jump to navigation

Sunset Alarm Clock Problem May 20, 2010

Posted by Tom Frobish in Physical Computing.
add a comment

Ok, so I’m making this alarm for my physical computing class that basically wakes you up by turning on a high powered light that would rotate over your wall or your body to create a false sunset for those of you who wake up to light.

Basically what I’ve been working on was taking an alarm clock, my trusty arduino, a wireless wall switch and relay, a 4′ 2000 lumen led flourescent replacement bulb, some servos, and some pvc tubing.  In a very fast summary, my friend Jason and I wired them together and pressed a couple of keys in the keyboard to tell the light to turn on and swivel when the arduino recieves signal the alarm going off.

So far, I have not finished the project because for some reason, I have been very retarded and couldn’t find the right signal off of the alarm clock board that triggered the speaker to go off.  I kept thinking I can use the buzzer lines themselves but was very confused when I found that they had a constant 3.2 volts running through the line when the buzzer wasn’t going off and when the buzzer did go off, the voltage dropped down to 2 volts which baffled me for a very long time.  Then when I called my dad to see if he knew what might be happening, he said to try checking it on AC current and I was like…uh ok, when I did skeptically, I the voltage jumped up to 1 volt AC when the buzzer went off, which means it really wasn’t a buzzer, but an actual speaker (which runs off of AC current, not DC) which would explain why it wasn’t making any noise when it had 3.2 volts running through it.

After a lot of searching for the trigger signal coming out of the little microprocessor, I couldn’t actually find a line that jumped up to a high when the alarm went off.  Every line that had voltage change went from a constant high and dropped down to a low.  So I decided instead of trying to find a high to signal the arduino, I would just tell it to send out a low signal to to wireless transmitter when receiving a high and send out a high when it received a low from the alarm clock.

Then after being braindead and having a cheapass soldering iron, I went on to surface mount a lead off of one of the resistors (normally this would be peace of cake if I had the right tools and was in the right mind) but I had a cheap soldering iron with a blunt pencil tip and because of it’s low heat, I had to hold it onto the board for an extended amount of time (don’t worry, I used flux) and it heated the other resistors around it and caused a few to pop.  Then Murphy’s law kicked in hardcore because after that happened, I managed to get them soldered back on.  After that, the wire I leaded off of the other resistor (was an 18awg wire solid core, that’s all I had at the time) broke off and took half of the resistor with it.  After just staring at what just happened for a few minutes, I figured “Well shit, maybe if I just solder the two halves together, maybe the board won’t know.”  and I think between that and popping some of the other resistors and heating the other components up I figured and broke something or shorted something else because when I go to check the clock, now it’s got a power drain somewhere because the line that was supposed to be outputting 3.2 volts was putting out 2.6 volts and didn’t drop when the buzzer went off which was totally awesome!

Anyways, I summarize the rest of the project, when the alarm clock went off, it would tell the arduino it was beeping, then the arduino would switch a transitor on the wireless switch which would flip the latching relay hooked into the wall to turn on and turn the light on.  When that would happen, the arduino would then tell the servos to run their script (which was slowly rotate the bulb of the bed and blind the sleeping person awake.

EL Wire Clothing May 20, 2010

Posted by Tom Frobish in Cool Stuff, Design, Physical Computing.
add a comment

Alright, so I’ve been designing this new idea for awhile and that was to create some kind of safety clothing that would be both stylish and very visible at night or in heavy fog or anything that the user would want to be seen in.  I recently come across Electroluminescent Wire (EL Wire) which produces and constant and seamless light along a wire.  It comes in many sizes and is pretty  cheap.

Anyways after much searching, I started going through many different concepts and ideas of how I’m going to stylize the clothing.  I’ve seen a lot of clothing for halloween costumes that light up but they all look very cheesy.  Running around like Tron may look cool in the movie but in real life…yeah.

I’ve been focusing on the simplicity that Under Armor has for their clothing and decided to make the lights follow a two tone pattern the runs along the body.  I’ve posted different concepts and some of the thinking pages (if you actually want to spend the time to read those too :P)

I’ve also posted at diary of this project on youtube so that I can link it over to this blog:


The clothing and final design basically came out to be a simple two tone running jacket that runs along the arms in a spiral pattern and around the shoulders.  When the light is off, noone would be able to tell the jacket has been modified, but when it turns on, it really draws a lot of attention.  Another thing I really liked about the wire was the fact that it was very bright  at night but when you entered a lighted area, it was like it wasn’t even on.

Also the other reason for the blue color was in bioluminesence, blue actually travels the farthest of all of the colors with the least amount of energy.  Also the light blue color stands out the most to peripheral vision.

Light Sensor Circuit Code with Arduino May 20, 2010

Posted by Tom Frobish in Physical Computing.
add a comment

Alrighty, so I’m finally posting the code I made for the light sensor circuit.  If you can read C++ then the schematic is basically posted in the code.  Essentially, the code just reads the resistance from the photo resistor and depending on the range, it’ll light up the corresponding light.  To help with a smoother transistion between the reads, I also told the arduino to smooth the data meaning it’ll take the average of every 10 samples.

I will make this is the summer and link the vid on here from youtube since I can’t post videos on this blog.

If you want to make a light sensor, here’s the code to do it (All you’d need to do is change the “if” “else” values to calibrate the sensor):

const int numReadings = 10;
const int ledPin = 13;
const int ledBlue = 5;
const int ledYellow = 4;
const int ledGreen = 3;
const int ledOrange = 2;
const int ledRed = 8;
int readings[numReadings];
int index = 0;
int total = 0;
int average = 0;
int inputPin = 0;
void setup()
{ Serial.begin(9600);
for (int thisReading = 0; thisReading <numReadings; thisReading++)
readings[thisReading] = 0;
pinMode(ledPin, OUTPUT);
pinMode(ledBlue, OUTPUT);
pinMode(ledYellow, OUTPUT);
pinMode(ledGreen, OUTPUT);
pinMode(ledOrange, OUTPUT);
pinMode(ledRed, OUTPUT);
pinMode(inputPin, INPUT);
void loop() {
total= total – readings[index];
readings[index] = analogRead(inputPin);
total= total + readings[index];
index = index +1;
if (index >= numReadings)
index = 0;
average = total / numReadings;
Serial.println(average, DEC);
if (average < 506)
{digitalWrite(ledRed, LOW);}
else {digitalWrite(ledRed, HIGH);}
if (average < 489 || average >= 506)
{digitalWrite(ledOrange, LOW);}
else {digitalWrite(ledOrange, HIGH);}
if (average < 472 || average >= 489)
{digitalWrite(ledYellow, LOW);}
else {digitalWrite(ledYellow, HIGH);}
if (average < 455 || average >= 472)
{digitalWrite(ledGreen, LOW);}
else {digitalWrite(ledGreen, HIGH);}
if (average < 438 || average >= 455)
{digitalWrite(ledBlue, LOW);}
else {digitalWrite(ledBlue, HIGH);}
if (average < 421 || average >= 438)
{digitalWrite(ledPin, LOW);}
else {digitalWrite(ledPin, HIGH);}

Physical Computing Night Light Circuit March 22, 2010

Posted by Tom Frobish in Physical Computing.
add a comment

The first thing for Physical computing we had to do was create some kind of circuit, so I decided to kind of go a little farther. I created a night light circuit that has problems 😛 Basically the circuit is supposed to turn on automatically in the dark and turn off in the daytime but can be turned on by pressing the button. I’m not actually sure what’s going on at the moment. The LED never fully turns off and it and only gets brighter when you press the switch. I don’t know if this is a characteristic of the 74ls00 (Quad NAND Gate)chip or not but when I check it it’s putting out a constant 1.4-1.6 volts and when I press the switch it puts out 3v (I have a little 3v coin battery on it) I’m pretty sure the chip is supposed to send out zero voltage when putting out a Low Signal.

Since the 74ls00 chip can only supply like 24mv it’s not strong enough to supply the LED to the brightness and it could hurt the chip so I put on a transistor to basically create a gate that activates when the chip sends it a High signal and routes power directly from the battery instead of through the chip.

So attached are the different revisions of the schematic and some poor quality photos of the breadboard. I’ll update with a cleaner setup, I have to put the circuit back together.