coin-cell (CR2032) powered temperature sensor
-
Just a quick Update on my coin-cell sensors:
I still did not figure out why one sensor did not work because I lack of the needed measurement-equipment :(But I figured out something else: The voltage of a CR2032 battery has a very strong temperature-dependence. So for calculating the battery-level I probably need to calculate a temperature-normalized voltage-value.
-
I'm following this topics with much interest. It would be really great if it's possible to power a sensor with a CR2032 cell.
For my two AA powered Soil Moisture sensor, I just put a transistor (BC547b I think, they came with the Arduino starter kit) between the soil moisture sensor circuit and one in the circuit for battery power measurement. As I only have basic knowledge of electronics, I'm not sure if this will save battery power. But I switch on the transistors whenever I have to read the sensors. Wait a little bit so that the sensors have enough time to give a good reading. And then I switch the transistors off. I only need two extra outputs this way and I'm using A0 and A1 as digital outputs.
My guessing is, that I will save battery power by turning the power on the sensors on, only when I need to read them.
-
That depends: Does the step-up just feed the measurement or also the arduino?
Can you post schematics?As long as you stay below 20mA you can use the digital pins to power everything.
Be aware that a step-up regulator has low efficency at low currents, so it is possible that it actually shortens battery life instead of increasing it.
-
The step-up feeds the mini pro 3.3V. I measure the battery level directly from the battery.
-
Did you ever solve your boot-loop problem?
-
@TheoL: The step-up regulator will most likely drain your battery very quickly. It uses a lot of current in "standby-mode" (when Arduino is powered down)!
You can power an Arduino and most sensors directly from battery but you need to disable BOD (brown-out-detection). To do this you need an programmer ("Arduino as ISP"-sketch is sufficient) and set the extended-fuse to 0x07. This can be done with the Arduino-IDE, but you need to edit the boards.txt file.
-
@carmelo42 I just changed coin-cell on one of my sensors. It lasted since for 10 months, this is ok for me.
@fleinze said:
@carmelo42 I just changed coin-cell on one of my sensors. It lasted since for 10 months, this is ok for me.
10 months ? it's perfect :)
Can you provide the modified version of the library to avoid using 4.7k resistor for the Dallas sensor ?
What is for the resistor on the pic ? for the voltage mesurement ?
-
@fleinze said:
@carmelo42 I just changed coin-cell on one of my sensors. It lasted since for 10 months, this is ok for me.
10 months ? it's perfect :)
Can you provide the modified version of the library to avoid using 4.7k resistor for the Dallas sensor ?
What is for the resistor on the pic ? for the voltage mesurement ?
@carmelo42
The no-resistor-library can be found here:
https://wp.josh.com/2014/06/23/no-external-pull-up-needed-for-ds18b20-temp-sensor/The resistors (there are two but the other one is barely visible) are for voltage-measurement. In a later version I got rid of them using this resistor-less method of measurement:
http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/ -
Just found this post https://www.hackster.io/Talk2/temp-and-humidity-sensor-with-a-cr2032-for-over-1-year-580114 showing some details about using a CR2032 to power a sensor node. By my calculations, if the author removed the LED at all the solution would last for over 2 years!
-
@carmelo42
The no-resistor-library can be found here:
https://wp.josh.com/2014/06/23/no-external-pull-up-needed-for-ds18b20-temp-sensor/The resistors (there are two but the other one is barely visible) are for voltage-measurement. In a later version I got rid of them using this resistor-less method of measurement:
http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/@fleinze said:
@carmelo42
The no-resistor-library can be found here:
https://wp.josh.com/2014/06/23/no-external-pull-up-needed-for-ds18b20-temp-sensor/The resistors (there are two but the other one is barely visible) are for voltage-measurement. In a later version I got rid of them using this resistor-less method of measurement:
http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/great :)
Did you change the bootloader ? Which one did you use ?
-
Hello,
there are a few improvements you can do to make your CR2032 nodes last longer:
- add a capacitor of 100-200µF in parallel with your battery. Ceramic is better, but I have no problem with nodes using electrolytic capacitors. This will help when there is a peak power consumption from the radio. If you do not put one, voltage will drop quickly and that's probably what is triggering reboot loop on one of your nodes: maybe radio is less efficient and needs to resend more messages. Or maybe your BOD is not updated so it resets when voltage drops at 2.7V...
- in your code, add a sleep command between message sending to give time for your cell to rest, and for the capacitor to recharge. Do it also at the beginning of presentation method and between each message sending in presentation.
- use a better sensor that can accept a lower voltage, they are more expensive that DS18 but they can work down to 2V and use much less current: BMP180/280 if you want to measure only temperature (with barometer as extra), SI7021 for temp/hum, BME280 for temp/hum more expensive but better.
- do not use voltage divider at all, you don't need one as you can just get Vcc from the A0 pin (with it I have some change of voltage related to temperature but not as wild as you seem to get. Maybe it's related to the DS18 measurement also ?)
With these changes and a si7021 breakout board from which I removed the voltage regulator (it's not consuming much, but without it is even better), I can send every minute, flash a led and I hardly see any drop in voltage after a few weeks of running.
-
@Nca78 said:
add a capacitor of 100-200µF
I will try this, thanks! Currently I use the 10uF capacitor which is on the arduino pro minis on the raw pin side.
in your code, add a sleep command between message sending
How long do you sleep? In normal operation there is only one send command per loop, I only send battery level once every hour. I try to read vcc after sending the temperature so the battery is under some load when measuring.
use a better sensor that can accept a lower voltage
I already built one with a Si7021 sensor. But I ran out of CR2032 so I powered it using two AA cells. I should solder it back to coin cell now I got some.
you can just get Vcc from the A0 pin
I don't know this method do you have a link or can you explain it?
-
@fleinze said:
@carmelo42
The no-resistor-library can be found here:
https://wp.josh.com/2014/06/23/no-external-pull-up-needed-for-ds18b20-temp-sensor/The resistors (there are two but the other one is barely visible) are for voltage-measurement. In a later version I got rid of them using this resistor-less method of measurement:
http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/great :)
Did you change the bootloader ? Which one did you use ?
-
@carmelo42 sorry I somehow missed your post. I use the standard-bootloader as I did not get Optiboot to run on the 3.3V/8MHz pro minis. I set the extended fuse to 0x07 (BOD disabled) by editing boards.txt.
@fleinze said:
@carmelo42 sorry I somehow missed your post. I use the standard-bootloader as I did not get Optiboot to run on the 3.3V/8MHz pro minis. I set the extended fuse to 0x07 (BOD disabled) by editing boards.txt.
thanks !is is a bit confusing for me :
- we can burn the bootloader from the Arduino IDE : are the fuses written at this moment ?
- we can upload a sketch with the arduino IDE : are the fuses written at this moment ?
- with my researches, I found that for disabling BOD was possible with 0xFF value for efuse ?
I have some lifetime issues with my CR2032 sensor .. and I suspect the fuses are not correctly set ...
If you can light up my mind it will be perfect :)