24vac to 5vdc

Thread Starter

Eric1066

Joined Oct 27, 2022
1
Hi,

I'm not an engineer and have no idea who to turn to for this, hence why I am here.

I would like to add a wifi relay switch on to my automated gates. The switch has 7-32v AC input as well as 5v dc input. The circuit board for the gates only has a 24vac output.

However, the 24vac connections, fried my first switch and I am reluctant to do that again. However the switch works perfectly when I tested it and I connected it to 5vdc via my phone's USB charger.

So, my problem is how to get the 24vac in the gate's box down to 5vdc and, whatever can do that, to be small enough to fit in the gate's box.

I know that this may sound stupid to you guys, as I'm sure there's probably a reason why not, BUT, wouldn't any normal phone charging usb plug do this? I know that they are for 240vac (I'm in the UK) and it converts to 5v dc, so it couldn't do 24vac? Or is that just too low for the electronics inside the plug?

If that was a stupid suggestion , can someone point me in the right direction.

There is no space in the box for me to put an electrical socket and to simply plug a usb plug in to, so that's out. There is however, 240v going into the gate's board, but I cant find a transformer that is just wires to connect to the 240v. The 240vac to 5vdc transformers always seem to come as these big moulded 3 pin plugs with the transformer within that. There are however the laptop type transformers where the plug is a separate cord from the actual transformer, but these are usually 12vdc and up to 24vdc. So again as a workaround I thought I could connect to the 240vac and run through a laptop type transformer to 12vdc, and then, get a DC to DC converter to get to my 5v, but that sounds like a lot more things in the chain that can go wrong.


Anyways,
Any help is GREATLY appreciated!
Eric
 

AlbertHall

Joined Jun 4, 2014
12,186
Welcome to AAC, @Eric1066
You could rectify and smooth the 24VAC, giving about 34V, and then use an LM2596 to reduce that to 5V.
Both parts of this could use ready built modules so you would just have to wire it all up.
 

ronsimpson

Joined Oct 7, 2019
2,515
The switch has 7-32v AC input as well as 5v dc input.
We need more information on "The switch"! Pictures, who made it, part number.......
I have some "IOT switches" that have a "7-32v AC input" and a "5v dc input". They are to be used as (AC or DC) not (AC and DC). They are not to be used at the same time.
I do not know about your switch, so I may be wrong.
ron simpson
 

dl324

Joined Mar 30, 2015
15,421
Welcome to AAC!
So, my problem is how to get the 24vac in the gate's box down to 5vdc and, whatever can do that, to be small enough to fit in the gate's box.
Assuming the 24VAC output can provide sufficient current, you can add a rectifier, filter, and buck regulator.

Buck regulator such as:
1666895775746.png
There are probably less expensive options. This was the first I looked at. Dimensions are 17.5mm*12mm*4.3mm (length*width*height).

You could try using a half wave regulator to save the additional 3 diodes a bridge regulator would require. You don't specify how much area you have for this additional circuitry, so I don't know how much filter cap you can accommodate. Using a bridge rectifier would let you use a smaller filter cap.
1666896304335.png
 
Last edited:
Top