#### kemuelgersonb

Joined Mar 18, 2019
17
For the circuit below, how do you compute the current flowing from LED to 200R resistor? Without the p-mos the current is around ~8-9mA depending on Vled drop, but when there's p-mos the current was limited to 3mA.

#### Irving

Joined Jan 30, 2016
1,150
If what you intended was to simply switch the led on/off the led needs to be on the drain (resistor) side of the MOSFET, then your normal
R = (Vs - Vf) /If calculation works, giving 9mA for a Vf of 2v.

The MOSFET here is turned on permanently by the 1Mohm resistor taking the gate -ve wrt to the source but...

The MOSFET turns on when Vgs > Vth, but as soon as current flows in the LED the voltage at the source falls from 3.8v due to the Vf of the LED reducing the MOSFETs Vgs. The device ends up in equilibrium where the MOSFET is turned on just enough to maintain a current in the LED where Vgs - Vf ~= Vth, but Vf of the LED is a function of If and Ids of the MOSFET is a function of Vgs.

Of course if Vf is close to the supply rail of 3.8v there may not be enough voltage for even that equality to hold. For a red LED @2v say that's probably OK, but a white LED would be a different matter.

Calculating the resultant Ids or If is tricky, the simulation uses some basic physics for MOSFET Ids v Vgs and LED Vf v If. But how close to reality that is will only be known when you have the specific components on a breadboard.

If you have the curves for the specific LED Vf v If and the MOSFET's Ids v Vgs you could get an indication.

What did you intend with this circuit?

Last edited:

#### kemuelgersonb

Joined Mar 18, 2019
17
If what you intended was to simply switch the led on/off the led needs to be on the drain (resistor) side of the MOSFET.

The MOSFET here is turned on permanently by the 1Mohm resistor taking the gate -ve wrt to the source but...

The MOSFET turns on when Vgs > Vth, but as soon as current flows in the LED the voltage at the source falls from 3.8v due to the Vf of the LED reducing the MOSFETs Vgs. The device ends up in equilibrium where the MOSFET is turned on just enough to maintain a current in the LED where Vgs - Vf ~= Vth

Of course if Vf is close to the supply rail of 3.8v there may not be enough voltage for even that equality to hold. For a red LED @1.5v say that's probably OK.

Calculating that is tricky, the simulation uses some basic physics for MOSFET Id v Vgs and LED Vf v If. But how close to reality that is will only be known when you have the specific components on a breadboard.

If you have the curves for the specific LED Vf v If and the MOSFET's Id v Vgs you could get an indication.

What did you intend with this circuit.
This is a charging-on indicator, charging current is set to 25mA but what I measured is around 23mA and I want to verify via calculation that the charging indicator draws the ~2mA offset.

#### crutschow

Joined Mar 14, 2008
26,748
That circuit is configured as a source follower with the LED as the source load, and a resistor in series with the drain.
This is not a normal way to connect an LED if you want the MOSFET to act as a switch.

#### Irving

Joined Jan 30, 2016
1,150
If that was the designers intention, I agree it sure is an odd way to do it.

@kemuelgersonb did you measure that current in situ or just from the simulation?

There's so much odd about this I don't know where to start. Vbat will vary with the SOC of the battery and could drop as low as 2.9v, assuming 3.8v is a fully charged Li-ion cell. So in the CC phase of charging the LED wouldn't come on at all...

Looking at the transfer curves for that device at 2v Vgs, assuming the control signal is o/c and a Vf of 2v for the LED, it should be close to fully on with that 1M to ground, even with Vds close to 0.25v.

The control signal would have to be at near Vbat to force it off and a logic low would only turn it on more. In which case the 1M is redundant. It makes no sense. .

#### kemuelgersonb

Joined Mar 18, 2019
17
It was designer's intention. I'm just validating it for test plan. I measured the actual charging current in series with vbat.
The missing 2mA was calculated to (Vbat-Vf-Vds / R) = 3.8-1.4-2 / 200 = ~2mA. Is this correct?

#### Irving

Joined Jan 30, 2016
1,150
If those voltages were measured then yes, that's 0.4v/200 = 2mA. Can you actually measure the volts across the 200ohm and validate that current directly?

What was designers intention? I'd love to understand it.

#### schmitt trigger

Joined Jul 12, 2010
417
I will attempt to make this statement politely.

How does the designer expect the full 25 mA charging current to reach the battery, if there is a previous current bleed of 2 mA?

Also the note: "Change R19 to 1M for lower current" is completely false, as that resistor, connected as is, has no impact on either the LED or the battery's current.

#### kemuelgersonb

Joined Mar 18, 2019
17
I will attempt to make this statement politely.

How does the designer expect the full 25 mA charging current to reach the battery, if there is a previous current bleed of 2 mA?

Also the note: "Change R19 to 1M for lower current" is completely false, as that resistor, connected as is, has no impact on either the LED or the battery's current.
I'm not so sure myself also why he did that. Anyway I'm just looking out where the current bleed occurs and it's in those led indicator.

#### Audioguru again

Joined Oct 21, 2019
2,861
The charger IC will normally stop charging when the battery charging current drops to 0.5mA. But with the LED using 2mA that will never happen and the LED will stay turned on and the battery will overcharge.

#### Irving

Joined Jan 30, 2016
1,150
I read the comment on the 1Mohm differently. I got the feeling the original intent was to control the LED current by fixing the Vgs and therefore adjusting the constant current, but of course it doesn't really work like that and constant current source followers anyway only work in a very narrow linear region of MOSFET operation. And that MOSFET is a high-current device with a very small linear region so the whole thinking is a bit suspect. Its not clear why you'd want this to work like that, or what the signal LED_CTRL is meant to do...

According to the datasheet R29 (on the charger chip) and charge current are related by R = 351 Ichg^-1,11 = 351 . 25^-1.11 = 9.854kohm, hence 10k. (which therefore gives 24.66mA) and Ifin = 0.1Ichg = 2.5mA approx. There is still a chance the battery will continue charging, but its less likely.

Why the designer didn't use the CSO output to drive the LED I don't know... instead he's just pulled it up to Vin with 100k, which given its an open drain is just a waste of a resistor - unless there is a test point there so the resistor just facilitates sampling CSO.
●Charging status output pin (CSO) The charge status output pin turns ON by Nch open drain output during trickle charging and main charging, and turns OFF after charging is completed. If an abnormal condition is detected, the charge status output pin repeats ON-OFF at 1kHz on the XC6808A, and turns off on the XC6808B.

#### kemuelgersonb

Joined Mar 18, 2019
17
Well basically I don't have much details pertaining to the intention of such configuration. The product is in pre-production now so any suggestions for improvement will be considered and appreciated. Thank you very much for all the insights.

#### Irving

Joined Jan 30, 2016
1,150
The charging output is constant current, not constant voltage. A Li-Ion battery connected to Vbat will be 3.7v fully charged, dropping to 2,9v at 10%SOC typically.

The LED current calculation is wrong because it assumes Vbat is 3.8v which is only true at fully charged. At 2.9v the LED may well be off or Vds would have to be 1v.

When the USB is plugged in to device with a low battery, the XC6808 delivers the charge current, Vbat will be at 2.9v and gradually rise over the next 10 hours max (implying battery capacity is <=250mAh) until it reaches 4.2v (type C chip) when the charger will switch to constant voltage and Ichg will reduce down to Ifin and the charging stops. The LED should be connected to CSO on the XC6808 unless there is a good reason not to... and junk Q1 and associated components. I'd also consider connecting CSO to the microcontroller so that charger error conditions can be handled.

I'd spec R29 as 10k 1% rather than the 5% currently.

Last edited:

#### Audioguru again

Joined Oct 21, 2019
2,861
A Li-Ion battery connected to Vbat will be 3.7v fully charged.
Absolutely not. A lithium old style battery cell is 4.2V when fully charged and when its charging current has dropped to a low amount. Its voltage is 3.7V or 3.8V when sold and when it is half-charged.

#### Irving

Joined Jan 30, 2016
1,150
That's not my experience, and Battery University says:
"Once the charge is terminated, the battery voltage begins to drop. This eases the voltage stress. Over time, the open circuit voltage will settle to between 3.70V and 3.90V/cell. Note that a Li-ion battery that has received a fully saturated charge will keep the voltage elevated for a longer than one that has not received a saturation charge."

I have here, for example, some brand new 500mA LiPo cells that have been charged at 0.5C CC (250mA) to 4.2v and then at CV til charge current is <5mA (C/100) and are fully saturated. Off charge they are 4.2v OCV and will remain so for several hours. But put a tiny load, say a few mA, on them and they drop virtually instantly to 3.85v on load. Take the load off and they recover to just over 4v OCV within a few minutes. Put them back on load and they are still 3.85v. If I run a discharge cycle at 0.5C (250mA) on my Revolectrix PL8 they give between 510 and 520mAh as expected and 480 - 490mAh at 3C (1.5A). I've seen this repeatedly with various cells from 370mAh to 100Ah. Measuring voltage after charging, with a high-impedance multimeter, gives a false impression of actual voltage in use.

I would contend that the only time the OP will see 4.2v is while they are held there at CV by the charger. As soon as that USB plug is pulled they will drop to ~3.8v despite being at 100% SOC.

Having said there is a version of LiPo marketed as 'high-voltage' that can be charged to 4.35v and do hold up around 4.2v. They give about 10% more energy density, but require a special charger or a special profile on the Revolectrix. I have some but I'm not yet convinced they justify the price premium.

#### kemuelgersonb

Joined Mar 18, 2019
17
Hello,

Below is the circuit I'm currently working on. And I'm wondering why there's no output when I mount D5? D3 is unmounted.
When I gradually increase the input voltage the cutoff is just at 4Vin with 1Vout. Any thoughts?

#### ci139

Joined Jul 11, 2016
1,696
Infineon-BTS443P-DS ? 1,5 going to current sense (incase you have too low load attached ? such triggers ? if so then it's trivial expected behaviour)

i didn't look the d/s too sharply - if the current is sensed on the voltage drop on mosfet the prev. wont apply

also you may lack driving voltage if the chip does not generate its own drive voltages

also2 : is the "switch" designed to handle capacitive loads - if so - is the load side circuit appropriate to such
(i don't like to start reading another d/s of the device i won't regularily use , sorry)

Last edited:

#### kemuelgersonb

Joined Mar 18, 2019
17
Yes that's the part. I'm just thinking if better to remove the D5 and short it to GND.

#### Irving

Joined Jan 30, 2016
1,150
Read the data sheet. D4 and D5 are protection against back-emf on an inductive load. In normal use they are reverse biassed and have no impact. If your output is ~1v then I suspect D4 and D5 are in backwards...

The reason your input gets to 4v before the output voltage appears is that the charge pump to turn the control FET on doesn't start up til 4v