I did some more research because of Having one Raspberry Pi reset another Raspberry Pi through relay or transistor.
- [WayBack] How To Add a Reset Switch To Your Raspberry PiRemoving and replacing the USB power cable puts undue wear and tear on your Raspberry Pi, particularly the power port itself. What the system really needs is a reset switch, but sadly none was included.
- Grove Relay board:
- has two versions; the V1.2 schematic adds a XC6206P302MR voltage regulator to regulate 3V through the relay coil and an extra 47k Ohm pull-down resistor.
- has a trigger on high supporting a voltage of 3V, so it works with the Raspberry Pi 3.3V GPIO pins.
- is “normal open”, so suits the reset scenario (connect on trigger) well.
- has no “normal closed” header, so if you need that, you’re out of luck
- does not have optocouplers:
- Be careful with high voltages on supplies that differ from the one powering your Raspberry Pi
- It’s fine for resetting another Raspberry Pi powered from the same source
- The relay is rated 250V ~ but I’d be careful (I’m not sure if this is mains electricity 250V RMS or 250V peak; if the latter, it would be suitable to 175V RMS (approximately 250/1.42 volt).
- An excellent description (sans optocoupler) on how to connect a relay to power, ground, signal-input and both outputs is at [WayBack/Archive.is] gpio – How to add isolation between raspberry pi and relay board? – Raspberry Pi Stack Exchange (thanks [WayBack] ppumkin).
- Many 5V optocoupler (or optical-isolator, see video below) based relay boards work fine with the 3.3V GPIO pins from the Raspberry Pi.
If they don’t, then there are two basic solutions:
- Easiest: solder an extra resistor next to the signal input of about the same value (so the voltage drop over it halves), see for instance [WayBack] Controlling a relay board from your RPi · foosel/OctoPrint Wiki
- Harder: put an extra transistor in between to pump up the voltage to 5V, see one of the schematics below.
Details of the above can be found from the below links and images from those links.
There is also an Android App with a RaspberryPi distribution that allows you to operate relays:
Finally there are USB relays, shown way down in this post.
Often these are part of some home automation (domotica), IoT, or other, so these are relevant too:
Read the rest of this entry »