-
• #2
Sun 2019.06.16
re: ' English is not my first language'
Hi @barry_b_benson, you had me fooled, right up to the "Hi
y'all
" which gave it away! ;-)
How many LEDs are we talking about and how long are they enabled? Duty cycle?As the entire code block isn't shown, is it possible we are stuck inside a loop perhaps?
(e.g. continuously broadcasting perhaps)Not enough time in sleep mode?
Have you seen these:
In the Tutorial Section: Quick Start Best Practices - increasing battery life
Posting the entire code block would be of immense help here.
Common quote: "The problem is in the code you didn't post."
-
• #3
https://github.com/iamericmin/Time-Machine-Mk.-IV/blob/master/clock_mk4.js Here's the code. I put it in a link to make my response more concise.
I have two seven segment LEDs and five 1206 SMD LEDs, all blue. I know, it's quite a load for the tiny battery. I'm only an amateur so I'm not familiar with the term "duty cycle." I've heard it before but never understood what it was. I just keep all the LEDs on full brightness whenever they are activated. Since it's a watch, they LEDs turn on for about two seconds when a button is clicked. I multiplexed the segments so there's also some fast computation/timing going on too. The button is clicked I think about 5 times an hour, which means the LEDs are activated for 10 seconds an hour, or 240 seconds(4 minutes) a day.
I thought NRF52 modules automatically went to deep sleep?
-
• #4
What is your firmware version? Older firmwares definitely did draw more power when connected - but new ones enter a low power mode after a minute of inactivity which isn't much worse than when disconnected.
CR1255 is only 48mAh (CR2032s like in the Puck are ~220mAh) so with the LEDs (which might draw 50mA when all on) you're going to flatten the battery pretty quick even with just the LEDs. How long does the battery last without the Bluetooth connection?
However, none of the LEDs on my watch can light up.
What's the voltage on the cell? Blue LEDs take a reasonably high voltage to turn on, so chances are the cell voltage is too low to light the LEDs, but high enough to power the chip still.
However with those lithium batteries once the voltage starts to go down your battery is already 80% flat.
I thought NRF52 modules automatically went to deep sleep?
Yes, they do.
-
• #5
Hey Gordon,
The watch went for five days until I implemented the music control function. Then it died in about 10 minutes. I'm estimating the actual battery life is about a week, assuming I check the time about five times an hour. My firmware version is 2.03, which I believe is the newest.
Also, the battery was completely drained very shortly after the LEDs went dim. Usually I can guess a few culprits for my electronics issues but for this one I'm completely blank. -
• #6
I'm not really sure - there's nothing in that code that'd drain the battery so quickly - people have been running devices in HID mode for ages without issues. Have you tried just powering your system off a bench supply, maybe via a volt meter to measure current draw?
It might help to figure out exactly when your board starts drawing lots of power.
One thing that could cause you issues is if the onboard serial port decided to power on because D8 was pulled high at boot. Even then it's only 1mA or so, which wouldn't drain the battery that quick.
-
• #7
Mon 2019.06.17
Hey @barry_b_benson, since you have quite a few LEDs, have you considered pulsing the on state, with say a thirty percent duty cycle, e.g. ON state == on for ~3ms, off for ~10ms, on for ~3ms, off for ~10ms, on for ~3ms, off for ~10ms, etc over the desired duration or something like that. Eye persistence would/may allow for the indication the LEDs are always on and would only draw 1/3 the power.
Hi y'all,
I have a custom PCB designed for the MDBT42Q module(it's a wristwatch). The whole thing's powered by a 12mm CR1225 coin cell. I've been doing some battery life tests and today was the fifth day on the same battery.
I decided to implement the Bluetooth HID function so that my watch can allow me to control music hands-free. However, after uploading the code and testing things out, the battery died about 10 minutes later. I thought it was because my battery just happened to be low when I added the new function. So I put in a new battery, and it was drained in less than an hour.
Can someone please tell me what I'm doing wrong? I believe there's a reason it's called Bluetooth Low Energy...
EDIT: So I found out the battery's still alive and my smart devices can still connect to my watch. The hands-free control still works. However, none of the LEDs on my watch can light up.
Here's the code I used for the hands-free music control function:
Sorry if things sounded a bit confusing, I'm Korean so English is not my first language.