AC to DC simple power supply help?

Thread Starter

AverageMoss

Joined Apr 24, 2021
34
Hello, I'm trying to build a small power circuit that outputs 5 VDC to power a microcontroller and some relay coils. The power source is 24 VAC rms.
I've designed a basic circuit that I originally thought would work but after building it, I quickly realized my design is off.


This is the schematic:

Photo-1.jpg

The concept of this design is the microcontroller would be programmed to toggle the relays on or off which would control 24 VAC signals to a furnace, but the 5 VDC required to power the microcontroller and relay coils would come from the furnace's 24 VAC source. That way I don't need to rely on an external DC power source. It could all be integrated into one PCB.


This is the measured 24 VAC rms power source:

Photo-2.jpg


I've put this entire circuit together exactly the way its shown in the schematic and when I measured what was supposed to be 5 VDC, I got this:

Photo-3.jpg

I would like to keep the cost and complexity of the components as low as possible. Size is a bit of a constraint, so large capacitors or something like that is a no-go.

Just to clarify, I'm a bit of a beginner when it comes to this stuff so if anyone that knows more could point out and explain the problems with this design I would greatly appreciate it.
 

LowQCab

Joined Nov 6, 2012
4,069
Reducing 80-Peak-Volts down to 5-Volts is not practical without some sort of a Transformer.
Having No Transformer will result in having to get rid of a tremendous amount of Heat.

A hefty Diode, ( which will reduce the Peak-Voltage to ~40-Volts ),
into a ~470uF Capacitor,
and then into a Buck-Regulator would be my recommendation.

An "Off-Board" External-Power-Supply would be the best overall plan.
.
.
.
 

Irving

Joined Jan 30, 2016
3,884
You have 5 relays each having a 167ohm coil, needing 30mA, so your total demand at 5v will be 150mA. The maximum total load for the ATTiny404 pins is 100mA absolutemax in total; you need transistor buffers between the ATTiny and the relays (or limit it to no more than 2 relays on at any time)

On top of the relays the ATTiny404 needs 10mA itself. Thats a total of 160mA all relays on. That 160mA is drawn from the 78L05 which is rated at 100mA max output. You need the standard 7805 (1A) not the 78L05.

However, that 160mA is also drawn from the 24v supply through a 2.2k resistor. V = I.R = 0.16 x 2200 = 352v ie there will be 0v at the input to the regulator! A resistive divider wont work here. The 24vac rectified will give 33v out, which is only just below the 35v max input of the 7805. Also at 160mA the 7805 will dissipate 0.16 x (33-5) = 4.5W which will need a big heatsink. You would be better off using a switching buck regulator here, many available at Amazon or eBay, eg https://www.amazon.co.uk/Youmile-LM2596S-Converter-Regulators-Adjustable

Finally you need protective diodes on each relay coil...
 

MrChips

Joined Oct 2, 2009
30,802
You state that your power source is 24VAC.
Is there anyway to change this specification?
As others have already stated, if this is non-negotiable, then your first solution is to use a transformer to reduce to AC voltage to about 6VAC.
 

ElectricSpidey

Joined Dec 2, 2017
2,776
I don't think that divider before the regulator is helping any, if you want to tap off some voltage before the regulator I would at least use a series resistor, but that still isn't a good choice either.

Maybe a pre regulator, such as a shunt regulator.

Or buck up and add another transformer before the bridge.
 

Irving

Joined Jan 30, 2016
3,884
Here's a partial rework of your circuit based on my post above. You're not far wrong, just some devils in the detail...

1678917894332.png

Using the ULN2003 driver, the protection diodes are built in. Note that the logic has changed - a high output activates the relay.

The 40v/5v buck converter is readily available on Amazon/eBay. Alternatively,there are switching regulators built into the same 3-pin package as a 7805,
 
Last edited:

Thread Starter

AverageMoss

Joined Apr 24, 2021
34
Thank you to everyone that's posted so far!

I found an enclosed AC-to-DC converter like this one that can be mounted directly to a PCB which could work, but I can't find one with a rated input of lower than around 80 VAC. Does anyone know if something like that exists for an input of 24 VAC rms (around 40 VAC peak)?

Might be a simpler solution...

Also, most thermostats run off of that voltage and I've wondered how they do it?
I've looked at images of thermostats PCB's online but I just can't figure out how they do it.
 
Last edited:

LowQCab

Joined Nov 6, 2012
4,069
Here's a simple solution ..........
This Circuit will provide 5-Volts at 5-Amps = 25-Watts.
Requires small Heat-Sink.
( The present 24VAC Transformer may not be able to deliver ~25-Watts )
( You may need much less than ~25-Watts )

For much less "Ripple-Voltage" and "Switching-Noise",
adjust the Resistor-Voltage-Divider for 9-Volts, instead of 5-Volts,
then, follow the Switching-Regulator with a "Linear-Regulator" such as an LM-338.
.
.
.
5V Buck Cnverter png.PNG
.
5A Linear-Regulator .png
.
 

Attachments

Last edited:

Thread Starter

AverageMoss

Joined Apr 24, 2021
34

Thank you for your help!

I really like the product in the second link you posted (SPAN02C-05). I think it would be the best solution for my project at this moment.

I wanted to ask though, could I directly input a rectified AC sign wave into the converter and still get a smooth DC output?
Or do I have to filter it beforehand?

I read through the datasheet but could not find anything about this.
 

Thread Starter

AverageMoss

Joined Apr 24, 2021
34
Just an update on the project.

I put together an updated circuit using the ready-made DC/DC component that Irving suggested. I ordered the component and tested the circuit and I'm happy to say it works perfectly.

Thank you to all who took the time to help me out!



Here is the updated circuit:

Screenshot_1.png
 
Top