I am trying to switch a small water pump (for a pet fountain) according to the output of a PIR sensor. A couple of years ago I setup a circuit on a breadboard and tested it with the pump - it worked! Unfortunately, I don't have schematics or photos of the circuit anymore.

The circuit is powered by the power adaptor of the water pump (12VAC output). Using the L7805CV it should regulate to 5VDC (for the PIR sensor). The PIR sensor activates a transistor which uses the same 5VDC to activate a relay. The relay should then switch the original 12VAC.

Originally used water pump

I am a bit confused why that worked back then. I tried a similar setup now and the L7805CV gets hot, but there is no power output.

Can I source the L7805CV with AC power? (without using a diode bridge)

If not, is it correct that I could use a diode bridge to convert the 12VAC to 12VDC and use that as an input for the L7805CV?


  • After reading your comments/answers, it came back to me that in the working circuit I had been using a 9V battery as an input for the L7805. Sorry 🙈
  • My current (wrong!) circuit is attached: Current circuit
  • \$\begingroup\$ We need a schematic of you you have set it up now. When you convert the 12Vac to dc via the bridge you will get more than 12Vdc. And no, you can't just stick ac into the 7805. \$\endgroup\$
    – DiBosco
    Commented Jul 20, 2018 at 11:21
  • \$\begingroup\$ I suggest you grab a 2nd switching AC adapter that outputs 5.0VDC and use that for your supply. They are very common and cheap and most will output enough current for your purposes. \$\endgroup\$ Commented Jul 20, 2018 at 12:50
  • \$\begingroup\$ @DiBosco Added a schematic. \$\endgroup\$
    – nyi
    Commented Jul 20, 2018 at 15:58
  • \$\begingroup\$ @SpehroPefhany I'd rather not have a second AC adapter due to the clunkiness of the whole setup. But you made me remember that I originally used a 9V battery (which I guess would not last long driving the relay). \$\endgroup\$
    – nyi
    Commented Jul 20, 2018 at 15:59

3 Answers 3


No buddy , you can not connect 12VAC directly to 7805 as it is not meant to be operated with ac voltage , better use bridge rectifier and capacitor afterwards to smoothen the DC output and then feed it to the 7805 to get +5VDC.

12VAC * 1.414 = ~17VDC

With this 17VDC input and 5VDC output - if your current drawn is high , definitely your 7805 will get hot so you may need a small heatsink to dissipate the heat and keep the junction temp. of 7805 less than absolute maximum .

hope this helped !

  • \$\begingroup\$ with 1.2~1.5V drop , you don't get 17Vdc input. and a 5V relay draws more current from bridge and LDO which means wasted heat and more cost, so better to use a 12Vdc relay but still use 5V LDO for PIR. no heatsink!!! -1 \$\endgroup\$ Commented Jul 20, 2018 at 12:50
  • \$\begingroup\$ @TonyEErocketscientist A LDO is not needed for this application, which is why a 7805 is fine. I think you're being a bit petty here. It sounds like he already has a (possibly dead) 7805 and a 5V relay. Which is more expensive: another relay, or a heat sink for a TO-220? \$\endgroup\$
    – W5VO
    Commented Jul 20, 2018 at 14:28
  • \$\begingroup\$ @W5VO I think I got it right . LDO should be for PIR only with low side coil drive and 12V $1.5 Relay with no heatsink needed for PIR current then more power avail to pump. 0.5W5V relay sucks 1.2W at 12V in to LDO necessary for PIR?? Got it?? \$\endgroup\$ Commented Jul 20, 2018 at 15:15
  • \$\begingroup\$ Remember only 3.5W avail for pump \$\endgroup\$ Commented Jul 20, 2018 at 15:21
  • \$\begingroup\$ I'm using a GH-1C-6L as a relay. AFAIU I could throw 12VDC at it as well. If I understand you guys correctly (I'm over my head with this one..), using the same AC adapter for the PIR sensor and relay would mean that there is less power on the pump, reducing its effectiveness, right? \$\endgroup\$
    – nyi
    Commented Jul 20, 2018 at 16:07

A diode bridge with a 10uF cap would probably best to drive a 12V relay coil more efficiently than a 5V coil.

You only have 3.5W power @ 12Vac and relays from 8 to 10A contacts for motors must be derated can draw 100 to 400mW of power . The efficency loss using an LDO effectively multiplies the power consumption.

So how much power margin is in the supply or how hot it gets depends on the choices you make in the circuit design.

My choice would be 12vAC full wave rectified without cap for contacts then a series diode to cap for low power demand of LDO to drive PIR detector and switch which draws from 12Vdc unregulated, unfiltered DC output.

This could draw < 0.1W from a 8A 12Vdc Panasonic relay leaving 3.4W for the pump.


simulate this circuit – Schematic created using CircuitLab

LDO and PIR not shown. Depending on final selection of relay , 100uF may be needed.

  • \$\begingroup\$ Note: et al, DC coils are rated in RMS not peak \$\endgroup\$ Commented Jul 20, 2018 at 12:54
  • \$\begingroup\$ Makes sense! I'm using a GH-1C-6L relay. AFAIU the datasheet says that the coil consumption is 360/450mW in any case. Would it still matter for this relay? Or do I need a "special" relay to save some mW? \$\endgroup\$
    – nyi
    Commented Jul 20, 2018 at 16:20
  • 1
    \$\begingroup\$ That’s a 90 +\-10 Ohm 6V relay drawing 67mA nom @5V or 12V*67mA= 0.9W from your 3.5W transformer which ought to be derated for a pump so if you want , try it but I would expect it to have a shorter lifespan. and pump to run slower and transformer 30% hotter \$\endgroup\$ Commented Jul 20, 2018 at 16:37

Other than what @A.Kumar suggests, you can rectify the AC voltage and use a voltage divider to get unregulated ~8V before feeding the voltage to the IC. That will solve the heating issue of the IC and you 'may' not need a heat-sink unless and until you are not drawing too much current.

  • 2
    \$\begingroup\$ No, a resistive divider is not a sound solution here. For one, it simply shifts the heat dissipation from the regulator onto the resistors, which will need to be sized appropriately. Second, the voltage supplied by the divider will droop as load increases, and may fall below the 7805's minimum input voltage. \$\endgroup\$
    – user39382
    Commented Jul 20, 2018 at 16:52
  • \$\begingroup\$ Thanks for the feedback, what is sized appropriately? Isn't it Ok with voltage dropping before being regulated as long as it doesn't fall below the desired VCC + Voltage Drop at regulator. So dropping voltage upto 6.25 is Ok? \$\endgroup\$
    – MaNyYaCk
    Commented Jul 21, 2018 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.