Just an idea ...

May be some comparators and adc to disable ???

Good evening

Alain