niss wrote: ↑
Mon Jul 02, 2018 9:36 am
I have a raspberry pi 3 and i just started using GPIO pins. So far, i have managed to control Led light. Now i want to control higher voltage. I want to control a 220 voltage with the raspberry pi, but in order to do that there has to be a relay in the circuit. My question is: Is the relay of 5V enough if i connect a source of 220V or do i need to add multiple one in order to control the 220V ? Thank you.
If you need to ask a question like that you are not experienced enough to be playing with mains circuits. It's dangerous to you and people around you.
1. All components must be verified as suitable for the voltages and currents concerned. That means looking up their manufacturers specifications, and also confirming the component in question has been independently tested to meet that specification. Note that, for switches (a relay is just a mechanised switch), contact ratings will be different according to whether the current is AC or DC, and whether the load is resistive or inductive.
2. All electrical assemblies must be checked by a suitable authority to confirm that such things as minimum gaps between circuits and appropriate insulation have been conformed to, so that nobody can come into contact with dangerous voltages even by accident and the voltage can't leak across too small a gap.
3. You really, really want to make sure your RPi can't get exposed to any voltage outside its specification - ie 3.3V.
The best way for a novice to switch a mains circuit is to use a commercial remote-controlled socket, and use the RPi to send the remote control signal.