Q:

How to pick a voltage comparator switch for a low power circuit

I am finishing up an embedded project for my vehicle and the last step is to make it automatically power off with the car. The way I detect whether the vehicle is on or not is via a battery pin, which maps the car’s battery voltage as a value between 0-3.3 volts, multiplied by 7.2 to give the real voltage. To preserve power, I need to sleep the microcontroller until a signal is written to the wake up pin. So, I need to write gpio high (3.3v) to the pin when the battery is below 13 volts (around 1.8v on the battery pin), and gpio low when it isn’t. Theoretically the high/low can be flipped but that’s not important.
I have done a fair amount of research and have gotten swamped with solutions. At first I thought I could get away with just a transistor but apparently the right way is through a voltage comparator built from op-amps... but that almost seems overkill? I would prefer to input the minimum voltage into the comparator and for it to be low power. I am also not quite adapt a parsing their spec sheets so I’m really at a loss as to pick the exact part I need. I would really appreciate some guidance :)

A:

A comparator is indeed a great solution for this, given that is pretty much a comparator's only job. The transistor solution will be much more difficult to tune and make stable. By the time you've added enough to the transistor circuit to get it to behave well, you'll have effectively designed a comparator.
To keep things really simple, consider a 5-pin, push-pull output, comparator IC like the LMC7211. Your requirements will be met by a huge range of comparators, so I'll just use the LMC7211 to explain.
Simply connect your scaled battery voltage to the inverting - input pin, your threshold voltage to the non-inverting + input pin, and your 3.3V supply to the supply pins. Finally, because the battery voltage changes very slowly and will likely increase at the moment you turn off the car, you'll probably want to add some hysteresis. Hysteresis means the turn on threshold is different from the turn off threshold so the circuit doesn't bounce repeatedly between on and off. To do so, just add a large value resistor from the output pin to the non-inverting input pin. The output pin will then give you the signal you require.
Something like this:

simulate this circuit – Schematic created using CircuitLab
With the resistor values I've used in the schematic, the output goes to 3.3V when the input falls below 1.76V and the output goes to 0V when the input rises above 1.94V. Adjust to suit your preferences.

