Contents
How to control a Raspberry Pi with a relay?
The goal of this ible is to show how to get started with setting up a relay module on your pi and controlling it. My goal is to add scripts to my octopi to turn on and off LED lights, but anyway you decide to eventually control the GPIO commands, the setup is the same. A relay module board for the pi.
What kind of protection does a Raspberry Pi have?
Another “circuit-friendly” protective feature for your RPi is the opto-isolator (817C in the picture schematic). This isolates your GPIO pin (s) from the relay board.
Can a 3.3V relay be used on a Pi board?
It is not a very popular option because the 3.3v on the pi is limited to 50ma, so it can take 1 MAYBE 2 relays of the 3v types, but as many 5v relays as the board can take. Last comment, these boards differ from bare relays (i.e. just buying a 50c relay), in that the board has built in protection circuitry so you do not damage your pi
Can a Raspberry Pi control a GPIO port?
My goal is to add scripts to my octopi to turn on and off LED lights, but anyway you decide to eventually control the GPIO commands, the setup is the same. A relay module board for the pi. They come with up to 8 channels, you can use as many as you have free controllable GPIO ports.
On the Raspberry Pi, we will use GPIO3 (pin 5) and GND to connect the push button. You can use any Ground pin available on the Raspberry Pi GPIO header. One terminal of the push button must connect to GND, and the other terminal to GPIO3.
What kind of adapter do I need for Raspberry Pi?
A raspberry pi (does not matter which one, but check the site above to make sure you are using the correct pin mapping. Wiring and the proper adapters. Ribbon cables are popular, in my case I had old speaker\\fan\\USB headder connectors from old computers that I just reused and spliced.
How to shut down the Raspberry Pi 4B?
Apply power to the Raspberry Pi 4B and wait for it to finish its booting sequence. Press the button to shutdown the Raspberry Pi board. To startup, press the button again.