Go to advanced search

by paulv
Tue Jun 18, 2013 1:25 pm
Forum: Automation, sensing and robotics
Topic: Failsafe(r) use of GPIO pin driving critical applications
Replies: 41
Views: 12929

Re: Failsafe use of GPIO pin driving critical applications

Here is the updated circuit I have in mind:
(still not built and tested yet)
Thanks techpaul for spotting the error.
by paulv
Tue Jun 18, 2013 4:47 am
Forum: Automation, sensing and robotics
Topic: Failsafe(r) use of GPIO pin driving critical applications
Replies: 41
Views: 12929

Re: Failsafe use of GPIO pin driving critical applications

Well, according to Gert, the SOC based PWM is hardware based, so you cannot use that as a CPU hart-beat. ( we're talking here about the PWM that is available on channel 18 of the GPIO connector, and is labeled PCM_CLK) I was using the software version of the PWM, from the RPi.GPIO library, but got a...
by paulv
Sun Jun 16, 2013 11:50 am
Forum: Automation, sensing and robotics
Topic: Failsafe(r) use of GPIO pin driving critical applications
Replies: 41
Views: 12929

Re: Failsafe use of GPIO pin driving critical applications

Below is a suggested revision for the circuit, to improve the reliability of this particular solution. (Is there a better way to put a picture/diagram on this forum (not a link)? Using a software threat or during an init, the PWM is started on one GPIO channel, similar to the solution earlier, but n...
by paulv
Fri Jun 14, 2013 12:27 pm
Forum: Automation, sensing and robotics
Topic: Failsafe(r) use of GPIO pin driving critical applications
Replies: 41
Views: 12929

Re: Failsafe use of GPIO pin driving critical applications

I don't think we need to use airplane type redundancy and fail safe systems for an HVAC system. I do not want to downplay anything said, but if it's that critical, I would not use a Pi (or two or three) in the first place. BTW, I looked at some commercial thermostat systems of reputable companies, a...
by paulv
Wed Jun 12, 2013 8:42 pm
Forum: Automation, sensing and robotics
Topic: Failsafe(r) use of GPIO pin driving critical applications
Replies: 41
Views: 12929

Re: Failsafe use of GPIO pin driving critical applications

Interesting. I propose a competition to find the cheapest design to switch off a relay when the Pi crashes. Still powered, just crashed. Prize - 1 (one) virtual hug. Hi Joan, Coming from you that's a big compliment. Tks! :roll: I will enter the competition (good idea!) to try to score that hug. As ...
by paulv
Wed Jun 12, 2013 1:56 pm
Forum: Automation, sensing and robotics
Topic: Failsafe(r) use of GPIO pin driving critical applications
Replies: 41
Views: 12929

Failsafe(r) use of GPIO pin driving critical applications

I'm using my Pi as a web-based thermostat in my second home, on another continent. It is supposed to keep the temperatures in the house above a minimum, and below a maximum (it's in a hot climate!) Needless to say, when the pi crashes while the HVAC system is heating or cooling, it may continue to d...
by paulv
Sun May 26, 2013 2:04 pm
Forum: General discussion
Topic: What's the simple and safe way to do a "shutdown" button?
Replies: 60
Views: 68784

Re: What's the simple and safe way to do a "shutdown" button

Well, while was at it, I discovered yet another method to add a button press event to a python program. Turns out that when you use the GPIO.add_event_detect function, you can not only add a separate thread, but also add a debounce value like so: GPIO.add_event_detect(PORT, GPIO.FALLING, callback=my...
by paulv
Fri May 24, 2013 1:05 pm
Forum: General discussion
Topic: What's the simple and safe way to do a "shutdown" button?
Replies: 60
Views: 68784

Re: What's the simple and safe way to do a "shutdown" button

That's very interesting. There are a number of Python frameworks that allow you to turn multi threaded apps into an event driven app. You don't have to worry about managing threads, but write an event handler, so when your button gets pressed it runs the code in your event handler. Possibly the bes...
by paulv
Fri May 24, 2013 1:01 pm
Forum: General discussion
Topic: What's the simple and safe way to do a "shutdown" button?
Replies: 60
Views: 68784

Re: What's the simple and safe way to do a "shutdown" button

In the meantime, I decided to figure out how to do a thread in Python. Needed to do that for a while anyway, so I had a good reason. Here is my sample code: #!/usr/bin/env python2.7 import subprocess import RPi.GPIO as GPIO import time from threading import Thread GPIO.setmode(GPIO.BCM) # GPIO 23 (p...
by paulv
Fri May 24, 2013 9:55 am
Forum: Automation, sensing and robotics
Topic: Orderly shutdown your RasPi using a hard disk jumper
Replies: 11
Views: 32278

Re: Orderly shutdown your RasPi using a hard disk jumper

There is yet another method to do this without polling and sleep(ing).
Look at the following topic at the post from Fri May 24, 2013 3:52:
http://www.raspberrypi.org/phpBB3/viewt ... 74#p355974
by paulv
Fri May 24, 2013 9:52 am
Forum: General discussion
Topic: What's the simple and safe way to do a "shutdown" button?
Replies: 60
Views: 68784

Re: What's the simple and safe way to do a "shutdown" button

I have found yet another method on the web to do a shutdown, but now by using the new(er) interrupt possibility for the GPIO pins, rather than polling. The new version uses no cpu time and is very responsive (no waiting for sleep cycles). Here is the code I found, and I only added the shutdown state...
by paulv
Sat May 18, 2013 1:26 pm
Forum: Advanced users
Topic: STICKY: HOWTO: Move the filesystem to a USB stick/Drive
Replies: 380
Views: 591948

STICKY: HOWTO: Move the filesystem to a USB stick/Drive

This procedure will allow you to run Debian from a USB connected drive, instead of the SD card. (latest update: April 2020) The RPi will still boot from the SD card, but in essence, will no longer write to it. The original idea was to keep the SD card from failing due to excessive writing to it. It ...

Go to advanced search