Piano Lamp Opener
I choose to do an automated lamp which will turn on once I open my piano. There will be a sensor checking if I open the piano lid, and once it checks that I did, it sends a signal to the servo to have a pen tap on the lamp. I chose this particular project since I forget to turn it on whenever I play. Usually 10 minutes in I notice I'm having a hard time reading the sheet music since it's too dark and I realize I forgot to turn on the lamp.
Supplies
- Particle Argon
- Servo
- Hall Sensor
- Magnet
- Tape
- Battery
- Chromebook(power source)
- Piano
- Lamp
- Metronome(any object around that size)
Breadboard Setup
https://wiring.org.co/learning/basics/hallsensor.html
I used this website to learn how to wire the hall sensor. Both the servo and hall sensor have three wires that need to be grounded and connected to a digital pin. For the servo, you will need longer wires in order for it to reach the lamp on top of the piano(15-25in).
Code
Simple code that activates the servo to flick when the magnet is away from the hall sensor.
Configuration
- Tape the breadboard on the side of the piano near the edge of its lid. The magnet should be taped at the very edge of the lid so the hall sensor detects the magnet when the lid is closed.
- Connect a battery to the servo's arm and angle it so the battery is upright when the servo swings. This is needed if you have a touch lamp that responds to human touch.
- The wires of the servo should be attached near to the lamp so it is dangling down. To keep it in place I taped the servo to a metronome so the end of the arm is facing directly over the switch of the lamp.
- Position the battery on top of the button. When you open the lid the magnet will no longer be detected by the hall sensor so the servo will flick the button with the battery. When you close the lid it will return to its base position.