Power Regulation with the 278RA05C
This walk through is heavily based on OddBot's walk through, "Once you've decided on batteries, how do you regulate the voltage?" I highly recommend that you read that first. The only reason I'm posting my own version is to point out a few nuances in my own implementation.
OddBot recommends the LM2940CT-05 5 volt regulator above the very common LM7805. I had several 278RA05C low dropout voltage regulators, which have similar properties as the one OddBot recommends, plus higher current rating.
This regulator is designed for a 6V battery. I will use 4 AA 1.5V batteries, but you could use 5 AA 1.2V rechargeables instead. I plan to use this basic design for most of my robots, as I have the components to make three or four of them.
It is very important to use a heat sink with most of these voltage regulators.
Apply a thin coating of heat sink compound to the surface of the regulator that will be in contact with the heat sink. The heat sink I had needs to be attached with a screw and nut. Some types clip on instead.
Here you can see the components bread boarded. See OddBot's walk through for the circuit diagram.
I tried to keep everything tignt, to help me visualize how I was going to do the circuit board layout. Also, it is best to keep capacitors close to the components they are filtering.
Here's the regulator all wired up on a perf board. The wires on the right are the output. I scavenged some wires with jumper headers on them from an old PC carcass in my basement. This way I can easily connect them to my PICAXE project board. The Orange wire is "V2", which is directly connected to the battery. The red and black wires are "V1" 5V and ground, respectively.
The red and black wires on the left get connected to the battery supply. Since I have a power switch on my SHR robot, I connect the black wire to the battery ground lead, and the red wire to the switch. Then the battery + lead goes to the other side of the switch. This way, both the +5V and battery + get switched.
It is good practice to always switch the "hot", or positive voltage. If you switch the ground wire, you can accidently send power to your circuit if something on the board gets grounded.
Here's a closeup of the completed board. I was going to use the orange and yellow wires with the attached jumpers for connecting the regulator to the switch. However, they fit a bit loosely, so I just soldered them on and insulated the battery lead with shrink wrap to reduce chance of a short.
Be sure to check and double-check the output before you hook it up to anything you care about.
Here's the regulator board in position on my SHR robot. Sorry for the blurry pic. I'll replace it eventually with a cleaner one.
Well, that's it. The regulator is working great, and doesn't even get hot under load with the big heat sink I used.