Electronics > Projects, Designs, and Technical Stuff
Using Digital Potentiometer with Charger IC
Chillance:
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!
Chillance:
Oh, wait, what I'm suppose to do is connect from Q1 pin 2 to PA (pin 5) on U1! I think... :)
mikerj:
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.
Chillance:
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.
mikerj:
--- Quote from: Chillance 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?
--- End quote ---
I don't know, but the datasheet explicitly tells you do this when using the device as a rheostat.
--- Quote from: Chillance on January 04, 2020, 12:36:31 pm ---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.
--- End quote ---
The datasheet states that only pin A is disconnected in shutdown, so this is the pin you need to connect to the charger IC.
--- Quote from: Chillance on January 04, 2020, 12:36:31 pm ---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.
--- End quote ---
A series resistor to limit the resistance to the 2k minimum mentioned in the datasheet would be a good plan.
Navigation
[0] Message Index
[#] Next page
Go to full version