Battery slow drain

I’m back at square one, unfortunately. It’s now been sitting here for over 24 hours, with the ADC turned on (the original configuration) and the battery hasn’t drained one bit. It’s still sitting at 4.19V. That’s disappointing in the way that I can’t find the (original) source of the drain. The truth of the matter is, there was (is?) no reason for the off-scale drain I saw several days ago, at least none that I can think of. And this proves it, whether the ADC is on or off, it doesn’t (shouldn’t?) affect the battery, at least not to that extreme. I should be seeing milivolts drainage, not a few volts. So yeah, I’m back at square one. I can’t necessarily call this a fluke because it did the same thing with different batteries, but at the same time I don’t know what else to do/test/try to duplicate what happened. Grrr…

On another note, I spent last night building the two power modules for the prototype and I’m about to actually test them. Either they’re going to work as expected, or I’m calling the local fire department. We’ll see what happens.

(Two modules panelized on a 50mm x 39mm piece.)

kirash4:
I’m back at square one, unfortunately. It’s now been sitting here for over 24 hours, with the ADC turned on (the original configuration) and the battery hasn’t drained one bit. It’s still sitting at 4.19V. That’s disappointing in the way that I can’t find the (original) source of the drain.

It's good when things make sense and this shows you don't have a design flaw. Somehow your prior test setup was not exactly what you thought it was. Whether it's worth the effort to track down is up to you. Given you're not at your final design, HW or SW, I wouldn't bother. Sounds like you've been paying attention to the details.

Ok, question: when finalized and the USB connection is no longer used, should I worry about leaving the battery connected to the ADC pin when the unit’s turned off, or should I disconnect it as well?

Getting back to the original hi drain issue with the ADC…

Do you have a DVM (even a cheap one) to measure discharge current ? This is much less painful than waiting 10 hrs to see what is going on.

The high current could be latch-up caused by back powering. Did you make the ADC a digital input before disabling the ADC ?

Also, do you have an up to date schematic we can peer at


ADC - these are some times charge balance types for on-uP types. make sure you have 100nF between ADC input and GND. You can then feed the ADC via 100k since the 100nF can will swamp any input capacitance changes during conversion.

Not sure if a 100k load on the battery is too much to worry about (?)


-mark

markaren1:
The high current could be latch-up caused by back powering. Did you make the ADC a digital input before disabling the ADC ?

Yep, although we've discovered ADC on or off there's minimal to no drainage. So that's not the source.

markaren1:
Also, do you have an up to date schematic we can peer at

Yep, attached, large image. Hope you can follow the connections ...

markaren1:
ADC - these are some times charge balance types for on-uP types. make sure you have 100nF between ADC input and GND. You can then feed the ADC via 100k since the 100nF can will swamp any input capacitance changes during conversion.

Not sure if a 100k load on the battery is too much to worry about (?)

Consider that I can't replicate the problem, and it's been running with a 10K, is there any reason to swap it out for a 100K?

Mee_n_Mac:
It’s good when things make sense and this shows you don’t have a design flaw. Somehow your prior test setup was not exactly what you thought it was. Whether it’s worth the effort to track down is up to you. Given you’re not at your final design, HW or SW, I wouldn’t bother. Sounds like you’ve been paying attention to the details.

In some ways it's frustrating because I can't replicate it, where I was able to repeat it twice before. And nothing has changed on the circuit. And I realize I may be chasing a ghost right now but at the same time, if I was able to somehow make it happen before, what's to say it won't happen again? That's my main concern here, that I will proceed with the design, get it finalized, only to have the problem creep back in. Meh, I can go bonkers on this or just let it go ... I'm opting for the latter ... for now.

Just for the fun of it, last night I plugged the LED drivers in and left it doing nothing (LEDs themselves are off.) I forgot to check this morning before I left the house so I’ll check when I get home this evening.

Switching off: DATA and CLK must be inputs before you remove power to the LEDs

Switching on: Apply power to the LEDs, then make DATA and CLK outputs.

I think this causes some flickering, but driving un-powered logic may cause the sort of issues you are reporting

Got a DVM in circuit monitoring current yet :slight_smile:

-mark

markaren1:
Switching off: DATA and CLK must be inputs before you remove power to the LEDs

Switching on: Apply power to the LEDs, then make DATA and CLK outputs.

I think this causes some flickering, but driving un-powered logic may cause the sort of issues you are reporting

The *only* time anything is being driven with the power OFF, is at the very beginning, and there's a valid reason for that too. The drivers, when not used for a long period, will reset to full duty cycle. This causes a rather unpleasant effect: when you power them up again, they turn on the LEDs at full brightness and duty cycle (all white.) When you have 192 of them in a 12" tube, that's very bright and almost painful to look at. From speaking with one of the engineers from the manufacturer, I CAN send a "off" command prior to turning on VCC, as long as the DATA/CLK signals are above 3.3V (which they are.) From what they're telling me, that's enough voltage to back feed the driver just enough to latch the command and when VCC gets applied, the LEDs won't come up. So when I first start up the unit, it keeps VCC turned off till the MCU sends an "off" command down the line, and immediately after that it turns VCC on to the drivers. This has been tested and is works rather well. [1]

However, I was NOT flipping the DATA/CLK pins to inputs when turning things off, so I guess I’ll add that in now. Although if by the time I get home this evening and check the battery and there’s no drastic voltage drain again, I don’t see any compelling reason to make that change to the code. If the drain is in the milivolts, I’m ok with that. Ultimately, the unit isn’t going to be used for hours and hours non-stop. (Also, I never tried doing a pinMode() outside of the setup() function - can that even be done?)

markaren1:
Got a DVM in circuit monitoring current yet :slight_smile:

I will tonight.

[1] This isn’t the first time I’ve encountered LED drivers that do this, although this is the first one that I can back feed through the DATA line. The other one didn’t do that and I decided not to use them.

Ok, so the scenario that I tested is the following:

Micro is plugged into computer via USB, LED drivers are connected to battery, LEDs are turned off.

Battery voltage last night was at 4.19V. After sitting for 24 hours, the battery’s measuring 3.69V. So 4.19V - 3.69V = 0.5V drop in 24 hours.

Here’s the breakdown:

Note that on that last test, the only connection to the battery is the wire to the ADC pin. As long as the Micro is powered, the ADC pin was left as an INPUT.

I don’t think I’ll bother turning the ADC off when the drivers are also off, I mean we’re talking 0.2µA there …

What is interesting to see, with the drivers disconnected, is the increase in draw when the Micro is not powered versus when it is.

kirash4:
Ok, so the scenario that I tested is the following:

Micro is plugged into computer via USB, LED drivers are connected to battery, LEDs are turned off.

Battery voltage last night was at 4.19V. After sitting for 24 hours, the battery’s measuring 3.69V. So 4.19V - 3.69V = 0.5V drop in 24 hours.

That's looks correct given your measured current draw. Picking a battery similar to yours from the 2011 test data, 3.7v equates to ~650 mAh used or 27 mA for 24 hours. Compared to your measured 34mA, I'd say that's about right.

kirash4:
What is interesting to see, with the drivers disconnected, is the increase in draw when the Micro is not powered versus when it is.

Huh ? Your table shows a decrease in draw w/o the Micro. In any case I'd have expected no difference in [u]battery[/u] draw. The state of the control lines must be making a difference ?

With the Micro powered, there’s a 0.2uA draw. Turned off, it climbs to 282uA. How’s that a decrease?

kirash4:
With the Micro powered, there’s a 0.2uA draw. Turned off, it climbs to 282uA. How’s that a decrease?

Aaaah, I see. I was looking at the mA and not the uA. I was expecting the "phantom power" via the signal lines to decrease the draw from the battery.

Yeah, I don’t know. My only guess is with the Micro turned off, the ADC is left floating and the battery back feeds through that (and the series 10K resistor.) Meh, I’m not sure if it’s worth disconnecting that too …

I have a feeling this will be a short yes/no answer and since it’s still pertaining to the same (overall) circuit, rather than starting (yet) another thread, I’m posting it here. In the schematic I posted earlier, I have a VBUS switch. It’s task is simple, enable or disable VBUS going to the MCU. There is one scenario where I don’t want VBUS to the MCU, and I needed a way to shut it off electronically (as opposed to using a mechanical switch.) However, in testing I discovered that sometimes, when I turn the whole unit on, without applying the 5V to switch on the MOSFET pairs, that VBUS_SWITCHED is already “on”, and I have to ground that 5V line to turn it off. In essence, that 5V is a floating signal. Since it’s tied directly to a 5V supply (that’s also turned on/off), can I get away with a 10K pull-down resistor on it? Should I go larger, like 100K? Does it matter? Let the flogging begin …

For reference, here’s the specific portion of the circuit:

[ I had to make a small change to the overall design because I forgot/overlooked one issue related to this very switch as well. That’s what the ‘D’ in R&D is for, right? :slight_smile: ]

100k on btw the gate and source on Q9 sounds OK.

Cool. I’m always aware of purposely adding a shunt-like device (that’s not a capacitor) between VCC and GND. :slight_smile: