I understand the concept of turning let or right just turn off one and leave the other one on and it will turn on direction , but this sort of stop-and-turn is impractical
like if you had to stop your car completely to make a turn, so i am assuming to turn while still maintain some minimal bit of drive , instead of stopping one motor completely, you just reduce the speed of it and you will get a turn, and the bigger the difference in speeds of both motor depends on how fast it will turn?
am i getting it right here?
because im making a little bot but i have not received the motors yet so i am just writing up some pseudo code right now and it revolves around this "reduction" of speed to turn as oppose to just having one motor high and the other off.
You need to decide how you are going to drive your motors, and if some form of software differential is feasible.
im going to pwm them with my arduino, with an external power supply obviously, and using a separate arduino with accelerometer and rf links to make a sort of tilting remote for it, i have the remote ready now my receiver part is yet to be determined , but the way i have it set up right now is i have a range of let say 200 to -200 because its hard to keep it flat at zero while holding it, so if its in that range its at a normal cruising speed, tild forward past that range and there is another range for speed 1 and then a speed 2, same goes for reverse and turning, now the turning part i was thinking when i reach range 1 reduce speed of one motor by 25% of the current forward speed it has, and maybe a 75% for second turning speed
Yes, you are getting it right. If you want your car to go i a straight line, you need to add the idea of 'trim' to your code, as no two motors / drivers are identical, so it will drift to one side or another.
The 'trim' will provide a constant offset.
eddiea6987:
I understand the concept of turning let or right just turn off one and leave the other one on and it will turn on direction , but this sort of stop-and-turn is impractical
like if you had to stop your car completely to make a turn, so i am assuming to turn while still maintain some minimal bit of drive , instead of stopping one motor completely, you just reduce the speed of it and you will get a turn, and the bigger the difference in speeds of both motor depends on how fast it will turn?
am i getting it right here?
because im making a little bot but i have not received the motors yet so i am just writing up some pseudo code right now and it revolves around this "reduction" of speed to turn as oppose to just having one motor high and the other off.
Well having separate PWM outputs for each motor allows one to do what you wish. However it's still not very precise unless you also have separate wheel rotation speed feedback to your sketch, usually using a encoder sensor on each wheel. Then you have all the information required to do smooth controls for turning at any speed.
Lefty
interesting this 'trim' concept is new to me, i will research this. as well as what lefty said
The other approach is to use a drive motor at the back and control the steering with a servo.
But your way sounds more fun ![]()
Depending on your wheel arrangement, you could still have it do some mad things spinning the drive wheels in opposite directions!
yeah i thought about that as well using a servo to turn, but i went for a caster wheel hehe, perhaps my next one , ill keep making and practicing until i can work my self up to an rc lawn mower , thats my main goal as far as rc goes.
Here is a picture of the finished remote for the two dc motors i was asking about earlier ![]()
top left: accelerometer and rx for tilt-control, not too practical but for the sake of learning
