Concept
Link: https://drive.google.com/file/d/19TgW5BmcVSER1t9MUOYlwJh5GEUXzX6o/view?usp=sharing
For this assignment, I decided to create a simple light-controlled system using a homemade pressure switch (A foot pedal). This is because I was curious to learn how basic, mundane materials like paper could be used to create an operational input device without using typical components like push buttons. By including this on the Arduino Uno, I could turn an LED on and off with a physical press, demonstrating how simple materials around the house can be repurposed to create interactive electronics projects.
Arduino Code
I changed the original Arduino “Blink” code to make the light not turn on and off by itself, but only turn on when I trigger it using my paper and copper tape switch:
int buttonPin = 2; int ledPin = 13; void setup() { pinMode(buttonPin, INPUT_PULLUP); // Enables internal pull-up resistor pinMode(ledPin, OUTPUT); } void loop() { if (digitalRead(buttonPin) == LOW) { digitalWrite(ledPin, HIGH); // LED ON when pressed } else { digitalWrite(ledPin, LOW); // LED OFF when released } }
I connected the switch to one of the Arduino’s pins that has the ability to sense if something is being touched. I also used a built-in function that helps the Arduino become aware when the switch is not being pressed. In the code, I instructed the Arduino to switch the light on when the switch is triggered, and off when it’s not. This ensures that the light will switch on directly due to my homemade pressure switch (A foot pedal).
Challenges
One of the main challenges was creating a functioning switch without a supply of crocodile clips, actual push buttons, or normal conductive material. I used paper, copper tape, and jumper wires with some trial and error to develop consistent electrical connection. Getting the copper strips into perfect alignment and holding them together in use took some experimentation. Also, getting a grasp on how to utilize the internal pull-up resistor is necessary to prevent false firing and ensure that the switch is reliable.