I have a project using RPi devices acting as time lapse cameras in remote places.
I have been able to develop them so they are fairly reliable and stable. Several mechanisms are in place for multi-level battery backup, as well as error recovery.
The one problem that I have not solved yet, is the invariable RPi freeze-up.
The solution I have thought of is as follows:
1. The RPi board has a set of pads that will initiate a restart when shorted.
2. A timer circuit (555 or other) that counts to a set time interval (i.e. 5 minutes)
3. A small background program on the RPi that initiates on startup, which toggles a GPIO pin high and low every so many seconds (say 10), and is tied to the reset pins on the counters.
4. As long as the RPi is functioning normally, the timer would then be reset every 10 seconds.
5. If the RPi freezes or has other issues, the background program will halt and stop sending the reset signal.
6. Therefore if the time gets to 5 minutes without being reset, it would trigger the reset signal.
What I have tried so far:
1. Built a 555 timer circuit that drives 3 decimal counters. I used a 555 because the accuracy is not that important for the use case. I do NOT want to use a single 5 minute pulse from the 555. Three hundred 1 second pulses are far more dependable than one 5 minute pulse in my opinion. I only lose 1 second of accuracy if there is a misfire, which is okay.
2. Right now I have the RPi reset wired to the carry-out pin on the 3rd timer, via a transistor to short it out. It works but has some issues.
What I need help with:
1. Is there a better way to do this all together? I have looked at several small timer boards, but still struggle to see how they would implement the reset.
2. What resister and capacitor values will generate a 1 second pulse on the 555? I know there is a formula, but math was never my strong suit.
3. How would be the best way to create some sort of one-shot event when the count reaches a certain number (300). The problem with wiring it to the carry out, is that it stays high until the next pulse comes in to the counter. Since it as the last timer in the circuit, that could be a while, and it would hold the reset high for far longer than desired.
Clear as mud I'm sure, but any help would be greatly appreciated!
Bryan
I have been able to develop them so they are fairly reliable and stable. Several mechanisms are in place for multi-level battery backup, as well as error recovery.
The one problem that I have not solved yet, is the invariable RPi freeze-up.
The solution I have thought of is as follows:
1. The RPi board has a set of pads that will initiate a restart when shorted.
2. A timer circuit (555 or other) that counts to a set time interval (i.e. 5 minutes)
3. A small background program on the RPi that initiates on startup, which toggles a GPIO pin high and low every so many seconds (say 10), and is tied to the reset pins on the counters.
4. As long as the RPi is functioning normally, the timer would then be reset every 10 seconds.
5. If the RPi freezes or has other issues, the background program will halt and stop sending the reset signal.
6. Therefore if the time gets to 5 minutes without being reset, it would trigger the reset signal.
What I have tried so far:
1. Built a 555 timer circuit that drives 3 decimal counters. I used a 555 because the accuracy is not that important for the use case. I do NOT want to use a single 5 minute pulse from the 555. Three hundred 1 second pulses are far more dependable than one 5 minute pulse in my opinion. I only lose 1 second of accuracy if there is a misfire, which is okay.
2. Right now I have the RPi reset wired to the carry-out pin on the 3rd timer, via a transistor to short it out. It works but has some issues.
What I need help with:
1. Is there a better way to do this all together? I have looked at several small timer boards, but still struggle to see how they would implement the reset.
2. What resister and capacitor values will generate a 1 second pulse on the 555? I know there is a formula, but math was never my strong suit.
3. How would be the best way to create some sort of one-shot event when the count reaches a certain number (300). The problem with wiring it to the carry out, is that it stays high until the next pulse comes in to the counter. Since it as the last timer in the circuit, that could be a while, and it would hold the reset high for far longer than desired.
Clear as mud I'm sure, but any help would be greatly appreciated!
Bryan
