Interrupt with external voltage change

Hello,

I came across a problem that demands a solution that I can't figure out how to implement, if possible at all.
And as I can't quite explain it directly, I'll explain what it should work as and hopefully someone can let me know if this is possible.

I have a project with an "arduino" running from batteries. In the final version of the project , it will be just an atmega chip, probably an attiny85.
It will be extremely power conservative, and it will sleep most of the time. It will be handling some stuff, part of it is monitoring and managing the voltage from a 12v lead acid battery and some connected devices. This battery will have 3 possible states. Discharged, charging, and normal state. I need the arduino to run only on normal state. Above 11.4v and below 12.9v

Is there a passive way of driving an interrupt from a voltage change? Something like wake up the chip when the voltage lowers from the "charging" voltage (12.9v) or when the voltage "rises" from the discharged voltage (11.4) ?
Something that consumes no power or consumes on the few microAmps range?

Thanks

one question, why can't it also run when the battery is charging? it would simplify things greatly
I assume that you need to protect the lead-acid from overtly discharging?

While its charging arduino can run and just do nothing since you dont have to worry about conserving power, If you are measuring the lead-acid battery you can run arduino from the same battery using a voltage regulator, instead of having separete batteries for the arduino, lead-acids are hefty so you don't need to worry about arduino putting a drain on it, no?

Wake on interrupt is possible, and you would still need it when the charger kicks in, you can find the info on arduino pages, also check in the atmel datasheet for your chip if you want to understand how it works.

If we are talking about putting this in a car/bike/boat that has sparkplugs, you would need to pay special atention to shield the device properly from RF

A bit more info would do wonders you know...

Good Post, have fun with your project. There is a fourth solution,l low voltage lockout. As mentioned previously just run it off the battery and let it sleep most of the time, just wake it up once in a while to check things and do what is necessary. You can use a low current circuit breaker to power your system and if the voltage goes to low trip it disconnecting all of your electronics. This can also be done with a mechanical latching relay.

I can only think of a pico power comparator with some low current reference. You might look at processors that have built in comparators.

FYI, A typical automotive battery has an internal drain of about 50 ma. I would guess internal leakage for other size batteries would be roughly proportional to size.

Whatever you connect to your battery should be small in comparison.

Hi,

Thank you both for the replies.

Yes, the arduino can also run while charging. That is not a problem. I can just sleep over it. In fact, it could also run when discharged as I can have it sleep under 2uA...

The reason for not considering to run from the car battery is to prevent battery drain on it. That was my first idea, but tried several voltage regulators, both linear and switching, and they use a lot of current even when the arduino is sleeping on a 2uA.

My objective was to be under a couple mA while sleeping but I don't think there is a regulator that handles up to 15v and have such a low current when not doing nothing if the arduino is sleeping. Am I wrong?
Is there such a regulator?

Well, it would be nice to know the application you need it for, to help us asses since you could be overthinking it, for example you can run a nice car audio for hours, and could still be able to start the car with like a 75Ah battery. This sounds to me like your charging intervals are days or weeks apart. If you really want to minimize the energy drain go with a simple cut out or warning circuit that dosen't use micro-processing, like a voltage comparator, relay, or a specialized IC, if you don't need it to automate or display anything else while monitoring the battery... Or is it more of a science project with Arduino type of thing. Also there might be ways to efficiently regulate 12-whatever volts to 5 with switching, like a step down buck converter (chopper), that essentially uses pwm to charge a capacitor, the drain of its control loop can be pretty minuscule...