R3 Turning On By Itself

Started by gburdzin, August 31, 2020, 02:51:52 PM

gburdzin

Hi,

I just got an R3 version of the CurrentRanger and found some weird behavior with it turning itself back on a short time after I turn it off.  The turn on occurs when powered from the battery or USB.

When powered from the battery, if I turn it off via the button (2s press), after about 20 seconds it turns back on by itself.
When powered from USB, if I turn it off via the button (2s press), after about 5 seconds it turns back on by itself.

Any idea if this could be a firmware bug, or do I possibly have a hardware problem?  A visual inspection of the board and components didn't reveal anything that looked suspicious.

Thanks
Greg

Felix

Sounds more like a hardware problem.
Do all the components look good as far as them not being dislodged or knocked off the board in some way?
Also, what battery are you using?
Can you check continuity on the power button terminals (actual resistance when it's OFF)?

gburdzin

Yes I did a close inspection of the components and I don't see any issues.

The battery I'm using is a generic 1000mAh Li-Po with the correct JST connector, but the issue also happens just with USB power and no battery connected.

The resistance between the terminals of the power button is approximately 30kOhm.

Felix

Is your 30K consistent?

I get 80K on all CRs I just tried, regardless if I test soon after power off. But I test without a battery, otherwise the CR turns ON as soon as I touch the button terminals with the DMM probes.

The interesting part is this: if I press the power button once, the resistance goes to 30K, if I press it again it goes to 6K, then I have to release the probes and retest to get back to 80K. This is consistent on my end. So the DMM internal resistance has an effect on the CRs power switch circuit.

My best guess is maybe a component (resistor, capacitor) of the wrong value was mounted on the board which is causing that circuit to not behave correctly and hold the CR in OFF mode.
If its a resistor its easy to spot, if it's a capacitor its not. Can you please send me a high res photo (in focus pls) of the SMD side to my email: felix at low power lab dot com. And we can take it from there.

Thanks

gburdzin

So with no power source connected, I get different measurements depending on the DMM that I use.

With a Fluke 289, I read 81K and this value changes to 31K after 1 or more presses of the button (I never get 6K like you do), and resets once the leads are removed.  In case it is relevant I also read a resistance of 4.7M with DMM leads reversed with no change after any button press.

With an Agilent 34461a, I read 31K and this value changes to 850Ohms after 1 or more presses of the button, and resets once the leads are removed.  With the leads reversed I read 9.5M with no change after any button press.

I will try to get a high res photo later today.

Thanks for your help.

tinkerbee

I have the same issue. It keeps turning on by itself!
Please suggest a solution.

Felix

tinkerbee - nothing looks out of the ordinary.
Can you read the above and check what was suggested already? Specifically the resistance on the power button. That is a mechanical part that could potentially fail.

tinkerbee

The switch reads ~33k when open and ~0 when closed.
The button seems ok, since it does switch ON when pressed and OFF when pressed for 2 seconds.

However, I also noticed that auto-off does not seem to work.

I added a serial.println to the sketch to confirm this.
The "AutoOff Now" seems to keep getting printed but the device does not power off.

if (millis() - lastKeepAlive > autooff_deadline) 
{
      Serial.println("AutoOff Now");
      pinMode(AUTOFF, OUTPUT);
      digitalWrite(AUTOFF, LOW);
}


Video:


Felix

The PWR LED is turning on slowly, never seen anything like that.
Some further questions:
1) Is this a deterministic time? Meaning, if you turn the unit OFF, then will it always take that same amount of time for it to come back ON?
2) Has this always happened on this unit, since you received it?
3) Did you tinker with the SMD components on the board at all?
4) Are you using a LiPo battery as required?

tinkerbee

1.
- If I connect the battery after a long time (overnight), the device takes a few minutes to wake up.
- Then it takes shorter time duration to turn on. You are right, I can see the power on LED glow faintly first and then turn full on.
- If I turn it off using the button, it wakes up again in a much shorter time.
2. Yes
3. No (Have shared the SMD side pic with you)
4. 2000mAH 3.7V LiPo. The batt gives 4.2V on my DMM, so I guess it is fully charged.
Also, the same thing happens if I disconnect the battery and use only usb power, so I believe it may not have anything to do with the battery itself.

Felix

Something is not quite right, the LPF LED never turns on at power ON. Yours turns ON briefly then turns OFF.
Also I see default values for the firmware, this is a non-calibrated unit. Have you replaced the firmware?
Have you backed up your original firmware?

tinkerbee

I did replace the firmware to see if that would fix the issue, and have not calibrated yet. I haven't backed up either.

Felix

If it would have been a stock firmware issue, that would be present on all CurrentRangers and a massive problem, and replacing firmware with the same one would obviously not fix the problem.
According to my records, your CR was delivered about 1.5 months ago. After this long, you'd have to return it for me to figure out what happened exactly. If it was a DOA I would replace it no questions asked. But I have never once found a legit DOA - it's why I test each unit thoroughly so I am 100% sure I ship something that works. In each such returns instance there were hacks, improper use/damaged MCU, poor soldering etc.

Why didn't you report it right away, like after first powering the device, if there was a problem?
Backing up the original firmware is strongly recommended, having that original to revert to is sometimes critical in debugging a problem.
The CRs come tested and calibrated, so such a fault would be pretty obvious here on the test bench.
It's almost impossible that a CR slipped through the cracks and is malfunctioning out of box.

tinkerbee

Had briefly powered it on when I'd received it, then added the OLED header and plugged in a display, it seemed to power-on fine (on USB) and I so kept it aside. I was busy with a few projects earlier. Just got time recently to print an enclosure and power it with a LiPo and that's when I noticed that it would wake up on its own! Then I tried searching/ reading up more and ended up here.

I don't think there's much of a point wasting time and money shipping this back to you etc. For now I will solder in a toggle switch on the power cable from the battery, calibrate the LDO and I guess the functionality would still be intact for my use. From whatever I've read so far, you've put together an extremely useful tool for all low-power workbenches and thank you for that!

I understand that the device would have gone through your checklist. Maybe I did something wrong, but I'd love to know what exactly. I have no intent to hassle you/ get another unit at all; just to be able to use it. Meanwhile, if there is anything you'd like me to do remotely to help you figure out what the issue is, I'd be glad to :)

Cheers and thanks.

Felix

That's reasonable.
If I had the unit back on my bench I would start probing several components to see how they are acting up during that glowing of the LED.
It's probably too hard to try to walk you through it and do this over zoom, because it's not a step by step process, more depending on what I find while trying to debug it, and the tools involved etc.
Remote software debugging is one thing and its very possible, hardware is not quite as easy :-\

Overall, while not ideal, adding the switch will solve the problem. If there's anything that develops in this regard, and I have a more certain answer I will be sure to post it here.