Materials included: -Tin Foil -Lamp -Others (Wires, Arduino, Breadboard) -Seven segment displays We plan on building the lamp part first. We first need to make sure that the tin foil switches can turn the lamp on and off. Then we add coding for the on switch to automatically turn the lamp off after a certain amount of time. And then we will add the display that shows how much time is left on the light. |
The science behind turning on a lamp with pieces of tin foils as switches is actually simple: the Arduino measures the capacitance (amount of electric charge something can store) from the pins on the Arduino. As a person has skin contact with the tin foil which is conductive, the person's skin absorbs a great amount of the capacitance, and the Arduino is able to detect a difference.
Therefore, to code the normal on switch, as capacitance value from the pin connected to the on switch is higher than 1000, which is usually what happens when human skin gets in contact with the tin foil, the light will be turned on. And for the off switch, if the capacitance value from the off switch pin is higher than 1000, then the light will be turned off. For the switch with the timer, the part with the tin foil remains the same. But as the light is turned on, a timer is also starting to count up, and as the timer counts up to a certain desired time (adjustable), the light turns off and the timer resets to 0 until the timer switch is pressed again. |