While I'm not new to electronics (I've been playing with kits all my life), I've recently been building things out of electronic components more often. I've also noticed that a lot of people have power supplies at their "station", making it easy to build projects. I have a pair of AA batteries in holders that are perfect for powering an LED or two, but they don't do much with motors or arrays of LEDs, so I thought it was time to buy or build a power supply.
What I came up with is not perfect, but it will do for some basic tinkering. All of the critical components are cheap and available at RadioShack. However, before you even _start_ gathering materials, you should know that:
I am not an electrical engineer, and my knowledge comes only from _LIMITED_ practical experience. You will be working with things that could, if you misuse them, hurt you. If you decide to build this, TEST EVERYTHING before you start using it, and make sure that nothing is shorting before you plug it in. Also, USE A SURGE PROTECTOR! As far as I know surge protectors will shut off if they detect a short, so that might help you out.
I'm pretty sure that in the event of a short you're just going to fry your power supply and leave your house and wiring untouched, but one never knows. In any case, you've been warned.
OK, so materials:
-7805 voltage regulator
-LED (5v LED's are nice, 3v will work, but you'll need a resistor)
-Two wire terminals
-Radio shack 1.5v-12v power supply
-Veroboard/perf board/prototyping board/ whatever kind of board they call it
-A bread board
-A case for the electronics
You'll also need:
-Pliers (wire cutters)
-Wire strippers (Optional, real men use the scissors on a Swiss army knife)
-Hot glue gun and hot glue (also optional, but they help secure things)
-Soldering iron and solder
The glasses and desk fan are to keep you from inhaling solder fumes and to keep you from going blind. I've had a piece of solder shoot up and hit my glasses before. If I weren't wearing them I might be blind right now, and that wouldn't be much fun. It's a pain, but wear them.
Step 1: Step 1
Slip off the tip of the AD-DC converter, and leave yourself plenty of room still attached to the brick. You can throw the tip away if you like, we won't need it. Then strip and twist the wires.
I tested mine to see if it would work, and which wires were which. I also felt the wires and brick to make sure that they weren't heating up at an abnormal rate, indicating a short. I'm a little paranoid about shorts, it's one of my things.
Step 2: Build the Circuit
The circuitry here is pretty simple, it's just so that you have a light and a switch. Note: the switch is not represented in the circuit diagram. If you don't know how to add the switch yourself, then you should probably not attempt this at all. Sorry.
Yes, I know that the LED doesn't come on under 1.5v, and that it's dim at 3v and 4.5v, but I rarely use below 3v, and I know that if I don't have a light to remind me I'm going to leave it on. I could have just used a variable regulator for this project, and then used the 5v regulator solely to power the LED, but in Montreal all of the RadioShacks have been bought out by this dumb store called "La Source", which appears to have higher prices and no electronic components. Anyway, that's just my opinion (La Source, please don't sue me). I bought these components last time I was in Plattsburgh, before I though of this project.
If anyone knows of an electronic components store in Montreal, please drop me a line in the comments. I appreciate it.
Step 3: Solder It Up
Transfer to your veroboard and solder it up. Again, goggles/glasses and a fan are really good to have. I build a fan out of a PC fan hooked up to a switch and a 9v power supply. It's a 12v fan, but it goes fast enough to blow all the fumes away, and I hardly smell anything while it's on. There are all kinds of nasty things that happen if you breath in enough of these fumes, or so I'm told. Either way, they smell bad, so It's probably not a good idea to go breaking them in.
I left the switch and LED disconnected. Why? So I could mod them into a nifty case, of course (and because the switch doesn't have pins).
Step 4: Snip It and Seal It Up
Use a pair of wire cutters to cut out the veroboard. If you line them up with a row of dots it works best, and sometimes you can get a perfect square with only two cuts. Now use the hot glue to coat the bottom of the board.
You can leave it out if you like, but I like things in cases. I also don't like contacts capable of delivering 12v just lying on my desk, so I modded a case for mine. Now, being a diabetic, I use insulin pump sites, and mine come in these small plastic cases that were otherwise worthless... until now.
For those of you who have diabetes and use Insets, you can remove the white plastic inserter from it's package by grabbing the part that's connected to the case and ripping it out (be sure to bend the needle back first so you don't stab yourself). After you do that you need something to close up the bottom. I took the plastic from a package for one of those Ascensia disks, cut that out, and hot glued it to the bottom. It's pretty sweet.
I was planning on using an Altoids tin, but the switch didn't really fit, and I made the hole too big for it, so I decided to abandon that plan, and I'm glad I did because my new case works so much better... and I have so many more of them. (Non-diabetics: I go through one of these every 2-3 days, because I have to change my site that often. Therefore I have a lot of them.)
You'll also need to solder the wires for the switch and LED, and solder them to the circuit. You did leave the ground disconnected from your 7805 and your second terminal, right?
Step 5: Plug In, Enjoy.
Now screw the wires from your power brick into the right terminals on the board (I don't think it matters, but for convention's sake it might matter to you), and then the wires to go to your power supply into the other terminals (Or the same ones if your lazy and like having to deal with the difficulty of trying to get two wires to stay in the same terminal while trying to screw it in)
I'd try it at low voltages first. Your LED should come on at 3v. However, if the LED doesn't come on, unplug it immediately, and check your circuitry. This means one of two things, either your LED is dead or backwards, or you have a short, and you are rapidly killing your power brick. Examine everything with a multimeter, make sure the LED is going the right way, and then try again. Electrical fires are not fun, so make sure you don't start one.
Another note, I realized that the 7805 has a heat sink for a reason, and that my case was pretty much sealed, so I drilled a few vent holes just to cool things down a bit. I doubt I'll need them, but oh well.
I hope you enjoyed this, and please let me know what you think or ask me questions. Again, if you life in Montreal and know of a place to buy electronic components it would be awesome if you could let me know.