Week 8 – Unusual Switch

PROJECT: UNUSUAL SWITCH

For this unusual switch project, I conceptualized a system where clicking or snapping my fingers would activate an LED light. This idea explores novel ways of interacting with electronic devices using natural gestures.

Components Used:

Arduino board: Used to control the circuit and process inputs

LED: The light source activated by the finger snap

Resistor (330 ohm): To limit current flow and protect the LED

Jumper wires: For making connections between components

Copper tape: Used as a sensor to detect the finger snap without a traditional button

REFLECTION: 

  • Importance of resistors: I initially forgot to add a resistor, which resulted in the LED burning out. This made me understand the critical role of resistors in protecting sensitive components.

IMG_7912

Reading Reflection – Week 8

The reading “Emotion & Design: Attractive Things Work Together” presents a compelling argument about the interplay between emotion, design, and usability, particularly emphasizing that attractive things work better. This resonates with my own experiences and observations in various contexts, such as product design and user interfaces. For instance, I have noticed that when using a software like a food delivery app with a visually appealing interface, I tend to feel more satisfied with the experience, even if the functionality is similar to less attractive alternatives.

On the other hand, the reading “Her Code Got Humans on the Moon” has shifted my perspective on the historical significance of software engineering. I had previously viewed software as a more modern development, but the article illustrates how foundational work was being done as early as the 1960s. Additionally, the reading raises several questions for me. How did Hamilton’s experiences as a working mother in a male-dominated field influence her approach to software development? Furthermore, how can we ensure that the contributions of women and other underrepresented groups in technology are recognized and celebrated in contemporary narratives? These questions highlight the need for a more inclusive history of technology that acknowledges diverse contributions.

Week 8 – Night Light with Arduino

Project Overview

This project is a hands-free, light-activated night light designed to automatically turn on an LED when it’s dark and turn it off when it’s light. Using a light-dependent resistor (LDR) as a sensor, the circuit detects ambient light levels and toggles the LED accordingly. This is ideal as a night light or as an indicator light in dark conditions.

Materials Used

  • Arduino Uno: The microcontroller board used to control the circuit.
  • Jumper Wires: For making connections between components.
  • Resistors:
    • 330 Ohm resistor (for the LED, to limit current).
    • 10k Ohm resistor (as a pull-down resistor for the LDR to ensure stable readings).
  • LED: Acts as the night light, illuminating when ambient light is low.
  • Light-Dependent Resistor (LDR): Detects the light level in the environment and changes its resistance accordingly.

    Arduino Code

    The following code reads the light level from the LDR and turns the LED on when the light level drops below a specified threshold (indicating darkness) and off when the light level is above this threshold (indicating light):

int ldrPin = A0;           
int ledPin = 9;           
int threshold = 500;       

void setup() {
  pinMode(ledPin, OUTPUT);    
  Serial.begin(9600);         
}

void loop() {
  int ldrValue = analogRead(ldrPin);  
  Serial.println(ldrValue);           
  
  // Check if the light level is below the threshold
  if (ldrValue < threshold) {
    digitalWrite(ledPin, HIGH);  
  } else {
    digitalWrite(ledPin, LOW);   
  }
  
  delay(100);  
}

Improvements

    • Automatic Brightness Adjustment: Incorporate PWM to adjust the LED brightness gradually based on light levels, creating a dimmer effect in low light.
    • Sensitivity Adjustment: Experiment with different threshold values based on the ambient light conditions in various environments. This ensures accurate and responsive behavior.

Video Demonstration

Week 8 – Reading response

Small things overlooked

We often overlook small details and focus too much on assumed important features such as usability or practicality. In the reading “Her Code Got Humans on the Moon”, the suggestion to put a warning on a project was disregard because the assumption that the users are trained enough. This resulted in a disastrous problem, deleting all data when the astronauts actually press it. I think this example is similar to small lines of code or comments that we often consider insignificant. These parts may not make a project immensely better, but without them, issues could arise, as seen in the astronaut example.

Another takeaway from the reading is the importance of not making assumptions about users. Good design should account for worst-case scenarios or consider the perspective of someone with no prior knowledge of the product.

Similarly, Norman’s reading said that small details like warnings or the aesthetics of an interaction may not add specific usability to an object. However, it’s important to view design from multiple perspectives, not just functionality. While it’s logical to prioritize functionality, good aesthetics can sometimes offset weaknesses in other areas. In some cases, strong aesthetics prompt users to engage more based on emotional appeal rather than logical reasons. A good example of this is the vintage trend, such as using vinyl records or old flip phones. While these items don’t offer more functionality than recent models, they attract users by evoking nostalgia and a unique aesthetic.

Week 8 – Sleep No More

intro

How tough can designing a switch be? Presumably not much—but it’s the contrary. While the circuit to utilize a switch may be one of the simplest ones in the electronics world, to what extent can that switch ‘make sense’ as well as be creative and ergonomically intuitive? From the distance-triggered switch I rushed in class to a coin-classifier that utilizes the different diameters of different coins, both of these prototypes I made in the course seem too ‘basic’ in terms of being so realistic (aka. boring). At the end of the day, setting off from the concept of ‘using body parts,’ I came up with the idea of a ‘Sleepiness Detector’ that would act as an automatic alarm (visually with LEDs and sonically with a buzzar) when the user (if there is one) closes their eyes.

process

Although the first two prototypes are discarded, I would still give credit to them here as a chronicle:

Still, the second prototype did give me some inspiration about using the conductive fabric to form the later artificial eyelids. While the code below is relatively simple, I would say the most difficult part of this product is to ‘install’ artificial eyelids to my eyes—maybe this is where collaboration was a necessity.

/*
+---------+               +--------+
| Switch  |  eyes         | LED R  |
|         |               |        |
| Terminal|--- Pin 2 ---  | Anode  |--- Pin 9 (Arduino)
|         |               |        |
| Terminal|--- GND        | Cathode|--- GND (through 220Ω resistor)
+---------+               +--------+
                         
                         +--------+
                         | LED G  |
                         |        |
                         | Anode  |--- Pin 10 (Arduino)
                         |        |
                         | Cathode|--- GND (through 220Ω resistor)
                         +--------+
                         
                         +---------+
                         | Buzzer  |
                         |         |
                         | Positive|--- Pin 11 (Arduino)
                         |         |
                         | Negative|--- GND
                         +---------+
*/

#define SWITCH_PIN 2   // Pin connected to the switch
#define RED_LED_PIN 9  // Pin connected to the red LED
#define GREEN_LED_PIN 10 // Pin connected to the green LED
#define BUZZER_PIN 11   // Pin connected to the buzzer

void setup() {
    pinMode(SWITCH_PIN, INPUT_PULLUP); // Set switch pin as input with pull-up resistor
    pinMode(RED_LED_PIN, OUTPUT);       // Set red LED pin as output
    pinMode(GREEN_LED_PIN, OUTPUT);     // Set green LED pin as output
    pinMode(BUZZER_PIN, OUTPUT);        // Set buzzer pin as output
}

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

    if (switchState == LOW) { // Switch is ON (active low)
        digitalWrite(RED_LED_PIN, LOW);      // Turn off the red LED
        digitalWrite(GREEN_LED_PIN, HIGH);   // Turn on the green LED
        tone(BUZZER_PIN, 1000);              // Play sound at 1000 Hz
    } else { // Switch is OFF
        digitalWrite(RED_LED_PIN, HIGH);     // Turn on the red LED
        digitalWrite(GREEN_LED_PIN, LOW);    // Turn off the green LED
        noTone(BUZZER_PIN);                   // Turn off the buzzer
    }
}

schematics & illustration

Both of the graphs are generated with TinkerCAD

Product Demo

Hindsight

Obviously, the method I used to install eyelids was not wise enough to replicate easily. If this is actually to be a thing, then there must be some more mature way to detect if eyes are closed.

Week 8 – Reading Response

It’s all about the balance – right?

Aesthetics vs. function, durability vs. lightness, artistic vs. technical—it’s so easy to fall into a binary mindset. To some extent, my intuitive argument would be: ‘Yes, that indeed makes life easier—but in terms of?’ While we humans like clear frameworks and roadmaps to navigate through the complexities, it seems that at the end of the day, despite the urge to simply pick a side (or polarize, in a fancy way), things—in many cases—turned out the most favorable when we took a step down and found the middle ground.

In fact, it seems quite contradictory to me, especially considering Norman’s arguments as a whole: yes, we tend to be hard-headed and pick sides intuitively, and the ‘fact’ seems to praise the balanced, but to perceive that balanced beauty/harmony/coherence or whatever induced, it comes back to our first-hand perception system (or effects in Norman’s words).

Okay, I’ll try to step down from delving into the philosophical rabbit hole. However, maybe more practically, how can these inquiries benefit our—or my—practice? From poetry to music to tennis, I constantly struggle between the fine lines. And now, not surprisingly, but ‘coding’ turned out to be the same. If I am to name a takeaway from this, then although I may not be able to point out a solution to any of the fields at the point or even forever, it must be, again, transforming the mindset:

When we use the term balance, what’s its connotation? If something, two or more, needs to ‘be balanced,’ at least it sounds to me that we are assuming that those things are intrinsically conflicting to some extent. But what if they do not conflict with each other in the first place? I’m not saying that this is the new version of ‘fact’ but suggesting maybe we should try to get rid of that guggling mindset and try as hard as possible to really, really look at what we are dealing with as a whole.

 

 

Reading Response: Week 8

Her Code Got Humans on the Moon—And Invented Software Itself

After reading the article on Margaret Hamilton, I can genuinely say her work left me inspired. One of the most fascinating aspects of her journey in software engineering is that the career path was not taught formally at the time; pioneers like Hamilton navigated complex, unprecedented problems relying solely on their resourcefulness and intellect. To me, this makes her story all the more exciting and inspiring. In the article, Hamilton reflects, saying, “When I first got into it, nobody knew what it was that we were doing. It was like the Wild West.” This captures an intriguing concept: how something entirely unfamiliar can eventually grow into a field recognized by the world. It emphasizes the invaluable contributions of innovators like Hamilton, whose dedication transformed this “Wild West” of programming into a modern, booming industry.

Today, what was once unknown is now a leading field, with software engineering being a top choice for bachelor’s degree pursuits. Interestingly, there’s a marked contrast between Hamilton’s era and ours: while she and her peers pursued this path out of passion and a pioneering spirit, the $400-billion industry today is often seen as a gateway to financial stability, with passion sometimes secondary. Despite the fact that software wasn’t even included in the Apollo mission’s budget or official documentation, its impact is undeniably felt across industries today. This article brilliantly highlights the work of women in technology and helps bridge the gender gap by celebrating these overlooked pioneers.

 

Norman, “Emotion & Design: Attractive things work better”

When I first began reading Norman’s essay on “Attractive Things Work Better,” I was initially skeptical, believing functionality should outweigh aesthetics—why prioritize appearance if it compromises performance? Yet, as I delved deeper, I found myself agreeing with Norman’s insights on how attractive designs can enhance usability. One key point he raises is that while aesthetics sometimes need to be sacrificed in contexts where functionality is paramount, there are cases where the two can harmoniously coexist. This perspective helped clarify any initial doubts I had about the essay’s premise.

Norman’s explanation of positive and negative affect, and their impact on user experience, is particularly compelling. His argument on how emotions like anxiety and fear can be leveraged to overcome procrastination, especially when working within time constraints, feels remarkably applicable. At first, I was hesitant about his idea that a product’s utility can be influenced by mood, and the suggestion of owning multiple versions of a product seemed inefficient to me. It felt impractical to rely on mood when selecting functional items, especially considering cases where only the “undesirable” product might be available, potentially leading to a poor experience. This extends beyond the teapot example he provides. However, his quote, “When we feel good, we overlook design faults. Use a pleasing design, one that looks good and feels, well, sexy, and the behavior seems to go along more smoothly, more easily, and better. Attractive things work better,” presents a thought-provoking angle that I acknowledge has merit, though I feel it doesn’t apply universally.

I do disagree with Norman’s claim that color displays offer no additional value compared to black-and-white screens. This seems particularly outdated in today’s digital world; for example, working in design software like Photoshop often requires accurate color information, and relying on a black-and-white display could lead to unintended, muted results. This is just one of several cases where Norman’s argument might fall short.

Finally, Norman’s emphasis on products being affordable, functional, and pleasurable resonates in our present context. This balance is essential, as seen in decisions by major companies like Apple, which might discontinue products like the Vision Pro if they fail to meet these criteria, particularly in terms of affordability.

Week 8: Don Norman and Margaret Hamilton Reading

Both of this week’s readings are the result of developing a complex relationship between aesthetics, degree of complexity and function. Norman in his readings states that inproving the user experience through design is important as it allows users to ignore the minor flaws and bugs by impressing them with creativity. For example, he states that walking the plank at different heights might seem same, but as the height increases, a person might reconsider that. However, if there are some aesthetic design incorporation, then one might choose to do so either due to aesthetic curiosity. However, initially going through Margaret Hamilton’s reading, even I was quite sure that her view is quite in contrast with Norman, as she focusses majorly on error-free, mission-critical functionality while designing software for the Apollo systems. This is because of the risks involved in her work. At the moon surface, a place unknown to humans, anything could go wrong and total preparation was needed. This became clear when just before landing on the moon, the computer overwhelmed with the many tasks on hand, chose to prioritize the main task, and leave the others.

However, Norman’s approach to adaptability in design based on aesthetics goes well with Hamilton’s approach to adaptability in systems. Norman thinks that an appealing interface makes a product more usable for a wider range of people. Hamilton, on the other hand, worked with NASA on the Apollo program and showed adaptability through strict, modular engineering that could handle unexpected edge cases, like when her daughter made a critical error during testing. These similar and different ideas show that Norman’s ideas about beauty make everyday things easier to use, while Hamilton’s high-stakes setting shows how important it is to build for reliability and test things thoroughly, which is an important quality in and of itself for life-or-death tasks.

Week 8: Hugging switch

Idea

For this project, my initial idea was to use a simple interaction as a switch to light up the LED light. I think hugs is the most suitable, because hugs usually gives us warmth and energy, which can symbolically ‘light up’ a light.

Implementation

I create a simple circuit like in this one:

Arduino LED - Complete Tutorial - The Robotics Back-End

I connect the 3.3V to the resistor -> LED -> ground. However, from the 3.3V to the bread board, instead of connecting the wire directly to the resistor, I attach it with a piece of tin foil to my plushy. I also attach another tin foil on my T-shirt, this tin foil is attached to a wire, which is connected to the resistor. Hence, when I hug the plushy, the tin foils touch, completing the circuit and turn on the light.

Video

 

My project implementation was fairly simple, so I did not encounter many problems. Nevertheless, I do have some tips from my first experience working with Arduino. Initially, I tried connecting the wires with regular tape, which didn’t work at all since it isn’t conductive. I then switched to tin foil and wrapped it around the connecting points. Next time, I would use conductive tape or male-to-female wires instead.

Reflection

I enjoyed creating this project. I think the components provided in the Arduino kit make building physical projects much easier. I also try to look at “switch” in a different perspective to come up with a switch which is not only unusual but also has some kinds of meaning.

Week 8: Creative Switch

Short Description:

The project for week 8 asks to design a switch without manually connecting the switch to the power. By looking through some online resources and reviewing the Arduino documents, I created a switch using the distance sensor that detects if there is an object in front of the circuit and two LED diodes that reflect if an object is present. When an object is present, the circuit would light the red LED, and when there isn’t an object, the circuit would light the green LED.

INITAL APPOACH

Going into the project, I knew I wanted to use the sensors that came with the kit because I wanted to learn more about the connections of the components and coding in the Arduino IDE. By searching on Youtube and Arduino documentations, I initially played around with the light senor and was able to create a switch that is dependent on the amount of light that is present in the room. If there was low visibility, the LED would turn on, and if there was high visibility, the LED would turn off. Here is the link I referenced.

However, I felt this design wasn’t creative enough and sill had other components in my kit I want to learn about, so I decided play around with the distance sensor as well.

Light Sensor LED Switch (from Arduino)
The Process

The biggest challenge in the project was understand how the distance sensor worked, but I found a useful Youtube video  that was able to explain the manual to me and walk through the process of connecting each pin to the Arduino board. I understood how to connect the GND and VCC pins, and through the Youtube video, I learned that the trig pin sends out an ultrasonic wave and the echo pin would receive the ultrasonic wave if something was in front the component — similar to bats & echolocation.

Physical Components

After understanding the component, all that was left was to connect my circuit and set up the code to run the project. Below is the photo of my circuit connections from TinkerCAD and physical circuit. Here is a short video (IMG_4697) of how the circuit would work.

TINKERCAD

GREEN LIGHT -- No Object Present

RED LIGHT -- Object Present (i.e: my hand)

The Code

Through the in-class exercise, tinkering with the light sensors, and looking through Youtube videos, I was able to write a short code in the Arduino IDE that makes the circuit function. Below is the main looping function.

void loop() {
// sets the trig pin to a low state 
digitalWrite(trigPin, LOW);
delayMicroseconds(2);

// every 10 mircoseconds sends out a pulse (based off the manual)
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);

// from the echoPin --> returns the time it took the sound wave to travel in microseconds
timeTraveled = pulseIn(echoPin, HIGH);

// calculate the distance (in micrometer)
distance= timeTraveled * 0.034/2;
onDistance = distance;
if (onDistance <= 5){
  digitalWrite(ledRedPin, HIGH);
}
else{
  digitalWrite(ledRedPin, LOW);
}
Conclusion

Overall, I am very happy with how it turned out and being creative with the hand motions of “stop” for red and “go” for green in the circuit. I liked that I was able to learn more about the components and also work in software to make the circuit function the way I wanted it. For anyone else curious or wanting to learn more about Arduino, there are numerous resources and tutorial online that are so helpful, and I recommend anyone else just starting out in Arduino to take a learn and have fun.