Sale ends todayGet 30% off any course (excluding packages)
Ends in --- --- ---
I’m interested in the CAN Bus course you’re offering, but I’d like to confirm that what I’m planning to do is actually possible before signing up.
My project involves a 1600cc turbocharged Mazda engine in a 700 kg, rear-wheel-drive (open diff) vehicle.
I’m running a MaxxECU Sport, which currently has all but one of its inputs in use. Have E throttle running,
My goal is to build an Arduino-to-CAN Bus adaptor for the Sport. the material cost for this is less than $100 so worth having a play with :)
The Arduino will handle the wheel speed sensors (Hall effect), convert those signals into CAN messages, and transmit them to the ECU. The car will have tooth wheels on both front and rear axles to measure wheel speeds.
I’ve been working with ChatGPT to generate the Arduino code and wiring diagram, and I believe the setup will mostly need fine-tuning in terms of the CAN message structure. the arduino code would be pretty much handled by AI, not bright enough to write that !!
Where I’m getting stuck is understanding exactly what data the MaxxECU Sport expects to receive for traction control to work correctly — such as wheel speed format, tooth count,Kph, wheel slip, could get arduino to do maths if reqd,
Any guidance on this would be greatly appreciated.
Hi
Made progress, loaded up the arduino with the chatgpt program, took a bit to sort library files or the .h files, once sorted compiled and loaded with no issues, so a good start. looking to get the canbus module connected and see if it broadcasts a can signal.
cheers
maxx has a rather open framework for sending messages, you would want to send whatever frequency input in a 2 byte value, unsigned integer (uint16_t) to the maxx from the arduino.
Note: you will need protection circuitry, as arduinos aren't gonna handle over 5v or 3.3v reliably,
Can an arduino do this? Yes, Would I recommend it for my very first project relying heavily on AI for it... you can try but it'd be better if you understood the architecture better.
the arduino sketch would be setup the following way.
setup pins,
include some sort of timer so you can keep up with triggering frequency,
determine the time between 2 pulses to get a Hz value, or 0 if no teeth have been measured since the time base...
Map that Hz value across the device to a CAN message,
Send that CAN message at 100hz.
Caveats? this is a VERY basic implementation that would need refinement.
doesn't include features such as sample averaging, glitch/hysteresis/debounce, predictive tooth analysis, etc..
Hi mitch
The power supply will be feed via voltage modules, and inputs will be going thru opto isolators,
I understand that relying on AI could /probably problematic, but the overall cost ,gnoring my time is currently under $30,
I will take your comments and put them thru AI and see what it comes back with, It seems pretty capable,
The various sketches it has supplied so far, all loaded up and ran with no issues, will keep updating as I progress.
Cheers
Hi mitch
The power supply will be feed via voltage modules, and inputs will be going thru opto isolators,
I understand that relying on AI could /probably problematic, but the overall cost ,gnoring my time is currently under $30,
I will take your comments and put them thru AI and see what it comes back with, It seems pretty capable,
The various sketches it has supplied so far, all loaded up and ran with no issues, will keep updating as I progress.
Cheers
quiet day at work, put in your comments about sample averaging etc , and this is what i gave ended up with, about a week till I get all the components together to see if it actually works :)
Each wheel sensor (FL, FR, RL, RR) will have its own:
Sample Averager: configurable moving average window
Glitch Filter: ignores short-duration spikes
Hysteresis / Debounce: stabilizes the output to prevent rapid toggling around a threshold
Timeout: detects if a sensor stops updating
CAN transmission: sends averaged wheel speeds + derived slip at 20 Hz (configurable)
All parameters (averaging window, debounce ms, hysteresis %) will be adjustable via the serial command interface, e.g.:
set avg 5 // average over 5 samples
set debounce 20 // debounce time 20ms
set hyst 0.05 // hysteresis 5%
save // store to EEPROM
⚙️ Hardware Used
Arduino UNO / Nano / Mega / ESP32
MCP2515 CAN module (TJA1050 transceiver)
4× Hall or VR-conditioned digital wheel speed inputs
🧩 Coming Code Package
When finished, you’ll get:
main.ino — Arduino sketch
MaxxECU_CAN_Perf.h — auto-generated CAN header
filters.h — reusable library with averaging, debounce, and hysteresis per channel
Watch this space
Peter