====== 230 V Dimmer ======
For this functionality the **[[io_project|IO project]]** (base or pro) has to be [[fwupdates|uploaded]] to Netzer.
The Netzer supports the direct connection of phase dimmers. So it is possible to control high voltage loads like bulbs via Ethernet resp. Intranet/Internet.
**Be careful when experimenting with 230 V. There is danger to life!**
A phase switching mechanism is described here that is for example built up by a thyristor. For this switching mechanism, the important feature of the thyristor is that in zero crossing it deletes from mains voltage itself, i.e. switches off.
{{ :phase_control.jpg?nolink& |}}
The switching mechanism basically consists of zero-crossing detectors and a dimmer circuit.
{{ :en:netzer:phasecontrol.gif?nolink& | Block diagram phase dimmer}}
===== Zero-crossing detector =====
IO0 is used as a zero-crossing detector for the 50\ Hz network frequency. For this purpose, the pin is required to be configured as a digital input with an edge trigger switched on:
{{ :en:netzer:phasecontrolio0.gif?nolink& | IO0 setting}}
Zero crossings must be captured by an external circuit, creating a homopolar pulse during every zero crossing. For this purpose, for example an AC optocoupler such as SFH620 is suitable.
===== Dimmer circuit =====
A triggered pulse output of Netzer is dimmed. **IO3** or **SPI_INT** are both suitable for this. It is hence possible to operate up to two dimmers in parallel.
{{ :en:netzer:phasecontrolpulsee.gif?nolink& | Pulse setting}}
This setting allows very granular gradations with a resolution of 200\ ns. Since under mains voltage a half cycle is 10\ ms and values between 100 (the is the smallest possible value in [[en:netzer:io#impuls|pulse operation]] and 50000 possible. Values comply with the time according **to which** the thyristor is powered. I.e. the larger the value, the less power will run at the output.