Converting 24VAC to 5VDC

Good afternoon, all. For my current project, I'm trying to build a simple programmable sprinkler controller. The sprinkler valves have a solenoid that's activated by 24 volts AC. Triggering them is easy with a relay; I've got that part covered easily. But I'm trying to minimize the number of wall warts that I'm going to need to run this thing and would like to take the 24VAC from a wall wart and convert that to the 5VDC that I need to power the Arduino and associated bits. I'm not having much luck finding what I need on Mouser.com. Searches for "transformers" and "rectifiers" don't lead me to anything obvious, mostly AC-AC transformers and plug-in wall warts.

Can someone point me in the right direction? Should I just roll my own full-wave rectifier from four diodes and feed that output into an LM7805?

Thanks, Brian

Should I just roll my own full-wave rectifier from four diodes and feed that output into an LM7805?

Unless you need the efficiency of a switching regulator, that's the best way to go, I think. Put a big filter cap in front of the 7805 for stability. You'll be cooking off around 7 watts of power, so get it in a TO-220 package and put a heat sink on it.

I think this is a fairly reasonable thing to do, I know they make AC to DC transformers that would work, depending on your price range, and your actually going to be looking for a DC voltage of 6-12v. Anything less than 6, your not going to get a true 5v signal, and anything more than 12, the voltage regulator will get too hot.

Keep in mind that the way the Arduino's voltage regulator works is to waste all the extra energy from its DC input as heat. Feeding it 24V means dissipating quite a bit of heat. Possibly too much, if you're running the relays off the Arduino's 5V.

There's a company making a 5V switcher that's pin-compatible with a 7805 regulator for about $10-15. It's a bit bigger than a TO-220 transistor package, but not a whole lot. I first saw it on ebay, but I think the company also sells it off its own website.

What I would do in your situation is buy a MaxSerial kit from Fundamental Logic, stuff it with that switching regulator and a much larger filter cap, and feed it rectified DC from your 24V transformer.

The reason I recommend the MaxSerial is that all the competitors that I have, or have researched, have less room for the filter cap. If you're using a shield, double-check to ensure that the switching regulator module is narrow enough to fit the snug space between the power jack and RS-232 connector.

If you're not using a shield, you might also get away with mounting the 7805 vertical and putting a heatsink on it (although I think it's still a little dicey if it's powering several relays). Or just build the power supply on a protoboard and use a cheaper Arduino like the DuinoStamp or RBBB.

Ran

Thanks for the info. I’m actually using more of a (R)BBB Arduino, so I’ll be grabbing a 7805 from my parts bin. The solenoids will only be operated one at a time. The 7805 is capable of handling at least 40V, so I’m not concerned about its capability, but the heat could be a concern. I’ll look into bolting a heat sink on there. The rectifier will feed the 7805 which will power the AVR, relays, RTC, etc. The relays will switch the same 24VAC going into the 7805 into the sprinkler solenoid.

I did finally track down a bridge rectifier for just about 35 cents at Mouser, the DF02M. But if I have enough diodes at home, I’ll just try that approach first.

Since you're regulating down to 5VDC yourself, bypass the *duino built-in voltage reg and connect power via the Vin pin rather than the power connector.

If your board is a 3.3V unit then disregard that statement. ;)

If you are regulating down to 5 volts you want to connect to the 5v pin, not the Vin pin.

D'OH! Right. I knew what I meant. It's what I said that I wasn't sure of. :D

For a similar project, I was thinking of using several 78xx style regulators, each with their own heat sink, to “spread out” the power dissipation. 24V->16V->9V->5V or similar.
Don’t forget that 24VAC is going to be 33V once rectified and filtered…

How does 24VAC get raised to 33VDC after rectification? I thought the diode bridge just put both haves of the AC sine wave “on top”?

Once again, I’m not actually using an Arduino board. I’m basically building the entire system up on a breadboard, from the Atmega168 and 7805 on up.

Because AC voltage levels are fluctuating, the voltage is usually given in terms of the RMS voltage. The diagram below shows the relationship between the RMS value (the dotted line) and the peak value.

RMS is representative of the average power for a given load, but when the AC voltage is rectified and filtered, the DC voltage (without load) is around 1.4 times greater then the RMS value.

You could also use a transformer to reduce the voltage from you main 24VAC. This way you could significantly reduce the heat load on your regulators.

Thanks, mem. Didn't realize that.

I took my 24VAC transformer wall wart (which actually puts out a little over 27V) and piped it through a network of diodes laid out like this: (via Wikipedia) My multi-meter shows approximately 24V*DC, and just over 52VAC*. I didn't expect to be able to read AC voltage from the output of the bridge, but doing the same thing with a DC transformer on my bench outputting roughly 7.5VDC, I see about 16VAC, too. Can someone explain that to me? :)

Once a AC DVM is not measuring a true sine waveform then the value it displays is subject to errors or misinterpretations. Once you full wave rectified the AC you now no longer have a true sine wave but rather a pulsating DC waveform and the meter is not able to accurately read. Even the DC measurement value is in question because without filter capacitors there is lots of ripple voltage on the waveform and it's not clear how your specific meter handles that.

Some better high cost DVMs display true RMS voltage so waveform shape is not a source of error. A true RMS voltage reading is the value equivalent to a pure DC voltage reading applied to a resistive load.

That's the best explanation I can give not knowing the specific meter you are using and it's AC measuring characteristics. Instrumentation measurement is not a simple subject and just because a specific DVM displays a value does not mean that it is always an accurate representation of the actual true value. Meter design is often made with assumptions and have limitations based on those design decisions.

Lefty

Ya, the only way to be sure of the voltage of a wave form without knowing for sure if you have a true RMS DVM is to read the wave with an oscilloscope.

Just to reinforce what others have pretty much already stated: The 24VAC wave is almost 34 volts at its peak (maybe more since you noticed it's actually up around 27VAC). The RMS voltage of a perfect sine wave is about .707 of the peak voltage. The RMS of a non-sine wave will be different. When you rectify that, it's converted to a pulsed DC like you have in your diagram which peaks at about 34 volts.

When you add a filter capacitor, the capacitor fills in between the peaks and your DC voltage remains around 34 VDC, but it will ripple a little bit based on how much load you have and how big the capacitor is. And that will all change a little as the load increases or decreases because the output of a transformer isn't very stable.

etracer's idea to use a 24VAC step down transformer is probably the best way to handle this. If you can find something that steps down to 6-9 VAC, you'll save some heat and efficiency. You still need the 7805's but they will run much cooler.

I was thinking of using several 78xx style regulators, each with their own heat sink, to "spread out" the power dissipation. 24V->16V->9V->5V or similar.

I've done something like that before (24VDC to 6VDC), but I used several 7806s in parallel and tied them all to the same giant heat sink. That way you don't have a bunch of exposed voltage differences between the heat sinks. There's also the TO-3 package that handles up to 3 or 5 amps, I believe.

There's a company making a 5V switcher that's pin-compatible with a 7805 regulator for about $10-15. It's a bit bigger than a TO-220 transistor package, but not a whole lot. I first saw it on ebay, but I think the company also sells it off its own website.

Looks interesting... http://www.dimensionengineering.com/DE-SW050.htm

I'm trying to build a simple programmable sprinkler controller. The sprinkler valves have a solenoid that's activated by 24 volts AC.

Is my next project as well. It's a nice fit for MRMP...

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1232140631

etracer's idea to use a 24VAC step down transformer is probably the best way to handle this. If you can find something that steps down to 6-9 VAC, you'll save some heat and efficiency.

I like this idea too, but I don't think I've ever seen such a transformer for sale. You have your line voltage power transformers, your audio transformers, and your RF things. 60Hz transformers also tend to be quite large to handle any significant power...

Pretty much any power transformer with a 4:1 winding ratio will work. One that is rated for 115-120 VAC in and gives out around 28-30 VAC will convert 24 VAC to roughly 6 VAC.

I did a quick search at Newark and found these: http://www.newark.com/jsp/search/browse.jsp;jsessionid=C5MABK3WZTG1YCXDUY2W13Q?N=1000143+285516+285517+285521+285522+300269&_requestid=244756