Attiny85 to drive an airwick

Hi!

I've always been annoyed that the airwick works all night, so I'd like to sort of watch with a ATtiny to operate only from 15 to 23 for example, and my questions are:

  • I can do with millis () (accepting that there will be a gap that will accumulate and each time have to reset X) or is essential an RTC?
  • The airwick powered by two AA batteries, so I guess I can feed directly ATtiny with that, then I plan scheme is to feed the airwick with a PWM output, is this possible? or I have to put a relay or transistor?

Thank you.

uveral:

  • I can do with millis () (accepting that there will be a gap that will accumulate and each time have to reset X) or is essential an RTC?
    RTC

  • The airwick powered by two AA batteries, so I guess I can feed directly ATtiny with that,
    Voltage drop during activation could cause t85 to reset, so a large capacitor may be required and t85 brown out fuses set appropriately

then I plan scheme is to feed the airwick with a PWM output, is this possible? or I have to put a relay or transistor?
you will need a FET driver to handle the current for the AirWick