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

0 Members and 1 Guest are viewing this topic.

Offline kentfielddudeTopic starter

  • Contributor
  • Posts: 15
  • Country: us
Led current sense indicator help
« on: February 20, 2019, 11:19:20 pm »
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 20, 2019, 11:25:51 pm by kentfielddude »
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
Re: Led current sense indicator help
« Reply #1 on: February 21, 2019, 12: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 kentfielddudeTopic starter

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

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
Re: Led current sense indicator help
« Reply #3 on: February 21, 2019, 12: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.
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
Re: Led current sense indicator help
« Reply #4 on: February 21, 2019, 12:57:17 am »
Something like this may work...

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

Online wraper

  • Supporter
  • ****
  • Posts: 16833
  • Country: lv
Re: Led current sense indicator help
« Reply #5 on: February 21, 2019, 02:11:32 am »
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 kentfielddudeTopic starter

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

Online wraper

  • Supporter
  • ****
  • Posts: 16833
  • Country: lv
Re: Led current sense indicator help
« Reply #7 on: February 21, 2019, 09:06:40 am »
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

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

Online wraper

  • Supporter
  • ****
  • Posts: 16833
  • Country: lv
Re: Led current sense indicator help
« Reply #9 on: February 21, 2019, 10:27:26 am »
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: 12851
Re: Led current sense indicator help
« Reply #10 on: February 21, 2019, 01:16:51 pm »
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 21, 2019, 01:20:35 pm by Ian.M »
 

Offline kentfielddudeTopic starter

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

Offline Ian.M

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

Offline kentfielddudeTopic starter

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


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf