Microwave Oven Timer

From Microduino Wiki
Jump to: navigation, search


Anywhere timing-Microwave ovens.jpg

Make a microwave oven timer, for which the time can be set with a Joystick and displayed through rotating the servo arm to the specified position. Press the Joystick for starting to time, and then the servo will rotate to position 0 according to the set time.
Suitable kits: mCookie202, mCookie302

Module Bill


Module Number Function
mCookie-Core 1 Core board
Battery 1 Program download and power supply
mCookie-Hub 1 Sensor adapter plate
Joystick 1 Equal to a game Joystick which can control the input.
Servo 1 Servo
Servo adapter plate 1 Servo adapter plate

Other Equipment

  • USB cable*1
  • Sensor cable*2
  • Sensor shell
  • Lego or other fixation structure
Anywhere timing-Microwave ovens-module.jpg

Module Setup


Anywhere timing-Microwave ovens-step.jpg
  • Install the modules and sensors together:
    • Connect the Servo Connector to pin 6/7 of Hub;
    • Connect the servo to pin 1 (the below three pins) of servo connector;
    • Connect the Joystick to pin A0/A1 of Hub;
    • Plug one end of USB cable into the battery base, and connect the other to computer.


Required Program Blocks

Programming Thought

Before the Joystick is pressed, execute the time setting program repeatedly, and detect the left and right direction to set the time, and rotate the servo arm to the corresponding time. After the time is set, press the Joystick to exit the repeated execution, and the servo arm will rotate to the position where the time is 0 at the speed of 10°/s.

Mixly-ctrl-timing-Microwave oven.jpg

Start to Program

1. Before the Joystick is pressed, adjust the time of the timer.
Variable time is for saving the set time. If the Joystick is rotated to left, and time is larger than 1, then time will reduce 1, and wait for the Joystick to be released.
If the Joystick is rotated to right, and time is less than 18, then time adds 1, and wait for the Joystick to be released.
Map time from 0-18 to 180-0 (because the anticlockwise end of servo is 180°); set the servo angle to time (when adjust time, the servo arm is the hand of the timer, of which each 10° represents 1s).

Mixly-ctrl-timing-Microwave oven-code.jpg

2. After the Joystick is pressed, start to time.
Servo rotates to 180°( point 0 of the timer dial plate). The rotation speed is 10 degrees/s (keeping pace with the timed time). After timing, clear time.

Mixly-ctrl-timing-Microwave oven-code1.jpg

Test the result
After the program is uploaded, the right and left movement of the Joystick can control the servo to rotate between 0-180° and each 10° represents 1s. After setting, press the Joystick, and the servo will rotate back to 180°at the speed of 10°per second.
Make the time dial plate, and the time between 0~18 corresponds to the rotation range of servo 180°~0°.

Anywhere timing-Microwave ovens.jpg

Q: Now the timer can show the process of countdown of servo hand, however, after then end of countdown, there is no indication sound, do you know how to improve?
A: We can add a buzzer to it, which can emit "ding" sound at the end of countdown.

Keep other programs unchanged, and just add the program of making the buzzer buzz once at the end of the whole program.

Anywhere timing-Microwave oven.jpg

Technical Specification

Related Cases