Operationpi
Posts: 2
Joined: Thu Dec 07, 2017 11:42 pm

Mains Timer Equivalent for Raspberry Pi

Thu Dec 07, 2017 11:53 pm

I have to start off by saying I’m a newb with both the hardware and software side of things, and any help here is greatly appreciated.

I need to find a way to schedule regular reboots that are controlled by hardware - I do have a software solution but it is not entirely robust, and external devices are not aesthetically suitable for some of my clients.

I’ve just left a store that focuses more on Arduino’s than Pi’s, but they advised using a 5v relay board. Unfortunately I don’t understand how this would work.

Help please!

ghans
Posts: 7723
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Mains Timer Equivalent for Raspberry Pi

Fri Dec 08, 2017 7:04 am

You might want to look into "hardware watchdogs". The Raspberry Pi includes an internal
hardware watchdog.

A hardware watchdog reboots the whole system by force unless it is recieves an "i'm alive" signal from software running on the Pi regularly. If the software hangs (perhaps a kiosk app or Linux itself), the signal does not get sent, a timer starts ticking and after 2, 10, 15 or whatever seconds the Pi is forcefully resetted.

If you want an external watchdog instead of the internal one, you would need both a timer component and a relay. The relay would cut and reinstate power to the Pi (reboot it). A relay is an electromechanical switch which is controlled by electricity. You can use a relay to turn off/turn on devices with big elctricity requirements with small control currents/voltages.

Fun fact : This sounds similiar to a laymans explanation of a transistor , doesn't it ? Relays were indeed used to build the first computers before transistors were invented.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Operationpi
Posts: 2
Joined: Thu Dec 07, 2017 11:42 pm

Re: Mains Timer Equivalent for Raspberry Pi

Tue Dec 12, 2017 10:02 pm

Thank you, Ghans!

Your reply is super helpful!

My developer had thought we had already installed the hardware watchdog, but apparently there are a few known bugs with it. We will dig deeper into that as time allows and I will let you know the results.

Thanks again for your wonderful help!

Daniel

ghans
Posts: 7723
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Mains Timer Equivalent for Raspberry Pi

Wed Dec 13, 2017 9:13 am

Are you using the inbuilt HW watchdog or an external one of your own creation ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

sparkie777
Posts: 118
Joined: Tue Nov 27, 2012 4:37 am

Re: Mains Timer Equivalent for Raspberry Pi

Sat Dec 30, 2017 7:05 am

Operationpi wrote:
Tue Dec 12, 2017 10:02 pm
My developer had thought we had already installed the hardware watchdog, but apparently there are a few known bugs with it.
what bugs are you talking about? The watchdog works like a charm :-)
Is this the correct way to install the watchdog package?

Return to “Interfacing (DSI, CSI, I2C, etc.)”

Who is online

Users browsing this forum: Bing [Bot], odenizot and 6 guests