Thermometer 3

A project log for Heroineclock II

Giant clock from a PIC18F6585, 135 cheap LEDs, foam core posterboard, hot glue, lots of hot glue

lion mclionheadlion mclionhead 08/14/2020 at 05:530 Comments

4 reconstituted autopilot boards from 10 years ago were reprogrammed & reworked for their new life as a sensor network. 

1 transmitter board transmits the temperature from outside.

1 transmitter board transmits the temperature from inside.

1 reciever board sends the temperatures to the router.

1 receiver board sends the outside temperature to a new LED panel.

The outdoor thermometer runs at 32.768khz.  The PIC18F14K50 was found to use 150uA in idle & up to 30mA when transmitting. It needs to transmit for a long time to overcome interference. The easiest error correction is to transmit more data.  The PIC uses its maximum baud rate of 8192 baud.  The internet said the sleep current is lower when using the watchdog timer instead of idle mode, but this was found to not be true.   The watchdog timer can go to 120 seconds, but it would have to take all its ADC readings at the moment of transmitting instead of averaging them over 120 seconds.

The thermometers transmit a 16 byte key to identify themselves, followed by the temperature repeated 4 times.  The key & temperature are also repeated 4 times.

The existing thermometer board got a retrofit to transmit temperature to the router.  After 16 years of just showing the temperature, giant thermometers could finally record the temperature.

After much debate, the outdoor thermometer got a new voltage divider to measure battery voltage.   It doesn't need to measure battery voltage over its many years of temperature measurements.  It only needs the battery voltage to test the solar panels in its 1st day.  The problem is the alternative is to go outside with a voltmeter several times.

Its idle current increased to 200uA & lions rediscovered the ground for the voltage divider can't be a GPIO or it'll sink the high voltage from the battery.  When the power usage is this low, the high voltage from the battery raises Vdd.

As bad as the compromises seem, the power usage is actually tiny compared to a modern standards based solution.  The modern solutions use an ESP32 & wifi.  They have to stay on for a long time to negotiate a wifi connection, which tends to erase any gain from their nano amp sleep current.  

It was frustrating to discover despite being only a temperature sensor in a very suboptimal location, the enclosure still needed to be a proper weather station enclosure to get good results. Much cardboard prototyping yielded something like a bird house with a way to access the innards. Now the lion kingdom knows why it needed to keep around a speaker stand for 20 years. The mane problem is keeping the wind from giving the neighbors a free $90 thermometer. It's cost as much just to get temperature as a full chinese weather station.

Thermometer with a smile, you might say.

Junk NiMH battery from an ECX Ruckus rated for 7.2V.  

Waterproofing the battery.

Trying to protect the electronicals from condensation.

Failed attempt to isolate the thermistor from conducted heat.

The enclosure size was dictated by the solar panels.

The electronicals were buttoned up & it was put outside.  The thermister was 5 deg higher than wunderground at night & 15 deg high by day .  The fluke was 20 deg higher than wunderground at night & bang on by day, despite being in the exact same place inside the enclosure.  Location of the thermistor inside the enclosure affected temperature.  The area without circulation was much hotter than the area with circulation.  When indoors, the thermistor was bang on.

The thermistor:

A full day of measurements revealed it suffered from heat conduction. A new assembly made of magnet wire & balsa would conduct less heat from the coroplastic. This was still higher than wunderground by 1 - 3 degrees but much closer. If it was exactly the same as the wunderground stations, it would be a waste of time.

Discovered the best way to check the thermistor is putting the fluke in the HVAC inlet. That shows the thermistor with its magnet wire suspension is within 1 degree of the true outdoor temperature & the outdoor temperature really is a few degrees off of wunderground. It's been surprising how accurate these home made thermometers have been, since they're solving the Steinhart–Hart equation in fixed point math.

The key to measuring air is to overcome the self temperature of the fluke. The fluke's self temperature isn't a problem in its normal task of measuring metal because metal has a higher heat capacity, but it is a problem when measuring air because air has a low heat capacity.

The 1st day of solar charging revealed acceptable results with the radio transmitting every 30 seconds & the ADC sampling every second. It managed to get a net charge without direct sunlight. Only a brief period with direct sunlight got it to 7.2V. It finished the day with higher voltage than yesterday.

 It'll never fully charge the battery, but the idea is to have enough reserve capacity to keep the battery from getting hot.  Sizing the battery to optimize the used capacity is a long term project.  

It uses 2x 1W 8.2V panels in series.

Getting the outdoor panel up to a readable state got the entire 4 radio mesh running.  It was the lion kingdom's 1st temperature display which relied on a radio instead of a thermistor directly connected to it.  When it doesn't get a packet for 1 minute, it shows an invalid code rather than an obsolete temperature.

The lion den command center was complete. 

The lion kingdom realized there are better diffusers than wax paper, which would look a lot better. The wax paper dates back to heroineclock 1, which tried to minimize cost. When the solar panel costs $25 & the coroplastic is $20, the diffuser isn't an obstacle anymore.

Used wrapping wire instead of ribbon cable for this one & it looked the cleanest.  The $1 car USB chargers were finally used as buck converters for the input power.  Those are the last of the hackable car USB chargers.