DIY Traction Control
- johu
- Site Admin
- Posts: 6735
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 378 times
- Been thanked: 1559 times
- Contact:
DIY Traction Control
Finally got the chance to test traction control on snow today. See for yourself
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- Proton
- Posts: 306
- Joined: Sat May 06, 2023 2:23 am
- Location: Georgia/US
- Has thanked: 184 times
- Been thanked: 43 times
Re: [DRIVING] VW Touran powered by Nissan Leaf
So that traction control is done by the Car VCU correct? by applying the brakes?
- johu
- Site Admin
- Posts: 6735
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 378 times
- Been thanked: 1559 times
- Contact:
Re: [DRIVING] VW Touran powered by Nissan Leaf
What you see is done by cutting back throttle and yes that is done by the VCU: https://github.com/jsphuebner/stm32-car ... r.cpp#L416
It's only when one side spins faster than the other that ABS applies brakes.
It's only when one side spins faster than the other that ABS applies brakes.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 3566
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 134 times
- Been thanked: 336 times
- Contact:
Re: [DRIVING] VW Touran powered by Nissan Leaf
How do you use that, as a discrete input to OI or reported over CAN bus?johu wrote: ↑Thu Jan 09, 2025 7:21 pm What you see is done by cutting back throttle and yes that is done by the VCU: https://github.com/jsphuebner/stm32-car ... r.cpp#L416
It's only when one side spins faster than the other that ABS applies brakes.
There are many possibilities of using ABS/ESP signal and if your vehicle has traction control it should definitely be wired to remove torque/regen on application for just such snowy cases.
But using traction control outside OEM application is dangerous and should be done using redundancies such as removing torque/regen in the case of loosing ABS/ESP keep alive signal etc...
I would like to know more about this particular OI ABS/ESP application. Can you elaborate on your Patreon or maybe here under a separate thread?
tnx
- johu
- Site Admin
- Posts: 6735
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 378 times
- Been thanked: 1559 times
- Contact:
Re: DIY Traction Control
It's all CAN based. Wheel speeds come in via CAN and then throtmax/throtmin is modified (via CAN) to throttle regen or acceleration.
The code I linked above calculates average axle speed from the two wheels speeds. A certain difference is allowed (in the test 3 kph during acceleration and 2 kph for regen). If that is surpassed throttle is cut back 7%/kph with P-controller.
This may not be aggressive enough, probably PI-control would be preferable and not oscillate as much (did you see the snow flying like a mole is digging?)
There is indeed a CAN bit that indicates ESP is disabled, either by pressing the dash button or if there's a fault. Right now my reaction is to disable traction control entirely. I think it would indeed be a good idea to disable regen in that case.
The code I linked above calculates average axle speed from the two wheels speeds. A certain difference is allowed (in the test 3 kph during acceleration and 2 kph for regen). If that is surpassed throttle is cut back 7%/kph with P-controller.
This may not be aggressive enough, probably PI-control would be preferable and not oscillate as much (did you see the snow flying like a mole is digging?)
There is indeed a CAN bit that indicates ESP is disabled, either by pressing the dash button or if there's a fault. Right now my reaction is to disable traction control entirely. I think it would indeed be a good idea to disable regen in that case.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 3566
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 134 times
- Been thanked: 336 times
- Contact:
Re: DIY Traction Control
I am thinking on using ABS alive signal from computer to remove regen in Peugeot and Mazda. But i am not that far yet i would need to find the signal pins pn the Pug.johu wrote: ↑Fri Jan 10, 2025 11:35 am It's all CAN based. ....
There is indeed a CAN bit that indicates ESP is disabled, either by pressing the dash button or if there's a fault. Right now my reaction is to disable traction control entirely. I think it would indeed be a good idea to disable regen in that case.
Its not that simple though! Both cars are halfh mux which means ABS is a digital ON/OFF signal not CAN bus.
On Mazda i already broke ABS when i converted it the second time and now it wont come on, i dont know what is wrong. When i test the pump and computer i get good pressure and signal to the pump. Must be some wire i cut???
Re: DIY Traction Control
My understanding of modern ESP systems is that the ESP computer can calculate a maximum torque value and sends this to the engine computer.
The ESP computer knows live wheel speeds, as well as having some accellerometers for yaw etc, and is provided current engine torque over can. When it detects slip/instability and wants to intervene it computes a maximum desired torque from all the available inputs and sends this back to the engine computer. The computer then responds by reducing engine torque to the limit from the ESP system.
This allows the whole system to operate in a very seamless manner. I had a E90 330d for a while with a remap meaning massive torque and it was always amazing how you could floor the throttle in any conditions and the car would just go. ESP would cut the torque just enough to keep the wheels at the limit of traction.
In modern EV's the ESP system also gets involved with regen. If it detects instability during regen it will tell the ECU to cut or reduce the regen. I used to get this quite often in the LEAF where i'd hit a drain cover on a motorway slip road while at full regen. The slippy cover would trigger the ESP system to cut regen. I'm not sure if an older ICE ESP system would understand the concept of negative torque/regen though, they would have to deal with engine braking so it may be the case that they do.
It would be very nice if the VCU could interact with these factory ESP signals and respond appropriately.
The ESP computer knows live wheel speeds, as well as having some accellerometers for yaw etc, and is provided current engine torque over can. When it detects slip/instability and wants to intervene it computes a maximum desired torque from all the available inputs and sends this back to the engine computer. The computer then responds by reducing engine torque to the limit from the ESP system.
This allows the whole system to operate in a very seamless manner. I had a E90 330d for a while with a remap meaning massive torque and it was always amazing how you could floor the throttle in any conditions and the car would just go. ESP would cut the torque just enough to keep the wheels at the limit of traction.
In modern EV's the ESP system also gets involved with regen. If it detects instability during regen it will tell the ECU to cut or reduce the regen. I used to get this quite often in the LEAF where i'd hit a drain cover on a motorway slip road while at full regen. The slippy cover would trigger the ESP system to cut regen. I'm not sure if an older ICE ESP system would understand the concept of negative torque/regen though, they would have to deal with engine braking so it may be the case that they do.
It would be very nice if the VCU could interact with these factory ESP signals and respond appropriately.
- johu
- Site Admin
- Posts: 6735
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 378 times
- Been thanked: 1559 times
- Contact:
Re: DIY Traction Control
Yes that was the plan but I never understood the system to that extend. I should do some CAN logs the next time I get a chance but the snow is already melting

Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 748
- Joined: Thu Mar 02, 2023 1:30 pm
- Location: Uk
- Has thanked: 403 times
- Been thanked: 116 times
Re: DIY Traction Control
I got some CAN logs yesterday on my 2005 VW T5 transporter whilst driving on ice so might be usable for the Touran.
I will upload them this evening as they are on my personal laptop at home.
I will upload them this evening as they are on my personal laptop at home.
-
- Posts: 3566
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 134 times
- Been thanked: 336 times
- Contact:
Re: DIY Traction Control
Hm... is there any enable byte in CAN telegram for ESP function? For start we could simply use it to enable or disable regen ramp. The same for ABS...
By the way you can test ESP on water also. I noticed on a level road such a parking lot if you pour a lot of water on the road ESP will be very active...
-
- Posts: 156
- Joined: Tue Jun 15, 2021 5:44 pm
- Location: Finland
- Has thanked: 39 times
- Been thanked: 10 times
Re: DIY Traction Control
I've been testing same with ZombieVerter, best result with only P-control is not to have oscillation like in video. For gs450h BMW I got with very low allowslip value of 1kph and increase P until it oscillate under acceleration and then back a bit. For regen lag same Kp value was ok with snow, but not nearly enough when road gets all ice even with studded tires.
I think this needs PI-controller and possibly separate values for acceleration and regen.
Traction control makes rwd winter driving really pleasure, it allows some amount of spin which is good - even nice controlled sliding sideways on snow is fun now

-
- Posts: 599
- Joined: Mon Jul 03, 2023 3:17 pm
- Location: CT, central shoreline, USA
- Has thanked: 218 times
- Been thanked: 178 times
Re: DIY Traction Control
There's some info here on how racelogic was doing this back in the day with ice vehicles that might help.
https://www.racelogic.co.uk/_downloads/ ... l-v3.2.pdf
https://www.racelogic.co.uk/_downloads/ ... l-v3.2.pdf
Re: DIY Traction Control
I was planning to implement it in my BMW E46 ev conversion but still have to work on mechanical part.
Here is how traction control worked before removing engine: https://github.com/maciek16c/BMW-E46-ev-conversion
There are can logs of enabled and disabled system, full dbc file and savvycan graph defiinition to easily see used signals.
It's two way communication. Engine ecu sends real wheel torque, theoretical one without traction control and throtle position to DSC and DSC responds with torque limit % or required positive engine torque while slipping due to engine drag on ice/snow. There are also flags which show if specific intervention is required and also overall DSC status.
Here is how traction control worked before removing engine: https://github.com/maciek16c/BMW-E46-ev-conversion
There are can logs of enabled and disabled system, full dbc file and savvycan graph defiinition to easily see used signals.
It's two way communication. Engine ecu sends real wheel torque, theoretical one without traction control and throtle position to DSC and DSC responds with torque limit % or required positive engine torque while slipping due to engine drag on ice/snow. There are also flags which show if specific intervention is required and also overall DSC status.