Thicker ground wire?? Where exactly??
Circuit is very simple to understand but i have bad dreams about this unstable working :-\ ^-^
So i made some onother measurements with scope and i figured out that when i put bigger resistor in rc filter, for example 1ME (1ME and 100nF) thern i have small smaller dc signal but stable under discharge process. Problem is to sensing current via shund to atmega adc, resaults is unstable, picture belows shows signal on mosfet gates:

Voltage is unstable from OP output (scope settings is 1V p-p), so that is because unstable current flow from battery.
Onother interesting thing happening on circuit, when i put scope ground on battery ground there is signal like in picture from post before (charging and discharging capacitor), when i put scope gnd to gnd of OP, there is dc signal on current RC low pass filter also with smaller resistor - 100kE+100nF like before!!
the same thing happenig when put scope to Vcc pin of atmega MCU, signal is like in picture below, off course when i start discharge battery:

Circuit is very simple to understand but i have bad dreams about this unstable working :-\ ^-^
So i made some onother measurements with scope and i figured out that when i put bigger resistor in rc filter, for example 1ME (1ME and 100nF) thern i have small smaller dc signal but stable under discharge process. Problem is to sensing current via shund to atmega adc, resaults is unstable, picture belows shows signal on mosfet gates:

Voltage is unstable from OP output (scope settings is 1V p-p), so that is because unstable current flow from battery.
Onother interesting thing happening on circuit, when i put scope ground on battery ground there is signal like in picture from post before (charging and discharging capacitor), when i put scope gnd to gnd of OP, there is dc signal on current RC low pass filter also with smaller resistor - 100kE+100nF like before!!
the same thing happenig when put scope to Vcc pin of atmega MCU, signal is like in picture below, off course when i start discharge battery:


