7
\$\begingroup\$

I have a single cell, ~2100mAh rated Li-Ion battery. Something like 18650, I have taken it out from a laptop battery pack. I want to make a simple charging circuitry for it since I will use it in the heart rate monitor that I am trying to build.

I am going to supply power to the battery via the USB port. Whenever the USB cable is connected to the device to communicate with PC using MCP2200 USB-to-Serial converter, it will also charge the Li-Ion battery which is the main power source of the device.

Below is the circuit I am using:

enter image description here

Here is how it works:

V_BUS is the 5 V power from the USB bus. C15 is the bulk capacitor, I did not want to violate the standard, so I put a 4.7 uF capacitor. Also, since I did not want to violate the current limit of the standard, I have put a current limiter in the charger circuit; D5 and D6 limit the voltage that is dropped on R22 + (Vbe of Q2).

The way the charging circuit works is simple; Q2 is current limited, but to limit also the voltage, TL431 is configured to control the base of Q2 with respect to the voltage on node A.

Also, there are some other circuitry after node B, that is powered up from the battery BT2. Here is some of it shown:

enter image description here

Now, I thought there is no way the battery can supply current to Vbus since Q2, D5 and D6 will be reverse biased, but it seems like I am wrong at some points. At certain voltages of the battery, for example at about 3.8V, MCP2200 cannot enumerate and Windows does not recognize it as a virtual serial port. Whenever I remove the battery, this problem is solved, USB enumerates successfully every single time.

Also, I have inserted a diode between node A and node B with a polarity that is shown in the schematic, and this worked, too. I know that I have to connect R28 to node B again to compensate for the voltage drop of the added diode.

That makes me come to the conclusion that battery feeds the circuitry on the left of it and messes up with the voltage or current levels of USB standard and it cannot enumerate. However, I cannot give a logical explanation.

Edit: When the battery voltage is 3.8 V, I measure 4.3 V on the V_BUS node when the USB cable is not connected and there is a diode between Node A and Node B.

Edit: It seems like V_BUS was getting fed by Rx pin of MCP2200, through the protecting diode inside of MCP2200. Madmanguruman said it right, I have to include full schematic and here it goes; Page 1 and Page 2 of the full schematic. I have edited the code to idle this pin at 0 V instead of 5 V, and the problem seems to be solved now.

What is the reason this USB battery charge circuit will not work without a diode?

\$\endgroup\$
8
  • \$\begingroup\$ Things to try to instrument in order to find out what's going on: (1) when the device is not plugged into USB, is there a voltage on VBUS? (2) when it is plugged in, what current is flowing on VBUs and in which direction? \$\endgroup\$
    – pjc50
    Commented Feb 8, 2013 at 13:50
  • \$\begingroup\$ @pjc50 Yes, there is a voltage of 4.3 volts on V_BUS when USB cable is not plugged in. \$\endgroup\$ Commented Feb 8, 2013 at 14:59
  • \$\begingroup\$ 4.3V cannot possibly be coming from the 3.8V battery, therefore it must be coming from the boost converter somehow. Is there an error in the PCB layout, or a bridged track somewhere? Can you add the part of the schematic which includes the MCP2200? Is VBUS connected to anything else on the PCB? (eg ESD diodes) \$\endgroup\$
    – pjc50
    Commented Feb 8, 2013 at 15:05
  • \$\begingroup\$ @pjc50 I have checked but could not find any bridges, than I have removed MC34063 from its socket, and the voltage on V_BUS dropped to about 0.7V below the voltage of Vcc. Then I checked the schematic and found out that the only connection between Vcc and MCP2200 is by the Rx and Tx pins that come from the microcontroller. I have removed the microcontroller from its socket and the voltage on V_BUS dropped down to 0 V. Then, I have changed to program to make the idle voltage level of Tx line (LOW) 0 V. Probably, the voltage was being fed through the ESD diodes inside MCP2200. \$\endgroup\$ Commented Feb 8, 2013 at 15:44
  • \$\begingroup\$ For future reference, more complete schematics would have helped others decipher your issue. You mentioned a micro, but didn't include it in any of your snippets. The fault was outside of what you provided us... \$\endgroup\$ Commented Feb 8, 2013 at 21:08

3 Answers 3

3
\$\begingroup\$

As Madmanguruman noted, you did not show your complete schematic, so it was not possible for us to diagnose the problem.

The reason you were seeing some problems when you plugged your USB cable, is because there was already a voltage present on the V_BUS before you connected your cable. Also, this voltage may even be fluctuating.

Here is the reason why; the PIC microcontrollers generally have protecting diodes, which are called internal clamp diodes, to both rails on their input so that any over-voltage, that is voltages higher or lower than a diode drop from Vcc or Vss. MCP2200 is rumored to be a PIC18F14K50. Here is the pseudo block diagram of the input pins of MCP2200:

enter image description here

When there is no voltage present on V_BUS, which is the case of an unplugged USB cable, the applied voltage, hence current, flows through the input pin, which is Tx of your microcontroller, through the upper diode, to the V_BUS. There you have it, 4.3V on your V_BUS, exactly one diode drop lower.

Here is what to do; make the Tx pin on your microcontroller LOW if you are bit banging, or disable the UART module if you are using the hardware serial peripherials, until you somehow enter the serial mode.

If there is not some kind of "serial mode" or "PC connection mode" in your application, you can detect the connection by checking for a serial input, for example, start the module (or make TX pin HIGH if you are bit-banging) after you receive a character, say; S.

When you start the serial port, you make the Tx pin of your microcontroller HIGH, after that be sure to transfer a dummy character or MCP2200 will get confused and you will not be able to communicate over serial.

\$\endgroup\$
0
\$\begingroup\$

With no cathode voltage from V_BUS, the regulator can not generate its reference voltage, so it is ON when the battery is connected. V_BUS is shunted to ground by the 100 ohm resistor.

enter image description here

Edit: Nope. Wrong answer. Thought it might go unstable when V cathode less than V ref-internal, and V ref high.

\$\endgroup\$
2
  • \$\begingroup\$ But either way, 100 ohm will let only 50mA through it? \$\endgroup\$ Commented Feb 8, 2013 at 16:06
  • \$\begingroup\$ Ya, this is a wrong answer. But the regulator circuit -is- kinda odd, with power on the reference but not on the cathode. \$\endgroup\$ Commented Feb 8, 2013 at 16:09
0
\$\begingroup\$

Interesting solution of discharging battery to voltage divider for TL431:

http://belza.cz/charge/liich.htm

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Link-only answers are discouraged because they become useless if the link dies. Please add a summary of the solution mentioned on that site so it remains useful if that occurs. \$\endgroup\$
    – PeterJ
    Commented May 4, 2014 at 12:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.