I haven't made much noise about Anelok lately, but that doesn't mean
that things aren't moving.

I had a good long look at the design for the next board revision - and
promptly discovered two nasty little flaws in the battery / USB
switching circuit, which would probably not have worked very well, if
at all.

For the following explanation, you may want to look at the old (buggy)
schematics:

http://downloads.qi-hardware.com/people/werner/anelok/tmp/anelok-20140603.pdf

The idea is as follows: when USB is connected, we have 5 V on USB_VBUS,
which then drives the p-FET Q1 that cuts off the battery. When USB is
disconnected, the resistor R10 pulls the p-FET's gate to ground and
battery current can flow.

So far, so good. Now there are two problems: the first one is that FETs
Q1 and Q2 can leak up to a few uA through the gate. With a pull-down of
1 MOhm, that would already raise the gate voltage by a volt or two. But
that's the smaller of the two issues.

The worse one is that current can flow out of the input of the MCU's
voltage regulator (VREGIN). That's nothing uncommon since regulators
are often designed to work mainly in one direction and not worry about
the opposite direction. I have known that VREGIN behaves like that for
a while, which is why there is diode D1.

However, I didn't realize that this would also upset my little battery
cut-off circuit. When on battery power, VREGIN would have a low
resistance path to battery power, which would completely obliterate any
effect of the weak pull-down R10 and try to close Q1.

So the circuit would basically try to strangle itself. I'm not sure
what exactly the end result would have been - it may still have worked,
or perhaps only sometimes, etc., but this is certainly not what was
meant to happen.

Here's the corrected version:

http://downloads.qi-hardware.com/people/werner/anelok/tmp/anelok-20140711.pdf

I moved the tap to the other side of D1, so only a few uA can leak (*)
from VREGIN to the FET. I also decreased R10 from 1 MOhm to 82 kOhm
(same value as R12 so the BOM doesn't grow), to absorb any leakage of
the FETs. This means that Anelok will burn 60 uA in R10 alone when on
USB, but that's not much of an issue, at least not for now.

(*) D1 is a Schottky diode and thus has a relatively high reverse
    current. I can replace it with a switching diode later, but I don't
    have any suitable part laying around.

I also grew all the test points from a copper diameter of 60 mil (1.5
mm) to 80 mil (2.0 mm), making them just as large as those of the
Y-Box. The 2 mm diameter worked will there, so there won't by any
concerns about the test points being difficult to hit in Anelok.

Here is the updated layout:

http://downloads.qi-hardware.com/people/werner/anelok/tmp/anelok-20140712.png

- Werner

_______________________________________________
Qi Hardware Discussion List
Mail to list (members only): [email protected]
Subscribe or Unsubscribe: 
http://lists.en.qi-hardware.com/mailman/listinfo/discussion

Reply via email to