Sorry guys, my bad. I should have explained my curcuit first. I attached my schematic below. It is DIY balancer module for 4S battery. This is just for 2S. This cuircuit should measure the voltage of each cell (1 and 2) and in the case of exceeding over 4V, while charging, the mosfets (mos1,mos2) should turn on and the additional energy put into the power resistors (paralel rez1, rez2). When all cells are 4V the charging is interrupted. Accurate measurement is required for realization this project ... the accuracy of 0.01 atleast. As you probably know the arduinos maximum voltage is 5V so i can measure first cell and need a voltage divider to measure the others (8,12,16V). I tried to measure accuretly with voltage dividers but it is not easy to optimize the software for this .. dont even know if it is possible. So i decided to try different approach. Positive sides of all cells are constantly connected to the arduino (analog inputs) and only one cell´s negative side is connected at the time so GNDs of all cells are not shared (you know, what would happen). So arduino would send a signal to optocoupler to connect GND arduino with negative side of first cell, analog pin would measure the voltage and hold that value, after like 0,2s would disconnect GND of first cell and connects negative side of the second cell, analog pin would measure the voltage, hold the value etc etc. The values should update every second so circa 0,2s for each cell with time reserve. All values are gonna be shown on display. The connecting path resistance between negative cell side and arduino GND should be as low as possible to eliminate drop voltage.
Sorry for my english. Hopefully it is understandable.
Looking forward to your answers guys. Thanks