I want to measure voltage of each cell using esp32 . I currently need about 20 pin of analog to measure voltage because I have 10 cells in series (10 pin for positive terminal and 10 for ground) . I decide to use 2 16 analog multiplexer , one multiplexer responsible for ground and one for positive terminal . How could I synchronise both of them ? for example, as measure I need the pin C0 at multiplexer 1 to connected positive and at the same time C0 at negative terminal to connected.
You can only measure voltages with reference to a common ground.. You can't multiplex the ground.
One way of measuring voltages that are sitting on a high bias voltage is to use an external circuit called a flying capacitor.
This uses relays to switch a capacitor across a cell to charge it up, and then switches that capacitor to the power and ground of an A/D converter.
so what you mean we could not get the voltage of each cell ?
I thought we could measure cell voltage by connect the anolog of esp32 to positive terminal of cell and the negative of battery to the gnd of esp32. So by doing this we could multiplex the ground of esp32 to the reference negative terminal we want .
this seems to be what you are trying to do IMHO:
hope that helps...
Could you simply use 10 analog inputs, each with a suitable voltage divider, to measure the total of 1, 2, 3... etc, up to 10 cells?
Correct.
No because the negative terminal of the later batteries would be connected to a high bias voltage caused by all the battries further down the chain.
No because even if the multiplexer were perfect, which it isn't, the multiplexer would have each ground of each battery tap going into it and would have a very large voltage on the multiplexer chip. You can not connect a voltage higher than the power supply driving any chip.
I think you are getting confused with your electricity theory.
Draw up the circuit and see for yourself. If you can't see it then post that circuit and I can point out the voltages at each point.
This is the flying capacitor circuit I told you about:-
In the circuit posted by @sherzaad the number of batteries you can monitor in this way is limited such that the sum of the battery voltages must not exceed the voltage to the multiplexer. Given you have 10 cells, take the maximum of one cell and multiply it by 10. That is the voltage you must power the multiplexer with and which the OP amp must use, so good luck finding those.
That would do . But because I currently have some multiplexers so I don’t know if I could use it for this situation
So do you realise that the resolution of the voltage on the top most battery will be ten times less than the resolution of the first battery measurement?
Which mean require amplifier for the top most ?
Well if you want to use amplifiers then you need one on each of the 9 voltage dividers above the first. Each amplifier needs to have a precise gain and a similar DC offset voltage.
Thank you
It this mean , for example we have 3 battery in series , as we switch from battery 1 to battery 2 using multiplexer , during the switching between terminal , the negative of battery 1 and positive of battery 2 will connected ? Is that what you mean ?
No, not at all. Try reading my reply again.
I will do
You could use a multiplexer I guess. That would reduce the number of ESP32 pins used from 10 down to 5.
I'm assuming your cells are li-ion, correct?
If you used an identical voltage divider (e.g. 12K + 1K) for each cell, then the resolution would be the same for all cells. The ESP32 ADC is 12-bit, which should in theory give you a resolution of 0.01V. In practice, there will be some noise in the signal, but that can be reduced by averaging over a large number of readings.
Do you know what resolution you need when you measure these cells?
about 16 bit
Connect matching address pins to the same Arduino pin. That way to the multiplexers are always using the same address.
How do you plan to get 16 bits precision when the ESP32's ADC is only 12 bits?
You are measuring voltage. What precision do you need in measuring the voltage? Like 1mV? 10mV? 100mV?
If you are measuring li-ion cells, then 16 bit would mean about 65uV which is 65 millionths of a Volt. I doubt you need that much precision.
And I doubt if you could actually get that much precision. It is not just a matter of adding the appropriate chip. It has to be laid out correctly on he PCB and have good isolation from the digital components generating interference.
It is not something you can lash up on solderless bread board.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
