-
• #2
Yes, you can just power it from the 3v+GND pins.
However, the maximum rated voltage of all the components is 3.6v so ideally you shouldn't exceed that. With a LiFePo4 battery it looks like you can get up to at least 3.65v when charging?
The 'Absolute Maxiumum' voltage for the nRF52 chip is 3.9v (and the mag/acc/temp sensor are higher) so you probably could run the Puck just fine (especially if the max really was 3.65v), however it's not something I would recommend (and I wouldn't replace one if it broke doing that!).
-
• #3
Perfect, thanks alot!
-
• #4
Another question ... I'll put it here because it has similar subject.
I have attached a LFP cell (3.2v nominal voltage), working great for weeks now.
Now I need to check battery status regularly but I am having trouble with the results.When using NRF.getBattery() the result differs everytime in such ranges that make it hard to consider them real. So I have tried checking multiple times and using the average like this (found it somewhere here in a post):
(analogRead(D3)+analogRead(D3)+analogRead(D3)+analogRead(D3)+analogRead(D3)+analogRead(D3)+analogRead(D3)+analogRead(D3)+analogRead(D3)+analogRead(D3))/10*72
However, this results in values much to high most of the time. What would be the right calculation to get a decent value for LFP cells?
Any hint is appreciated. -
• #5
I think
analogRead(D3)
might have been a hack for the Bangle.js? On the Puck D3 is connected to the Blue LED - so probably not what you want!NRF.getBattery()
won't work well because it's expecting voltages from a Lithium battery, not a LiFePo4 :)So what you need is
E.getAnalogVRef()
which will give you the actual voltage on the chip - probably just one call to that might work, but you could do like above, calling it 10 times and then dividing by 10.The voltage there should correspond pretty well to what you get if you google "lifepo4 discharge curve"
-
• #6
Thank you Gordon,
when I use a single E.getAnalogVRef() it returns a much to high value (measured 332 with multimeter). But when I add multiple values and check average, it gets lower the more I use, e.g.:
E.getAnalogVRef() = 382 ( E.getAnalogVRef() + E.getAnalogVRef() + E.getAnalogVRef() ) / 3 = 274 ( E.getAnalogVRef() + E.getAnalogVRef() + E.getAnalogVRef() + E.getAnalogVRef() + E.getAnalogVRef() + E.getAnalogVRef() + E.getAnalogVRef() + E.getAnalogVRef() + E.getAnalogVRef() + E.getAnalogVRef()) / 10 = 236
How come? Shall I make a delay between?
-
• #7
Are you really seeing the value
382
? What firmware version are you on?E.getAnalogVRef()
should report a voltage value, so it should be somewhere in the range of 2..5 - not 300+! -
• #8
yeah it is 3.82 sorry
2.74 and 2.36 in the examples
and I believe it is firmware 2.19 -
• #9
Do you have definitely a direct connection between the battery and the Puck?
It feels almost like the Puck is connected by a big resistor, so the more power it's drawing, the more the voltage drops?
What happens if you turn a LED on on the puck, and then take a reading - what value do you get?
-
• #10
Strange. I have tested different batteries now including the original CR2032, which shows correct values! The LFP batteries I use have over-& undervoltage protection AND they have a small circuit connected for charging. The circuit output is connected directly to the battery and therefor to the puck as well. This one is supposed to be "doing something" only when a charging cable is connected but seems to interfere nevertheless. Need to think how I can prevent it from doing so.
-
• #11
Gordon, apart from the charging circuit ... how come the voltage is different (lower) the more often I run the function E.getAnalogVRef()? Does it "draw" as much power as possible, then measures, then "undraws" again? If so, better don't measure to often to keep consumption lower?
-
• #12
I think it's just that when you've executing JS the chip is drawing more power and that's depleting the voltage in the capacitors, so the more times you read the more it's awake for and the lower the voltage.
It's why I asked about turning the LED on as that draw about twice as much as executing JS, so it's a good way to see how much the voltage drops!
-
• #13
Okay, will try to put the LED on and measure. This is the schematic of the charger (TP5000):
1 Attachment
-
• #14
So, measured voltage with LED1 on and off ... same results.
-
• #15
Well, that's very strange. All I can think is while you were messing around with different batteries is it possible you over-volted the Puck.js? I guess it's possible it broke something inside it?
-
• #16
Although it seems to work okay, I may have indeed screwed something ... I surely once mixed +/- and I have fiddled around with the Puck quite a lot (bought it in 2021 I believe). I'll buy another one and try more. However, I have seen that taking the average of three measurements comes very close to what the battery actually has. Still need to check lower voltages though. Actually, I only need to know when battery is close to its lower limit to know when to charge.
Someone I talked to about the measurements asked me "how do you use the ADC? Any voltage divider resistors, filter capacitors?" ... guess Puck does not?
-
• #17
Any voltage divider resistors, filter capacitors?" ... guess Puck does not?
The nRF52 chip has some kind of internal voltage divider for measuring the voltage on VCC - I can't remember exactly sure how it does it internally (you could look it up) but normally there's no problem at all measuring the voltage - there's no external circuitry needed
I surely once mixed +/-
That won't have helped for sure!
Can I put power to 3v / GND to run it instead of the battery holder?
Does it take 3.6v without trouble (LFP battery)?
Thank you!