I bought a cheap "wire controlled" car to make a arduino controlled car. Here is the picture of the car:
It is really cheap and simple. A DC motor on the back for moving forward/backward and a DC motor on front to turn front wheels.
Since they use a simple DC motor on front, they use a gearing on top of the motor axes but they do not glue it. So when user try to go right, the motor push to the right util the max position, then the motor axes declutch from the gearing. So in max position, the gearing is blocked and the axes still turn.
The problem is that the car is quite old and now it declutch all the time. I can't really turn front wheels.
My plan is to glue the motor axes to the gearing and add two lever switch to detect the max positions to stop the motor when needed:
I will have a motor driver controller board to manage both motors. I wonder if there is a circuit that can use my two switches to modify the command signal (when signal is "turn right AND motor is in max right position" > no signal, when signal is "turn right AND motor is not in max right position" > normal signal) or if I have to use my switches as input of my arduino to control the signal from arduino code.
Add limit switches to the gearing, so that you can know when to stop the motor.
Or, depending on your skills, add a trim-pot to the motor axis or gearing, from which you can read the actual position (angle). That's how servo motors find their positions.
Thanks for your answer. I was speaking about switches to know when to stop the motor but I prefer to not have to manage it in the code. That's why I would prefer a circuit that handle that.
Can this works:
Instead of driving the motor directly with the digital pins, I could place my limit switches in the command circuit to cut the current when the switches are closed when the limit position is touched (I have normally opend/closed pins). So my arduino have only to set pin X UP to go right for instance and when the motor reach the limit position it automatically simulate pin X DOWN.
When the motor reaches the left limit, it must still be possible to move it to the right. That's impossible if the limit switch simply disconnects the motor from power. It's possible, of course, but only with manual steering or a couple of relays.
Most people who read the Motors Mechanics and Power section also see this section so I don't think it would make any difference if your Thread is moved.