How to set up the power supplies
For our system, it is very important to set up the power supply that will be used in the system. First we need to ensure that the voltage for the Arduino is about 5V. In the following diagram, we have shown how to configure the voltage to about 5 volts:
Power supply for AC loads
If we need to connect AC loads to the Arduino or Raspberry Pi Zero and make an industrial control system, we need to use a voltage of 24 V of DC, as you can see in the following circuit diagram:
Connecting a relay of 24 DC volts to the Arduino board
In the following diagram, we have the circuit to control an AC load using a relay of 24 volts of DC:
We have the final circuit, which represents the interface to control an AC load, connected to the output digital pin to the Raspberry Pi Zero or the Arduino board: this is not very common to see, but it's necessary to learn how to connect a relay that can be energized with 24 volts of DC to the Arduino board:
Finally we have the final circuit...