Working on adding gps module
Primary guide on adafruit mini gps
Able to get current time from gps! Note: it's UTC time.
Goal: to send only at 5 AM and 1 PM MST
Going to try to use RTC instead of GPS -- might remove a failure mode (connecting to gps network) ...
Circuitpython code for the DS3231
Rockblock codes: https://learn.adafruit.com/using-the-rockblock-iridium-modem/basic-test
Note: the old smithereen test code is at http://bayou.pvos.org/data/t2tn5x6krzvw?plot_param=temperature_c
http://bayou.pvos.org/data/hynj3bxfuzst?plot_param=distance_meters&limit=43
This code seems to be working well: https://github.com/edgecollective/sweet-p/blob/12ce832cbadbaeb9d29aa78e8f4a9ed8c1cbeef8/ver_0.3/firmware/grassnomads/v2.0/utilities/satellite_hour.py
This code also works well, and sends temperature: https://github.com/edgecollective/sweet-p/blob/a9dcde832bb8d2363664934cd545ba1b778fba73/ver_0.3/firmware/grassnomads/v2.0/utilities/satellite_temperature.py
Sending data every 3 hours using new firmware:
Latest pics of hardware:
Timing via the TPL5100 (see ref for resistor-controlled timings on Adafruit TPL5110 usage guide
Currently, T1 -- 81.5K -- approx 25 minutes T2 -- 118.7K -- approx 55 minutes
We want more like 10 minutes. But might be too short, induce too rapid a battery drain. So, keep T1 at 25 minutes as a backup; switch T2 to something between 54K and 58K.
Looks like I have 51K, and 68K. So, 68K would be between 10 and 20 minutes.
Let's try 51K. And also minimize the wakeup time. And turn off the radio transmit (if it is).
Looks like true resistance is 50.5 K -- which is about 7.5 min. Let's try it.
Current code:
Let's cut out the lora for now ...
Updated code testing Jan 9th overnight is here
Results of deployment late Jan / early Feb 2024 ...
Looks like the sensor fails (reads '999 cm') whenever the temp falls below 3 C or so ...
(Note that after Feb 5 or so, we fixed a bug that was dividing the distance by an extra factor of 10; thus the jump -- before, a reading of '999 cm' would show up as '1 meter'; afterwards it shows up as '10 meters' on the graph.)
Details on RockBlock 3.7V input pin:
http://bayou.pvos.org/data/gcr565avyan2?plot_param=distance_meters&limit=20
(note -- the above link will give latest 20 data points -- so not the data below, as more data will have been added -- just giving feed as reference)
Mike B. suggests the L91 ...
... and points to the fact that many battery chemistries ought not to be charged at low temperatures
Manual for charger (similar to one that) I purchased here
Batteries that work best in cold weather
Discussion of temperature compensation
How to keep batteries warm in winter
https://www.amazon.com/dp/B07VDRGK9F
https://www.eevblog.com/forum/beginners/switching-12v-power-from-ds3231-open-drain-intsqw-pin/
also here: https://forum.arduino.cc/t/mods-to-ds3231-zs-042-module-for-power-control/1101164
see post #2 -- also handles higher-voltage circuit
For the low-voltage circuit, the P-channel mosfet could be a DMP1045U or something similar with very low threshold voltage and low on-resistance.
For the high-voltage circuit, the P-channel doesn't need to be logic level, but should have a GS maximum of 20V, and low on-resistance. An IRF9540 would work.
And the BSS138 would work for the small N-channel mosfet.
Debugging ...
9602 sat modem module main page here
Ah! rockblock needs at least 3.5 volts on the 'li-ion' pin
also -- the 9602 doesn't limit the in-current, which might impact the battery; not a problem for the 9603 (and perhaps not a problem for lead acid chemistry?)
max voltage is 5.5 volts
looks like 5V works well on VEXT -- 3.3V was too low -- perhaps it would've been enough with only the feather, but the sat modem was taking in too much current?