In this design, the 2A motor "M", which is running at PWM=10kHz, creates a lot of noise in the ground as shown on the scope trace. Not only the ground is sinusoidal but more painful, the ground level raises up to 80mV when the motor is running.
Unfortunately, this noise and the fact that "ground is at 80mV" make it very difficult to detect the very little voltage variation of the sensor "S".
Only one big 3.7V battery powers the motor and the processor. A very small 3.0V battery is powering independently the op-amp.
All the ground traces are extremely thick and have been designed as much as possible like a star. There are a couple of 100uF on the big 3.7V battery as well as mutliple 0.1uF. There is one 4.7uF and multiple 0.1uF on the small 3.0V battery.
What could I do to minimize this noisy ground?