Close
0%
0%

Automatic Self Stirring Mug

I won a mug that has a motor with little propeller for mix the drink, this motor turn on through a buttom. It works well, but...

Similar projects worth following
I won a mug that has a motor with little propeller for mix the drink, this motor turn on through a buttom. It works well, but push the buttom every time to mix the hot chocolate was so boring. Then I thought use a microcontroller to control the motor. Using an small ATtiny13A SMD, a transistor, resistor led and capacitor I made an automatic system for this mug. Do you can see how it works below.

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.

  • 1 × ATtiny 13 or ATmega 328p
  • 1 × BC548 transistor or other
  • 1 × 1000 ohms Resistor
  • 1 × 10uF Capacitor for circuit
  • 1 × 100nF Capacitor for noise motor filter

  • 1
    Step 1

    Compiler and burn instructions

    ===========================

    Need AVR Toolchain (avrdude and avr-gcc)
    To compile: make inside folder
    To compile and burn: make flash
    If you want only burn the HEX file:
    avrdude -c usbasp -p t13 -U flash:w:mugTiny13.hex:i
    Where usbasp is your ISP programmer and t13 is ATtiny13A

    Code and HEX Download: https://github.com/naldin/mug

  • 2
    Step 2

    Use Instructions

    ==============

    - First click, motor always on.
    - Second click, motor turn on every 30 seconds for 5 seconds.
    - Third click, motor turn on every 1 minute for 5 seconds.
    - Fourth click, motor turn on every 1 minute and 30 seconds for 5 seconds.
    - Last click, motor turn on 2 seconds and turn off the system.

    Video of operation

    ================

View all instructions

Enjoy this project?

Share

Discussions

natmospherichos wrote 10/26/2021 at 15:12 point

Seems good. I can Apply the same program script with my mokken bedrukken mug design website?

  Are you sure? yes | no

_theAnaa♥ wrote 11/01/2016 at 09:44 point

it's hard to find attiny13A. Its attiny85 can be used?

  Are you sure? yes | no

Ronaldo Rezende Junior wrote 11/02/2016 at 13:39 point

I didn't remember, but I think that it will work. At aliexpress.com you can find Attiny13

  Are you sure? yes | no

_theAnaa♥ wrote 08/21/2016 at 15:45 point

can i get your circut sketch for this project. Because i dont know how to sketch by seeing breadboard view. Email to me : anasuhass501@gmail.com

  Are you sure? yes | no

Ronaldo Rezende Junior wrote 08/22/2016 at 14:46 point

Sorry, but I didn't draw the circuit and PCB. I only have the breadboard picture.

  Are you sure? yes | no

_theAnaa♥ wrote 08/19/2016 at 17:36 point

it's have temperature sensor

  Are you sure? yes | no

Ronaldo Rezende Junior wrote 08/21/2016 at 15:23 point

Hi! No, it doesn't have.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates