Author Topic: MCP73831 - LiPo Charger STAT Output - truth table for 2 stats  (Read 4146 times)

0 Members and 1 Guest are viewing this topic.

Offline made2hackTopic starter

  • Frequent Contributor
  • **
  • Posts: 424
  • Country: 00
    • Made2Hack
Hello all,

I want to know if my truth table makes sense. I want to charge 2 LiPo cells from 2 MCP73831 chips which output via a Stat pin as shown. When Charging, output is Low, When finished charging, output is High. When no battery, output is High-Z (this doesn't concern me).

With one chip, my current setup works fine as in the schematic. What I want to know if I connect output of 2 Stat pins, what will happen when the batteries are not both finished charging at the same time?

Ie, battery 1 is done so STAT is high, but battery 2 is charging, so STAT is Low.  Will my output be Yellow? (Both Red & Green turned on? ) Or will the High output be sunk to grown by the Stat pin that is Low?

Thanks


Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2682
  • Country: de
Re: MCP73831 - LiPo Charger STAT Output - truth table for 2 stats
« Reply #1 on: July 07, 2016, 12:12:32 pm »
Or will the High output be sunk to grown by the Stat pin that is Low?

The current will flow to ground through the open drain in the second STAT. R1 and R2 will then work as a voltage divider and depending on the values of R1 and R2 and the transistors you've chosen, the green LED may or may not turn on.

McBryce.
30 Years making cars more difficult to repair.
 

Offline made2hackTopic starter

  • Frequent Contributor
  • **
  • Posts: 424
  • Country: 00
    • Made2Hack
Re: MCP73831 - LiPo Charger STAT Output - truth table for 2 stats
« Reply #2 on: July 07, 2016, 01:25:01 pm »
Right ok. I'm gonna have to think about this some.


Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: MCP73831 - LiPo Charger STAT Output - truth table for 2 stats
« Reply #3 on: July 07, 2016, 01:51:27 pm »
You need some diodes.  The conditions required are:
* If either stat pin is low the Red LED must be on.
* If either stat pin is high the Green LED must be on.

You also cant use a common resistor for the two LEDs.
This should work:

Caution: If  BOTH batteries are disconnected,  both LEDs will glow dimmer than usual.  To add a circuit to detect this would be quite complex.  It will work correctly with one battery connected.
« Last Edit: July 07, 2016, 01:59:47 pm by Ian.M »
 

Online Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: MCP73831 - LiPo Charger STAT Output - truth table for 2 stats
« Reply #4 on: July 07, 2016, 01:52:07 pm »
Generally, if both LED die's are going to be on at the same time, you'll need a current limiting resistor for each one.  With a single resistor on the common the LED die with the lowest forward voltage will determine the voltage across both LED's - and green generally requires ~2.1V, whilst red = ~1.8v (these are rough numbers and depends on the material used in the dies).

You've done well with your truth table.  You could expand it out so that each LED has its own column - the fact they are in the same package just means they have a common cathode.  With the last column being the truth table for the LED's - R+G = Y, R = R, G = G etc.

That way you'll see that, according to your table the 'green' should always be on, except when both STAT outputs are pulled low.
 

Offline made2hackTopic starter

  • Frequent Contributor
  • **
  • Posts: 424
  • Country: 00
    • Made2Hack
Re: MCP73831 - LiPo Charger STAT Output - truth table for 2 stats
« Reply #5 on: July 07, 2016, 02:07:31 pm »
@IanM Thanks Ian, didn't think about the diodes. It makes perfect sense the way you drew it out. I'm not worried about High-Z since the battery will always be present.

@Buriedcode, You are right about the resistor no longer being common. It will work with Ian's schematic.

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: MCP73831 - LiPo Charger STAT Output - truth table for 2 stats
« Reply #6 on: July 07, 2016, 02:45:06 pm »
There is one 'gotya' in my schematic.  Because the NPN transistor is an emitter follower, it doesn't have a base resistor.  Therefore the input signals must never be above the Vdd rail feeding the LEDs.   Also expect to have to tweak the LED resistor values for equal brightness as the Red one pulls up to Vdd-Vce_sat, but the Green pulls up to two diode drops below the status signal high level.
 

Offline made2hackTopic starter

  • Frequent Contributor
  • **
  • Posts: 424
  • Country: 00
    • Made2Hack
Re: MCP73831 - LiPo Charger STAT Output - truth table for 2 stats
« Reply #7 on: July 07, 2016, 03:19:00 pm »
@Ian.

K will do.

Offline KL27x

  • Super Contributor
  • ***
  • Posts: 4103
  • Country: us
Re: MCP73831 - LiPo Charger STAT Output - truth table for 2 stats
« Reply #8 on: July 07, 2016, 09:18:45 pm »
Does your device have a power light?

Why not just use the 78732, open drain output. Connect them both to a single LED and single resistor. Two components. When the LED is lit, one or both are charging. When it's out, charging is done. As long as there's some other indicator light when plugged in, you will know the USB power is good. And therefore, if the LED is off, both batteries are finished charging.

I'm all about simple. Heck, give them each their own LED and resistor and add a dedicated Vusb LED and resistor. That's 3 LED and 3 resistors, and you are still ahead of the curve. Wash on parts counts, but fewer pads and much simpler routing.
« Last Edit: July 07, 2016, 09:24:33 pm by KL27x »
 

Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2682
  • Country: de
Re: MCP73831 - LiPo Charger STAT Output - truth table for 2 stats
« Reply #9 on: July 08, 2016, 07:40:14 am »
There is one 'gotya' in my schematic.  Because the NPN transistor is an emitter follower, it doesn't have a base resistor.  Therefore the input signals must never be above the Vdd rail feeding the LEDs.   Also expect to have to tweak the LED resistor values for equal brightness as the Red one pulls up to Vdd-Vce_sat, but the Green pulls up to two diode drops below the status signal high level.

You can just move R2 and D6 above Q1 and add a resistor to the base of Q1.

McBryce.
30 Years making cars more difficult to repair.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: MCP73831 - LiPo Charger STAT Output - truth table for 2 stats
« Reply #10 on: July 08, 2016, 08:35:37 am »
No you cant, because D5 & D6 are a common cathode tricolour LED that shows Yellow when only one battery is fully charged so the two cathodes share a single lead..  Anyway, its not an issue if the LEDs are powered from the same Vdd as the MCP73831
 

Offline McBryce

  • Super Contributor
  • ***
  • Posts: 2682
  • Country: de
Re: MCP73831 - LiPo Charger STAT Output - truth table for 2 stats
« Reply #11 on: July 08, 2016, 09:00:03 am »
Ah, didn't realise that, I thought they were two seperate LEDs.

McBryce.

30 Years making cars more difficult to repair.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf