Components to create a power supply from 230V AC

Hi, guys!

I'm in the process of building a microcontroller circuit with the Atmega 328, which is supposed to control a few 24V valves.

My plan is having the power supply inside the same box as the controller circuit will be in, and a power cable hanging out that can be connected directly into a 230V socket.

I'm unsure of which isolation transformer to choose, as there is a lot to choose from. The circuit will probably not draw more than 1.5A at max. I'm thinking a 230V AC to 24V AC transformer, a fuse according to datasheet of transformer, then a rectifier bridge, an electrolytic capacitor of 2200uF, and finally a 7805 regulator for supply to the microcontroller, and a 7824 regulator for the 24V circuit.

Then the plan is using a couple of logic level MOSFETs, to control the 24V circuit with the 5V digital outputs from the microcontroller.

I'm asking for guidance in choosing the components for the power supply for this project, especially the transformer, as I have no experience with these components. Not some cheap ebay stuff. It should be built to last as long as possible. :slight_smile:

I found two transformers: Link 1, Link 2. Is this something I could use, or would you recommend something else?

Thanks! Any help I can get is appreciated.

The part of the picture you left out is the total current needed to operate your valves. And are you considering a printed circuit board for your project? If not, why pick a transformer designed for board mounting?

Also, what ever you choose, there is NO need to regulate the 24 volt going to the valves.

Paul

A couple of things...

The peak of an AC waveform is about 1.4 times the RMS and the capacitor will charge-up to the peak, so that's about 33V (minus the voltage drop across the bridge +/- the transformer tolerance).

The power dissipated (Watts) by a linear regulator is Voltage x Current, and that's the voltage dropped across the regulator. With higher voltage across the regulator you might overheat it (even if you are within the current specs). And, the 24V regulator could overheat too, with the combination of voltage & current.

If you can find an 18V transformer, you could eliminate the 24V regulator. It would also help if you can drop about half the voltage across your regulator and half across the Arduino's regulator.

Paul_KD7HB:
The part of the picture you left out is the total current needed to operate your valves. And are you considering a printed circuit board for your project? If not, why pick a transformer designed for board mounting?

Also, what ever you choose, there is NO need to regulate the 24 volt going to the valves.

Paul

Hi, Paul.

Thanks for your feedback.

The valves we are going to control is not set yet set, but let's say 300mA per valve, max 2 valves will run simultaneously.

Yes, this is gonna be a PCB in time, so the transformer could be board mounted. Otherwise I could make some mechanism to fasten it elsewhere in the box. But for the proto type, I'll be using a breadboard.

Why is it not needed to regulate the power to 24V? The valves are 24V DC. And the transformer gives you 24V AC. If you rectify 24V AC, you get approximately 34V. Right?

DVDdoug:
A couple of things...

The peak of an AC waveform is about 1.4 times the RMS and the capacitor will charge-up to the peak, so that's about 33V (minus the voltage drop across the bridge +/- the transformer tolerance).

The power dissipated (Watts) by a linear regulator is Voltage x Current, and that's the voltage dropped across the regulator. With higher voltage across the regulator you might overheat it (even if you are within the current specs). And, the 24V regulator could overheat too, with the combination of voltage & current.

If you can find an 18V transformer, you could eliminate the 24V regulator. It would also help if you can drop about half the voltage across your regulator and half across the Arduino's regulator.

That is good info! Maybe use a 1x230V to 2x9V transformer, to get both 18V for the 24V, and 9V*1.41 to the 5V regulator?

EDIT: Or maybe it is better to use a 230V AC to 3.3V AC transformer (if it exists?), and use that as power supply for the microcontroller, and then have a step up transformer or an opamp to 24V DC. This way we don't have the power loss over the regulator. Yes/No?

jgrovan:
Hi, Paul.

Thanks for your feedback.

The valves we are going to control is not set yet set, but let's say 300mA per valve, max 2 valves will run simultaneously.

Yes, this is gonna be a PCB in time, so the transformer could be board mounted. Otherwise I could make some mechanism to fasten it elsewhere in the box. But for the proto type, I'll be using a breadboard.

Why is it not needed to regulate the power to 24V? The valves are 24V DC. And the transformer gives you 24V AC. If you rectify 24V AC, you get approximately 34V. Right?

That is good info! Maybe use a 1x230V to 2x9V transformer, to get both 18V for the 24V, and 9V*1.41 to the 5V regulator?

EDIT: Or maybe it is better to use a 230V AC to 3.3V AC transformer (if it exists?), and use that as power supply for the microcontroller, and then have a step up transformer or an opamp to 24V DC. This way we don't have the power loss over the regulator. Yes/No?

Solenoids are so slow in reacting, they don't care if the DC voltage is steady or pulsating 100 or 120 times per second. By the way, HOW LONG are the solenoids going to be activated and how much time to cool off?

Paul

Paul_KD7HB:
Solenoids are so slow in reacting, they don't care if the DC voltage is steady or pulsating 100 or 120 times per second. By the way, HOW LONG are the solenoids going to be activated and how much time to cool off?

Paul

Okay, thanks, Paul.

The solenoids will be activated for about 5 seconds at max. When deactivated they will not be activated again until at least 5 seconds has passed, usually minutes.

When you include mains supply and low voltage wiring in the same enclosure, there are laws regarding the isolation of the two AND any associated wiring. This is more emphasised when you start to bring the low voltage wiring out of the enclosure. It is usually more appropriate for diy to use plug packs or similar where the mains wiring is contained in the above manner. You have to plug a lead in to the mains supply anyhow so no difference there. The point being the plug pack or similar is a much safer approach for everyone involved( or just passer-by)

You need to decide what valves you are going to use.
24V valves can be either AC or DC depending on what type of valves they are and what they are controlling.
Water valves for example are normally 24V AC.

Hi,

It will be controlling 12VDC valves for water. Less than 1A per valve, max two valves running at the same time.

I have decided to use an external transformer, 230VAC to 12VDC, and plug it into the circuit with a jack plug.

What I then need is something like a buck converter to transform down to 5V efficiently, and a boost converter to give 24V that I will use to send a digital signal to a freqeuency drives digital input.

Do any of you have any suggestions or experience with buck/boost converter ICs? Any tips/advice?

Thanks.

jgrovan:
Hi,

It will be controlling 12VDC valves for water. Less than 1A per valve, max two valves running at the same time.

I have decided to use an external transformer, 230VAC to 12VDC, and plug it into the circuit with a jack plug.

What I then need is something like a buck converter to transform down to 5V efficiently, and a boost converter to give 24V that I will use to send a digital signal to a freqeuency drives digital input.

Do any of you have any suggestions or experience with buck/boost converter ICs? Any tips/advice?

Thanks.

Let's tighten up on the vocabulary a bit. A transformer only changes the input AC to an output AC, not DC.

A jack plug means nothing. A jack is the female part of the connector. The plug is the male part that goes into the jack.

If you use a phone plug/phone jack to make a power connection, be aware putting the plug into the jack will cause a temporary short circuit. If you are using a coaxial type power plug and jack, then there is not problem with "hot" plugging.

Paul

For getting from 12V to 5V I'd rather use a buck converter. Much more efficient, and much less risk of overheating.

For the solenoids you don't really need capacitors to smooth the power (for the buck converter you probably do need them). You can just take a 230V-24V transformer, rectifier, and use that to power the solenoids. Good enough.

jgrovan:
What I then need is something like a buck converter to transform down to 5V efficiently, and a boost converter to give 24V that I will use to send a digital signal to a freqeuency drives digital input.

Do any of you have any suggestions or experience with buck/boost converter ICs? Any tips/advice?

Thanks.

Hi, if all you need the 24Vdc for is a VSD digital input, the VSD should have a 24Vdc pin for that purpose.
Just get the controller to control a relay and the relay contacts supply the VSD's 24Vdc to the appropriate pin when activated.
The VSD manual should have suggested control circuits for your device.

Do you have a basic diagram of how you want to connect the power systems together, either a CAD drawing or a picture of a hand drawn diagram will help.

Thanks...Tom... :slight_smile: