Powering Robots

I am doing Robotics projects, at first I start I started with wall follower Robot using Two ultra sonic sensors, my code is perfect. but I faced the problem in powering. At first I used separate power supplies : one supply for pro mini and for motor driver Ic, second supply for motor driver IC 12v to power motors
during this condition my robot did not run in forward condition(too slow trying to move), but it runs in backward condition(average speed).

but when I provided them all with the single power supply source (for pro mini(5v), motor driver(5v and 12v) its runs efficiently. and I have achieved what I want.

still I did not understand the concept of supplying power to robots, as I have read from website we should provide separate supply for 12v motor and separate supply for other electronics components.

Plz provide me the clear understanding on this.

I usually power my bots with one supply, but it's perhaps 2 x lith at 3.7v each or 4-6 AA rechangeables. This goes direct to the motor driver board or module (I like the small DRV 8833 etc) then to the Vin pin on the arduino, where the on-board regulator sets it to the 5v needed.

Remember that motors need 100's of Ma's or even Amps when stalled, small or cheap batteries will not last long or even be able to supply this! See my website for my bots, If I can help: www.melsaunders.co.uk under electronics.

Show us your schematic and code for more help.


Thanks for your reply, I am using NiMH batteries (12v and 1600 Mah). Motor driver IC is L293D and 12v motor. I have attached the code.

wall_code…txt (3.1 KB)

No, you're using a 12V 1600mAh battery.
Or at least I assume you are.

Did you connect the ground pins of both supplies together and did you connect all the ground pins of the L293D? My best guess is one of the ground pin either wasn't connected or had a poor connection so current flowing in one direction was blocked, but in the other direction it flowed freely.

When using separate power supplies you almost always want to connect the ground pins of both supplies together. The only time you will normally not connect the grounds is when you are isolating your low voltage circuit and people from the high voltage side. Normally this would be done using opto-isolators. There are other circumstances but they are not normal for the kinds of circuits on this forum.

There is no reason you shouldn't be able to power the Pro Mini and VCC1 of the driver by one supply and VCC2 with a different supply.

Thank You, May be grounding could be a problem when I connected both with different supplies. Because It works fine When connected with the single power source.