Lipo Charger and USB Detect

Discussion in 'General Electronics Chat' started by bumba000, Oct 14, 2015.

  1. bumba000

    Thread Starter Member

    Oct 7, 2015
    Hello All,
    I have a little lipo charger that uses the MCP73831/2 chip. It's actually the SOT-23-5 version and here is the datasheet

    Here is the actual product that I own

    Please help me understand how I can with an arduino detect whether or not a usb cable is attached and charging the battery.

    I was using a 1ohm-1ohm voltage divider from the 5V pin on the arduino but that seems to be getting in the way of a voltage divider that I'm using for another reading, so I had gotten rid of that and had gone with a jumper from the PROG (5) pin on the MCP73831 to the arduino and had some success but now reading the data sheet again and again, I just can't figure how that worked in first place.

    I see that I can use a pullup resistor from the STAT (1) pin on the MCP73831 to an input on a micro but really I don't understand how that works.

    Looking at this schematic

    which is the lipoly backpack product based on the MCP73831 chip it appears that if I remove the LEDs the circuit will no longer function as intended. Am I right?

    again, please help me understand how I can detect when the usb is connected.

    Thank You, John
  2. bumba000

    Thread Starter Member

    Oct 7, 2015
    So I removed the LEDs from one of these little "backpack" lipo chargers and it stopped working. I soldered them back on and it didn't work. Went with a new one (lucky I have a few as I knew I'd mess up at least one).

    OK. at least at this point I'm figuring not to remove the LEDs. Two reasons. The backpack wont work because they are part of the feedback network that triggers / feeds the prog (program) pin of the charger chip and also because they're a bear to solder back on.

    Next up. Determine whether usb is plugged in or not based on that prog pin. With the USB plugged in; the feedback will give the prog pin 0.99v for a dead battery and 0.2v when the battery is charged but being maintained.

    Now; after soldering the two little diode/LEDs back on I still had nothing at the prog pin. I'm pretty sure that I had the polarity correct on at least one of the leds. Might be easier with a few less beers in the tank too. =0)

    I was able to figure out a bit of what's going on in this schematic after studying it and the MCP73831 datasheet for roughly 10 hours and then watching Dave Jones EEVBlog video regaring the MCP73831 on youtube here: . LUV this guy!!