Kitt0s
Posts: 3
Joined: Sat Oct 05, 2013 10:10 am

24VAC to 5VDC Conversion

Sat Oct 05, 2013 12:29 pm

Hello,

I am currently starting the planning process for an Irrigation controller (for sprinklers) based on the Pi.
I've stumbled upon OpenSprinklerPi and considering using its software and some ideas from the hardware.

I am planning to use a Sainsmart 4-Channel 5V Relay Module as the relay for the 24VAC selnoid sprinklers (thanks to this topic)

So the only thing I'm missing now, is the power supply. I've got a 24VAC~830mA power supply lying around which I was planning to use (currently powering the sprinklers) - so they only question is how to power the Pi with a 5VDC 1A
I've read a blog post at rayshobby.net which talks about 24VAC to 5VDC Conversion. It has some examples on how this can be accomplished but it steps out of my basic electronics knowledge :)

I was thinking of using ray's AC to DC Rectification along side with a LM2596S Power Module DC-DC Buck Converter Step Down Module to output a 5VDC

Would love to hear some thoughts about this, as I'm a relative newbie in this area - am I shooting at the wrong direction?

jsobota
Posts: 42
Joined: Tue Jul 10, 2012 3:24 pm
Location: Plzen, Czech Republic

Re: 24VAC to 5VDC Conversion

Sat Oct 05, 2013 1:34 pm

I'm using this one based on KIS-3R33 and it works great:
http://www.ebay.com/itm/Kis-3r33s-DC-DC ... 51aa89e8b3

Kitt0s
Posts: 3
Joined: Sat Oct 05, 2013 10:10 am

Re: 24VAC to 5VDC Conversion

Sat Oct 05, 2013 3:19 pm

Thanks jsobota, what about the conversion from AC to DC?

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: 24VAC to 5VDC Conversion

Sat Oct 05, 2013 3:37 pm

AC to DC is easy with 4 rectifier diodes i.e. 1N4001 or 1N4002 - http://en.wikipedia.org/wiki/Diode_bridge

Richard S.

User avatar
Tage
Posts: 287
Joined: Fri May 24, 2013 2:29 am
Location: St Thomas, Ontario Canada

Re: 24VAC to 5VDC Conversion

Sat Oct 05, 2013 7:47 pm

if you are using a 24Vac transformer and you add a rectifier bridge and a capacitor to convert the ac voltage to dc, then you must consider that the dc voltage occasionally can go above 40V. so at least one of not both of the dc/dc converters mentioned are not suitable. one has 18V rating the other one 40V.
measure the 24Vac voltage at no load, then multiply that ac voltage by 1.7 and that is what you can expect that the dc voltage can reach.
it could be more, because of the peak rectification of line transients, but you can use a load across the dc such as a power resistor to keep the voltage from rising at no load.

FM81
Posts: 518
Joined: Wed Apr 17, 2013 4:33 pm

Re: 24VAC to 5VDC Conversion

Sat Oct 05, 2013 8:31 pm

The factor is 1.414 (squareroot from 2), not 1.7 - so you reach at maximum around 34V ...
And you have also to subtract voltage across diodes, so a little bit less than this value ...
MfG, FM_81
A: What does the command 'cat /dev/urandom', can you tell me please?
B: Yeah, that's very simple: It feeds your cat with radioactive material!

User avatar
Tage
Posts: 287
Joined: Fri May 24, 2013 2:29 am
Location: St Thomas, Ontario Canada

Re: 24VAC to 5VDC Conversion

Sun Oct 06, 2013 2:15 am

FM81 wrote:The factor is 1.414 (squareroot from 2), not 1.7 - so you reach at maximum around 34V ...
And you have also to subtract voltage across diodes, so a little bit less than this value ...
MfG, FM_81
that is not true in real life. at all. you can expect mains voltage variations and you need to take those into account. how large the mains voltage variations are will differ depending on each location. out in the countryside you are more likely to see large variations. the factor 1.7 is not exaggerated. some locations will have larger variations. and with a rectifier bridge you can expect that the voltage transients that appear on the mains voltage will also be rectified and increase the capacitor voltage by peak rectification.
to make things worse, a 24V transformer typically has a no-load voltage that is a lot higher than the nominal voltage. that is why I recommended to measure the actual ac voltage and then multiplying that voltage by 1.7 to get the maximum dc voltage that you can expect.

Tage

grahamed
Posts: 277
Joined: Mon Jan 30, 2012 7:01 pm

Re: 24VAC to 5VDC Conversion

Sun Oct 06, 2013 10:07 pm

Hi

I have to say that I agree with Tage, using 1.7 is certainly realistic. Some really small cheap transformers exhibit really poor regulation - like 50%! - and the line voltage as I sit here is near enough 255V which is a bit more than the 230V UK nominal and diodes do die due to spikes on the sine-wave.

A 1N4007 is the same size as a 1N4001 and probably costs twice as much - but if that's more than 5p extra you are buying from the wrong place. So why allow anything less into your inventory (unless you are using them by the thousand then it starts to add up), even if you don't believe how bad a transformer can be?

And I would always use a capacitor rated at at least twice the rms ac voltage. Problem is that increased voltage leads to increased size and cost.

Kitt0s
Posts: 3
Joined: Sat Oct 05, 2013 10:10 am

Re: 24VAC to 5VDC Conversion

Thu Jan 16, 2014 12:40 pm

Thanks all for your comment.

So I've bought LM2596 DC-DC converter.

I would just like to clarify I'm doing it right - to convert the 24VAC to DC I use 4 1N4007 like this:
Image

And then just run it through the LM2596 DC-DC to step it down to 5V.

Correct? :)

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: 24VAC to 5VDC Conversion

Thu Jan 16, 2014 2:39 pm

You will need some capacitors to smooth out the voltage coming from the rectifiers.

Follow the circuit example as shown in the data sheet.

http://www.ti.com/lit/ds/symlink/lm2596.pdf
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

PilotC150
Posts: 8
Joined: Fri Apr 18, 2014 9:52 pm

Re: 24VAC to 5VDC Conversion

Sat Dec 05, 2015 4:03 am

Sorry to bring this back from the dead but this fits right in with something I'm working on right now. I'm working with a sprinkler system power supply and I want to be able to continue using the 25.5VAC that comes from that (according to the printing on the power brick) for the sprinkler system solenoids, but I want to pull 5V off to power the Pi.

So, I think this thread has mostly answered my questions. It sounds like I can build a diode bridge to convert the AC to DC. But then I need a capacitor to smooth out the voltage. What size cap should I use? How do I figured that out?

Then once I've got the power to DC I need a buck converter to bring the voltage down to 5V. I found this one on Amazon (http://www.amazon.com/gp/product/B009HP ... 10&sr=8-10) but I want everybody's opinion on whether or not it will work. I'm assuming I can hook my power to the diode bridge and see what the output voltage is to make sure it's lower than the max 35V that this part can handle. Is that right?

Anything I'm missing?

stevend
Posts: 209
Joined: Fri Oct 11, 2013 12:28 pm

Re: 24VAC to 5VDC Conversion

Sat Dec 05, 2015 10:21 am

PilotC150 wrote: What size cap should I use? How do I figured that out?
Basically it depends on three things:
1. Your mains frequency (50Hz or 60Hz), and whether you're using half-wave or full-wave rectification (I think you're using full wave). So assuming 50Hz you'll have 100 'peaks' per second, or 0.01 seconds between peaks.
2. How much current you're drawing. 5V at 1A is 5 watts. Allowing for some inefficiencies in the power conversion, that's going to represent around 0.25A at 24V d.c. (we don't need to be very accurate here)
3. How much "ripple" you can tolerate on the rectified and smoothed d.c. You're using a proper regulator later, so 5 volts (or more) shouldn't be a problem.

You then have a formula:
Capacitance(farads) x ripple(volts) = current(amps) x time between peaks(seconds)

Pluggin in the numbers we have, you get a capacitance of 500uF. So 470uF should do, or 1000uF if you really want to play safe.
PilotC150 wrote: I'm assuming I can hook my power to the diode bridge and see what the output voltage is to make sure it's lower than the max 35V that this part can handle. Is that right?
Theoretically the maximum voltage you'll get is 25.5V x the square root of 2, or about 36V, minus any voltage dropped across the diodes. But by the time you've allowed for tolerances in everything - your incoming mains voltage could be up to 5 or 10% above nominal, the brick voltage might vary with load, and not be totally accurate in the first place, and so on - you should be looking at rating everything for at least 45 volts.

User avatar
Cancelor
Posts: 756
Joined: Wed Aug 28, 2013 4:09 pm
Location: UK

Re: 24VAC to 5VDC Conversion

Sat Dec 05, 2015 10:37 pm

Just a cautionary aside ..... https://www.youtube.com/watch?v=JLwJb4MVbls
Can't find the thread you want? Try googling : YourSearchHere site:raspberrypi.org

silentonePi
Posts: 2
Joined: Mon Dec 14, 2015 10:12 pm

Re: 24VAC to 5VDC Conversion

Mon Dec 14, 2015 11:12 pm

We have developed a power supply that works perfectly at providing a device that can take in any level of AC power maxed at 48 volts AC at 24 volts 12 volts, 16.5 volts, 9 volts AC and provide a clean 5 volts DC as the output. It has a real time clock, a temperature sensor, a board opening that allows for the passage of the ribbon from the Pi camera to pass through from the top of the power board to the PI camera mount, and it has an on-board polarity protection circuit so that you cannot make a mistake when hooking up power to it. It has a mini USB in and a power controlled USB host connection for resetting pesty USB devices, It is pined to fit directly on any Raspberry Pi that has a 40 pin connector, and it also has the Raspberry HAT epromm for allowing auto configuration, all in a size that mirrors the footprint of the Raspberry Pi. Unfortunately, since we have only made them in small production runs of 15 at a time, we have the devices priced at $89.99. If we begin talking about larger orders, we are confident that we can eventually bring the pricing down

silentonePi
Posts: 2
Joined: Mon Dec 14, 2015 10:12 pm

Re: 24VAC to 5VDC Conversion

Thu Dec 17, 2015 12:24 am

I forgot to mention in my earlier post that the Pi compatible power supply that we have built is also indifferent to any form of DC power supplied to it, whether it is 24 volts 36 volts,,12 volts, 9 volts or 6 volts DC. It will suppy a steady 5 volts DC as the output. : .

dglcinc
Posts: 1
Joined: Sun May 12, 2019 5:33 pm

Re: 24VAC to 5VDC Conversion

Sun May 12, 2019 5:35 pm

I finally found a US-made converter that may work. The Chinese-made Buck converters and SMAKN converter invariably fail after a few months and take your Pi with it. I have not fully tested yet but looks promising.

https://store.ncd.io/product/acdc-power ... -1mm-male/

Return to “Automation, sensing and robotics”