I’m going to build this later, but as the follow up on shortening the RUN pins of a Raspberry Pi to reset it in The woods and trees of OpenSuSE on single-board computers – image abbreviations – and getting it installed using OS X, I want to see if the below will work for me to have a pair (maybe trio?) of Raspberry Pi devices watch each other and reset any hung one.
The need comes because sometimes a Raspberry Pi either hangs or just won’t finish a reboot sequence:
- Raspberry hangs at reboot · Issue #626 · raspberrypi/linux [WayBack]
- Raspberry Pi • View topic – No boot after reboot command [WayBack]
Basically a Raspberry Pi has GPIO pins that can drive electromechanic (like mechanical relay) or electronic (like transistor+resistors or SSR solid-state relay). Examples:
- Most solid state relays work with 3V-30V input signals, so these work:
- Topic: Raspberry Pi – Using Crydom D24XX Solid State Relay | Tinker Labz [WayBack]
- Some only work with “zero cross” which means the switched output needs to be AC
- Prices vary between USD~1 and USD~50 and there are both AC and DC versions: The Raspberry Pi Hobbyist: Solid State Relays [WayBack]
- Some have zero for off others have one for off: Raspberry Pi • View topic – Python and solid state vs mechanical relay [WayBack]
- Ensure you always put a resistor on your GPIO pints to prevent a “fried Pi”; Properly wiring a solid-state relay to the GPIO pins? – Raspberry Pi Stack Exchange [WayBack]
- Mechanical relays:
- Are cheaper than SSR
- sainsmart relays is that they are NOT UL or CE approved: Raspberry Pi • View topic – Help selecting relay to switch 110V power from Pi [WayBack]
- you need an extra diode around the relay input to protect the low-power part during switching: Control a Relay From Anywhere Using the Raspberry Pi – Open Home Automation [WayBack]
- Sometimes you also need a transistor to increase the 3.3V GIO to 5V for the relay: Raspberry Pi – Driving a Relay using GPIO | SusaNET [WayBack]
- gpio – How to add isolation between raspberry pi and relay board? – Raspberry Pi Stack Exchange [WayBack]
- 433 Mhz – How to control mains electricity safely: Simple home automation using the Raspberry Pi – Electronics information from PenguinTutor [WayBack]
- GPIO pins
- Do not draw more than 16mA per GPIO pin or 50mA for all GPIO pins:
- Resetting:
- Raspberry Pi • View topic – Hardware reset and P6 riser (rev b / 2) ? [WayBack]
- Raspberry Pi • View topic – Orderly shutdown your RasPi using a hard disk jumper [WayBack]
- Raspberry Pi • View topic – Wake from halt [WayBack]
- Using a transistor and two resistors to reset another Raspberry Pi: Raspberry Pi • View topic – Hardware reset and P6 riser (rev b / 2) ?
So basic steps:
- Get switching gear (relay+diode, transistor+resistors or solid-state-relay)
- On each Pi modify the RUN holes so it has a header
- Connect header to switching gear
- Write watch-dog code to monitor other Pi and flip GPIO pin
- Test, test, test
And since I’m relatively new at electronics:
- Can someone explain this simple schematic? (capacitor with voltage regulator) – Electrical Engineering Stack Exchange
- LED Resistor Calculator
- IC Voltage Regulators
- Power is important: https://www.youtube.com/watch?v=bA9Ol6q9Xmc
- NPN transistors part 1: basics https://www.youtube.com/watch?v=Dn2NEZC5dEM
- NPN Transistors part 2: GPIO and resistor values calculated by beta value of transistor: https://www.youtube.com/watch?v=_nCNXY98qyE
- PNP transistors and switching 5V with GPIO pins by adding an NPN transistor: https://www.youtube.com/watch?v=UdAnUc7nXYs
- GPI / 3.3V / 5V power: https://www.youtube.com/watch?v=wwgmgobDqms
- LED and resistors: https://www.youtube.com/watch?v=UApKArED3JU
- LED through GPIO: https://www.youtube.com/watch?v=J9cEAGTLaC8
- GPIO voltage levels for off/on: 0.00-1.10V / 1.34V-3.30V; https://www.youtube.com/watch?v=Wr49ia3oID4
- switches and pull-up / pull-down resistors to prevent floating values: https://www.youtube.com/watch?v=Bqk6M_XdIC0
- RGB LEDs: different resistor values for each colour: https://www.youtube.com/watch?v=b4_R1eX9K6s
- PWM LED: frequency and duty cycle; https://www.youtube.com/watch?v=uUn0KWwwkq8
- GPIO-on to 0V or 3.3V to GPIO-off to light an LED: https://www.youtube.com/watch?v=VNiX6Swu1MY
- Vbe is about 0.70: amplifier – Why is Vbe a constant 0.7 for a transistor in the active region? – Electrical Engineering Stack Exchange
–jeroen
via: https://plus.google.com/u/0/+JeroenPluimers/posts/EXYKwrs2xrT
Filed under: *nix, Development, Hardware Development, Linux, openSuSE, Power User, Raspberry Pi, SuSE Linux
