20th October
written by Todd Harrison

I’m in a pinch and need to convert 120v AC to 12v DC to cool an electric motor. Not having much for supplies on a Sunday I pulled out the whiteboard and my calculator to devise a quick hack to power my 12v DC fan from the 120v AC mains running the electric motor. I needed only three components to create my DC power supply: a light bulb (40W), capacitor (470uF 80v), diode (1N4004) but in the video I used a salvaged diode from an old microwave oven.

In this video I share this simple hack and go into the math just enough so others can calculate the correct size light bulb for such a DC power supply hack if ever needed.


I needed to cool the below electric motor with the fan from an old computer case.

This is the 12v DC fan that needs the power supply. It has 3 wires but the yellow wire will not be used because it is just for sensing RPMs.

Below is the salvaged diode from a trashed microwave oven. A smaller form factor common 1N4004 would work better if you have one handy.

This is the 470uF 80v electrolytic capacitor I used. I salvage it from a dead power supply long ago. A rating as low as 40v would work too.

In the video I cover how the AC waveform is conditioned into DC and how to calculate true RMS when working with 1/2 rectified sin waves; which is peak voltage divided by two: (170v/2) : 85v when working with 120v AC mains.

After getting the true 1/2 rectified RMS voltage after the diode I show how Ohms law is used to calculate the light bulb wattage needed to give the mystery resistance which gives us our final 12v and 150mA to the cooling fan.

Where “V” is the voltage drop across the light bulb (85v – 12v) = 73V
“I” is the current through the circuit ~0.150A and “R” is the resistor we need to calculate.

73v = 0.15 * R
R = 73v/0.15
R = 487ohms

We can’t use any 487ohm restore because the current through it will be 0.15A and that could get real hot!

P=0.15A * 73V
P = 11 watts

Most small resistors are only rated at 1/4 to 1/2 watts.  You can buy some high wattage resistors but then you’re not using scrap.

But I happen to know that 487ohms is real close to some incandescent light bulbs when powered off 120v AC.  And there will be no issue with a light bulb taking 11 watts.

To calculate the resistance of some light bulbs just run their ratings through the same equations as above.
Let’s do 100W, 60W, 40W and 25W bulbs.

100W bulb:
100W = I * 120V
Solve for I:
I = 100W/120v
I = 0.833A

Now lets find its resistance when driven at this normal 120v AC.
120v = 0.833A * R
Solve for R
R = 120v/0.833A
R = 120ohms
If we needed a 120ohm resistor running close to 120v AC mains power we can use a 100W light bulb

Now let’s do the 60W bulb:
60W = I * 120v
I = 60W / 120v = 0.5A

120v = 0.5A * R
R = 120v/0.5A = 240ohms

Now 40W bulb, which I used in my circuit:
40W = I * 120v
I = 40W / 120v = 0.333A

120v = 0.333A * R
R = 120v/0.333A = 360ohms

Just for completeness 25W bulb:
25W = I * 120v
I = 25W / 120v = 0.208A

120v = 0.208A * R
R = 120v/0.208A = 577ohms

A 25W bulb would have also worked for me but being it was getting higher than my calculated 487ohms I would rather use the lower resistance bulb.  I would rather my fan turn a bit faster than too slow to cool my motor.

Another thing to consider is that I’m not going to be powering my light bulb with 120v AC.  My light bulb is after my diode so it will be running on 85v DC such that it is only really on and conducting current 1/2 the time.  This will change the heating and the resistance of the light bulb but not enough to cause problems with my back of the envelope style of calculations for powering a fan.

So there you have it.  Three scrap components and you have yourself a hacked together 12v DC power supply.

Below is an oscilloscope screen shot of my final power supply signal across the fan. Notice the 3.4v peek to peek ripple riding at the 16v DC offset. That comes out to a 1.02v RMS ripple as the capacitor charges and discharges.  Not at all a good power source for some electronics, but just fine for my quick weekend hack.

This circuit could be used for any project that is not affected by the 1v RMS ripple but like I said in the video “This is just a quick weekend hack and should not be ran continues or unattended”.  Things could go real bad at anytime with such a circuit and you want to be there to shut it off. This is not a safe power supply circuit and should be used with extra care. I did not use a fuse and it does expose the user to dangerously high voltage if something should go wrong. This is a hack and should only be done by somebody who knows what they are working with and can do so safely. There, you have been warned.

If you watch the full video you will see that I replaced this hacked power supply with a more stable and safe alternative in the end but the hack did get me by for the weekend and I thought it would be an interesting hack to share.

If your needs are for more or less than 150mA then you can just rework the above equations to get the light bulb size you need.  Remember you can put light bulbs in series to get more ohms or parallel to get combined lower ohms just like normal resistors.  Also remember to pick a diode that can handle your target current and being this is just ballpark calculations you want to take measurements at your load to validate your power conditioning is acceptable.  I calculated for 12v but got 16.5v with a 3.4v p-p ripple which does work for a silly fan power supply but maybe not your project.

Thanks for following along and remember to subscribe to my YouTube Channel “toddrharrison” and my blog RSS feed.






  1. 25/10/2011

    Thanks for the overview of figuring out the resistance of the bulbs: Being a self-taught electronics guy, I understand ohms law technically, but you broke it down very nicely into something practical my brain could easily consume. Appreciated!

  2. 25/10/2011

    Hey Todd, that’s a stunning coverage of the electronic process with “found objects” and I can really appreciate the fun involved in working it through. Congratulations on explaining it so thoroughly and clearly but if it is not soafe/wise to leave it unattended, is it a solution you would that really is solved?

  3. 01/11/2011

    Hey Todd,

    Great work here. Do you have an email I can grab you on? I have a few questions to ask you.



  4. Curt Kitrick

    120 Volt AC is already referring to rms value of the supply. So, the half wave voltage powering the light bulb is equivalent to half of 120 V. , 60 VDC, not the root mean square of 120 V. , 85 VDC.


  5. 20/11/2011

    @Curt You are making a classic mistake. That is why I produced this video, so people would know that 1/2 of 120V AC rms is not correct for 1/2 wave rectified power. I know it is easy to think so but it is just not true. And your true RMS meter can’t help because it will not take the DC offset into account when calculating the rms voltage. A Fluke 287 or Fluke 289 has a mode called AC+DC true rms and they will give you the correct RMS voltage for an 1/2 rectified signal. If you don’t believe me, get a Fluke 289, set it to AC+DC mode, create a 1/2 rectified signal through a load resistor or light bulb. You will see for yourself.

  6. Sebastian Salzgeber

    This was VERY interesting to see. Keep up your filming.

  7. […] project shows a way to convert the 120V AC current to the 12V DC power by using some simple and easy steps. The project is so easy that anyone can perform it by […]

  8. john j1022

    hey Todd,

    i have an automatic chicken door opener running on a 120V 12V AC situation and then there is a timer and then my cord to 120V power source. This is an extension running to my house. i want to stop the cord. how would i rig my rig to work with a battery source? i thought this was possible.



Visit Our Sponsor: MROSupply.com - An e-commerce site of Mechanical Drives & Belting