Monday, March 30, 2015

Midterm Project

The title of your project: Coaster for Health

Sample Video (with each light set up to light up every second, for demonstration's sake):



Describe the concept:
During a stressful work day, people often forget to keep hydrated, going for hours at a time without a drink. In order to help people follow the 8 by 8 rule (8 glasses of 8 ounces of water a day) at a standard 9-5 desk job, we've created a coaster that will remind the user to drink water every fifteen minutes.

Describe the target audience:
The target audience is someone who works a desk job, either from home or in an office setting.

Describe the technical system:
After about a minute and a half have passed since putting a mug on the coaster, a light will come on. This continues until fifteen minutes have passed, and all the lights will blink on and off until the mug is picked up. The timer resets when the mug is placed back down.

Spec out what parts you will need, where you will get them from, and prepare a preliminary bill of materials, including cost for all parts.
Arduino (already purchased)
Plastic Box- $4
Lace Dollies- $4
Total Expected Cost: $8

What manufacturing techniques will you be using?
Cutting out paper, glueing and taping.

Document what possible problems you forsee (i.e. wrong choice of sensors for the job, or problems getting overly-complicated output devices to work), and document some back up contingency planning for those scenarios.
– The photoresistor may not be able to sense an empty bottle of water (hence the need for a mug instead of a plastic bottle)
– The user will be forced to refill their mug constantly while using the coaster and might simply ignore it after a while (the entire point is for them to drink from and refill their mug though - perhaps using a tumbler and not a mug would make more sense)

Document how your team will work together, and the division of labor for the next steps
Our group members are Sarah Lerner and Natalynn Chun. We will divide the labor equally.

Progress Photos:


Monday, March 23, 2015

Lab 5 - Processing Labs

1. Oscillating Circle with Processing



  • Processing is based on Java.
  • A global variable is able to be referenced at any point in a program, whereas a local variable can only be referenced within the function in which it was declared (and will consequently disappear when the function ends)
  • The draw() function returns a void data type.
  • The code below the "//keep the circle in bounds" comment checks to see if the circle has gone to or past the top or bottom of the window. The variable y refers to the center of the circle, so y - (diameter/2) is the y-coordinate for the top of the circle, and y + (diameter/2) is the y-coordinate for the bottom of the circle, so when the top of the circle hits the top of the window (at y-coordinate zero) or when the bottom of the circle hits the bottom of the window (at y-coordinate "height"), the y-speed reverses.
2. Sending Serial Data from an Arduino Circuit to a Processing Application




3. Etch-A-Sketch



This circuit uses a potentiomenter and a photoresistor to create a 'sketch' through Processing.

Tuesday, March 10, 2015

Assignment 2: Interactive Toy


The objective of the game is to throw or shoot something at the calendar, and hit Link square in the face three times. If you hit him again after that, a short jingle will play, and the game automatically restarts. Here, I am using it more as a punching bag, but ideally it'd be shot with a nerf gun or hit with a hacky sack, or something of the like.

The code for the song at the end was taken from a piece of the code from this webpage. The code for the actual game, as well as modifications to the above code, however, were made by myself, in addition to the actual design and set-up of the game seen above.

The intended user for this game is probably children from ages 6-12. Their attention span is still very limited, which is why the game only requires three hits before game is won, so they can play a couple times and then let it be for a while. The 'hit box' for the fsr is quite small, and requires a great deal of precision in order for something to actually register as a hit, so ideally, the child would use this as a means of target practice using a toy gun or simply tossing a small object, which would help to improve their gross motor skills (depending on how they choose to play) and their hand-eye coordination.

The user is allowed one affordance, which is to hit Link right in the face (behind which lies an fsr).

I don't know any kids to test this with, but I myself spend quite a while playing through it, though the design currently lacks a strong support system in the back (the giant stack of books in the video), and so the calendar continually loses the support in the back, which prevents the fsr from getting an accurate reading, so the great majority of the games I played were ended prematurely so that I could rearrange the books as necessary. I'd also like to increase the prerequisite number of hits to ten, and also add another fsr (a much larger one) behind Link's shield, so that any time the fsr reads above a certain value, the number of hits actually goes down.

Monday, March 9, 2015

Lab 4 - Servo Motors

1. Servo Motor Controlled by Pulse Width Modulation from an Arduino


  1. We add a delay after rotating the servo so it actually has time to rotate before running through the loop again.
  2. Pulse widths range from 544 to 2400 μs, for angles from 0 to 180 degrees, so 45 degrees = (45/180)(2400-544) + 544 = 1008 μs.
  3. The piezo speaker and the servo motor both use PWM from the arduino, which is not capable of reliably sending out both signals without any interference.
2. Servo Motor Controlled by Potentiometer with Arduino


3. Servo Motor Controlled by a Pushbutton Momentary Switch


Monday, March 2, 2015

Lab 3 - Introduction to Transistors

1. Force-sensitive resistor and LED with Arduino



  1. FSR's could be used in mobility devices (walkers, wheelchairs, and the like) to detect signs of distress in their users - while it would work best when combined with a temperature sensor, a very sensitive FSR could be used to detect heart rates, which, when elevated, could prompt, say, a message to be sent to their phone, informing them that their heart rate is dangerously elevated, and perhaps giving them an option to call paramedics or family, if they need to. Additionally, an FSR could be used in automated lifts, detecting when someone has stepped onto the lift and moving up or down accordingly.


2. Temperature Sensor and LED Circuit with Arduino


  1. The temperature sensor is not a variable resistor, and as such does not require the voltage divider circuit.
  2. Interactive designs based on this sensor would need to generate effects that are slow and gradual as well, instead of quick and immediate responses.
  3. Temperature sensors work well in Air Conditioning systems, reading the ambient temperature of a room, being fed in a desired temperature by the user, and heating or cooling the room depending on how the temperatures differ. This could also be used in a freezer (in a home, commercial, or laboratory setting) and alerting a specified user (or set of user) if temperatures fall above or below a specified range of values (this would be particularly useful for wine cellars, but could be useful in storing any temperature-sensitive objects).
3. Transistor as Amplifier


  1. Current always flows through the past of least resistance, and the path through the 560 Ohm resistor provides a lot less resistance than the path running through both the switch and the 10 k-Ohm resistor, so the LED turned on by the transistor will be brighter than the one turned on by the switch.
  2.  Give the approximate current flowing through each leg of the circuit (ignore any affect the transistor might have on the current flow or voltage drop).
    1. I = V/R ; I = (5V)/(560 Ohms) = 8.9 mA.
    2. I = V/R ; I = (5V)/(10 kOhms) = 0.5 mA.
4. Transistor as Switch


  1. When the potentiometer is offering its maximum resistance, there is very little current that can flow to the photoresistor, so its sensitivity will be dulled, whereas when the potentiometer is offering its minimum resistance, there is a lot of current flowing to the photoresistor, and as such its sensitivity will be much greater.
5. Transistor Controlled by Arduino