Intro to Phys Comp Blog

Week 1

Component

  • Datasheets — In my previous projects using Arduino, one task I always skipped is to read the datasheets since it felt complicated. Only when I encountered operational issues did I look into the datasheets and find that the answers were all there. I appreciate that the datasheets video explains in detail how to read the datasheets and it would help tremendously during prototyping.
  • Voltage Regulator — regulates varying input voltage (8–15v) into a constant voltage output (5v), and uses a capacitor to clean up the electrical noise by smoothing the power.
  • A cool tip that hot glue the headers to prevent electrical shorts
  • Read the label to differentiate different packages! The bipolar transistor is like a relay that uses smaller voltage to control larger voltage, but works faster; Mosfet is similar to Bipolar but requires almost no current to turn on the gate.
  • the Arduino Uno operates at 5 volts, while the Arduino Nano 33 IoT and BLE, and the MKR series, operate at 3.3 volts.
  • * Motorpulse width modulation (PWM), use Mosfet to allow a smaller voltage to control a motor that requires higher voltage?
  • High Current Loads — use electrical switches to control higher voltages (e.g. using Arduino to control a car?), mechanical relay, slower but work with alternating current; transistor is faster but the controller is electrically connected with the controlled circuit, so might cause shorts; optoisolator is controlling with light, so it’s faster and isolating the controller and controlled circuit.

Setting Up A Breadboard

  • I found the introduction of the voltage regulator super useful in helping understand how Arduino regulates the voltage internally into 3v output. I would like to know the scenarios the voltage regulator is useful since I feel like in most cases Arduino can do the power supply work as well.
  • I also appreciate the tip to disconnect the power supply when connecting the circuits to prevent circuit shorts or damage.
  • There is a voltage regulator in Arduino, so in the cases below, Arduino and the voltage regulator serves the same purposes
A circuit without Arduino vs Using Arduino Nano to power a LED

Electronics and using a Multimeter

  • When electronic components do not work, a multimeter is a quick way to debug the connection of the circuits. I encountered issues when LED didn’t light up and used a multimeter to test different parts of the circuit to see where the disconnection is from.

Switches

  • Read the diagram and breadboard carefully — when I was connecting the switches in parallel, I failed a few times because misread the breadboard in the diagram and connected to empty slots;
  • Spacing on the breadboard — since there is not enough space on the breadboard, it is important to plan the position of different electronic components so that the interactable components are accessible and the wiring is easily readable.
Switches in parallel and series
A switch controlling one electronics and two electronics
creative switch — fork switch!
  • Use fruit as conductor needs preamp: to amplify the tiny current change
  • aluminum foil is a good conductor

Week 2

The biggest issue I faced for this week’s lab is to set up Arduino IDE for Nano 33 IoT board. There were a few failed attempts to install the board, which caused the console to output:

ork/exec /Users/meijiehu/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7–2017q4/bin/arm-none-eabi-g++: no such file or directory Error compiling for board Arduino NANO 33 IoT.

This was eventually solved by reinstalling the board and restarting the IDE.

Pull-Down Resistor

The purpose of the pull-down resistor is to ensure that the reading is zero when the switch is unplugged.

What scenario should I use this method?

Digital Input v.s. Analog Input

When I adjusted the potentiometer to zero, the analog output jump between 0 and 1, causing the LED to flicker faintly. How can I make sure that the analog output is smoothly 0? (smoothing)

Digital input from button press (left); Analog input from potentiometer (center); Analog input from force-sensing resistor (right)

Detecting Peak + Dealing with Noise

The peak value is only printed when it passes the threshold and the sensor value drops below the threshold, to prevent if the peak has not reached the highest peak

?: How do you know what value the threshold should be? What scenario can I use this method?

Detecting Peak + Dealing with Noise

Debounce

Use delay (50) or library to avoid activity during the value bouncing in the transition phase.

Week 3

Tone Output Using An Arduino

I learned that detecting sensor output is essentially measuring the voltage of the sensor, so there has to be a resistor connected with the sensor in series in order to create voltage difference. As I was trying to debug the connection, I realize that only two force sensors work and both produced the same pitch, but I don’t know how to fix it despite switching sensors a few times.

Project 1 Concept — Pianona Roll

For or project 1, Lifei and I decided to recreate this music box (https://duino4projects.com/electronic-music-box-powered-arduino-sort/) with what we learned in class using a speaker and photoresistors.

To reduce the complexity, we are thinking of first testing out if the circuit will work by using one photoresistor to detect one row of cells and then expanding the system into multiple roles. This is the first schematics we produced and we would like to get some feedback on the feasibility of the circuitry.

Week 4

We faced a great number of challenges when inserting the circuit board in the box since it can easily mess up the wire connection. We spent a lot of debugging time replacing and tightening the wires to make sure the connections are well-functioned.

The speakers we bought came with an amplifier and instructions, which made it a lot easier than creating an amplifier ourselves.

Week 5

  • What is important in the datasheet: input range, output range, sensor detection range, dimensions, connection schematics.

Don’t interpret your own work.

  • I found this quote quite impactful. I remember showing one of my physical comp projects to Igoe and he said the same thing. I believe that in the realm of physical computing, one needs to make a clear distinction between creating interactive art/game (artistic) and designing interaction models (utility). While the previous one needs to give room to the audiences to explore with minimal interruption, the latter one requires the interactive system to offer an intuitive and straightforward instruction to operate the system. To design interactive models, it is important to illustrate the pain-point, rationale, and importance of the new interaction model in order to justify the behavioral change. It is easy to be confused about the two and create interactive work with no clear interactive goals.
  • Cardboard text/low-fi playtest is an interesting early step to collect user feedback and improve the design before full investment into prototyping.s

Week 6

Sending data from Arduino to P5

Unfortunately, there are some major road blockers for this week’s lab which made it difficult to proceed with the lab. When I tried to send data from Arduino to P5, errors as shown below occurred.

Later as I followed the video tutorial again I realized that

  • I should not open the Arduino serial monitor while opening the p5 serial control;
  • I also didn’t connect the serial port on the p5 serial control by selecting the right port, then clicking open, and then enabling the console to check if data is actually sent through.

Send the sensor value as a single byte

  • it must be between 0 and 255, or no more than 28 bits
  • faster, but limited information can be sent
  • arduino: Serial.write(mappedPot); +
    p5: inData = Number(serial.read());

Send the sensor value as it is

  • Slower but can send in a number of any value to P5.js.
  • arduino: Serial.println(mappedPot); +
    p5: var inString = serial.readLine();
    // check to see that there’s actually a string there:
    if (inString.length > 0 ) {
    // convert it to a number:
    inData = Number(inString);
    }

Sending data from P5 to Arduino

Week 7

Project 2 concept — Finger Skateboard controller

Concept: Make a BLE-empowered wireless finger skateboard to play skateboard games, the goal is to essentially fabricate such skateboard

The technology used: Tiny Motion Trainer, Arduino Nano 33 BLE SENSE, p5.js

Playtest Prototype

playtest prototype

Playtest prototype: I would love to have some feedback on the range of controls, the smoothness of the control, and how to set up the physical environment.

Week 10

Transistor and relay

  • The diode protects the transistor from back voltage generated when the motor shuts off, or if the motor is turned in the reverse direction.
  • MOSFETs require almost no current on the base (gate) to allow a larger current to flow from the collector (drain) to the emitter (source).
using a buzzer as motor

Controlling a DC Motor With an H-Bridge

Controlling a Stepper Motor With an H-Bridge

This is a slightly unsuccessful attempt. Our stepper motor didn’t move as planned and got stuck in one position, so we tried to debug by:

  • checked the wiring of the stepper motor to make sure the color and the pin are matched, this will be more accurate if we have its datasheet;
  • changed the steps per revolution in Arduino code according to the motor’s steps per revolution;
  • changed the power supply to match with the power supply required.

However, after all these debug, the motor still didn’t work. This could potentially because the 4 stepper motor pins are connected in a wrong order which makes it continually rotate in both direction and therefore locked the rotation.

Unipolar motor vs bipolar motor: uni is more versatile but also slightly more expensive.

Linear actuator

Servo hub to hold and rotate along with the motor: https://www.servocity.com/hubs/

Gears and sprockets: https://www.servocity.com/32-pitch-press-fit-acetal-gears/

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

Meijie Hu

A curious & self-driven multimedia interaction designer interested in speculative interactions. Salted pretzel@CMU Design.