I had a Newton-esque moment of inspiration this week. Instead of an apple hitting me on the head, I burned my tongue on my morning coffee. I said to myself, if big 3 beer companies can make cans change color based on temperature, then there's no reason coffee lids can't change color when the coffee is too hot to drink! Mission defined.
So, I went to CoHo and ... ahem... borrowed some coffee lids to vacuum-form. My intent was to vacuum form a lid upside down, to mold the part of the lid that goes around the coffee mug. Looking at them, I realized they might be vacuum-formed themselves, since they're also made out of a single formed sheet of plastic.
FIRST PASS: I tried to vacuum-form one using the white material (I think it was polystyrene) but the first pass didn't go so well - the plastic ate my coffee lid!
SECOND PASS: I tried again with a plastic sheet heated for slightly less time, so it wouldn't bend as much. Basically the same thing happened. Oops.
THIRD PASS: I tried a more roboust approach: the lids from the Stanford Bookstore Cafe are somewhat stackable, so I fit a bunch (5 or so) inside each other and tried vacuum forming again.
Success! ...except the plastic material still captured the coffee lids. After about 20 minutes of cutting with poor substitutions for X-acto knives, I pulled lids out 1 at a time until I finally got all 5 of the lids out. Looking at the mold, I realized that the critical feature that holds onto the coffee cup lid didn't quite form, so I cut this feature out of one of my lids, and placed it in the bottom of the mold.
Hoping this would work, I poured in some Vytaflex 20 and taped in an embedded temperature sensor, shown below it fluorescent-lit stripey iPhone photo glory. If you look carefully you can see the ring of the coffee cup lid aound the outside border of the bottom, too:
I took home a GoGoBoard, an identical temperature sensor, and a couple of LEDs. My goal was to write a program that read the temperature and behaved accordingly:
At room temperature, LEDs off
Colder than room temp, Blue LED on (the colder the brighter)
Warmer than room temp, Red LED on (the hotter the brighter)
I found that room temp resulted in a reading of about 210, and hotter was lower.
I tried to setpower with a proportional formula something like
If sensor < 200, then setpower ((200-sensor)*25)
but the non-integer setpower commands ended up turning off the LEDs unintentionally. I also noticed that the power level changes were hard to see with LEDs so I inforporated some blinking too. I set it so that the light would be off for a short amount of time, and the more extreme the temperature, the longer the light should stay on. This produced a flicker effect.
I finally ended up with this program:
ifelse sensor1 > 220
c, on d, off
if sensor1 > 255 [setpower 2 wait 2]
if sensor1 > 290 [setpower 3 wait 3]
if sensor1 > 325 [setpower 4 wait 4]
if sensor1 > 360 [setpower 5 wait 5]
if sensor1 > 395 [setpower 6 wait 6]
if sensor1 > 430 [setpower 7 wait 7]
if sensor1 < 200
d, on c, off
if sensor1 < 170 [setpower 2 wait 2]
if sensor1 < 140 [setpower 3 wait 3]
if sensor1 < 110 [setpower 4 wait 4]
if sensor1 < 80 [setpower 5 wait 5]
if sensor1 < 50 [setpower 6 wait 6]
if sensor1 < 20 [setpower 7 wait 7]
c, off d, off
I came back to lab and pulled my new 'lid' out of the mold. To my delight, it came out great - even the modified 'cup lip' feature!
Now, it's time to:
1) cut a hole in it for drinking (and no, I have NO IDEA if it's food safe)
2) do some circuit/sensor testing!