I have made some battery powered specific Gravity sensors that are immersed in fermentors of beer. they turn on once every hour to send a reading. often they will run for a month or longer before the fermentor is emptied often the battery is dead by then.
I assume this is bad for the battery and will affect its life span. If I measure voltage of the battery at each cycle at what voltage should I shut down the device for good?
Everybody will have a different opinion on the Lowest Voltage to Use.
Something like this would extend your sleep time once the battery is getting low: if (fuel.getVCell() < 3.50) System.sleep(SLEEP_MODE_DEEP,14400); // Sleep for 8 hours when Lipo drops below 3.5V
Can you modify your Photon code to immediately go to Sleep after it’s finished reading the sensors (instead of 1 minute) ? That may save a lot of power.
it sleeps for 60 minutes. i could go to 120 minutes if needed. right now the accel are on all the time. I tried powering them via a pin but that didn’t work.
Are you putting the electronics and battery inside the fermentor? If so, do you have any concerns about contamination from the electronics and/or lithium? Does the photon WiFi penetrate the fermentor (presumably stainless steel construction in a production environment or is this home-brew which gets by with plastic construction)?
This is a good question and one I am considering with the mesh devices which I want to run for long periods on a LiPo battery. I have researched what can be done based upon voltage measurement. The Xenon and Argon (and Photon) do not have LiPo battery gauge ICs, although you could implement an external one with the Photon via I2C - but more power usage! The Xenon and Argon as I understand things use an internal pin (BATT) with a resistor voltage divider so the voltage output of the LiPo battery can be easily and accurately measured. However, I am unclear whether this decouples when the device is sleeping. Since, sleep modes have not been implemented yet - won’t know for certain until 0.8.0-RC.?? released.
Voltage measurement can’t tell you much for certain but 3 things are pretty clear. See diagram below:
All depends upon the current drawn relative to the battery C rating. I intend to do some experimentation as the peak current load is what will determine the battery life as much as the duty cycle. The other factor here is that for the Photon you must be jacking up the volts to 5 to feed the Vin pin? That will lose some power.
As per the Argon and Xenon schematics, the battery voltage BAT_DET is presented to the nRF52840 AIN3 through a 2M/806K resistor divider. With a Vbat of 3.7v, a constant “leakage” current of 1.3uA is incurred.
the image is a “tilt hydrometer” and that case was made for that device, although it may be @murmsk is either involved in the tilt project or developing a competitor.
Yes the photo is of a tilt I used their idea to make mine. I am not a competitor just a guy who likes to make my own stuff. The tube I use is a wide mouth pop bottle blank off of eBay. I’ll try and take some pictures if you want.
Do you know what the dropout voltage is on the Xenon and Argon with the onboard voltage regulator? So, if the LiPo battery voltage is 3.4V will it still work - just trying to understand the low voltage disconnect level.
That 1.3uA might point to having a MOSFET switched battery voltage test circuit once the SoM arrives - for a long life sleepy end node.