ㅡ Intro to Physical Computing
- 1. Getting friendly with Arduino and Physical Computing
- Sep. 03. 2024
- 2. Digital Input and Output with an Arduino
- Sep. 10. 2024
By using the codes above, if i push the button, red LED turns on,
and if I do not push the button yellow Led turns on.
It became more brighter!
Touch sensor controls each LED’s brightness.
- Sep. 17. 2024
- Lab: Tone Output Using An Arduino
---Play Tones
-> this code did not work!!!!!!!!!!!!!
-> I checked sensor range with using // Serial.println(sensorReading); -> range was around 0~1000
-> After fixing code to this, I could play tones with touch sensor.
Thank you Chloe!!
---Play music (pitches.h)
---Making a musical instrument
A0,A1,A2 sensor range : 0~900
- Sep. 17. 2024
Lab: Servo Motor Control with an Arduino
- Oct. 01. 2024
Tried to figure out why mine was not working.
It was soldering issue in H-bridge moter driver. So Sky helped me to fix the soldering.
It started to work!
- 3. Midterm Process ( Jiyou, Jenn and Amelia )
After testing the Heart rate sensor several times, we can check the range of rates between around 80~120.
In the shop, there are 2 kinds of pulse sensors: black(unknown brand) and red(Sparkfun)
The next step will be to connect the sensor to 4 servo motors.
What we should be concerned about is:
- How many Amp we need for servo motors
- How to decide whether to divide each sensor value by 3 parts with heart rates(Low/Mid/High)
/*
Heart beat plotting!
By: Nathan Seidle @ SparkFun Electronics
Date: October 20th, 2016
https://github.com/sparkfun/MAX30105_Breakout Shows the user's heart beat on Arduino's serial plotter Instructions:
1) Load code onto Redboard
2) Attach sensor to your finger with a rubber band (see below)
3) Open Tools->'Serial Plotter'
4) Make sure the drop down is set to 115200 baud
5) Checkout the blips!
6) Feel the pulse on your neck and watch it mimic the blips It is best to attach the sensor to your finger
using a rubber band or other tightening
device. Humans are generally bad at applying constant pressure to a thing. When you
press your finger against the sensor it varies enough to cause the blood in your
finger to flow differently which causes the sensor readings to go wonky. Hardware Connections (Breakoutboard to Arduino):
-5V = 5V (3.3V is allowed)
-GND = GND
-SDA = A4 (or SDA)
-SCL = A5 (or SCL)
-INT = Not connected The MAX30105 Breakout can handle 5V or 3.3V I2C logic. We recommend powering the board with 5V
but it will also run at 3.3V.
*/#include <Wire.h>
#include "MAX30105.h"MAX30105 particleSensor;void setup()
{
Serial.begin(115200);
Serial.println("Initializing..."); // Initialize sensor
if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) //Use default I2C port, 400kHz speed
{
Serial.println("MAX30105 was not found. Please check wiring/power. ");
while (1);
} //Setup to sense a nice looking saw tooth on the plotter
byte ledBrightness = 0x1F; //Options: 0=Off to 255=50mA
byte sampleAverage = 8; //Options: 1, 2, 4, 8, 16, 32
byte ledMode = 3; //Options: 1 = Red only, 2 = Red + IR, 3 = Red + IR + Green
int sampleRate = 100; //Options: 50, 100, 200, 400, 800, 1000, 1600, 3200
int pulseWidth = 411; //Options: 69, 118, 215, 411
int adcRange = 4096; //Options: 2048, 4096, 8192, 16384 particleSensor.setup(ledBrightness, sampleAverage,
ledMode, sampleRate, pulseWidth, adcRange); //Configure sensor with these settings //Arduino plotter auto-scales annoyingly.
To get around this, pre-populate
//the plotter with 500 of an average reading from the sensor //Take an average of IR readings at power up
const byte avgAmount = 64;
long baseValue = 0;
for (byte x = 0 ; x < avgAmount ; x++)
{
baseValue += particleSensor.getIR(); //Read the IR value
}
baseValue /= avgAmount; //Pre-populate the plotter so that the Y scale is close to IR values
for (int x = 0 ; x < 500 ; x++)
Serial.println(baseValue);
}void loop()
{
Serial.println(particleSensor.getIR()); //Send raw data to plotter
}
These screenshots are modeling the installation where the sensors and outputs will be installed.
- Concept & Background & Sketches
- Oct. 15-22. 2024
Theme Selection (Unexpected Fear)
We decided to create a fear that gives people unpredictable elements by incorporating aspects of traditional Asian ghosts into the Western Halloween setting.
As foreigners, the American subway is a dark, damp place that always makes us tense and scared. We placed typical elements of Asian horror, such as a virgin ghost, a snake, and talismans, in the subway setting, with a manually operated effect of the virgin ghost's eyes moving. In the center, we placed an unknown object with a straw shoe texture, inside which we positioned a sensor to create an unsettling feeling for people.
Material Selection (Heart Rate Sensor, Servo Motors)
Halloween evokes images of children collecting candy and the phrase "trick or treat!" We wanted to share candy and fun with those viewing our Pcom project, considering how to incorporate Pcom elements. Simply measuring heart rate through a sensor and distributing candy seemed boring, so we decided to add a game-like element where doors automatically open and close based on the measured heart rate, encouraging people to control their heart rate.
We chose to use three servo motors to classify heart rate levels into High, Mid, and Low, with corresponding rewards for each level.
Stage Sketch (Servo Motor Angles, Candy Baskets, Input)
For the Halloween atmosphere, we designed a small subway-shaped stage with layered forms to provide an immersive experience for the subjects. To create a floating ghost effect, we hung elements from the ceiling and attached a separate device to move only the eyes.
Functionally, the most important considerations were:
- Hiding places for servo motors and breadboards
- Positioning for the subject's hands
- Sensor location
- Candy dispensing area
The most challenging part was connecting the candy dispensing area with the servo motors and concealing the connection. We utilized elements like benches, trash cans, and ticket machines, designing them to rotate and reveal hidden compartments containing candy for the subjects to retrieve. The input was installed in a location where people's hands could easily reach and view the entire stage, ensuring our intentions were fully reflected.
- Fabricating Process
- Set Design Sketch and Modeling
- Before building the set, we started with simple hand sketches and 3D modeling to establish the scale of the set.
- Our goal was to rescale the large space of a subway station into a more manageable set size while finding the most effective layout that could contain all necessary components.
- By using a 1:1 scale model, we aimed to minimize potential sizing errors during the actual set construction.
2. Creating the Subway Set with Foam Board
- Referring to the model, we used foam board to construct the main structure of the set.
- After creating the images needed for each surface, we printed them and attached them to the foam board.
- To capture the essence of a subway station, we used actual images of subway elements.
- By layering features like pillars and ceiling protrusions, we aimed to give the set a sense of depth and space.
3. 3D Printing Subway Elements
- To visually link the output of each sensor to the subway environment, we used a 3D printer to create objects commonly found in subway stations, such as benches, trash bins, and ticket vending machines.
4. Building the Sensor House
- We needed a sensor house large enough for people to put their hands in.
- We cut string with a straw-like texture and attached it to the outer surface of a wireframe house.
- Inside the house, we added slippery-textured toys to create a sense of discomfort when people reached inside.
5. Installing the Circuit on the Set
- After creating the circuit, we attached it underneath the set.
- The heartbeat sensor was placed on top of the set, and the servo motors were installed below.
- After installation, we tested whether the servo motors worked properly in response to the sensor input.
6. Attaching Motors and Candy Dispenser to the Set
- We attached the 3D-printed subway elements to the motors.
- Below the motors, we built and installed a candy dispenser in the form of a box.
- When the servo motor rotated 90 degrees, it revealed an opening where people could take candy from the dispenser.
7. Attaching the Sensor and Making a Finger Placement Guide with Clay
- We attached the heartbeat sensor to the top of the set.
- Since people might have difficulty finding the exact sensor location when placing their hands inside the sensor house, we thought it would be helpful to make a guide.
- Using clay, we molded a guide to help people place their fingers in the correct position.
8. Installing the Ghost and Sensor House on the Set and Adding Final Details
- Finally, we installed all the fabricated elements onto the subway set.
- To enhance the atmosphere, we added details like ghosts and talismans to the background.
- We also made the ghost’s eyes move manually to add a more creepy effect.
- Technical Process
- Heart rate sensor(MAX30105) testing
- Decoupling 3 Servo motor
- Combine 3 servo motors as an output and a sensor as an input
- Scaling the sensor range and adding State variables and functions for interaction
- State variables: Stabilization period, Per-person quotas
- User testing and adjusting input range of Low, Mid and High.
Constraints
- Use the average value of the heart rate in the first 2 seconds after sensing the person's heart rate.
- Each person can have only one candy
Capacitor:
- Each servo motor: 220µF (decoupling x3)
- Entire power supply line: around 1000~1200(470µF x3)
Code
https://app.arduino.cc/sketches/521a936f-f60c-406b-97cb-316bb80b4f7e
Troubleshooting
- Unexpected conductivity of Playdough
- Controlling artificial heart rate for testing
Asynchronous Serial Communication: The Basics
1. Basic Concept of Serial Communication
- Communication between devices requires a method and agreed-upon language
- Serial communication is one of the most common forms of communication between computers
2. Essential Communication Agreements
- Data transmission and reception rate
- Voltage levels representing 1 and 0
- Meaning of voltage levels (whether high voltage represents 1 or 0)
3. Basic Connection Configuration
- Common ground connection
- Transmit line (for sending data)
- Receive line (for receiving data)
4. Data Transmission Method
- Example: At 9600 baud rate, 1200 bytes can be transmitted per second
- Data is transmitted by changing voltage levels bit by bit
- Generally transmitted from Most Significant Bit (MSB) first
5. UART, USB, and CDC Explanation
- UART: Universal Asynchronous Receiver-Transmitter handles serial communication
- USB: Primary communication method in modern computers
- CDC: Communications Device Class that supports serial communication over USB
6. Serial Buffer and Port Control
- Processors have serial buffers to store received data
- Only one program can control a serial port at a time
- Data is processed in FIFO (First-In, First-Out) order
7. Importance of Communication Protocol
- Both devices must use the same communication protocol
- Agreement needed on the meaning and order of transmitted bytes
– Week 8 ––––––––––––––––––––––––––––––––––––––––––––––––
- Oct. 29. 2024
Lab: Two-Way (Duplex) Serial Communication Using An Arduino and the p5.webserial Library
Sending Multiple Serial Data using Punctuation
works well!!!!
https://editor.p5js.org/wc2771/sketches/--tEkUGZT
– Week 10 ––––––––––––––––––––––––––––––––––––––––––––––––
- Nov. 12. 2024
Sorry.. I will update soon..
but I am archiving on https://www.figma.com/board/R6S91lMy2ORdENxY5vCSJB/Pcom-Baby?node-id=0-1&t=U2edRwq09Jh2JxUv-1
– Final documenting –––––––––––––––––––––––––––––––––––––
- Dec. 9. 2024
<Interaction between People and Computers and the Space In-Between>
- Reflecting on a Semester of Physical Computing
Through this course, I learned how to think about the interaction between three elements: people, software, and hardware. As a foundational process to understand this, I used Arduino to learn how electrical current flows, how voltage should be supplied, and how to write Arduino code when adding inputs like sensors and buttons, or outputs like monitors and speakers.
While the 'Physical Computing' course itself primarily focused on Arduino, coding, and circuit understanding, for me, this entire process was preparation for the final stage of connection with 'people' - human interaction. Since my future goal is to be a UX or Product designer, I found the processes most interesting that were related to people and the physical world. Every moment was fascinating - from choosing sensors that connect with the world, to deciding how to attach them, and whether to expose or hide sensors for the experience.
Because of these reasons, I took charge of concept planning, fabrication, and visualization for both midterm and final projects, working with team members who were more interested in coding and circuit connection. Our collaboration allowed us to leverage each other's strengths, helping each other understand and resolve challenges.
It was a meaningful time where people with different strengths came together to support mutual understanding. As a result, during this semester, I studied the foundational knowledge of what physical elements exist in a product, service, or experience, and how different commands and languages interact. Based on this, I became a more comprehensive designer, capable of thinking multi-dimensionally and imaginatively about various stages of a project.
Final Project : Baby Mac
A MacBook and a baby MacBook exist. The participants must take care of the baby MacBook while the mother MacBook rests. However, the MacBook does not want the baby MacBook to leave its line of sight even while resting. The main goal for participants is to care for the baby MacBook without letting it cry, while meeting the mother MacBook's demands.
Our project creates a system of interconnected unreasonable machines, blending human emotion and relationships with technology. At its core, it explores a complex parent-child dynamic between machines—the Baby Mac and Mother MacBook—reflecting deeper emotional connections and potential relational entanglements between machines and users.
The project is composed of two key technical components. The Baby Mac is a motion-detecting device that tracks rotation and acceleration, providing real-time feedback through visual or audio responses based on user interaction. The Mother MacBook uses machine learning via ml5 to monitor the Baby Mac's position, adjusting its expression when the BabyMac enters a predefined "insight" zone.
- Interaction
Initial Scenario Context
People first encounter our project in a chaotic and frustrating environment. Their initial interaction introduces them to a mother computer and a baby MacBook, where they are immediately challenged to:
- Sensory Overload
- Confronted with a noisy, overwhelming setting
- Faced with two technological entities with unclear requirements
- Experiencing immediate confusion and sensory stress
- Interaction Dynamics
- Presented with visual guidance instructions for each device
- Tasked with attempting to soothe the "baby MacBook"
- Forced to navigate complex interaction protocols
Psychological Experience
- Confusion: Participants will feel profound bewilderment
- Uncertainty: Lack of clear understanding about each entity's specific conditions
- Problem-Solving Motivation: Driven to find a resolution to their perplexing situation
Key Objectives
- Prevent the baby MacBook from crying
- Keep the baby within the mother's line of sight
- Ensure the mother MacBook feels secure and relaxed
- Maintain a delicate balance of care and observation