and research is what I'm trying to do here, so far with little success except #12's level shift (thanks by the way).
Ok, I'm back. Here is what I meant
View attachment 82127
You would take your voltage reading with the MOSFET off, of course.
If you're charging some kind of Li chemistry, I encourage you to go for it as a learning experience. There's no reason why it shouldn't work if you read that battery's spec sheet carefully and follow charging recommendations with your circuit. Try to charge at a low rate, like C/20 or C/10, for initial experiments, and work your way up later as everything is brought up. Will you be putting a temperature sensor on the batteries?
It does have a voltage reference pin though I'll have to do some research.Thanks for the advice. I have actually been working with these batteries for almost 10 years so I'm very familiar with the charging process and associated dangers. However the picmicro chip only has one port per adc channel, so would I have to use an external adc chip?
What are you talking to yourself? I do that sometimes. Nutz.It does have a voltage reference pin though I'll have to do some research.
You quoted yourself though! hahahajust adding to my earlier post.
A single adc channel should be enough, as long as you can route the adc to different pins to take readings. Let's say that the voltage divider for the +20V supply was connected to pin A, and the voltage divider for the bottom of the battery was connected to pin B. Then in software, you would first make sure that the MOSFET was off, then read the voltage on pin A, then read the voltage on pin B, then perform a subtraction in software. If the PIC processor that you chose does not have enough free pins, then you could choose a different model of PIC.Thanks for the advice. I have actually been working with these batteries for almost 10 years so I'm very familiar with the charging process and associated dangers. However the picmicro chip only has one port per adc channel, so would I have to use an external adc chip?
What's been happening is when the mosfet is off there's no ground reference for the adc, and the voltage measured at both points is basically random, getting readings from 2 to 18 volts unless mosfet is on, then it's accurate to about 0.1 volts. I'm going to do some testing to make sure everything is working correctly.A single adc channel should be enough, as long as you can route the adc to different pins to take readings. Let's say that the voltage divider for the +20V supply was connected to pin A, and the voltage divider for the bottom of the battery was connected to pin B. Then in software, you would first make sure that the MOSFET was off, then read the voltage on pin A, then read the voltage on pin B, then perform a subtraction in software. If the PIC processor that you chose does not have enough free pins, then you could choose a different model of PIC.
by Aaron Carman
by Jake Hertz
by Duane Benson
by Duane Benson