VS1010 Battery Charging

Designing hardware and software for systems that use the VS1010 MP3 Audio DSP Microcontroller.
Post Reply
rflores765
User
Posts: 15
Joined: Sun 2019-05-26 7:13

VS1010 Battery Charging

Post by rflores765 » Thu 2019-06-06 5:08

Hello,

I'm using a VS1010 dev board to validate some design choices for a product. One of them is to use the VS1010 battery charging capabilities to charge an internal Li-po battery. I have a few questions about this:

1. The datasheet shows USBVDD as a power input in the "5.5 VS1010d VQFN-68 Pin Descriptions" and the "4.6 Analog Characteristics of USB_VDD input" but in "Figure 8: VS1010d block diagram" it is shown as the charger output pin. I've seen that a battery charges from this pin but I'd like to confirm that I am using it correctly. In this case, VHIGH is powered from USB power or a benchtop power supply set to 5V

2. When I use a USB from a laptop, the bulk charge current set to ~50mA but when I use a benchtop power supply, the bulk charge current is set to ~110mA. Is there a way to guaranteed a specific bulk charge rate? Ideally 50mA.

3. When using a benchtop power supply, the current draw is ~70mA when no battery is present on USBVDD. When there is a battery present, the current draw jumps to ~270mA when only ~110mA are going to the battery. Where would the other 90mA go in this case?

4. Is there a circuit that is recommended to power VHIGH from either USB power or the internal battery without needing a separate power converter? My current idea is a P-ch FET on the battery with a couple of N-ch FETs to turn it on and off depending on whether USB power is present. In this setup, USB power is direct to VHIGH but the battery will power VHIGH through the P-ch if USB power is not present. The battery is then tied directly to USBVDD for charging.

Thanks,
Rodrigo

User avatar
Panu
VLSI Staff. Currently on holiday.
Posts: 2700
Joined: Tue 2010-06-22 13:43

Re: VS1010 Battery Charging

Post by Panu » Thu 2019-06-06 6:59

Hi!

Hmm, the USBVDD really is an input pin. And the VS1010 has a controlled current path from USBVDD to VHIGH. So the amount of milliamperes drawn from USBVDD count towards the whole current consumption instead of just the battery, which should be connected to VHIGH.

As this is different from what you thought, it's difficult to answer your questions such as they are... can you twist your braing for a moment and see how this affects your questions.. :) And mm-hmm, could you verify once more what kind of connection you have at the moment and to which direction you are experiencing current flow? I think there could be a diode path (like the body diode in NFETs) from the VHIGH to USBVDD, allowing current to pass freely in the "wrong" direction; from VHIGH to USBVDD, although I am not sure about this, I must consult one of the chip designers.

As of today, we have not yet published any specific recommendations on how to use the charging circuitry in a real world application. We've just verified the current gate hardware. But some thoughts along the way would suggest that first of all you MUST use such a battery that contains some protection/management circuitry. Secondly, the gate is switched off by default in the VS1010 so that it doesn't draw any current. In case your battery completely drains due to leakage, this would be a problem. Personally, I would look at using a dual connection switch for the power button and route some current from the USBVDD to the VHIGH through the second contact, a diode and a resistor, to ensure that the device actually does power up even when there is no current coming from the battery. Thirdly, you can monitor the VHIGH voltage with the SAR analog-to-digital conversion circuitry, so you can write an algorithm that controls the charging current based on the battery voltage. The VS1010 circuitry only provides, as a "last line of defense", a rudimentary charging cut-off circuitry which switches the current off when VHIGH reaches something near 4.2 volts.

As the current is supplied towards not only the battery, but the whole system, the whole thing essentially becomes a function of the VS1010 power consumption - there is no internal way of monitoring the VHIGH current itself. I might put a 2.2R resistor between the battery and the VHIGH pin and measure the voltage from the other side of the 2.2R resistor with another SAR channel and voltage divider resistors. This would give me the chance to get some kind of value for the current when I measure the voltage at each end of the 2.2R resistor (calibration per unit might be needed due to variations in resistor values).

Finally, the VS1010 power consumption itself, including how to use the various low power and power down states is currently under active research. The ROM code plays it safe and just keeps everything on at full power, basically.

-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

rflores765
User
Posts: 15
Joined: Sun 2019-05-26 7:13

Re: VS1010 Battery Charging

Post by rflores765 » Fri 2019-06-07 2:33

Hi Panu!

Thanks for the response.

So the reason I attempted to use USBVDD as the charger output is because of the block diagram of the VS1010 but also because when I placed USB power at USBVDD and the battery at VHIGH, the battery did not charge. The current consumption was actually independent of power on USBVDD. I also removed the battery and attempted to power the VS1010 from USBVDD but that also did nothing. The benchtop power supply showed zero mA draw in this case. Is there something I'm missing with this setup? Do I need to flip a bit somewhere or give the VS1010 some other indicator to start charging or allow power from USBVDD to power VHIGH?

Another note is that when I power VHIGH, USBVDD is measured close to VHIGH minus a few 100mV. USBVDD is reduced if I place a resistor to ground which would make sense for a diode drop.

Thanks,
Rodrigo

User avatar
Panu
VLSI Staff. Currently on holiday.
Posts: 2700
Joined: Tue 2010-06-22 13:43

Re: VS1010 Battery Charging

Post by Panu » Fri 2019-06-07 6:57

Is there something I'm missing with this setup? Do I need to flip a bit somewhere
You need to enable the charger. Hmm, from your explanation I thought that you already had code to do that. If not, can you check if the code below works for you? The setting can have values from 0 to 15, can you check what it does in your board?

Code: Select all

void SetCharger(u_int16 setting) {
	u_int16 r = PERIP(0xFC25) & 0x87FF;
	r |= ((setting & 0xf) << 11);
	PERIP(0xFC26) = 0x5A7D;
	PERIP(0xFC25) = r;
}
-Panu
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

rflores765
User
Posts: 15
Joined: Sun 2019-05-26 7:13

Re: VS1010 Battery Charging

Post by rflores765 » Sat 2019-06-08 5:57

Hi Panu,

That bit of code worked! It seems that the setting value will dictate how much current is drawn from the source. The IC draws current first and whatever is left is sent to the battery via VHIGH as you said.

Thanks for the help! I'm sure I'll have many more questions :)
Rodrigo

Post Reply