Let's Make Robots!

Once you've decided on batteries, how do you regulate the voltage?

Regulate voltages in your robot.
DSE200405_catalogue_data.pdf1.02 MB
LM2940CT-5.pdf409.32 KB
LM7805.pdf1.7 MB

Recently I've noticed some people are a bit unsure of how to regulate their robots batteries and since there was a tip/walkthrough on batteries recently I though this might be a good time to explain voltage regulation. Since robots and their power requirements vary so much I've presented several general purpose schematics showing different configurations. These should work with most of the robots I've seen on this site. Note that a heatsink should be used on the regulator. I've attached data sheets for the regulators.

To begin with the most common configuration is a battery with a voltage greater than 5V and a simple 5V regulator.

I've notice many people use a 9V battery so that is what I've shown here. The large electrolytic capacitors (470uF) help the regulator deal with big surges in power such as a heavy load being turned on. The smaller capacitors help filter out noise and spikes. This setup cannot produce a lot of current due to the battery. A 8.4V NiMh or NiCd rechargeable battery is the way to go here as it saves you money and can usually deliver more current for longer.

This setup isn't very efficent because up to 4V is dropped across the regulator. If your circuit is drawing 100mA at 5V then it uses 5x0.1=0.5W of power. If you are using a 9V then 4V at 100mA = 0.4W is wasted as heat by the regulator and a small heatsink may be required. Once again the rechargeable is a better choice as it will only waste 0.34W of power.

This is a more efficent design that can deliver more power. It also has a 6V output for servos, motors, relays etc. You can use 4xalkaline batteries or 5xNiMh. I recommend 5xNimh as they last longer and the voltage stays at 6V almost to the end where as the alkaline batteries will steadily drop in voltage. I've used a low dropout regulator for efficency. The popular 7805 needs the input to be at least 2.5V higher than the output for reliable opperation. This LM2940CT-05 will work reliably with an input just 0.5V higer than the output. As I mentioned before, the more a regulator has to drop the voltage the less efficent it is.

This is another variation using a popular 7.2V NiCd or NiMh battery pack from a radio controlled car. This circuit gives you 7.2V for bigger motors. I've used two power diodes in series to give you a 6V supply for servos. Each diode will drop about 0.6V and will handle up to 1A, together they drop aprox. 1.2V. If you need more than an amp for servos then bigger diodes can be installed. You may want to install a fuse as well since those battery packs can put out a lot of current if a motor stalls.

This is a typical setup with two batteries. I've shown a 12V car or SLA battery as might be used in a big robot like Walter. I've also shown a 9V as in some cases a 9V supply can be handy for op-amps. You can use whatever batteries suit your needs. The batteries shown in these circuits are just typical examples.


These are typical capacitors I use in my circuits.
I've shown them here for those who are uncertain what capacitors to use.

At the top you can see two electrolytic capacitors. These capacitors may be a different colour but will always have the polarity marked on them. Note in the photo that a negative symbol is shown in an arrow pointing to the negative lead. Usually the negative lead is a bit shorter than the positive as well. They also have a voltage rating on them. Never exceed this or connect them the wrong way around as the can leak a foul substance.

The next down is a greencap, polyester or mylar capacitor. They are not always green but reguardless of their name they work the same. The capacitor in this picture is a 0.1uF and could be used in the above circuits. This capacitor is not polarised (no plus or minus) and is rated up to 100V.

The smaller grey capacitor below is a modern equivalent called a MKT or minature polyester. It is the same as the greencap above in value and voltage rating but noticably smaller.

At the bottom is a monolithic ceramic capacitor which is what I tend to use these days. These capacitors have a lower ESR (equivalent series resistance) that allows them to charge / discharge quicker and filter higher frequencies. The capacitor in the picture is also a 0.1uF and non-polarised. It has a rating of 50V.

I've attached a general purpose datasheet from Dick Smith Electronics that has good information on electronic components in general including a section on regulators.

Our friends at SparkFun has a good article on capacitors here: https://www.sparkfun.com/news/1271


Finally a brief mention on DC-DC converters. As mentioned above, the more voltage a regulator has to drop the less efficent it is. When you need to use higher voltage batteries such as the 24V I use for BoozeBot then regulators are bad news. They can deal with input voltages in excess of 30V with suitable heatsinks but to get 5V at 1A from a 24V battery means 19W of power would be wasted as heat to give me 5W of usable power or just over 20% efficency. This is where DC-DC converters are well worth the money as they are usually 80%-90% efficent depending on load and design.

This photo shows the 3 DC-DC converters used in BoozeBot. The two converters at the top are kits I bought and assembled. They can put out in excess of 2A each. The 6V output is regulated down to 5V where necessary and the 9.5V output is for an ASUS Eee-Pc. These kits were reasonably priced and because you make them yourself they can be setup to produce almost any voltage. Both of mine reduce the voltage but they can be made to increase the voltage as well. At the bottom is a bought unit. It can produce about 10A and will run BoozeBots arm motors.

I hope this information is helpful. Good luck and enjoy!


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I'm a total noob at electronics

and I DO mean total noob

so let me see if I get this straight?

I can use the second example from the top with a 6v battry pack and connect the 5V out to, say, the input of my Picaxe chip

and use the 6V for the extra power input on the chip that supplies the servos. And get a steady current that doesn't dip and mess things up when the servos start moving?


I'm confused by your reference to the extra power input on the chip? I assume your talking about a starter kit (PCB) with a picaxe mounted on it?

oh sorry

yes, that's it


the picaxe 28X starter kit has an input for external power that delivers power to the servos

right now I have to have two battery packs to power my robot when I use servos which produces a serious weight problem

I don't have a starter kit but from what you say then yes. The 2nd circuit would let you use one battery pack.


this'll be great for my next project.



Very interesting.. I have a question: why do i need capacitors both before and after the regulator? Isn't it enought to have them in one place ?

Sometimes, you'll see people building circuits where they've left out the capacitors.  Usually, these circuits work.  But if the data sheet says to fit them, then there's a good reason for it, so it's always best to fit cpacitors to both input and output.  In some cases, some of the time, at certain temperatures, the regulator can oscillate if the capacitors are missing.  Such oscillation will make your robot behave very strangely -- not all the time, but just enough to be annoying!
If you read the data sheets on regulators they show capacitors on both sides.  The capacitors on the input help filter power prior to regulation, in my circuits where motors/servos are connected to the battery (2nd and 3rd circuit) they also filter com noise. On the output they help the regulator deal with spikes/surges created by the load.

This explains a lot! Very good to finally have a good voltregulation tutorial on LMR. 

A few questions.

Why do you use 470uF caps around the regulator? I've seen walkthroughs on other sites that use 10uF or 20uF. Am I correct in asuming that a larger cap will be able to handle a larger surge, but will take longer to charge (i.e be usefull) ?? Any way to determine the optimal value?

Also, isn't it common to place a fuse before the powerswitch? I don't think it would really matter, but some say the fuse should be as close to the battery as possible. 


Remember I'm trying to design general purpose circuits that should work with any of the robots I've seen on this site. I've chosen components based on experience and simplicity. The regulator circuits show should power any picaxe, atmega or arduino along with status leds and support IC's up to 1A with a heatsink. Note that power for servos and Hbridges are directly from the battery, not the regulator.

I only showed a fuse in series with the big battery so that if your motor stalled and blew a fuse your processor would still have power. You could put a fuse in series with every battery or voltage output, it depends on your robots design. I haven't show a fuse with the smaller batteries because I wouldn't bother, they're not dangerous enough. BoozeBot has one 40A fuse in series with the battery for emergencies and six smaller circuit breakers, one for each DC-DC converter and one for each 100W motor and it's drive circuitry in case a H-bridge fries.

With the capacitors it depends on how big a load is being drawn but since the regulator shown is only rated at one amp and a battery is being used, 470uF is probably overkill. If in doubt go bigger. I've shown circuits that should work with any of the robots I've seen on this site.