Have you tried limiting the base current of Q4? Could you try adding a resistor between Q4's base and pin 4 of IC3.
The circuit it's somewhat complex and I didn't take too much consideration about it when designing the pcb.
I think that doesn't apply because it's an inverting configuration
the atmega328 should be considered as digital ground, and Lm358 is analogue, right?
So doesn't that discards the bad design problem?