Hi, everybody, my question is simple. Is it possible to control 2 brushed DC motors, with the same power supply?, i think yes, but how? How does a R/C car work with only one power supply?
But using a ESC is for high current motors isn't it, these are my motor specifications: Stall current 800mA, Free run current 70 mA, i posted this question because everywhere i've read about H-bridges it says that i need a separate motor voltage, and it seems kinda useless doing a simple robot with 2 power sources, one for the logic and another for powering the motors.
if you regulate it to 5V for uC and logic then feed main power supply to your motor driver you can use 1 battery ,the thinking behind 2 battery's is to stop voltage drop when your motors fire up and prevent you uC resetting each time they do,
Your original post didn't say anything about controlling logic on the same power supply as your motors, but no problem. I'm sure the reason why you are reading information stating you must use different power supplies for logic and motors is because microcontrollers and motors are commonly run at different voltages and it prevents power surges from motor stalls from dipping the voltage low on the microcontroller which causes it to reset.
It can be done without a whole lot of trouble, assuming your motors use equal to or greater than the voltage of your microcontroller. Typically you will run the motors (H-bridge) directly from a battery source so you can get as much current as the motors like (basic voltage regulators tend to max out at less than 1 amp of current). You can connect the microcontroller to the output of a voltage regulator which gets its input voltage from the same battery source as the motors/H-bridge, just make sure there is a decent size capacitor on the voltage rail for the microcontroller to provide temporary relief from power dips caused by the motors stalling. I suggest also using a stronger pullup on your microcontroller reset line than the weak internal pullup resistor and also putting a small cap (about 0.1uF) between Reset and ground near the reset pin of the microcontroller to eliminate noise from the motors that could cause it to reset. Also make sure you are filtering noise on the motors using small capacitor(s) and using schottky diodes to suppress back EMF from the motors.
thank you very much guys, my problem was that if i'm using only one power suply the voltage dropes to 0V every time i change the direction of the motor , i wasn't using pwm , but now using pwm i solved that problem, thanks for your comments guys.
much better than mine :)
Connect both motors between power and ground of your voltage supply and they will both turn -> the motors are in parallel. The principle remains the same when using multiple H-bridges for bidirectional control of multiple motors (the H-bridges are essentially in parallel with one another).
One easy way is to get two ESC (google if you do not know what I am taliing about) - they'll take power from your main power source, and even feed your microcontroller with 5V on the same wires as you use to control them - with standard servo signals.