Electronics > Projects, Designs, and Technical Stuff
CR2032 battery voltage with BLE
jmaja:
I looked at a bit bigger batteries CR2430 and CR2450. Despite bigger capacity they don't show much improvement on ESR.
I could maybe skip writing to flash by using the few bytes storage available in the sensor or with an external eeprom. But there is also a problem with connection. My android phone forces the connection interval to 7.5 ms during connection time. My device sends connection parameter update request whenever it notices the connection interval is not close to 250 ms. When connecting with my phone it starts with 50 ms then goes to 250 ms after 700 ms. After 2.5 s it goes to 7.5 ms and finally after 440 ms back to 250 ms.
I don't think I have any control over that behavior from my device or from my android app. This means the cap has not enough time to charge. Now I can see that the voltage is at max about 50 mV below the idle and amplitude is about 300 mV during that 440 ms period.
In LTSpice I get about the same with a bit over 40 ohm ESR. About 100 ohm would be the limit. Then the voltage drops 0.2 V at max level and 0.5 V at min level. With 250 ms interval I could survive 250 ohm after the once in 64 s measurement. Without that even 1 kohm would be OK. With flash write the 0.5 V limit is at 40 ohm.
If I allow 0.7 V drop 7.5 ms interval equals to 180 ohm and flash write to 60 ohm. That would be OK for 2.7 V idle voltage.
Maybe I'll try to get rid of flash write or at least limit it to very seldom changed variables, which are most like changed only when new.
Psi:
--- Quote from: jmaja on March 19, 2019, 06:42:20 pm ---I don't really care much about the voltage reading accuracy. All I need is some kind of indication of battery level. It will never be accurate for CR2032, since voltage changes so little with remaining capacity and show much with temperature and current taken. I'm more keen to make the battery measurement with the least current used and as simple as possible.
ADC is now measured while sensor is read with I2C. Both events take about the same time. The current consumption is about 7 mA during that. It is the flat section in the white curve starting at about where the red dot for "Stop" is in the header. Probably it gives quite good indication of the remaining battery life.
--- End quote ---
You can create a system in code to keep track of all events that occure (led flash etc) and code into it how much current/time they use.
Then sum this all up to keep a running count of mAh used by storing, say, micro amp seconds, for example.
Its really the only way to get decent battery capacity. The voltage will tell you if it is a brand new cell or if its flat. Trying to get more info out of the voltage than just new/ok/dead is very tricky.
Rerouter:
If you want to measure "Is my battery dying", easiest measure is to measure at the transmission point, you know your device will start misbehaving at 1.9V, thats the only parameter you need to know for the question "Do I have to replace the battery?",
jmaja:
I'm already counting the current consuming events, but I don't really know how many mAh I will get out of the battery. Since this is still a prototype the counting and measuring voltage is more targeted to me than the end user.
The device needs to be rather small, very thin and water thight. I don't think the battery will be replacable. At least I haven't figured out how to make it replacable and still keep the thickness with the enclosure at 6 mm while keeping the construction simple and not too expensive to design and make. The enclosure needs to be transpararent to IR and visible light at many spots on both sides and of course also for BLE radio.
Measuring at the peak current is an interesting idea and should give some warning before the device stops working. I'm hoping even CR2032 would last long enough for most users.
GeorgeOfTheJungle:
I like this thread... :popcorn:
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version