Author Topic: Using Digital Potentiometer with Charger IC  (Read 915 times)

0 Members and 1 Guest are viewing this topic.

Offline ChillanceTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Using Digital Potentiometer with Charger IC
« on: January 04, 2020, 08:20:07 am »
Hi!

So, I figured it would be cool to have a digital potentiometer to change the resistance to vary the charging rate of a charging IC.
To make it even cooler, I also have a switch with a bunch of MOSFETs to enable it from having a default resistance.

My question here is that I'm a bit confused as how to connect the digital potentiometer to make this work properly.

So, when the switch SW1 is OFF, the charger IC U3, pin 5 goes through U2 through 10k R2 to GND. Having set at 100mA charging rate I believe. All nice and dandy.
However, when the switch SW1 is ON, I thought I use the resistance on the U1, by going from U3 pin 5 to Q1 to U1 to GND, but from what I've seen on other examples is that pin 6 on U1 is connected to, say a LED and then to GND.
So, how am I suppose to do this? I can't connect two outputs together essentially....

Bonus question: I'm not entirely sure, but I suppose that is how the shunts are suppose to be to connected when I want to use a current reader IC U4. Essentially the idea is to be able to get the current when charging the battery. The main confusing part might be that the SHUNT_MINUS goes to  battery + side. But the shunts need to be connected like that so the IC can get the current right?

Thanks!
« Last Edit: January 04, 2020, 08:21:53 am by Chillance »
 

Offline ChillanceTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Using Digital Potentiometer with Charger IC
« Reply #1 on: January 04, 2020, 09:03:04 am »
Oh, wait, what I'm suppose to do is connect from Q1 pin 2 to PA (pin 5) on U1! I think... :)
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3326
  • Country: gb
Re: Using Digital Potentiometer with Charger IC
« Reply #2 on: January 04, 2020, 12:19:12 pm »
Since the MCP73831 charge current is designed to be set by sinking current from pin 5, why not connect the digipot as a simple variable resistor (B and W pins tied together and grounded) and MCP73831 pin 5 connected to the A end of the digipot?  That way you can simply use the shutdown pin on the digipot to disconnect it from the charger IC, no MOSFETs needed.
 

Offline ChillanceTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Using Digital Potentiometer with Charger IC
« Reply #3 on: January 04, 2020, 12:36:31 pm »
Yes, this is what I've been thinking about just now. A few questions though.

What happens if I don't tie B and W pins together?

And, should I connect the MCP73831 pin 5 to A or B? Since the digipot is up to 10K resistance, I was thinking either A or B could be some kind of default value. So, essentially, I was thinking it could potentially default to 10k out of box and then it can be changed using SPI. But I'm not sure which of A or B would default to 10k, or maybe the device defaults to middle value.

One other thing I've been thinking is that if there is very low resistance (essentially connecting MCP73831 pin 5 to GND) that is not good? Something needs to be done with that too then. Having a "protective" resistor in series could help, but will offset things a bit, which is fine I suppose. The digipot has like 52 ohms or so min value.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3326
  • Country: gb
Re: Using Digital Potentiometer with Charger IC
« Reply #4 on: January 04, 2020, 02:52:53 pm »
Yes, this is what I've been thinking about just now. A few questions though.

What happens if I don't tie B and W pins together?

I don't know, but the datasheet explicitly tells you do this when using the device as a rheostat.

And, should I connect the MCP73831 pin 5 to A or B? Since the digipot is up to 10K resistance, I was thinking either A or B could be some kind of default value. So, essentially, I was thinking it could potentially default to 10k out of box and then it can be changed using SPI. But I'm not sure which of A or B would default to 10k, or maybe the device defaults to middle value.

The datasheet states that only pin A is disconnected in shutdown, so this is the pin you need to connect to the charger IC.

One other thing I've been thinking is that if there is very low resistance (essentially connecting MCP73831 pin 5 to GND) that is not good? Something needs to be done with that too then. Having a "protective" resistor in series could help, but will offset things a bit, which is fine I suppose. The digipot has like 52 ohms or so min value.

A series resistor to limit the resistance to the 2k minimum mentioned in the datasheet would be a good plan.
 
The following users thanked this post: Chillance

Offline ChillanceTopic starter

  • Contributor
  • Posts: 44
  • Country: se
Re: Using Digital Potentiometer with Charger IC
« Reply #5 on: January 04, 2020, 09:31:07 pm »
Ok, thanks for the help! I put a 2k resistor there now so it will be at least that and make it more safe.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf