We use batteries to power a lot of our electronics. But there are some battery powered devices that don't necessarily need to be portable all the time. One example is my son's battery powered swing. It can be moved around but it usually stays in the same general area. In cases like these it might be nice to power these devices with an AC adapter and save the batteries. So in this project, I am going to show you how you can use an old power adapter to power your electronics in place of batteries. I will share how to modify the adapter and two different ways to connect it to your electronic devices.

Step 1: Use a Voltage Regulator Circuit to Set the Output of the Power Supply to the Appropriate Voltage

It is very rare to find a power supply that will perfectly match an electrical appliance unless they are sold together as a pair. So we are going to have to modify our power adapter to match the circuit that we want to power. The easiest way to do this is to use a variable voltage regulator such as a LM317. The typical configuration for this kind of circuit is shown in the picture above. This regulator uses two resistors to set the output according to the formula: Vout=1.25*(1+R2/R1).

For most applications this circuit can be simplified a little bit. The capacitors are only needed if your load circuit is sensitive to small power fluctuations. So in many cases, these can be eliminated. The variable resistor R2 is useful if you want to be able to power multiple different devices. But if you are going to use the power supply exclusively on one device you can replace it with a fixed value resistor. Wire the circuit as shown with Vin connected to the power supply and Vout connected to the circuit that you want to power. The regulator will bring down the output of the power supply down to the value that you set.

Depending on the power rating of your circuit, you may need to add a heat sink. 

My son's swing normally runs on four C size batteries. So I found an old power supply with a 9V 1000mA output. I figured that would be enough to replace the battery pack. Then I soldered together the LM317 regulator circuit with a 220 ohm resistor for R1 and a 820 ohm resistor for R2. These resistor values give an output voltage of 5.9V. (It would have been ideal to use a 240 ohm for R1 and a 910 ohm for R2 but I didn't have those values on hand) This output is still well within the operating range for a four cell battery pack. Anything between 1.25V and 1.5V per battery will usually work. Since the electronics on the swing just consists of a motor and a speed controller, I decided that the filtering capacitors weren't necessary and I left them off. See the following steps for the best methods for connecting everything together. 

Step 2: Connect the Power Supply Using a Power Jack With a Built-in Switch

The first way to connect the power adapter to your electrical device is to use a DC power jack with a built-in switch. On this connector, pin 1 is normally connected to pin 2. But when the plug is inserted into the jack, this connection is broken and pin 1 is instead connected to the wall of the plug. This kind of connector can be used to switch the device from running on the battery pack to running on the power supply whenever the it is plugged in.

To wire up this jack to the rest of the circuit, cut the wire coming from the positive terminal of the battery pack in half. Connect the wire coming from positive terminal of the battery pack to pin 2 on the power jack. Then connect the other part of the cut wire that goes to the circuit to pin 1 on the power jack. Lastly connect the negative wire from the battery pack and the circuit to pin 3 on the power jack. This will create a common ground line.

To use this connector in this project you will need to connect the regulator circuit between the power supply and the plug. You can't put the regulator circuit inside the housing because the jack has a single output terminal and you would have to regulate the power coming from the battery pack as well as the adapter. This would waste a fair amount of electricity and saving batteries is the point of this project.

Step 3: Connect the Power Supply Using a Dummy Battery

Another option for connecting the power supply to the electrical device is to use a substitute or dummy battery. This is anything that takes the shape of the battery and fits in the battery housing, but is used to connect the power supply to the terminals of the battery connectors on the device.

Here is one quick example of how to make a dummy battery. Take a wooden dowel and cut it into section that are a little shorter than the battery. Then select some screws that will make the connections on each end. Using a drill bit that is a little smaller than the shaft of the screws drill a hole in the center of each end of the cut pieces. This will help prevent the wood from splitting. Screw the screws into each hole leaving a little room to wrap wires around the screws. Cut several pieces of wire and strip the insulation off each end. Then wrap the bare wire around the screws and tighten the screws down on top of the wires to hold them in place.  

One of the wooden pieces has an extra section of wood cut out to make room for the regulator circuit. The positive output of the regulator is connected to one screw and the negative output of the regulator circuit is connected to the other screw. Be sure to mark which end is positive and which end is negative to avoid confusion when inserting the dummy batteries into the battery pack. 

There are any number of other designs that could also work to make the connections in the battery housing. You could use bar stock, washers, pipe, quarters, etc. You could also skip the dummy batteries and just connect the output wires of the regulator circuit directly to the end terminals of the battery pack. The choice is up to you.

Lastly this method require you to cut a small slot in the wall of the battery housing or cover to accommodate the wires of the power supply. 

Step 4: Finished Battery to AC Power Adapter Conversion

Now just plug in the power adapter and you are ready to try it out. This mod give you a choice in how to power your electronics. You can have the convenience and portability of batteries, or you can save batteries and money by using AC power. 
<p>Would it be possible to convert something that runs on 3 little AG13/LR44 batteries? If so, how would i go about doing this? I ask because i just got a statue of the division agent made by Ubisoft from the game, The Division, and it has 3 LED's in it. 1 for the ball grenade, 1 for the watch and 1 for the ring on the backpack. I tested it out today to see how long the batteries would last. Within about 4 hrs, the batteries are almost dead already. That is why i would like to convert it to ac power. So, if it can be done, could i get some clear instructions on how to go about doing this and what i will need to do this please? Any help would be appreciated :)</p>
<p>You could follow the example given. But for something low powered like LEDs, you could simply things a little. How are the batteries and the LEDs wired together?</p>
Hi: <br>Thanks for your instructable.<br>I have fisher price swing for babies it's using 4 C ( LR 14)1.5V batteries. I want to convert to Ac source<br>I have 2 questions <br>1) if I am using 6 Volts adapter, do I need LM 317 and resistors.<br>2) if I am using 12 Volts adapter( which I have one) what voltage regulator and resistors do I need .<br><br>Thanks and appreciate for your response
<p> Four batteries at 1.5V each makes 6 volts. So an appropriate 6V power supply might work by itself.</p>
<p>How might this work in a device that has batteries oriented vertically, such as a flashlight? i have a dremmel-like tool for trimming my dogs nails that drains way too many C batteries.My first thought was to adapt an actual dremmel, but this seems much easier.</p>
<p>If the batteries are vertical, just make one long dummy battery instead of multiple smaller ones.</p>
My son has lit up letters that hed like to connect to a plug. Will this work
<p>It should</p>
<p>Couldn't you just use a universal adapter and wire it into the device?</p>
<p>Thanks for the Instructable. I would like to power a door lock this way but I still want to keep batteries for power outage backup. If I replace the alkaline batteries with NiCad or Li, can this circuit charge the batteries as well?</p>
<p>I would not recommend charging lithium batteries because they need a special kind of charging to make sure that everything is safe. NiCd are a little safer to trickle charge.</p>
<p>Thanks for the simple but very useful instructable.</p><p>Just a small edit to the formula in the figure in step 1. The correct formula should be : Vout=1.25V*(1+R2/R1)</p>
<p>Can you please help me I have that Nine Stars motion sensor garbage can that uses 4 D batteries I built your circuit and tested it with a multimeter and there's 5.96 volts coming through when I connect to the garbage can there is no power at all does this mean I need more amps?</p>
<p>how easy is to do it for this door bell and how do I do it?</p>
<p>This is a basic way to convert any battery powered device to run on AC power. The process should be basically the same regardless of what device you use it on. </p>
<p>Hi, thanks for the tutorial. I have used a LM317t, 240 ohm and 910 ohm resistors, and followed your circuit layout, but I am getting a voltage reduction from my 9v 1000ma power supply with no load from 9.36v to 8.51v. I have tried building it twice with all new resistors and regulator to attempt to eliminate the faulty components variable, but same results. Do you have any idea what I have done wrong? Playing with various different resistor values does not seem to affect the v-out much. I am trying to do something similar to you, but rather than a baby swing, it is a crib 'soother' that gobbles up 4 C batteries at least once a month. Thanks for any tips!</p>
Could you post a few pictures of the circuit. That would help me see what might be happening.
[IMG]http://i64.tinypic.com/oa0yfm.jpg[/IMG]<br>[IMG]http://i65.tinypic.com/f4nqtc.jpg[/IMG]<br>[IMG]http://i67.tinypic.com/20sx8xf.jpg[/IMG]<br>And a noob question...<br>Would this work?<br>[IMG]http://i68.tinypic.com/wkjtiw.jpg[/IMG]<br>Its just a potentiometer. I can get the correct output voltage when i set it just right, but is it a good solution?
<p>For some reason the images aren't showing up. You can post the images directly in a comment by clicking "Add Images"</p>
<p>Tried it from my phone and didn't find the add image button. <br>Here they are</p>
<p>Use a multimeter to verify the values of your resistors. It looks as though you are using a 240 kohm and a 910 kohm instead of a 240 ohm and a 910 ohm. If you look closely at my pictures the third stripe on the resistors are brown (x10 mutliplier). Yours appears to be Yellow (x10000 multiplier)</p>
Could you post a link on which kind to buy? When i searched google shopping it came up with a pack that also said 1/4W??
<p>Being off by a factor of 1000 on resistors matters??</p><p>Lol thanks, another set of C's and a month waiting for resistors but I finally got it. Works exactly as advertised!</p><p>Great tutorial thank you</p>
<p>glad to hear it.</p>
<p>I used this method to bring back to life a ps3 controller (dead battery). Just had to adjust r1/r2 to be = 2, got 3v aprox, and its working again!</p>
<p>This article touches on some issues that relate to a similar problem I am having. I would like to purchase a variable voltage ac to dc power supply to substitute for using a 9 volt battery. For versatility I would like a power supply that goes up and down in voltage as well. </p><p>My usage is for an ionic footbath, so a certain amount of precision in tech is needed. It will not run continuously, only for at most an hour. I've used something like this successfully. <a href="https://www.amazon.com/gp/product/B00DERMBFS" rel="nofollow">https://www.amazon.com/gp/product/B00DERMBFS </a> Of course I use a surge protector.</p><p>I see that there are power supplies that are variable in voltage; and some are linear some switching, some not. My question is, can I use something like this to substitute for a 9 v battery. </p><p>linear: <a href="http://tekpower.us/power-supply/linear-powersupply/tp3003d.html" rel="nofollow">http://tekpower.us/power-supply/linear-powersupply...</a></p><p>or <a href="http://www.mastechpowersupply.com/volteq-regulated-variable-dc-power-supply-hy3005d-30v-5a-new-model.html" rel="nofollow">http://www.mastechpowersupply.com/volteq-regulated...</a> </p><p>switching: <a href="http://tekpower.us/power-supply/switching-powersupply/tp3005e.html" rel="nofollow">http://tekpower.us/power-supply/switching-powersup...</a> </p><p>I am up to something like this.</p><p><a href="http://www.nenahsylver.com/make-foot-detox-bath-for--10.html" rel="nofollow">http://www.nenahsylver.com/make-foot-detox-bath-fo...</a> </p><p>Any advice you had I would appreciate. Thank you.</p>
There is a lot of variability depending on the model of power supply. I you want to make sure that the output is smooth and even, consider adding a large capacitor to the output. It should work then.
<p>hello, need some help.</p><p>I have an outdoor motion light in my drive way. it's using 4<br>C battery&rsquo;s, and would like to get a wall adapter. What voltage adapter should I<br>get? I can get one that change from 3, 5, 6, 8, 10, or 12. </p><p>Thank you in advance.</p><p>-Anthony Mendonca</p>
Try that adapter on the 6 volt seeing.
<p>thanks</p><p>have a great weekend</p><p>-Anthony </p>
<p>Please also be gentle with me. I know nothing about regulators/resisters etc. I was wondering if you could help me. I am trying to make a wireless Arlo camera<br>by Netgear designed for exterior conditions wired to an AC adapter. It uses (4) CR123<br>batteries which are 3.2v per battery. How can I make an AC/DC adapter work? I<br>found an 13v adapter. Here is a link to it. <a href="http://www.amazon.com/AC-DC-ADAPTER-13VOLTS-POSITIVE-CENTER/dp/B00GLW4PX4?ie=UTF8&psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00" rel="nofollow">http://www.amazon.com/AC-DC-ADAPTER-13VOLTS-POSITIVE-CENTER/dp/B00GLW4PX4?ie=UTF8&amp;psc=1&amp;redirect=true&amp;ref_=oh_aui_detailpage_o00_s00</a><br>I don't know if the output specs for the battery vs. adapter are compatible.<br>Can you tell me if your process will not damage the camera or help me with what exactly I need? Thanks for your<br>help.</p>
<p>Be careful here. I've read elsewhere that two of the cells are wired in parallel with the other two cells. This means it's only 6.4V at double the amperage.</p>
<p>I think I see my problem. The 13v adapter is only a 750 mA and the batteries are 1300 mAh. Does this matter? Will the adapter overheat or can I add something to increase the mA rating of the adapter?</p>
<p>The adapter will run warm regardless since it's drawing current, especially if it sheds less heat than it produces over some period of time. The closer it gets to that 750 mA window the warmer it will get. It probably won't overheat if your draw is usually 75-80% of the max (600 mA). What you need to know is what the actual current draw is, since it's probably not 1300 mAh since that would be 1300 mA of constant? current for 1 hr.</p><p>You cannot increase the mA rating of the adapter afaik. They're designed with a a maximum output current.</p>
<p>Ok. A CR123 battery is nominally rated for 3 volts. If the camera uses 4 x 3V batteries, then it needs 12 volts to operate. But this doesn't tell you anything about the current requirement. So you can't just get any 12 volt power supply because you have to match the current output. </p><p>So you have two options. One option is to do a lot of measuring and a lot of math to figure out the exact current requirements on the camera and then try to find a power supply with that exact current output. Or the easier way is to use a 12 volt regulated power supply. This means that it will always output 12 volts no matter how much current is required. </p><p>You can buy 12 volt power supplies that are regulated or you can add a regulated to any power supply that you have lying around. The most common one to use is a 7812 chip. <a href="https://www.radioshack.com/products/radioshack-12v-fixed-voltage-regulator-7812?variant=5717601477">https://www.radioshack.com/products/radioshack-12v...</a></p><p>Connect the positive output of the power supply to the input pin of the regulator. Then connect the output pin of the regulator to the positive terminal of the camera. Then connect all the ground/negative leads together.</p>
if im using a 4.5 volt (using 3 X AA 1.5v) table lamp. i have a ac/dc adaptor which can select up to 12v. but how do i know how much mAh current is ouputing?
If you have a power supply where the current output is not labeled, it is likely a regulated power supply. This means that it will output whatever current is necessary to drive the circuit at that voltage. This means that you just match the voltage to the battery pack, and the power supply will automatically adjust itself to set the proper current.
<p>Hi there, I have a very big wall clock that runs on a single AAA battery (1.5V). Could I use the same method as you did with your baby swing? What size power supply configs would I need?</p>
<p>To explain further, the reason for wanting to hook up to ac power is because the single AAA battery seems to only last a few weeks. I think this may be because the big wall clock is outside under our patio and is exposed to the cold and hot temperature. (not weather such as rain or sun as it's under roof)</p>
<p>That seems unlikely. Unless there is a huge temperature difference between day and night (+/- 30 degrees?) I doubt the battery cares all that much. If the clock is analog (moving hands as opposed to an LCD) it is much more likely that constantly driving a motor and gears is what causes it to run down. You could try modifying the clock to take 2 or 3 batteries in -parallel- to make the time until replacement higher.</p>
That could work. You could used the voltage regulator described in thetutorial.
<p>Hi there, going by the tutorial, I would need to use 240/220 ohm for R1 and about 80 ohm for R2 to give me vout of about 1.6v. Would that work using that configuration? Not sure if R2 has to be higher than R1.</p>
<p>That looks right. </p>
<p>Thanks for the feedback. Alternatively, could I just use a 1.5v power supply with the end plug cut off and then just wire the 2 wires into the battery compartment positive and negative?</p>
<p>If it is a regulated power supply it would work. Otherwise the voltage changes depending on the current output. </p>
<p>Correction! Clock use 1 x AA battery - 1.5V (not 1 x AAA)</p>
Bro. I have a battery operated fan. But the battery got spoilt dur to overcharging. The fan doesnt work even while being plugged in to AC. I then removed the battery and plugged it in directly but it still doesn't work. I want it to run on AC power
If you already followed the instructions in this project, I would probably assume that the fan is broken.
Hey where do u get a voltage regulator is there anything u can take it out of

About This Instructable




Bio: My name is Jason Poel Smith I am a Community Manager here at Instructables. In my free time, I am an Inventor, Maker, Hacker, Tinker ... More »
More by DIY Hacks and How Tos:How to Make a Festivus Pole Add Wings to an Infant's Halloween Costume Bubble Bath That Never Runs Out Of Bubbles 
Add instructable to: