Author Topic: Led current sense indicator help  (Read 531 times)

0 Members and 1 Guest are viewing this topic.

Offline kentfielddude

  • Contributor
  • Posts: 9
  • Country: us
Led current sense indicator help
« on: February 21, 2019, 10:19:20 am »
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
« Last Edit: February 21, 2019, 10:25:51 am by kentfielddude »
 

Online oPossum

  • Frequent Contributor
  • **
  • Posts: 678
  • Country: us
  • The other white meat
Re: Led current sense indicator help
« Reply #1 on: February 21, 2019, 11:37:10 am »
I think a LED + resistor in parallel with L1 would show when the buck converter is operating and the battery is being charged.
 

Offline kentfielddude

  • Contributor
  • Posts: 9
  • Country: us
Re: Led current sense indicator help
« Reply #2 on: February 21, 2019, 11:43:13 am »
the output voltage varies from 3.6v to 12v.
 

Online oPossum

  • Frequent Contributor
  • **
  • Posts: 678
  • Country: us
  • The other white meat
Re: Led current sense indicator help
« Reply #3 on: February 21, 2019, 11:52:34 am »
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.
 

Online oPossum

  • Frequent Contributor
  • **
  • Posts: 678
  • Country: us
  • The other white meat
Re: Led current sense indicator help
« Reply #4 on: February 21, 2019, 11:57:17 am »
Something like this may work...

http://www.ti.com/lit/ds/symlink/ina381.pdf
 

Online wraper

  • Supporter
  • ****
  • Posts: 9750
  • Country: lv
Re: Led current sense indicator help
« Reply #5 on: February 21, 2019, 01:11:32 pm »
You could use INA200-INA202 + a few resistors for that. http://www.ti.com/product/INA200 Or 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.
 

Offline kentfielddude

  • Contributor
  • Posts: 9
  • Country: us
Re: Led current sense indicator help
« Reply #6 on: February 21, 2019, 03:47:48 pm »
Yeah. I might just stick a 5v ldo on the input and connect it to a led.
 

Online wraper

  • Supporter
  • ****
  • Posts: 9750
  • Country: lv
Re: Led current sense indicator help
« Reply #7 on: February 21, 2019, 08:06:40 pm »
Yeah. I might just stick a 5v ldo on the input and connect it to a led.
Why would you need to waste LDO for that?
 

Offline Km

  • Contributor
  • Banned!
  • Posts: 5
  • Country: th
Re: Led current sense indicator help
« Reply #8 on: February 21, 2019, 09:19:48 pm »
i think smd stm8s is best solution for your question
 

Online wraper

  • Supporter
  • ****
  • Posts: 9750
  • Country: lv
Re: Led current sense indicator help
« Reply #9 on: February 21, 2019, 09:27:26 pm »
i think smd stm8s is best solution for your question
How 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  :palm:.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 7712
Re: Led current sense indicator help
« Reply #10 on: February 22, 2019, 12:16:51 am »
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.  :-DD

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 its not 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.
« Last Edit: February 22, 2019, 12:20:35 am by Ian.M »
 

Offline kentfielddude

  • Contributor
  • Posts: 9
  • Country: us
Re: Led current sense indicator help
« Reply #11 on: February 22, 2019, 04:48:49 pm »
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
« Last Edit: February 22, 2019, 04:53:03 pm by kentfielddude »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 7712
Re: Led current sense indicator help
« Reply #12 on: February 23, 2019, 02:14:10 am »
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.
« Last Edit: February 23, 2019, 02:23:06 am by Ian.M »
 

Offline kentfielddude

  • Contributor
  • Posts: 9
  • Country: us
Re: Led current sense indicator help
« Reply #13 on: February 23, 2019, 03:20:01 am »
Thanks for the help. :clap: :clap: I added the led to my circuit below.
« Last Edit: February 23, 2019, 03:23:14 am by kentfielddude »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf