I am trying to block/process 2 signals in the arduino wich converts these signals to 3 type of scenario's.
What I want to do is to let the arduino decide which device it should activate. It is for my wood stove which is connected to a boiler tank.
There are 2 signal the arduino needs to get
1 - a 24v thermostatic controller who drives a valve which drives the central boiler and..
2 - a 220v from a adjustable immersion thermostat, this one is connected to the tank.
How can read these signals in the arduino, is there a shield i can use.
I am reading a lot, as far as I am getting is a opto isolator, but I can not find a good manual to use it (read simple).
I already got a relay board/shield to convert the signal to the boiler and valves surounding the tank.
As you may know, the negative half of an AC voltage can damage the Arduino, as can voltages greater than +5V. And of course, 220VAC is dangerous for as well as the Arduino.
You can use an opto-isolator, but rather than connecting the opto-isolator directly to 220VAC*, it's better to get a small (low current rating) step-down transformer to step the voltage down to 12 or 24V. A transformer provides isolation as there is no direct electrical connection between the primary and secondary. Or, get a 5VDC power supply that runs off 220VAC.
You can use a series diode to rectify the 24VAC (and/or 12VAC) and then a [u]Voltage Divider[/u] (2 resistors) to knock the voltage down to 5V.
As DVDdoug has said, use a transformer for 220v. Cheapest is an old mobile phone charger. Some put out a bit over 5v so I prefer to use an optoisolator as well.
Although you can use a voltage divider for the 24v, I would also use an optoisolator. Just make sure you do not exceed the LED reverse voltage (usually fairly low, about 5v).
richier:
thanks for the solutions! the relay solution is one I have explored can the signal go 2 ways? I got a 4 relay board.
Chances are that relay board won't have coils rated for 220VAC or even 24VDC. You'll need different relays. Post the model of the relays if you want to be sure.
I think I'll go for the next 2 solutions. The 220v to 5v I'll give the mobile phone charger a try, because I can make a socket, at least a save way to convert 220v to 5v and for the 24v i'll use maybe this buck convertor
The next thing I must explore is to put this safely in a box and a way to easily, and safe, pick up the signal from the phone charger.
Opto-isolators is to new for me, maybe someone can show me the direction to a good website, kinda like opto-isolators (installing) for dummies.
Maybe it is much easier than I think it is :