Project Curacao Arduino Solar Power / DS1307 Update

Project Curacao DS1307
Effect of Arduino "Reboot" on Threshold Values

Project Curacao Arduino Solar Power / DS1307 Update

Monitoring and debugging a system from 3,500 miles away sometimes isn’t easy.  I

Project Curacao DS1307
Effect of Arduino “Reboot” on Threshold Values

understand a little bit better the issues that face the Mars Rovers, the IESS-3 team and the Voyager team.  When I designed Project Curacao, I spent a lot of time thinking about what might happen and how I could work around issues. So far, I seem to have made pretty good decisions, but a bad one I did make is coming back to haunt me. The issue is with the Battery WatchDog Arduino. It is supposed to run all the time and never need to be rebooted (yes, I am that good of a programmer – NOT). I wrote about the need for a Deadman Switch in this design so I could reboot the Arduino remotely and by a watchdog circuit.  I ran out of time to build the Deadman Switch before I had to transport and install the system (last March, 2014) and now I am regretting that decision. I can order remote boots of the Pi and the Arduino BatteryWatchdog reboots the Pi on a daily basis (according to a variety of  power and wakeup states).

These screen shots are taken from the RasPiConnect based Project Curacao Control Panel.

The Arduino BatteryWatchDog

Arduino
Left Button Reboots the Arduino, Right reboots the Raspberry Pi

Currently, the only way to reboot the Arduino is to have someone push the button on the outside of the box on and off.

The Arduino Project Curacao software (3000 lines) is robust and doesn’t hang or bomb,

DS1307
DS1307 Failure and Recovery, Kind of.

but it is vulnerable to the DS1307 I2C Real Time Clock going south, which it appears to do about once a month.  Heat?  Electrical Noise?  Unknown.  I saw it do it a couple of times during design and added filtering to the Arduino power supply (a big capacitor from +5V to Ground) and it did not do it again.  However, after six weeks in the hot sun, the DS1307

flaked out and lost the time again.  It has happened three times in the last four months, including a few days ago.  For some

DS1307 Arduino
DS1307 in Project Curacao

reason this time, the Arduino recovered itself (in the log to the right I can see the DS1307 RTC fail, then recover later.  Sometime after this, the Arduino managed to reset to the default threshold values and time values for starting the Pi and shutting the Pi down, the temperature and voltage control thresholds.   This meant that the Raspberry Pi stayed on a lot longer, hence the battery went lower (as in the first figure above). I suspect the problem is some subtle I2C/timekeeping interaction.    It was good to see it recover.

 

The Project Curacao WeatherArduino Upgrade Board

Below is the new WeatherPiArduino board that replaces the DS1307 with a DS3231 RTC.  This board also adds an anemometer, rain gauge and wind speed gauge.  It also will adds a 32KB FRAM memory board (mounted behind the DS3231) and possibly, if I get to it, a vibration piezoelectric sensor.  There is space to add a I2C 16 bit Adafruit A/D converter if the vibration sensor requires that precision (the voltages may be quite low – the issue is a 50 foot cable to the sensor).

DS3231 Arduino
Weather Arduino Board upgrade for Project Curacao. DS3231 has the Red LED.

Six more weeks and I’ll be down in the Caribbean to do maintenance and upgrades on the box. Oh, and to have some frozen Margaritas, give dance lessons, snorkel, have the coffee and do a bunch of time in the sun.  It’s a rough life.