im doing a project that involves controlling 4 12V fans, 4 small 12v water pumps, 4 water flow sensors (5v), 1 4x20 LCD, some more sensors and a fogger that runs on 24VAC, and some other things. all this will be outside in a flat roof.
I dont have much experience in electronics and im doing this as a long-term learning project. I'm now thinking about powering all this, and not very sure how to do it. being newbie, i want to have everything very clear before I attempt to do anything with the mains AC.
note - the 24VAC fogger datasheet is crap and doesnt even mention current. i got around 600mA with a multimeter, and the fogger came with a wall-wart AC adaptor (pri: 220V 50Hz, sec: 24V 1.2A), so i guess i should be safe assuming a max consumption of 1A. is this right?)
ok, so I have added together the max power consumptions of every device and I got these totals:
- at 24VAC -> total 1A.
- at 12VAC -> total around 1.5-2A
- at 5v -> total less than 500mA, i think... but to be safe, lets assume 1A.
so the total would be around 4A.
after some days reading a lot and seeing lots of schematics about powering a project, i have come up with this schematic
but i have lots of questions:
- is this schematic ok? what should i change or add?
- how to calculate the correct values for the capacitors etc?
- about the transformer... is this supossed to represent a pcb component transformer, or a complete wall-wart? and how to choose it? i guess i need one with a primary 220v 50Hz, sec. 24VAC and at least 4A... right?
- will i be able to feed also arduino directly from the 5V line?
of course any other tip or advice will be very welcome.
PD- it seems the pic of the schematic gets cut, dont know why... so here it is reescaled down...
10/10 for doing your research.
Your Arduino already has a 5VDC on-board regulator, so all you really need to do is rectify the 24VAC and plop a big capacitor in front of a 12V regulator, then connect the Arduino Vin/Raw pin (NOT the VCC pin!) to the 12V regulator output. The onboard regulator should handle the Arduino plus an LCD plus some sensors.
I also think you will need to parallel two 12V regulators to handle 2A of current.
Read the regulator datasheets for recommended capacitor sizes. Since you have an AC input though, use the biggest cap you can coming off your rectifier. Hopefully 1,000 to 2,200uF will be adequate.
I would not use a PCB mount transformer. It's dangerous to be messing around with mains power like that. I'd highly recommend buying an off-the-shelf enclosed wall wart with a nice barrel plug output. You can buy a matching barrel jack to solder to a small PCB/perfboard where you have your rectifier and regulators mounted. From there you can solder in screw terminals or other fancy plugs for the various 24VAC and 12VDC outputs.
A fuse on the 24VAC input is still a good idea.
will follow your advice about the transformer, I want to avoid touching the mains as much as possible... its scary!
as for the 12v regulator, the problem is i think arduino's regulator could get pretty hot converting from 12V... also, i forgot a couple of devices so the total current required in the 12V will be around 3A...
I think I will probably go for an adjustable regulator that can give me that current. i guess an LM350 should be fine... or even better an LM338?
so let me see if i understand correctly how this all works: as I will have a max load of 1A from 24VAC, 3A from 12VDC, and 1A from 5VDC. that means the 12V regulator will have to support 4A (3A from 12VDC + 1A from 5VDC). right?
also after some more reading, it seems when converting from 24VAC to DC, i will get around 31VDC (at max load) to 39V (without load). wow thats a lot of power that the regulator will have to burn... can i use another regulator (maybe another LM338) to convert the high voltaje to 24V for example, and then another one to lower it more to 12v? or is a bad idea?
just some math.. when you rectify the 24VAC to get DC, then add that huge capacitor, you will get a DC that is 1.414 times the AC voltage. so, your first DC voltage will be about 34 volts.
the LM7812 will burn up in short order as the maximum value of the input is 35 V ANY AC ripple will exceed that 35v
also, the LM7812 has to burn up that difference in voltage as heat, so you will need a huge heat sink.
I would offer that you can buy either a board with am LM2596 from e-bay that will be a chopper DC-DC converter and have almost no waste, or a simple power supply,
for a dollar
for a couple dollars.
to get started and testing, you should be able to use an old PC computer power supply, or one from a lap-top,
Please explain how the first e-bay solution will provide 12V@3A?
Please explain how the second will provide 24VAC for the fogger?
You will want to find a DC/DC converter, about 36W or greater for the 12V. Make sure the input range includes your 36V you will see when you run the math: 24V * 1.414 * 1.1 (to allow for a 10% high-line on the 120V).
Note: a 12V@60W converter would be OK since it just wouldn't be working as hard.
The 12V to 5V converter should be real easy to find.