💬 Battery Powered Sensors
-
@AWI in the first part it states:
"Primary cells such as lithium-metal and alkaline retain the stored energy best, and can be kept in storage for several years."
So you are correct and between Alkaline and Lithium-metal maybe the latter would be best. :)
I have no experience with coin cells and will do some testing with them as soon as I can.
Since this is the battery article, would you please tell me what you use and how you use it. What you expected and if the batteries lived up to your expectations. Would be cool to know as you've had more experience then me (and many like me)!@Nicklas-Starkel I mostly use a 'large' version lithium cell i.e. Cr123. These were used large in compact camera's and have a huge capacity and very little self discharge. My best example is the sensor in the fridge which measure temp and humidity every 10 secs and sends with nrf24l01 (MySensors of course). This one runs for almost two years now and has a stable 3.02V since the second month.
The coin cells need special care a these have a high 'internal resistance'. You need to be careful with designing the sketch so that the load is as short and light as possible.
There are some of my postings on this site which elaborate on the subject. (I'm on a mobile phone right now...)
-
@Nicklas-Starkel I mostly use a 'large' version lithium cell i.e. Cr123. These were used large in compact camera's and have a huge capacity and very little self discharge. My best example is the sensor in the fridge which measure temp and humidity every 10 secs and sends with nrf24l01 (MySensors of course). This one runs for almost two years now and has a stable 3.02V since the second month.
The coin cells need special care a these have a high 'internal resistance'. You need to be careful with designing the sketch so that the load is as short and light as possible.
There are some of my postings on this site which elaborate on the subject. (I'm on a mobile phone right now...)
@AWI OMG there is so many options when you look at it!
I think it all boils down to design (size) or money.
Normal AA roughly 0.3EUR/pc are quite large but OK power but cheap
CR123 roughly 2.5EUR/pc are quite small and OK power but expensive
Coin cell roughly 1EUR/pc and they are the smallest but not packing a good punch while being semi cheap/expensive.Obviously I have to build one node with each and put them in flowerpots around the flat to see in in action :)
And to top it off, I know there is a company in USA that has created a new battery that will double 'Ah' in same size batteries. They should launch this month i think, but think they will go for cellphone makers in the beginning.
-
@AWI OMG there is so many options when you look at it!
I think it all boils down to design (size) or money.
Normal AA roughly 0.3EUR/pc are quite large but OK power but cheap
CR123 roughly 2.5EUR/pc are quite small and OK power but expensive
Coin cell roughly 1EUR/pc and they are the smallest but not packing a good punch while being semi cheap/expensive.Obviously I have to build one node with each and put them in flowerpots around the flat to see in in action :)
And to top it off, I know there is a company in USA that has created a new battery that will double 'Ah' in same size batteries. They should launch this month i think, but think they will go for cellphone makers in the beginning.
I am not getting it...
I have a 3.3V Pro Mini, it is connected to my table power supply and want it to be powered by a coin cell later. To test the VCC lib, I set
const float VccExpected = 3.21;What do I need to put here?
const float VccCorrection = 3.21/3.21;It always returns BatteryPercentage of 2 or 3% seems the function is not calculating right. Anyhow I saw there is another function to call Read_Volts()
float volts = (float)vcc.Read_Volts(); int myPerc = volts *100 / VccExpected;So "myPerc" returns a value of 98% which seems feasible, also when reducing Voltage it drops.
But still, not getting the values with the build in function read_Perc() -
I'm building my home automation with a few Whisper Nodes (https://talk2.wisen.com.au/product-talk2-whisper-node-avr/) and I just got them working with the MySensor code. I'm running most of my projects with two AA but I just setup one with a CR2032 transmitting my attic temperature every 5 minutes to see how it goes. One thing I discovered is that the board comes two "built-in" resistor divider to monitor the battery and power supply voltage, which is pretty handy... also they have added a Mosfet on the battery voltage divider, I guess to eliminate the constant current leak consumed by the voltage divider, am I right?! (https://bitbucket.org/talk2/whisper-node-avr/overview#markdown-header-voltage-monitor)
-
Hi,
I'm sorry what do you mean by "control your resistance value"this is my circuit,
1M resistor to +V rail, 470K resistor to GND and middle point to A0.
,It seems you are missing the capacitors connecting each side of the crystal to ground. Those should be between 15 and 25pf (depends on the crystal), normally ceramic type.
-
Here is a view of a node running exactly 1year. The effect of a bad radio is seen here as the fast voltage drops. I had a very low charged battery to start with, replaced it with new batteries which also discharged fast, and replaced both batteries and the radio. Since mid january 2016 the node has been running as expected. My guess is that this combo will run for 2 years (given how it has been working the past 9 months).
This node measures battery voltage, temperature and humidity and sends 3 messages about every 5 minutes.

And here is the battery measurement of the second node that went "online" the same day (18/sep/2015, with a good radio, and similarly used batteries from the start). This node sends very few messages (at least 1 every 24 hours, and when one of 3 contacts are opened). Most days it just sends 1 message.

So even with batteries already at a low level, you can make useful nodes using the MySensors setup :-)
How are you sending the voltage?
Sensor = S_MULTIMETER and value = V_VOLTAGE in a normal message?
Thx!
-
How are you sending the voltage?
Sensor = S_MULTIMETER and value = V_VOLTAGE in a normal message?
Thx!
@chaeron
Correct :-) -
@chaeron
Correct :-)Thanks! I'll use that approach for all my house sensors, since right now all I send is battery percentage..
...at least until/if they add support for a I_Battery_Voltage internal value. 😈
-
Realy n00b in electronics here but do you need to use those exact values of the resistors when hooking this up?
-
Realy n00b in electronics here but do you need to use those exact values of the resistors when hooking this up?
@meanmrgreen are you reffering to the 470K+1M resistors? (This is a long thread)
If so, they can be any size but the code will need to be adjusted if the ratio between the resistors is changed.Also, less resistance will drain the battery faster.
-
Yes i do.
This is like going back to school... but fun! -
can someone explains why using analogReference(INTERNAL) ?
for the moment i only have 5V nano suplyed by a 7.4V lipo (i know, this is not a good choice, but i just have this right now) so with that hardware, 1.1V seems too low.
I mean that resistance ratio to reach 1.1V max smells a very inacurate result; isn't it? -
can someone explains why using analogReference(INTERNAL) ?
for the moment i only have 5V nano suplyed by a 7.4V lipo (i know, this is not a good choice, but i just have this right now) so with that hardware, 1.1V seems too low.
I mean that resistance ratio to reach 1.1V max smells a very inacurate result; isn't it?@giovaFr Hello, try to replace 470k(R2) by a 180k ;)
for obtain this value i did : R2 = R1 / ( Vbatmax - Vref); R2 = 1.1^6 / (7.5 - 1.1) = 172k, i taked a normalized value = 180k.
-
I think i've finnaly understood :
1.1V is not a reference like an offset it is a reference as a max readable voltage
Analog Input will always return values between 0 and 1023
5V / 1023 bits = 0.0048 V per bit
1.1V /1023 bits = 0.001075 V per bit
so with 1.1V we are allmost 5 times more accurate. Moreover it seems that 1.1V will stay stable even if battery voltage becomes low. (so understand now why using it)
And that's what mfalkvidd explained : if we type in code : analogReference(INTERNAL); then voltage must never exceed 1.1V on A0 (it is different on an arduino Mega)Now to choose R1 and R2 here what i've made :
A0maxV = VbattMax * (R2 / (R1+R2)
for me it means
1.1V = 8.4V * (R2 / (10^6 Ohms + R2)
so i use R2 around 150k OhmsA0voltage = A0value * 0.001075
A0Voltage = VBatt * (R2 /(R1+R2))
A0Voltage = VBatt * rRatio
VBatt = A0Voltage / rRatio = (A0Value *0.001075 ) /rRatioSo here the magic formula:
VBatt = (A0Value *0.001075 ) /rRatioLet me know if i'm wrong somewhere.
-
I think i've finnaly understood :
1.1V is not a reference like an offset it is a reference as a max readable voltage
Analog Input will always return values between 0 and 1023
5V / 1023 bits = 0.0048 V per bit
1.1V /1023 bits = 0.001075 V per bit
so with 1.1V we are allmost 5 times more accurate. Moreover it seems that 1.1V will stay stable even if battery voltage becomes low. (so understand now why using it)
And that's what mfalkvidd explained : if we type in code : analogReference(INTERNAL); then voltage must never exceed 1.1V on A0 (it is different on an arduino Mega)Now to choose R1 and R2 here what i've made :
A0maxV = VbattMax * (R2 / (R1+R2)
for me it means
1.1V = 8.4V * (R2 / (10^6 Ohms + R2)
so i use R2 around 150k OhmsA0voltage = A0value * 0.001075
A0Voltage = VBatt * (R2 /(R1+R2))
A0Voltage = VBatt * rRatio
VBatt = A0Voltage / rRatio = (A0Value *0.001075 ) /rRatioSo here the magic formula:
VBatt = (A0Value *0.001075 ) /rRatioLet me know if i'm wrong somewhere.
@giovaFr said in 💬 Battery Powered Sensors:
A0maxV = VbattMax * (R1 / (R1+R2)
Are you sure about that ? I think is A0maxV = VbattMax * (R2 / (R1+R2)
R2 = 150k Ohms for 8.4V with R1 always at 1M Ohms
-
If I power my 3.3V miniPro through VCC, do I still need to remove/cut the voltage regulator?
I thought the current moved from vvc-in/raw through the regulator and then to the MCU and VCC :confused: .
My battery powered nodes are dying and I suspect I need to change BOD and eventually something more (LED gone ).. -
If I power my 3.3V miniPro through VCC, do I still need to remove/cut the voltage regulator?
I thought the current moved from vvc-in/raw through the regulator and then to the MCU and VCC :confused: .
My battery powered nodes are dying and I suspect I need to change BOD and eventually something more (LED gone )..VCC pin is directly connected to the MCU.
The RAW or IN pin is connected to the regulator input. Th eregulator output is connected to VCC pin and thus to the MCU power input pin.
On a 3V3 promini you can give between 3V3 and 12V (on most promini's, some can handle up to 16V) on the RAW or IN pin. The regulator on the promini will bring that down to 3V3 (which you will be able to measure on the VCC pin).
By giving 3V3 on the VCC pin, some power is lost via the output pin of the regulator (through the regulator) towards the GND pin of the regulator. This should be minimal, but on bad regulators it can be enough to drain a battery in weeks. So yes, I would cut the regulator output line when giving power via VCC.
Cutting the line of the powerLED (on either side of it, doesn't matter) will make sure that the LED does not drain the battery either. This LED can pull between 5 -15mA depending on the protection resistor that sits in series with it.
So VCC pin and RAW pin are NOT the same.
-
VCC pin is directly connected to the MCU.
The RAW or IN pin is connected to the regulator input. Th eregulator output is connected to VCC pin and thus to the MCU power input pin.
On a 3V3 promini you can give between 3V3 and 12V (on most promini's, some can handle up to 16V) on the RAW or IN pin. The regulator on the promini will bring that down to 3V3 (which you will be able to measure on the VCC pin).
By giving 3V3 on the VCC pin, some power is lost via the output pin of the regulator (through the regulator) towards the GND pin of the regulator. This should be minimal, but on bad regulators it can be enough to drain a battery in weeks. So yes, I would cut the regulator output line when giving power via VCC.
Cutting the line of the powerLED (on either side of it, doesn't matter) will make sure that the LED does not drain the battery either. This LED can pull between 5 -15mA depending on the protection resistor that sits in series with it.
So VCC pin and RAW pin are NOT the same.
@GertSanders Thanks for you explanation. I thought vvc on the short end next to rx was going through the voltage regulator just as RAW. Anyhow I have already de-soldered the LED's and are powering through vcc next to A3. Apparently my voltage regulators are bad so I'll cut the lines and give it a try and hope power consumption stays low.