This instructuable will show you how to build your own vehicle-based regulated power supply that will power an Arduino or any AVR up to 5V. It's an inexpensive and easy to build project that you can have up and going in no time, and additionally, with very few external components. This device makes use of your car's cigarette lighter socket for power and then performs a DC/DC step-down to 5Vs while regulating the power.
Go to the next step to get started!
Step 1: Bill of Material
What You'll NeedAs I mentioned in the intro, this project has very few requirements or external components. Here's what you'll need:
- Auto power plug (www.mouser.com #171-A1378-EX $2.33)
- 0.1uF 0805 capacitor (www.avnet.com #08051C102JAT2A $0.09) (Thanks to David O. for correcting this part #)
- 0.33uF 0805 capacitor (www.avnet.com #0805YC33rKAT2A $0.04)
- 1uF 0805 capacitor (www.avnet.net #08053C105KAT2A $0.10)
- 5V regulator DPAK MC7805CD (www.avnet.com $0.22)
Various SundriesBesides the items mentioned above, you should have a soldering iron, solder, maybe some flux, tweezers, wire cutters, snippers, crimper, etc. But you probably already have this stuff laying around.
Turn the page to get started on the design.
Step 2: PCB Design
OverviewThe design here is very simple and follows a standard linear power regulator setup. We take in the 12V or so from the car and pass it to a 5V linear regulator with a few capacitors attached to handle transients and unwanted frequencies, helping to reduce ripple voltage in the output. Finally, we output this regulated 5V through a set of wires that will connect to the Arduino or AVR board.
Schematics and BoardCheck out the included pictures of the schematic and board to get an idea of how this is all setup. It's very straight forward and shouldn't offer too many surprises for those of you that have built your own power supplies for microcontrollers before. Also, find attached the actual schematic and board file (*.sch and *.brd) for use in Eagle, if you want to change or modify anything. Finally, if you do choose the option of having your board custom fabricated, I've also attached a zip file of the necessary files you will need to send to Seeedstudio to have them build the PCB. From time of order to the time I received my PCBs was about 2 weeks. Cheap and speedy.
Step 3: Build It!
Solder PCB ComponentsI started off by soldering the components on the top of the board. This includes the 0.33uF capacitor and the MC7805 voltage regulator (in DPAK package). I found it helps if you pre-solder the pads, as shown in the picture below. Then you can use tweezers to place the capacitor over the soldered pads and use your soldering iron to melt the solder and secure the capacitor in place. Same goes with the voltage regulator. You may want to add a ribbon of solder around the top edge of the voltage regulator after its been secured.
Next, flip the board over and do the same on the bottom side. Pre-solder the pads, then use tweezers to locate the capacitors where you want them and use your soldering iron to melt the solder to secure the connection.
N.B. None of the capacitors are polarized, so it doesn't matter how you place them on the pads.
Car Power ConnectionWith the PCB components securely soldered in place, next we turn to the car-to-board section. I cut two wires about 1.5" in length and stripped about 3/4" from both wires and then the normal amount from the other ends (for the solder pad holes).
N.B. The center pin is the positive (+) and the side clips are negative (-).
Note that the cap of the auto plug (ie cigarette lighter plug) pushes in and on the opposite side it raises a metal rod. This is what you will wrap the red wire 3/4" stripped around. Just push in the detent and wrap tightly then depress. It should hold itself in place quite well. Check out the picture below.
Move on to the metal clip. Wrap the longest stripped portion of your black wire around the straight center bottom of the clip and secure as best you can. Now, what I did next was to coat the wrapped portion in solder flux and solder it to the clip. You can see this in the pictures below. Once you have done these two things, you are ready to solder the other ends of the wires to the PCB. Solder the red (+) wire to the 12V pad and the black (-) wire to the GND pad as shown in the picture below.
Arduino/AVR ConnectionCut a red and black wire to about 13". Strip one end of each and thread them through the back of the main plug housing. Check out the picture below. Now solder each wire to their respective solder pad: red to 5V pad and black to GND pad.
Grab the wires from the back of the plug housing and pull them until the board fits inside the housing and the negative clip sits in its groove. Squeeze both sides of the clip and screw the top of the housing onto the plug. Check for any protruding wires and slip them back in if necessary. Now is an opportune time to test your creation. As you can see in the picture below, after plugging the auto plug into a car outlet, the output is 5V as read on my multimeter. That's a good sign!
If you're dying to try it out, go ahead and connect your red wire to the 5v header and the black wire to the GND header on your Arduino. It should power up and start executing whatever code is in its flash.
The rest is optional, but I think it really polishes your creation if you do it. Take the next step!
Step 4: Conclussion
Shrink Wrap the WiresIf you are unfamiliar with shrink tubing, it's a plastic-like tube that your wires go into that, after the appropriate heat is applied, shrinks to fit your wires like a glove. It not only helps protect your wires, but gives it a more professional appearance.
N.B. You can get shrink tubing from almost any electronics shop. They come in different diameters so get one that is appropriate for two wires.
Go ahead and slip your two wires through the appropriate length of shrink tubing, leaving maybe an inch or so of wire exposed at the end. Grab your hair dryer and blast the shrink tubing until it shrinks tightly around the wires.
Crimp the Wire EndsNow, what to do about these frayed ends? Why, crimp them, of course! To do this you'll need crimping ends and a crimper. I got a nice package of crimping ends from www.futurlec.com for cheap. You'll want to strip the ends of the wires and then trim it down to fit into the crimped end. Next, fit the wire into the crimped end and use a crimper to secure the crimp to the wire. Do this for both wires.
As an added piece of stability and security for your crimped ends, I coat the small exposed portion of wire with flux and solder it. This ensures a good connection and provides a bit more strength to the crimped end and reduces the chance it will come off.
Check out the pictures below.
I hope you enjoyed this instructable, and if so, don't forget to rate it. As always, I am open to your suggestions and questions about this project or any of my other projects on this site.
Have fun building!