How to avoid unwanted blocks with Arduino
How to avoid unwanted blocks with ArduinoOne of the worst things that can happen to us after so much work to write a sketch, is to see our Arduino crash unexpectedly for no understandable reason. There are many reasons for this to happen, but the one due to switching inductive loads is quite common.
There is an easy way to avoid this problem, and that is to use photocouplers. An optocoupler integrates a LED diode and a photosensor (transistor or triac) into the chip.
This simple coupling allows us to obtain galvanic isolation between Arduino and our load, be it a relay, a motor, or a 220v load.
In addition, divide the two worlds is good in order to prevent disturbances from reaching the Arduino, they also safeguard us from the possibility of taking dangerous electrical discharges when we are driving a load connected to the power network, in which case we will use an optocoupler with a triac output and not a transistor.
There are ready-made cards that mount optocouplers that make it easier for us.
The same technique is recommended not only for the outputs to relays and motors, but also for the inputs, to be sure that the disturbances are confined outside the walls of the Arduino.
If you enjoyed reading this little guide, click on an advertising banner. You will help us pay for the server.