Author Topic: Selecting different charge currents using one IO with low, high and HiZ state  (Read 596 times)

0 Members and 1 Guest are viewing this topic.

Offline GoatureTopic starter

  • Contributor
  • Posts: 14
  • Country: no
Hi!

I'm working on a circuit where I only have one digital output left, but want to select between 3 charge currents.

I'm using the BQ24020DRCR charger, which has an ISET1 pin. From my understanding it's a 2.5V source, and the current drawn selects the maximum charge current. Typically using a resistor, like this R_set = (320 * 2.5V) / R

So a 800ohm resistor gives 1A. A 8000ohm resistor gives 100mA.

Is there a neat way to select between 3 different resistors (or currents) using a single 1.8V digital output line, that can push, pull and float (high impedance)?

I was trying to make this work with a couple of resistors (pnp and npn), that each pulled their own resistor. And a third 8k resistor pulled the ISET1 pin directly to GND, so that a floating state gives 100mA. But the way I connected the transistors made them continously conduct (since the pnp could give bias current to the npn, etc etc.)

Do you have any suggestions on a transistor topology that would allow this? Or something completely different maybe?  :)
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
It depends - what range of currents do you need?
Driving the bottom end of the Iset resistor from the I/O pin reduces the effective Vref to 2.5V-1.8V (=0.7V) when the pin is high so gives you 28% of the max current (max. when its low).   You can then add a pulldown to the I/O pin to set the  current when its tristated, subject to the constraint that the resulting potential divider doesn't take the pin over 2V, limiting the third current to >20% of the max current.  How close you can get to the max. current when tristated is limited by the min. pulldown resistance you can use as the Ioh of the I/O pin as the I/O pin must drive the pulldown to near 1.8V when the pin goes high to choose min. current.
 
The following users thanked this post: Goature

Offline Sauli

  • Contributor
  • Posts: 43
  • Country: fi
Try to figure out what this gives ;)

If you can output PWM to that pin, you can set any current limit you want.
 
The following users thanked this post: Goature

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8173
  • Country: fi
You may also have software-configurable pull-up and pull-downs. This gives you five choices! Not all might be usable, depending on internal pull-up/down resistor values and their tolerances, of course.

Add a series resistor and work it out in Excel. Only Ohm's law needed.

I did use this trick to adjust output voltage of a boost regulator, basically using normal feedback loop but injecting current to the 1.2V FB node, from IO pin, through a single resistor. One-component (0.001$ resistor) 5-step digitally controllable output voltage. (See attachment.)
 
The following users thanked this post: Goature

Offline GoatureTopic starter

  • Contributor
  • Posts: 14
  • Country: no
@Ian M. Good thinking! I will be able to get all the charging current I want this way (100mA, 500mA, 1A)

I'm a bit concerned about having the 2.5V from the charger ISET1 pin going into the high 1.8V digital output. How do you think that will affect the circuit? The MCU i'm running is nRF52840. The current going into the output pin will be around 1mA. I guess it will affect the 1.8V line?
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
As long as you satisfy the constraint that the potential divider doesn't let the tristate mode I/O pin voltage exceed 2V,  you wont get much, if any of that 1mA going into the 1.8V rail.    You wont be able to get the 10:1 range between 1A and 100mA by my method - the best it can do is 3.6:1.   
 
The following users thanked this post: Goature

Offline GoatureTopic starter

  • Contributor
  • Posts: 14
  • Country: no
« Last Edit: June 02, 2022, 06:50:09 pm by Goature »
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8173
  • Country: fi
I'm a bit concerned about having the 2.5V from the charger ISET1 pin going into the high 1.8V digital output. How do you think that will affect the circuit?

Internal protection diodes will conduct. Series resistance you will have to add will protect from damage. But this affects voltage levels: with diode from the pin to Vdd, pin is clamped to approx. Vdd+0.3V = 2.1V.

Equivalent circuit is two voltage sources V1 and V2 connected together by R. V2 is always 2.5V.

Assuming Rpu = 13k and Ppd = 13k (somehow I remember this is the case with nRF52, check the datasheet of course), and setting Rext = 13k as well

Pin driven LO: V1 = 0V, R = 13k
Pin hi-Z with PD enabled: V1 = 0V, R = 26k
Pin hi-Z:, with or without PU enabled: V1 = 2.1V, R = 13k (protection diode conducts)
Pin driven HI: V1 = 1.8V, R = 13k

Of course, re-check my thinking.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf