RC Car Traction Control with an Arduino

  Рет қаралды 4,128

Indeterminate Design

Indeterminate Design

2 жыл бұрын

This video is about how to implement an automotive style traction controller for a radio controlled car using an Arduino (ESP32) and some hall sensors.
Check out the link below to view the source code for this project.
Github: github.com/indeterminatedesig...
#RC #Motorsport #Arduino

Пікірлер: 36
@PimpinPoptart06
@PimpinPoptart06 2 жыл бұрын
Super cool! I l forward to more videos
@torstonvodesil6709
@torstonvodesil6709 Жыл бұрын
All the stuff you are doing is what I want to do for my own diy rc car, nice to know it isn’t impossible
@IndeterminateDesign
@IndeterminateDesign Жыл бұрын
Yeah, it's actually amazing what can be done with these cars.
@chrisw1462
@chrisw1462 2 жыл бұрын
Regarding adding a 'slew rate' to the throttle control - A version of a PID algorithm would work great. Not sure if you'd need all three variables, but testing will give that answer.
@IndeterminateDesign
@IndeterminateDesign 2 жыл бұрын
Thanks! That makes complete sense. I was just adding a low pass filter to smooth the throttle, which is literally the derivative term. I'm fairly new to the control engineering and I hope this will be relatively easy to tune for different surfaces.
@ErichHaubrich
@ErichHaubrich 6 ай бұрын
Great work. I'm interested in this for my quad motor Latrax Rally 1:18 build, and my CineRipper AWD 1:10 Camera Car. I'm wondering if four-wheel traction control can work with all four ESCs. I'm also wondering if the capacitive touch sensor functionality on the ESP32 could be used in place of the hall effect sensors. Thoughts?
@dancoulson6579
@dancoulson6579 Жыл бұрын
I wonder if you could use 4 hall sensors. One on each wheel. And then compare the front left to rear left, and front right to rear right. This would allow for turning whilst still having traction control.
@IndeterminateDesign
@IndeterminateDesign Жыл бұрын
Absolutely. Four wheel sensors would allow for traction control when turning. This was really a prototype for me to develop a traction control algorithm for my RC streamliner that has a single rear wheel with too much power to control.
@ErichHaubrich
@ErichHaubrich 6 ай бұрын
Would you like to collaborate on a device for RC/Motorsports? I feel as though this could be an incredible product or open source project, especially if it were implemented on an ESP32, Which would add Wifi, BLE, and ESPNOW communication to/from sensors, ECU, ESCs, Phones, tablets, laptops, etc. ESP32 can also read CANBus and other data. This might also be able to talk to MegaSqirt or Carduino. It's worth a look.
@IndeterminateDesign
@IndeterminateDesign 6 ай бұрын
I'm working on this more with my RC Hypercar right now that has individual wheel motors and a 4:1 ESC. I also have magnetic encoders on each wheel. I think that's ultimately key. I implemented a bit better traction control algorithm on my last Streamliner, but it's limited by the resolution of just 24 magnets. The encoders are accurate to 0.3 degrees at 28,0000 rpm. The increased resolution allows for much finer control with these very fast reacting RC cars. Traction control for individual wheel motors is more complex. You can't rely on wheel speed sensors alone, you really need accelerometers and a full vehicle model to implement traction control. I haven't played with the capacitive touch on the ESP32 at all. I guess it would depend on their speed and sensitivity to electrical noise.
@adamyassine4210
@adamyassine4210 2 жыл бұрын
Does this traction control compensate for the front left wheel spinning faster than the rear left wheel during a turn? The car's center of turning circle is coincident to the rear axle, meaning that the front wheels have a larger turning radius than the rear wheels and hence cover a larger distance (think of the Ackermann steering geometry)
@IndeterminateDesign
@IndeterminateDesign 2 жыл бұрын
No, I touch on it in the video but this was setup primarily for straight line acceleration so that I could use it on my RC streamliner. It could definitely benefit from a more complex traction controller that takes into account steering angles and has wheel sensors on all 4 wheels.
@leighpettipas8601
@leighpettipas8601 Жыл бұрын
Question about your code>>there is a line in the "process traction control" loop: if (micros() - previousTractionControlMicros > tractionControlInterval) I don't see the previousTractionControlMicros ever being updated. When I do similar, i make the previous = current at the end of the loop. Just trying to figure out how yours works, and if I'm missing something. Thanks for the video and the code. My biggest take away is to evaluate TC every .01s....I think that was the key I need to make mine work. Mine is on a v8 race car, and im going to cut ignition and my inputs are throttle, rpm and gps speed....
@IndeterminateDesign
@IndeterminateDesign Жыл бұрын
Good catch, that was a bug. I made some last minute fixes. I just pushed out a new version of the code. I haven't really played with it much since the video but I do have a couple of lessons learned. There really needs to be an integral term to get the traction control to react faster, the version of the code that I just committed has this. On the race car you may need something more accurate than GPS for traction control based on tire slip ratio. I've seen it done with a combination of GPS and inertial measurement units, but it's a lot of work fusing that data together. Wheel speed sensors like I had on my RC car are generally the easiest and most accurate for 2wd cars. For drag racing you can get away with a rate based traction control which just looks at the rate of change of either wheel speed or driveshaft speed. You might look at how companies like Megasquirt and Haltech implement their traction control.
@leighpettipas8601
@leighpettipas8601 Жыл бұрын
Thanks for replying so fast, I’ll check out your new code… Yup, I’m trying to do it very simple…don’t want to add a lot of sensors. It’s a road race car, and I’m just messing around. I tried slew rate rpm, but I only get rpm from my aim dash at 50hz - it’s pretty slow. I’ve been studying some data from a wet session, and believe it or not (I didn’t at first), but rpm/gps speed shows pretty accurately wheel slip. We will see, I’m gonna write the code and tune it this race season. I did manage to implement no lift shift. I have a rev limiter with a hi limit and low limit, and with pwm, I can set the limiter anywhere in between - so I use it to shift cut and for pit speed. Hopefully I can make a simple tc system as well, that I can build on.
@tvathome562
@tvathome562 2 жыл бұрын
Very cool, so you'll be using traction control sensors for the abs as well? Also if you are going reapply throttle in a more gradual manner wouldnt there also be gains in a more gentle easing off the throttle when slip rate is too high? (or am I over complicating again)
@IndeterminateDesign
@IndeterminateDesign 2 жыл бұрын
Thanks. Yes, I can use the same sensors for ABS to detect when a wheel locks up. For re-applying the throttle, it’s gradual until the % slip falls under the maximum threshold and then the TC turns off and suddenly the car goes full throttle again which causes the wheels to spin. For the gradual part of cutting the throttle, I think you want to cut the throttle as quickly as possible to prevent overruns. The TC is cutting throttle proportionally to the % slip. An example is with a 10% max slip, if you just go full throttle and spin the tires, the TC will being cutting throttle at 11% and again a bit more at 12%, and so on but it can’t keep up perfectly with the wheel spin. There’s a delay due to only having 4 magnets per wheel and inertia of the motor and wheels will keep the wheel spinning. In a perfect world there would be no delays or inertia and the traction control could stop the slip at 10.001%. So I’ve been told by another viewer I most likely need to implement a full PID controller (proportional integral derivative if you’re not familiar). The integral term in particular looks at the cumulative error over time and would help cut the throttle faster. I hope that made sense and wasn’t too much of a random conscious stream of thought.
@tvathome562
@tvathome562 2 жыл бұрын
@@IndeterminateDesign thanks for the reply, I agree pid could be a good fit for this. Looking forward to the next video.
@Firashelou
@Firashelou 2 жыл бұрын
Great job ! I have a question why you chose not to run the tests on asphalt ?
@IndeterminateDesign
@IndeterminateDesign 2 жыл бұрын
I’m traveling in an RV in a very rural area so no real paved locations. I will definitely test the Streamliner on pavement with the traction control soon.
@Firashelou
@Firashelou 2 жыл бұрын
@@IndeterminateDesign ah ok i understand ! Good luck !
@xxxratixxx
@xxxratixxx 2 жыл бұрын
Thats really interesting
@ayhenterencio553
@ayhenterencio553 Жыл бұрын
Does adding more magnet can increase the resolution of the wheel speed data?
@IndeterminateDesign
@IndeterminateDesign Жыл бұрын
Yes. I’d recommend at least 12 magnets based on subsequent testing with my streamliner project. It smooths the response considerably.
@marcinpohl3264
@marcinpohl3264 2 жыл бұрын
What was the optimal slip % value for tarmac?
@IndeterminateDesign
@IndeterminateDesign 2 жыл бұрын
I don’t know yet. I don’t have access to a paved testing site right now.
@fredericpierron6999
@fredericpierron6999 10 ай бұрын
Hi, at the end do this project is working fine? Do you have any update on the code? You did a really good job, the code is crystal clear and well commented :D thank u
@IndeterminateDesign
@IndeterminateDesign 10 ай бұрын
I haven't made any changes as of yet. I have integrated it into another project and it's worked well. The biggest improvement comes from using more magnets (12+). The cars are easier to tune and much better performing when you have more accuracy.
@fredericpierron6999
@fredericpierron6999 9 ай бұрын
@@IndeterminateDesign Thanks for your answer, i analysed well the source and i don't arrive to figure out how the EMA fonction can work in your context because you never fill the "previousPercentSlip" static float? This stuff i don't understand ! but really nice work
@beachboardfan9544
@beachboardfan9544 2 жыл бұрын
If that hall effect sensor is what enables slip detection, how does it detect slip when 90% of the rim has no magnet on it?
@IndeterminateDesign
@IndeterminateDesign 2 жыл бұрын
There are 4 magnets on the front and rear wheels with the sensors. The sensors change state every time a magnet passes the sensor. The traction controller is updating every 1/4 turn of the wheel which is fairly often. Even at 3mph, or human walking speed, the wheel speed will be updated every ~0.1 seconds. The speed of the wheel doesn't change significantly in that time frame. If you notice the car when stopped has a tiny bit of tire spin before the traction control kicks in. More magnets would allow for finer resolution. A small amount of wheel spin initially can be beneficial. If you try in this in a full size car with traction control you'll notice the same thing, that the wheel will spin some before the traction control kicks in (Modern cars update between 20-25 times per wheel revolution).
@beachboardfan9544
@beachboardfan9544 2 жыл бұрын
@@IndeterminateDesign O damn, missed that, thought from that one shot it was just one magnet on the wheel.
@surfacta
@surfacta 5 ай бұрын
how do you deal with front wheel speed of 0? shouldnt it create infinite slip and mess with throttle when the car is idle?
@IndeterminateDesign
@IndeterminateDesign 5 ай бұрын
Traction control doesn’t turn on until I think 25 rpm is sensed. The whole setup would be better with more magnets. My later implementations use either 24 magnets or an encoder. The finer the resolution of the wheel speed, the faster and more accurately the traction control can react, particularly at low speed.
@bryanhutson6741
@bryanhutson6741 Жыл бұрын
Could be a good place to implement a PID.
@1danny2k
@1danny2k 3 ай бұрын
I want to use this for a real 4x4 car. To use brakes on a wheel when it starts slippin
RC Hypercar Hypercar Project Pt1
11:37
Indeterminate Design
Рет қаралды 3,2 М.
RC Car Active Suspension - Test Rig Pt4
10:08
Indeterminate Design
Рет қаралды 4 М.
39kgのガリガリが踊る絵文字ダンス/39kg boney emoji dance#dance #ダンス #にんげんっていいな
00:16
💀Skeleton Ninja🥷【にんげんっていいなチャンネル】
Рет қаралды 8 МЛН
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 14 МЛН
What Traction Control Button Does & When to Turn it Off!
5:25
AutoJeff Reviews
Рет қаралды 856 М.
RC Hypercar V2 - Failure is an Option!
17:14
Indeterminate Design
Рет қаралды 1,6 М.
RC Car Extreme Aerodynamics
12:44
ProjectAir
Рет қаралды 1,3 МЛН
F1 Car v Radio Controlled Car: DRAG RACE
12:49
carwow
Рет қаралды 4,9 МЛН
This Car Travels Farther Than You Push It
13:42
Tom Stanton
Рет қаралды 2,9 МЛН
RC Hypercar Pt8 - World's Best Handling RC Car?
17:33
Indeterminate Design
Рет қаралды 2,8 М.
EDF Powered Jet Car - High Speed Aero Stability
15:00
rctestflight
Рет қаралды 1 МЛН
RC Car Active Suspension System - Pt3
13:24
Indeterminate Design
Рет қаралды 4 М.
Driving an RC car over 60mph using my racing simulator (4G)
7:20
Mohammad Adib
Рет қаралды 1,4 МЛН
I Built a Sun Tracking Solar Charger
14:15
Axel Made It
Рет қаралды 84 М.
Гайцы чуть не устроили ДТП #автохам #shorts
0:18
Не хватило бензина встал на трассе
1:01
чоооооооооооооо
Рет қаралды 1,4 МЛН
Сравнил два перфоратора🤯
0:29
FilmBytes
Рет қаралды 1,4 МЛН
Злая Ауди vs Пассат! Оживление корча и заруба на треке!
1:28:47
ИЛЬДАР АВТО-ПОДБОР
Рет қаралды 1,4 МЛН