Lab 5: Hook Alarm

Submitted by alexis.taylor on Tue, 03/05/2013 - 23:17


I decided to use this opportunity to create something that I have always imagined (though not the most imaginative object). There is an already existing metal hook that women use to hang their handbags from the edge of the table. They are often decorated with a large plastic gem on top. This hook is the solution to the problem of setting one's bag on the table or floor, but I always wondered if a really clever thief could somehow manage to steal the bag from the hook. The solution to this hypothetical problem is to make the hook have an alarm system on it - if the bag is removed, the alarm sounds.

I hot glued an LED on top of a hook, and set it upon a pressure sensor (I later added a piezo nearby, but for now will have to only imagine the piezo as part of the unit). I had originally wanted the LED to blink and the piezo to sound if the bag was removed from the hook, but changed the code to have the LED continuously on, as a sort of peripheral reminder that the bag is still there, (ed note: but probably also a guaranteed way to alert any potential thieves of exactly who has bags hanging from tables), to be extinguished when the bag is removed. If this were a more complete prototype, it would also have to have a switch that only the owner could use to disable the alarm when she (or he) decided to remove the bag from the hook on purpose.

I had trouble getting the hook to sit flush on the sensor, so I basically still have the unsolved problem that when the bag swings the alarm will sound. A better constructed hook would have the pressure sensor inside the base, under the hook arm. The pressure of the bag on the arm will compress the material between the hook arm and the sensor.

Components Used

  • arduino
  • breadboard
  • 1 10K Ω resistor
  • 1 220 Ω resistor
  • 1 FSR
  • 1 LED
  • piezo speaker
  • wires
  • 1 USB cable
  • metal hook from Daiso




// Based on Resistive Sensor Input
int sensorPin = 0; 
int ledPin = 11;   
int speakerPin = 10;
int FSRval = 0;       
void setup() {
  pinMode (ledPin, OUTPUT);
  pinMode (speakerPin, OUTPUT);
void loop() {
  FSRval = analogRead(sensorPin); 
  if (FSRval > 10) //if pressure is sensed
/*10 is arbitrary, but I wanted to prevent false reading from the weight of the hook itself on the sensor*/
    analogWrite(ledPin, 128); //LED is on when bag is present
  else if (FSRval <= 10)
    analogWrite(speakerPin, 128); //piezo beeps at mid level
    analogWrite(speakerPin, 0);
    analogWrite(ledPin, 0); //turns LED off


Lab 5 Image 1
Lab 5 Image 2
Your rating: None
Drupal theme by Kiwi Themes.