Class 4 – Enclosure for a Sunlight Song Player

For this Intro to Fabrication assignment to create an enclosure, I chose to work on my current project in Intro to Physical Computing. I’m designing a musical instrument that you can press onto your window. When the sunlight comes out, it plays a song such as “Here Comes The Sun” by the Beatles. I’m imagining it would take the shape of an abstract sun, and made of translucent material in order to let the light in through the object as well.

Below is my current prototype.

For now I chose to use cardboard because this was my first time measuring precise holes for components, and I knew I wanted to change the shape later on.  Over the next few iterations I would use yellow mat board, and then eventually  yellow acrylic. Also, the back would use a suction cup or two. Eventually, I would learn to use a light sensor from Adafruit to place on the back of the object to face the outside. I’d place this behind a small plate of clear acrylic so that light can enter.

You can see I also used dowel pins instead of metal standoffs for the same reasons.



Below is an example drawing of what I have in mind.

However, by now I’ve come to the conclusion that I’d like the shape of the object to be an abstract sun, not a typical sun shape (as drawn below). Otherwise the design in total seems too on the nose… meaning each design element (the light sensor, the songs about the sun, and the shape) become too literal. Perhaps if I make the sun to be abstract like in my prototype, the total effect to be more interesting.



For now, a lot of my design decisions were determined by the size of my components. The object had to be large enough to house the microcontroller, the bread board, and the battery.  Likewise, the control panel had to be large enough to accommodate the buttons and sensor.

For now, the front and inside.


Soon I would create this back piece, once I learn how to place the specialized light sensor.






Once I had a sketch in my notebook, I started putting my design into Illustrator.

Here you can see the time I took to measure each component using an analog caliper. I then used these measurements to update my Illustrator shapes to match the size of my components.



In this Illustrator file below you can see I did two things that don’t appear in my final prototype.

  • Added lines to measure the distance between objects, which I later removed before printing to the laser cutter. Could I have added these to another layer in the same file, which would not have printed? Do the laser printers only print the first layer, or do they print all included layers?
  • Created sides for the enclosure. However, I saved finishing these for another time so I could focus on completing the control panel. Next time I’d be ready to do measurements to create sides like the ones found in this Nixie Tube project (image below).

Screen Shot 2017-10-03 at 2.35.33 PM.png


Nixie tube sides.

Nixie tubes



On the 50w laser cutter I used these steps to cut cardboard. The cardboard was thicker than what I used last time. This time I used auto focus! I also used 600 DPI. My other settings are below.


Front side:

First time – 50/50/500

Second time – 20 / 50 / 500

Third and fourth time – 20 / 75 / 500

Back side:

Three times – 20 / 75 / 500

One question I have is how much does DPI matter?  The printer’s list of material settings  makes adjustments based on DPI.


A major component of my control panel that did not print well is the TEXT on it…

You can hardly see it. Granted I only managed to make 9 font size fit due to limitations of my components’ sizes.  However, I followed the ITP Illustrator Laser Printer tutorial on the Shop’s website which mentions how to set text. I used the color black and did nothing else as suggested. However, when I sent the file to the laser printer, I got a pop up dialog box that said it would have to turn the font into an object.

Why did the text etching become white? Whereas the sun etching became black?

What settings should I have used for text?




Here are a few more photos of my final prototype. My buttons aren’t flush with the holes for three reasons.

  • I didn’t have the perfect height to lift my breadboard enough to match the height of my components (I used my phone to give it some height, as you can see below).
  • The hole I cut for the on/off button wasn’t big enough!
  • My jumper wires are quite long and create additional unnecessary height because they aren’t cut to be flush with the board and microcontroller yet. I’ll do this once I’m sure my circuit is final!


In the future, you would also see my battery and if being used, my USB to microntroller cable.


Below phone is being used to give my breadboard height. My dowel pins look a little wonky.


Different angle.


Class 4 – A Sunlight Song Player

I’m working on a musical instrument that you can press onto your window. When the sunlight comes out, it plays a song such as “Here Comes The Sun” by the Beatles. I’m imagining it would take the shape of a sun as well.


Ultimately, you can turn the whole object on or off, set which song will be played when it is bright enough outside, and hear that tune once as you select it. For now, the light sensors are photo resistor cells. Later, I want to use a light sensor that I have from Adafruit. I also want it to be able to work in lighter or darker cities, such as Los Angeles or Seattle. This would mean telling it to read the average light in a room, to come up with a new threshold after which to play the tune.

For now, I’m focusing on what I can prototype quickly. Conveniently, my Intro to Fabrication class assignment is to make an enclosure. This is what I have in mind for now.



As for the code and circuits, there are several functions to sort out… ! Therefore, I’m iterating by focusing one function at a time. That way I can isolate the code for each function before I combine them all together.

To start with, I focused on the control panel & ability to play a song with a piezo. On the left you can see my control panel in the works. On the right is my work to play at least one song by pressing one button.

IMG_0001 2

On a successful note, I debugged a lot of code and realized I needed to level up to create a pushButtonCounter, so that the program can keep track of whether the button is on or off, and control another behavior at the same time, such as a light or eventually playing a song.

giphy_3 buttons for sun.gif

As a challenge, even with lots of help from others, I can’t quite figure out why my first song “Here Comes The Sun” isn’t playing properly. The code used to play almost all the notes, as in the video below. But with new code recommended to me, it doesn’t seem to recognize the button at all!




Class 4 – Labs with Servo Motor and Tone Output, and Quiz


Lab: Servo Motor Control with an Arduino

giphy_servo with force resistor

Do the wave.

Here I am controlling a servomotor’s movement & position by sending it the value returned from a force resistor.

Question: Why is the syntax to create an instance of the servomotor different than a typical variable or instance? For example:

Servo servoMotor; <— creating an instance of the servomotor using the Servo library.


int servoPin = 3; <— creating an instance of the servo connection to pin 3.


Lab: Tone Output Using An Arduino

Play Tones

I may have shortcircuited a speaker, so instead I’m using a piezo (aka what sounds like my new pet mosquito). I sent a frequency to the piezo that changes depending on how much light the photo resistors are receiving.

Question: What does the 100 – 880 range for the piezo/speaker really refer to? Two frequencies being mixed together to create one? See below.

void loop() {
int sensorReading = analogRead(A0);
float frequency = map(sensorReading, 200, 900, 100, 880);
tone(8, frequency, 10);


A more complex example

This example plays a short melody. This is a great example of how a program runs through code one instruction at a time, in a loop, until its done!


A Musical Instrument

Below you’ll hear me playing Hot Cross Buns. In this exercise I learned that you can create three instances at one time while setting up a for loop. For example: for (int thisSensor = 0; thisSensor < 3; thisSensor++).

Question: However, I’m not certain I understand this way of creating three “thisSensors” is the most efficient or clear? 

Questions: What does the syntax [ ] mean and do? I believe it relates to creating a list… This will probably come up in ICM.




Question about the quiz. I believe the first part of the answer below is 0 – 1024 points. Is the second answer that 10 bits required to use the analogRead() command equal 80 bytes of memory (10 bits x 8 bytes in each bit = 80 bytes? )

  1. Microcontrollers read a variable input using an analog-to-digital circuit inside the controller. The Arduino Uno can read the input voltage with a resolution of 10 bits using the analogRead() command. Give the numeric range (decimal range) for this resolution. How much memory does this take up?

Another question: I found this part in the online syllabus. There is one connected idea in the paragraph below doesn’t make sense to me yet. Why is 10 bits a range of 1024 points?

The ADC in the Arduino can read the input voltage at a resolution of 10 bits. That’s a range of 1024 points. If the input voltage range is 0 to 5 volts, that means that the smallest change it can read is 5/1024, or 0.048 Volts. When you take a reading with the ADC using the analogRead() command, the microcontroller stores the result in memory. It takes an int type variable to store this, because a byte is not big enough. A byte can hold only 8 bits, or a range from 0 to 255. 

Finally, just a note to myself that that you need to use an int type of variable / data to store the readings you might get from analogRead(), so that you can access enough of the computer’s memory to store that many numbers. By using an integer or int data type (or variable), you use up 16 bits of memory, which is enough to house the 10 bits used to read input voltage at a resolution.

Class 4 – Analog Output Reading & Documentation

Analog Output

Pulse width modulation (PWM) allows you to get around the fact that a microcontroller can only send 0 or 5 volts (or “off” and “on”), and nothing in between. For example, you might want to send a voltage of 3.5 that is between 0 and 5, to give yourself finer control over an output, such as turning on a motor or servo at medium speed. You might also want to send the changing signals of an analog input, such as how hard I press my finger onto a sensor. That type of mechanical force can have a much finer range of values than just “on” or “off”.

PWM lets you cut these corners by “faking” a varying voltage while doing two things: very quickly sending regular pulses of 0 and 5 volts to a pin on your microcontroller, and changing the width of the pulses (or the amount of time spent at 0 or 5 volts). The pulse width is the amount of time the pin is high. The duty cycle is the ratio of taking half of the time it takes to go from off to on to off again. And the period is the total time if takes to go from off to on to off again.

Applications of Pulse Width Modulation

LED dimming

Here is an example of using PWM to vary the brightness of an LED.  In this circuit, the Arduino’s digital pin 3 using its ability to send different PMW (pulse width modulation signals) to dim or brighten an LED. I’m using analogWrite() to send the LED on pin 3 a duty cycle of 100, then 2, then 0.

analogWrite(3, 100)

analogWrite(3, 2)

analogWrite(3, 0)

giphy_motor transistor.gif


DC Motor Speed Control

Below you can see I’ve used a potentiometer to change the speed of the motor. This is done by sending the analogRead value of the potentiometer, mapping it to a value the motor can accept, and then sending that new value by using analogWrite to the motor.

giphy_pot analogwrite to motor.gif



I set up a servo motor but wasn’t able to get it to move using only digitalWrite or analogWrite(), and without an analog input such as a force resistor or potentiometer.

Question: Why is this?

You can see my progress by adding the servo library in the Servo Lab.

Question: For now, I am curious how I would send the voltage suggested in the reading? It says to send a 5-volt, positive pulse between 1 and 2 milliseconds (ms) long, repeated about 50 times per second.  What does this look like written as code?

Changing Frequency

I was able to set up a piezo using the suggested code set to a certain frequency. I struggled for a while because the speaker I bought from Tinkersphere was not working… but the piezo did work!

Question: To confirm, is it the changing period of a PWM signal that changes the frequency coming out of a speaker? 




IPC – Class 3 Observation of a piece of interactive technology in public

I wanted to share something I’ve casually observed this past summer.

The LinkNYC system of “structures” (as the city calls them).


A few observations:

  • I’ve seen very few people directly interacting with them so far. The handful I did see this summer were using them to charge their devices while sitting on the ground next to them.
  • But I do know for certain that one person is using them, and that is me. I use them for wifi. To do so, I don’t even have to touch the central tablet, which is a bit hidden between two larger screens. I log on from the screen of my smart phone. In addition, the structures also give you free phone calls, access to city services, and maps through the central tablet.
  • Unfortunately, the purpose of the structures seems to be primarily for selling advertisements. That’s the only message I can take away from how large the two side digital screens are.  More ads on the street?!  Ugh.
  • Ironically, it turns out the city says the structures’ primary purpose IS to provide free wifi!  They want these to replace pay phones with free wifi, across the city! I had no idea these were supposed to be pay phones of the 21st century. They say:  “LinkNYC is a first-of-its-kind communications network that will replace over 7,500 pay phones across the five boroughs with new structures called Links. “
  • A design challenge seems to be to make clear that these Links can help you with your 24/7 charging and calling needs.  I wonder how many other people even know you can use them for wifi?  There could be several solutions to this. For example, one design suggestion for the city would be to use the advertising space to promote the wifi service by tallying how many people have used the wifi that day.


  • Considered from Norman and Pullin’s perspectives, these are missing a few things:
    • Functionality in a stressful environment: New York City’s streets can lead to sensory overload. Few people have the time to slow down and peer at a small tablet between two very large digital advertisements. Norman would press a designer to consider the emotional context of the user. Why not make the tables bigger or somehow more apparent for a harried New Yorker?
    • Design for people with disabilities: Again, for someone with low vision, the main functionalities of the tablet are a little small to notice or navigate. While the tablet does have braille and talkback for touchscreen use, these adaptations seem too little for a major public utility service.


IPC Class 3 – Diary love-o-meter with lock combination

This is a private love-o-meter, for when you want to your love to be secret for the moment. First you need to unlock the love-o-meter, like you might with a locked diary. Then you can express your love for something. And finally, you could potentially save your secret love messages, to be locked away for no one else to see.


See below for me trying to unlock the love diary’s combination of three buttons so that I can use the knob. And then I use the knob to turn up or down the LED to express how much I love…. coffee? Chocolate? Riding my bike?

giphy love o meter diary lock.gif

My secret recordings of how much I love something, shown in the serial monitor. (Actually, I don’t know how to save these “messages” for later, but I’m sure you can.)

giphy serial monitor of potentiometer and led


IPC Class 3 Labs

Lab 1: Digital Input and Output

Here you can see that when the button is off, the yellow LED is on. But when I press the button, or it’s “on”, the red LED turns on.

This shows how I’ve connected a digital input circuit and a digital output circuit to a microcontroller.

The code is written to expect the button as an “input”, and change the “output” or behaviors of the LEDs depending on the state of that input.

giphy red and yellow leds.gif

Lab 2: Analog Input

When I turn the knob of the potentiometer, the LED’s brightness turns up or down, and those readings are sent to the serial monitor.

I did this by connecting a variable resistor to a microcontroller and reading it as an analog input. This means that the program is understanding that I’ve changed the conditions of the physical world (me turning the knob of the potentiometer) and converted them to changing variables (turning a LED’s brightness up and down, and printing the numerical change to the serial monitor).

The code:

There are global variables written for the analog value of the potentiometer, brightness of the LED, and the pin number of the LED.  The serial monitor is set up and the LED is declared as an output. Then we read the value of the potentiometer, turn that into another value that can control the brightness of the LED, and print that value of brightness to the serial monitor.

Questions: Why don’t we have to set the potentiometer as an input in the setup function? Why don’t we have to declare a global variable for the pin number of the potentiometer?

giphy potentiometer and led

Below you can see the value of brightness changing in the serial monitor. The numbers are between 0 and 255 because of how we translated the range of the potentiometer to something the computer could remember/process and send to the LED.  We did this by dividing the range of the potentiometer by 4, which fits into a BYTE…  which can only fit 8 BITS… which can only include up to 255 values. I don’t know why we divide by 4, or really fully understand base two or binary notation!

giphy serial monitor of potentiometer and led



IPC Class 2 Dinosaur Fight and Switches

If we were asked to make a project in Class 2 to use a switch, this is what I had in mind.

I would have a dinosaur fight.


I’d put these each on a separate piece of copper tape, and wire those each to the breadboard to light up a red LED.

I’ll do some more make-up and be sure to learn to solder, create a DC jack to a 9 volt battery, and hook this up with a voltage regulator.

Question: I’m not quite sure how to write this drawing as a schematic, with power coming in from one place, and the connected copper circuit through another.


IPC Class 2 Reading and Labs

Lab 1: Components

Some of the most helpful things I found in this lab:

Why microcontrollers are powerful: because they allow you to separate your object (or circuit) from its behavior. This allows you to leave your circuit the same, but change its behavior with a program.

Why the number 1023 is shown in the serial monitor: Your arduino’s microprocessor uses its Analog to Digital Converter (ADC) to take a changing voltage of 0 – 5 volts and convert it to a digital number range of 0 – 1023 (there is some mapping/translating math to arrive at this digital conversion.)

Lab 2: Setting up a breadboard

Question: My DC power supply is still on order so I haven’t learned how to solder to make the DC power jack connection.  However, I did these powered by my laptop.

Question: After going through the examples, I’m still wondering why the resistor and conductor row have the ability to bypass the LED, causing it to not light.





Lab 3: Electronics and using a Multimeter

Here is my work, notated at the top of each image.

Pictured here are 5 volts measured across power and ground in my circuit with my multimeter, powered by my arduino and laptop.



Below you can see two LEDs in series turned on by pressing a button, which connects the switch inside to allow voltage (or current?) to pass through to the 220k ohm resistor and LEDs.  While in series, the LEDs divide voltage yet the current is the same across them.

Question: I’m confused about when I should be saying voltage or current is passing through a circuit.

Note: Adding a third LED leads to none of the LEDs lighting up. This is because each LED uses up about 2 volts. Therefore, the 5 volts sent by my arduino & laptop is not enough to power 6 volts worth of LEDs (three 2 volt LEDs). Instead, about 6 volts would be necessary.

giphy two LEDs

Here you can the circuit uses up nearly all of the voltage in the circuit. My math compares the total voltage in the circuit with the combined voltages across each component.



Here, three LEDs are lighting up because they are in parallel. This parallel arrangement gives equal voltage to each LED, but divides the current among them.

giphy 3 LEDs to measure voltage.gif


Below I am measuring the amperage or current across a single component in my series. To do so, I removed one side of one component. In this case I removed the anode leg of one of the LEDs and completed the circuit with my multimeter.

It took several tries to do this while I figured out whether to have my multimeter set to which Amperage hole (200 milliAmps instead of 20 Amps) or which Amperage dial setting (20 milliAmps instead of 200 or 2milliAmps).

Also it was hard to press the button while I held the multimeter!

giphy of three LEDs connected by meter

I didn’t complete the potentiometer circuit because I haven’t learned to solder yet (soon!). But I did something similar during office hours and understand the concept and circuit.

Lab 4: Switches

Switches in parallel.  As long as you press the first one, you can press either of the second two buttons. This is because they are all connected by wires in such a way that both LEDs get voltage/current with whichever combination.

Can press either last two buttons to light lED


Switches in series. In this case, you need all three pressed to light up all three LEDs. This is because the third button is not directly connected to the first button.

Need all 3 pressed for LED



Question: I can see how the schematics are different for each circuit, in that parallel components are drawn going down, and series components are drawn across. Is this the way parallel and series are always drawn?

Connecting two of the last buttons to allow a different combination to be able to turn on both LEDs.

Question: Why is that the current/voltage passes through the third button to the second LED, even if I haven’t pressed it? Is it because current can pass through the bottom of a button even if it’s not pressed?

Can press either last two buttons to light lED



Create a dual pole switch, so that two separate circuits are turned on with the same mechanism. (I thought this had to be a special kind of switch, but turns out a momentary switch or button is fine.)

Question: I know the IC1 in the schematics are referring to the voltage regulator in the schematics, but why is it called IC1?

giphy LED and moto.gif



Definition of Interaction

The readings by Chris Crawford, Bret Victor, Alan Cooper, and Dan Hill were very clarifying! But where is the diversity in gender and race?

Meanwhile, it’s hard to think of a definition of interaction that isn’t heavily influenced by Crawford’s book “The Art of Interactive Design”. I found his to be very helpful.


For now, my working definition of interaction has two parts:

The conditions for interaction:

Good ol’ analog interaction needs five things to be in place: A person, a second person (or more if you like), and a shared medium, time and place. (For me, medium is defined as “a means of effecting or conveying something”. Thank you Merriam Webster.) For example, two people can’t interact if one person is playing Scrabble at 12pm in Detroit, and the other is playing checkers at 5am in Havana. The mediums, time and place are all different. You need all three to be the same for old fashioned interaction to take place.

The interaction itself:

If these conditions are met, good interaction requires two or more people taking turns. Each person incorporates their best understanding of the last person’s action in order to respond. Both people get close enough to what they need or want.

Special ITP consideration:

Digital interaction can sometimes disregard time or place, or even both! For example, an online word game can allow two people to play from different locations, and take turns at different times (Words With Friends, anyone?).  However, both people still need to play the same game — in other words, use the same medium.

Further consideration:

A bad analog interaction is when one person talks in pig latin or is rude (either can change the medium entirely or just plain ruin it). Or one person can ghost the other by walks away (changing the location). Or finally, show up for a meeting 2 hours late (changing the time).

A bad digital interaction is when one person didn’t plan ahead for what another person would want or need, software is stuck repeating itself / the form hinders the functionality, and the other person yells, throws up their arms, and walks away!

Here are a couple examples of “digital technology” that are not interactive.

  • This radio I bought off Kickstarter. When it arrives in the mail, I won’t be able to change the radio station (which is the point!). This limitation makes it not possible to really interact with it, beyond turning it on/off and changing the volume. However, I would consider it digital technology because the radio does use firmware.
  • My flip phone is a digital technology that isn’t THAT interactive. According to Chris Crawford’s degrees of interactivity, I would say it’s moderately interactive compared to my highly interactive iPhone (that I still use, but without data).