Week 8 Unusual Switch Assignment

My concept: 

For this project, I wanted to create a switch using my elbow as the activator. I set up two coins on the table and connected them to the Arduino with jumper wires, so that when my elbow touched both coins at the same time, it would complete the circuit. The Arduino reads this connection as a “press” and turns on an LED. I liked how this made the human body part of the circuit, creating a physical and playful way to interact with electronics.

The process of connecting the coins, taping the jumper wires, and adjusting the setup taught me that even small details, like how the wires touch the coins and keeping them stable, really affect whether the circuit works. The project was about exploring how we can rethink simple switches and find unexpected ways to trigger electronics.

Video Demonstration: 

elbow switch.mov

Arduino Code: 

// Elbow-activated switch with LED

const int switchPin = 2;   // Pin connected to Coin A
const int ledPin = 13;     // Pin connected to LED 

void setup() {
  // Set Pin 2 as input with internal pull-up resistor
  pinMode(switchPin, INPUT_PULLUP);

  // Set LED pin as output
  pinMode(ledPin, OUTPUT);

  // Start with LED off
  digitalWrite(ledPin, LOW);
}

void loop() {
  // Read the state of the switch
  int state = digitalRead(switchPin);

  // If coins are bridged (elbow touches), state is LOW
  if (state == LOW) {
    digitalWrite(ledPin, HIGH);  // Turn LED ON
  } else {
    digitalWrite(ledPin, LOW);   // Turn LED OFF
  }

  // Small delay for stability 
  delay(50);
}

Reflection:

Building this project was a lot of trial and error, and I learned so much about Arduino inputs, digitalRead, and resistors along the way. I realized that small details, like how the wires touch the coins and keeping the connections stable, make a huge difference. At first, I used a 10k pull-down resistor, but the LED wouldn’t stay on reliably when I touched the coins with my elbow. Eventually, I removed the external pull-down and switched to Arduino’s internal pull-up resistor, which made the switch much more stable and responsive.

I also loved seeing how simple code can control hardware in an immediate way, and how experimenting with the physical setup really affects the digital outcome. It was a fun reminder of how hands-on hardware projects are a mix of coding, problem-solving, and creativity.

Ideas for future work or improvements: 

Later on, I’d love to try using different parts of the body or gestures as switches, not just elbows. I could also add more LEDs or other outputs to make it feel more interactive and playful. It would be interesting to experiment with pressure-sensitive  sensors to make the switch respond more smoothly.

Eventually, I could imagine turning this into a small game or interactive piece, where your body becomes part of the control system. Also, I can imagine how interesting it gets when one could actually use their hands as part of the project where they would have more control on the switches and the whole system.

Github Link: 

https://github.com/deemaalzoubi/Intro-to-IM/blob/8753e3a8fa154b92aa973ab1735085c253a33d30/week%208elbowswitch.ino

Leave a Reply