The Drawer Alarm

1 Programming the drawer alarm

Badge It

  • You're going to be given very little support with this task, but you will have a structured English algorithm to help you through.
  • Create a program for the microcontroller using a flowchart or GENIE BASIC, that will implement the following.
    1. When the button is pushed, the green LED comes on, to indicate the alarm is ready
    2. When the button is held down for three seconds
    3. The Buzzer sounds for one second and the LEDs flash on and off three times.
    4. The red LED remains on to indicate the buzzer is armed
    5. The program then waits for 5 seconds (for you to put the alarm away)
    6. The light level is recorded.
    7. The alarm then waits for the light level to increase significantly.
    8. If the light level increases, the buzzer sounds and the LEDs flash on and off
    9. Holding down the button for a further three seconds will turn off the alarm.
  • If you're struggling to complete the task, this video tutorial will help:
  • Please note: The resistor with no value on the output of G4 to the LED is a 330 Ω resistor.
  • The voltage regulator (IN-OUT-REF) is under 'Power supplies' right at the top of the options.
  • The speaker is under 'Audio' in the drop down menu.
  • The LDR is under 'Sensors' in the drop down menu.


Completed finished everything including the evaluation? 

Time to design a case! 

Use the videos in the 'Independent Design project' to make a 3D printed case. You will need to use the calipers to measure the board size etc.