The ATtiny used is a 13A, it is important because the working voltage is
between 1.8V and 5.5V, as the mug use two AAA battery and the ATtiny
without "A" works between 2.7V and 5.5V, with the drop voltage the
microcontroller may have problem to work. In the power down mode, the
ATtiny13A drain only 0.5uA, what guarantee the life of battery for a
long time when it is in power mode. The circuit is simple, do you can
use a NPN transistor like BC548 or a FET like 2N7000. The capacitors are
importante because the motor noise will cause malfunction to
microcontroller. I made two codes, one for ATtiny 13A and another for ATmega 328p, but because the small dimension, the ATtiny is the best option. For change the motor time, modify the values in:
#define SOMA_TEMPO 137 // Add x to time between turn on
For led time, modify the value 2 in "led = led + 2;" inside of "ajustaTempos()" function. Each unit sum 0.45 seconds as setted in OCR0A. As the led is setted for turn on and off every entry to the "rodaTempos()", the led will blink every 0.45 second.
Seems good. I can Apply the same program script with my mokken bedrukken mug design website?