diy solar

diy solar

Home build LiFePo4 BMS - what should I be asking?

It's a bit more than that. Without negative feedback (connecting the output to the inverting input in some way) the op-amp has an infinite gain (ideally, in practice it's less than that, typically around 120 dB or 1000000:1) so the smallest difference between the inputs would make the output go directly to one of the rails, that's basically a comparator, all or nothing.
Yep, got that ta
Then, since you've added a resistor to add negative feedback you need to add another one on the input to keep the gain to 1:1 (or whatever gain you want). But then it's asymetric (the typical inverting or non-inverting amplifier configuration) so if you want a differential amplifier you need to have the same resistors on the other input to keep things balanced and also have a way to add a reference voltage (typically GND).
Bingo! That makes sense.
Thanks

It's an inexact oversimplification but that should help you understand ;)

The image you posted is more about the fact IRL op-amps aren't ideal ones and don't like having their output directly connected to the input without some kind of resistance inbetween. It's advanced stuff that is nice to know but you can skip that for now if you want.
 
Any comments about this as an op amp circuit between 4 x LiFePo4 cells & an ADS1115 voltage sensor to get individual cell voltages?

I put a 2K/10K voltage divider between each cell & first opamp follower to keep the voltage below the rail voltage (which will be battery + voltage) & a 3.3v zener on the output to protect the ads1115.

Not sure about best way to add a low pass filter...

Any comments welcome thanks ?

NUvrPWB.png
 
You're not supposed to need the dividers (and so the buffers). What's the max Vin of the ADC? If you really need them then a 2:1 ratio should be more than enough and will avoid loosing too much accuracy.

I suspect you added the dividers because the differential amps are not wired correctly: the resistor on the negative input should be wired to ground for all of the diff amps (like the one right at bottom) instead of to the output of the buffers. That's how you get rid of the common mode voltage and just keep the cell voltage on the output. Basically wherever you connect the negative input becomes the new 0 V reference for the output ;)

The zener at the output should also be tied to ground because as is, it's totally useless (it's effectively in // with the 1 k resistor).

You already have a 1 k resistor on the output so you just need to add a capacitor to ground to make a LP filter. Calculator: http://sim.okawa-denshi.jp/en/CRtool.php (for example a 1 µF cap would lead to a 160 Hz cut-off frequency). Make sure the cut-off frequency is well below your sampling frequency on the ADC (maths says half of it but I'd recommend at least 5:1 to have some margin).


Edit: crossed out a totally wrong part.
 
Last edited:
You're not supposed to need the dividers (and so the buffers). What's the max Vin of the ADC? If you really need them then a 2:1 ratio should be more than enough and will avoid loosing too much accuracy.
Based on this mentioned above >
"A buffer circuit is required to prevent any of the cells from getting loaded individually, which is no current should be consumed from a single cell but only form the pack as a whole. Since the buffer circuit has very high input impedance we can use to read the voltage from the cell without drawing power from it."
But the op amps aren't rail to rail so putting in a voltage divider sort of gets rid of any benefit there...
rSyHVc7.png

I suspect you added the dividers because the differential amps are not wired correctly: the resistor on the negative input should be wired to ground for all of the diff amps (like the one right at bottom) instead of to the output of the buffers. That's how you get rid of the common mode voltage and just keep the cell voltage on the output. Basically wherever you connect the negative input becomes the new 0 V reference for the output ;)
This is confusing, the ADC will measure up to about 5V, I want to measure the voltage of each cell, if the neg opamp is connected to ground it outputs the +ve cell voltage to ground?

bxaKK5M.png



Across the cell/buffer it is correct in the simulator ? >
CnXlLDv.png



The zener at the output should also be tied to ground because as is, it's totally useless (it's effectively in // with the 1 k resistor).
-??
You already have a 1 k resistor on the output so you just need to add a capacitor to ground to make a LP filter. Calculator: http://sim.okawa-denshi.jp/en/CRtool.php (for example a 1 µF cap would lead to a 160 Hz cut-off frequency). Make sure the cut-off frequency is well below your sampling frequency on the ADC (maths says half of it but I'd recommend at least 5:1 to have some margin).
?

thanks

EDIT /- Doesn't work though..... hmmmmm
 
Last edited:
Based on this mentioned above >
"A buffer circuit is required to prevent any of the cells from getting loaded individually, which is no current should be consumed from a single cell but only form the pack as a whole. Since the buffer circuit has very high input impedance we can use to read the voltage from the cell without drawing power from it."
But the op amps aren't rail to rail so putting in a voltage divider sort of gets rid of any benefit there...

Yes, you have a 12 k load on each cell currently. But it doesn't really matter as long as all the cells are loaded equally. Also, I would up the values a bit to limit the self consumption, something like 10 k and 47 k would be a 57 k load.


This is confusing, the ADC will measure up to about 5V, I want to measure the voltage of each cell, if the neg opamp is connected to ground it outputs the +ve cell voltage to ground?

Oh god, sorry, forget what I said. Your typology is good ;) I really shouldn't reply to stuff like that while doing other things at the same time... If you want to correct what I said then just replace "the resistor on the negative input" by "the resistor between the positive input and the ground" and then it works (and of course it's already connected to ground so it's fine).
 
Last edited:
Back
Top