Use Raspberry Pi To Control Light Switches
Cc by sa 3 0 by firstfreddy.
Use raspberry pi to control light switches. Connect breadboard to raspberry pi. In short i d like to control an ac socket or multiple sockets. 220 ohm resistor. Basically i want to control the light socket switch to on off via a remote control.
In order to do this you need to understand how to control a relay using raspberry pi as relay is the main component in controlling electrical loads. Our raspberry pi cannot turn the lamp on by itself so we use a relay switch to simple break the circuit when we want the lamp off and then connect the circuit when we want it in. The switch looks something like this. I though about using the raspberry pi to switch on and off other electrical devices which unnecessary consume power in stand by mode.
Using figure 2 as a reference connect the gpio pins on the raspberry pi to the breadboard using five female to male jumper wires. Often you want to control modules with a higher voltage with the raspberry pi. Since the pi only tolerates a maximum of 5v the gpios even only 3 3v without relays there is the risk that the pi could burn out. What i plan to do is mount a device on the socket switch.
On raspberry pi it s possible to use the python programming language to connect to the api and manage the lights at home. The relay switch is utilized by means of a low voltage pulse. The relay switch works how a switch normally works however it operates using an electrical source the raspberry pi. So user may use a phone connected to wifi to open the local webpage and turn on off the light.
For this purpose relays can be used on the raspberry pi. Unfortunately one day the raspberry pi running the nodered app passes by in smoke and it was not possible to switch these lights any more. Running the program to use the reaction timer load and run the program 07 reactions py in mu. We will do a practical demonstration with a raspberry pi to light up an led using the spst toggle switch.
The most common type of switch you will see in most projects are toggle switches. Toggle switch spst led. This device is connected wirelessly to a raspberry pi controller via local network. Raspberry pi will host a local webpage which contains the remote switch and also connect to wifi.
Of course i had a backup of the software created using dd directly from the sd card but no spare raspberry pi. Raspberry pi will be used for the remote switch. How can one let the computer push the button.