I want my Raspberry Pi B+ to periodically check if my Raspberry Pi 3 is still running (not frozen). If it is frozen, I wan't my B+ to hard reset my Pi3 by pulling the power, then giving it power again after a few seconds.

I have bought a 3.3V relay of ebay (view it here) and plan to use it as a switch for the power line of a USB cable.

I have tested the relay directly connected to GPIO pin 18, and GPIO ground. The relay works correctly like this.

My question is: Should I (or do I need) to use a current limiting resistor? Is there any chance of bad stuff happening if I continue to directly connect it to GPIO 18 and ground?

1 Answer 1


What you linked is a relay driver, not a relay. It appears to have current limiting on the opto-coupler, although you would never know from the sketchy "data".

If you want to reboot if the Pi is not running you do not need any external hardware, you can use the inbuilt watchdog timer.

Here's a link to more information on the Raspberry Pi's built in Watchdog timer.

Here's another link on how to use the Pi's Watchdog timer.

Here's a schematic of the "relay driver" you referenced. It shows that the driver can control a solenoid which would actually control the turning on/off of the power to the end device.

enter image description here

  • This may be a really stupid question, but what is the difference between a relay and a relay driver? Googling "relay driver definition" starts talking about relays (not relay drivers). Thanks for the tip about a watchdog timer, I'll look into that :) May 11, 2017 at 9:05
  • A relay is an electro-mechanical device. Relays can switch quite high currents. A driver is a device to interface between the limited logic output of a computer to the higher current required to switch a relay. The device you bought has very limited data, so it is difficult to say what its capabilities are.
    – Milliways
    May 11, 2017 at 10:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.