Simple (maybe) power supply question

godefroi

Joined Jul 1, 2011
9
I am planning to create a water valve controller using an MCU and a set of solenoid-controlled valves. The solenoids run on 24VAC (40mA inrush, 20mA holding), and I have a 24VAC 300mA wall-wart I wish to use (standard sprinkler timer transformer).

The MCU is on a board that draws ~100mA, and it has an on-board regulator, so I can supply it either 5V directly (bypassing the regulator) or 6-12V through the on-board regulator.

My question is how best to use this transformer to also power the MCU. I can throw together a quick little power supply using a rectifier and an LM317, but I believe I'm approaching the limits of the LM317 here. Am I better off with another transformer to drop the 24V to something more reasonable first?

bertus

Joined Apr 5, 2008
21,264
Hello,

You can drop the voltage using the LM317 to about 9 Volts.
The LM317 must dissipate the voltage difference X the used current, so about (24-9) X 0.1 = 15 X 0.1 = 1.5 Watts as heat.
A heatsink must be added to the LM317 to meet with this heat dissipation.

Bertus

ifixit

Joined Nov 20, 2008
650
Hi,

Rectify & filter the 24VAC to get approximately 34V DC. Now use a LM317T to regulate that down to 12V for the MCU.

34V-12V=22V, 22V * 100mA = 2.2 Watts power dissapation in the LM317.

The thermal resistance, junction-to-case is 4 °C/W, so the junction temperature rise will be 4 * 2.2 = 8.8 °C above the case temperature.

The max junction temp is 125°C so the max case temperature allowed is 125 - 8.8 - ambient of 40°C = 76 °C.

Use a good heatsink to keep the case temperature well below the max.

Regards,
Ifixit

bertus

Joined Apr 5, 2008
21,264
Hello,

OOPS, I overlooked the VAC, ifixit is right with his solution.
Will the solenoids work with this AC voltage?
Controlling an AC voltage needs special parts, like triacs.(isolated from the controller).

Bertus

godefroi

Joined Jul 1, 2011
9
Hi,

Rectify & filter the 24VAC to get approximately 34V DC. Now use a LM317T to regulate that down to 12V for the MCU.

34V-12V=22V, 22V * 100mA = 2.2 Watts power dissapation in the LM317.

The thermal resistance, junction-to-case is 4 °C/W, so the junction temperature rise will be 4 * 2.2 = 8.8 °C above the case temperature.

The max junction temp is 125°C so the max case temperature allowed is 125 - 8.8 - ambient of 40°C = 76 °C.

Use a good heatsink to keep the case temperature well below the max.

Regards,
Ifixit
I was hoping to be able to run some other devices from the MCU, a few LEDs, an LCD display, a temperature/humidity sensor, things like that. If I needed to pull, say, 500mA from the regulator, I believe I'm outside the thermal envelope of any reasonable heatsink without active cooling, correct?

Is there such a thing as a 2:1 transformer I could use to reduce the 24VAC to something more reasonable before regulating it? Is there some other option I'm overlooking here, other than running two wall-warts (the 24VAC and a 9VDC)?

godefroi

Joined Jul 1, 2011
9
Will the solenoids work with this AC voltage?
Controlling an AC voltage needs special parts, like triacs.(isolated from the controller).
Bertus
Yes, the solenoids are designed to work with 24VAC. I'm planning to drive them using a transistor and an optotriac (solid state relay) for each one.

ifixit

Joined Nov 20, 2008
650
Hi godefroi,

In your first post you said the walwart was 24VAC @ 300mA so you won't get 500mA from that. You will have to use another walwart or...

You could use one walwart if it has a higher current rating suitable for all your loads. For the 500mA load, including the MCU, you could use 2 or 3 LM317 as required to divide up the power dissapation, or...

You could use a power resistor in series with the LM317 to reduce voltage drop across the LM317, or...

Use a switch-mode power converter, which would be more efficent anyway.

Regards,
Ifixit

SgtWookie

Joined Jul 17, 2007
22,221

godefroi

Joined Jul 1, 2011
9
In your first post you said the walwart was 24VAC @ 300mA so you won't get 500mA from that. You will have to use another walwart or...
Yeah, I believe I have another laying around here somewhere with a higher current output.

Use a switch-mode power converter, which would be more efficent anyway.
I don't suppose there's a simple SMPS design that would be suitable for my needs? My electronics education was long ago, and not very thorough...

Another very interesting power supply I saw came from here. He's using a 24VAC transformer and describes a half-wave rectifier / capacitor setup that only delivers 11V to the regulator. Here he actually gives a schematic for a sprinkler timer, somewhat similar to what I'd like to use: http://ww.cappels.org/dproj/garden_timer/Garden_timer.html
What he's doing there is beyond my experience, and may not be suitable for my higher power requirements.

ifixit

Joined Nov 20, 2008
650
Hi godefroi,

Using half-wave rectifier would help reduce the power, but a resistor in series would still be needed. A zener doide is used to clamp the voltage at 11V, which is okay for low power situations.

An old computer SMPS would supply the +5V you need and alot more. This would overkill, but cheap and easy to do.

Anybody know of a cheap smps module available?
Vin=24 to 35V, Vout=5V, Iout= 1A max.

Regards,
Ifixit

SgtWookie

Joined Jul 17, 2007
22,221
5V @ 2.5A, 24v @ 50mA, \$4.95+shipping from MPJA:
http://www.mpja.com/prodinfo.asp?number=14345+PS
Not rated for outdoor use, where the 24vac@300mA wall wart our OP already has probably IS rated for outdoor use.

Using a transformer from 24vac down to a lower VAC and rectifying/filtering/regulating would also be OK.

Dick Cappels' 11v input clamp would not be suitable for higher power output; much of the power is wasted as heat in the 720 Ohm 2Watt resistor, more is wasted in the Zener.

godefroi

Joined Jul 1, 2011
9
It strikes me that I could use this transformer (115VAC input, 24VAC output, with a center-tapped secondary winding) to get both voltages in a single transformer. Use the 12VAC to run the MCU, and the 24VAC to run the valves...

Opinions?

godefroi

Joined Jul 1, 2011
9
No comments on whether I could use the center tap to produce my 12V for regulation and the full winding for my 24V?

It seems clear to me it'd work, but I'm not experienced enough to be completely confident about it.

SgtWookie

Joined Jul 17, 2007
22,221
The CT 24vac transformer would not be a good choice.

I've given you a couple of ideas that would work, but you don't seem to be interested in them for what reasons I have no idea.

ifixit

Joined Nov 20, 2008
650
Hi

Sounds okay to me. Use a fullwave rectifier to get the 12V and take the 24VAC from across the full output. You need to use the optotriac for sure.

Regards,
Ifixit