Led current sense indicator help - Page 1
Forum section: electronics / beginners

author: kentfielddude
author_rank: Contributor
timestamp: February 20, 2019, 11:19:20 pm
content: Hello. I am designing a usb quick charger. I am using the uP9616PDC8 ic. I have a working prototype based on the datasheet. I want to add a led that turns on when current is flowing through the charger. The uP9616PDC8 uses a current sense resistor for CC mode and over current protection. I am using a 0.039Ohm sense resistor. I think I need to use a opamp to detect the voltage across the sense resistor to switch on a transistor to drive the led but I'm not sure how to do this. I'm a noob so any help would be much appreciated.link to datasheet:https://lcsc.com/product-detail/PMIC-Battery-Management_uP9616PDC8_C92690.html

author: oPossum
author_rank: Super Contributor
timestamp: February 21, 2019, 12:37:10 am
content: I think a LED + resistor in parallel with L1 would show when the buck converter is operating and the battery is being charged.

author: kentfielddude
author_rank: Contributor
timestamp: February 21, 2019, 12:43:13 am
content: the output voltage varies from 3.6v to 12v.

author: oPossum
author_rank: Super Contributor
timestamp: February 21, 2019, 12:52:34 am
content: I misunderstood the purpose of this chip. Thought it was a charger chip. Since this supplies voltage to a USB powered device, I don't understand the need to detect current draw. It won't be an indication of charging. The device it supplies power to will show that.

author: oPossum
author_rank: Super Contributor
timestamp: February 21, 2019, 12:57:17 am
content: Something like this may work...http://www.ti.com/lit/ds/symlink/ina381.pdf

author: wraper
author_rank: Unknown
timestamp: February 21, 2019, 02:11:32 am
content: You could use INA200-INA202 + a few resistors for that.http://www.ti.com/product/INA200Or cheaper current sense IC with additional opamp/comparator IC. Although IMO it's too much complexity to add stupid led to this circuit to be worth it to begin with.

author: kentfielddude
author_rank: Contributor
timestamp: February 21, 2019, 04:47:48 am
content: Yeah. I might just stick a 5v ldo on the input and connect it to a led.

author: wraper
author_rank: Unknown
timestamp: February 21, 2019, 09:06:40 am
content: Quote from: kentfielddude on February 21, 2019, 04:47:48 amWhy would you need to waste LDO for that?

author: Km
author_rank: Newbie
timestamp: February 21, 2019, 10:19:48 am
content: i think smd stm8s is best solution for your question

author: wraper
author_rank: Unknown
timestamp: February 21, 2019, 10:27:26 am
content: Quote from: Km on February 21, 2019, 10:19:48 amHow it's best solution? Not only there is no need for MCU, it cannot actually measure the current directly. Not to say you will also need voltage regulator to power it. All for the sake of one stupid LED.

author: Ian.M
author_rank: Super Contributor
timestamp: February 21, 2019, 01:16:51 pm
content: Don't bother. Km's probably just a spammer running up their post count. IMHO Km's less relevant than a Markov bot!Edit: our moderators concur - Km's just been banned.Back to detecting a load on the uP9616PDC8. Its datasheet says its switching frequency is typ. 125KHz and that its quiescent current is typ. 1mA when itsnot switching. Therefore detecting when its active is simply a matter of detecting when its Lx pin is switching. A charge pump with a 220pF coupling capacitor could deliver 2.6mA at 8V in, rising to 10.5mA at 32V in, without significantly loading Lx, which is already driving the boost capacitor. That would be plenty for a high efficiency LED.

author: kentfielddude
author_rank: Contributor
timestamp: February 22, 2019, 05:48:49 am
content: Thanks for the suggestion. I've been doing some research on charge pumps online but I'm a bit confused on how they work. Could you please provide a schematic and edumacate me?Thanks,- Jason

author: Ian.M
author_rank: Super Contributor
timestamp: February 22, 2019, 03:14:10 pm
content: It looks like I fumbled the numbers above.To get enough LED current, you need a charge pump with a coupling capacitor in the nF range.Provided you aren't running it right at its abs.max. input voltage, tapping in at the earthy end of the existing snubber should work OK. It only needs three extra components + the LED, one BAT54S dual (series) Schottky diode, and a resistor and capacitor to smooth out the LED current a bit.*DON'T* use a LED with a high Vf (so not blue or white) as the extra voltage on C7 directly increases the stress on the Lx pn by decreasing the effectiveness of the snubber.LTspice sim attached.

author: kentfielddude
author_rank: Contributor
timestamp: February 22, 2019, 04:20:01 pm
content: Thanks for the help.I added the led to my circuit below.