Arduino Powered Arc Reactor Part 1/2

After receiving my Arduino UNO and playing with it for a bit I realized I needed to pick a project with a goal if I really wanted to learn how to use it. Playing around with tutorials online is fun and all but I find trying to complete a project forces me to learn and retain a lot more information.

So after learning how to make LEDs blink, photocells collect data and piezo speakers buzz (thanks Adafruit!) I set my sights on a project with a due date one month in the future. Completion date? Halloween 2010.

Enter the Arc Reactor.

This seemed like a pretty reasonable project for an Arduino newbie considering it’s really just some glowing LEDs under a shirt. Plus who doesn’t like Iron Man?

So here’s my supply list…

Supplies:

    Arduino Duemilanove (I didn’t know how hot gluing would work and didn’t want to sacrifice my UNO)
    7 5mm White LEDS
    Rectangular PCB large enough to cut into a 4 inch circle
    Hook up wire
    Length of 8 conductor wire (I used an old serial cable)
    InstaMorph Moldable Plastic
    Bread board
    Resistors (150 ohm seemed to work OK)
    Altoid tins for battery pack/arduino holder
    Hot glue
    9v battery + battery hookups
    Gold craft wire
    t-shirt with an internal pocket


After collecting everything I needed for the build I started working out the Arduino code. This could have been accomplished without the Arduino and static lighting but it’s so much cooler with animated LEDs!

The idea was to mount 6 LEDs in a ring shape around a PCB with one LED in the center. The animation sequence I came up with looks like this.

    10 Scrolling LEDs (outer 6 only)
    20 All 7 on (for 60 seconds)
    30 Pulsing LEDs (outer 6 only)
    40 All 7 on (for 60 seconds)
    50 GOTO 10


I used the pulse with modulation (PWM) digital outputs on the Arduino to control the pulsing animation. There are only 6 outputs that support PWM so only the outer ring of LEDs pulse. Here’s a quick test video of the scrolling animation (note: I didn’t have any resistors after the LEDs. I don’t recommend this, despite what some websites say my Arduino was red hot after a few minutes).

The physical build of the Arc Reactor will be in a follow up post. I’ve included the code I used to animate the LEDs below. I’m sure this could have been done in a much more elegant way but I’m new to Arduino programming and it worked.

/*
Tony Stark
Built this in a cave, with a box of scraps
TheNewHobbyist 2010
http://www.thenewhobbyist.com
*/
// Initialize Variables
int blinkCycle = 0;
int newLed[7] = {3, 5, 6, 9, 10, 11};
int i;
int fadeCycle = 0;
void setup() {         
// Nothing needed, config mode? blink all LEDs?
}
void loop() { 
if (blinkCycle == 6) { // Skip blink if t's already run 6 times
goto fade;
}
for (i = 0; i < 6; i = i + 1)  {
// Blink array in order
analogWrite(newLed[i], 255);
delay(200); // change for slower blinking
analogWrite(newLed[i], 0);
}
if (i == 6) // If finished array...
{
i = 0; // start over
blinkCycle++; // count times through loop
if (blinkCycle == 6) { // blinked x times already, LIGHT IT UP
analogWrite(newLed[0], 255);
analogWrite(newLed[1], 255);  
analogWrite(newLed[2], 255);
analogWrite(newLed[3], 255);  
analogWrite(newLed[4], 255);  
analogWrite(newLed[5], 255);    
delay (60000); // wait between animations
}
}
fade:
if (blinkCycle == 6) { 
Serial.println("DONE");
for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) {  // fade in
analogWrite(newLed[0], fadeValue);
analogWrite(newLed[1], fadeValue);  
analogWrite(newLed[2], fadeValue);
analogWrite(newLed[3], fadeValue);  
analogWrite(newLed[4], fadeValue);  
analogWrite(newLed[5], fadeValue);      
delay(30);                            
} 
for(int fadeValue = 255 ; fadeValue >= 10; fadeValue -=5) { // fade out
analogWrite(newLed[0], fadeValue);
analogWrite(newLed[1], fadeValue);  
analogWrite(newLed[2], fadeValue);
analogWrite(newLed[3], fadeValue);  
analogWrite(newLed[4], fadeValue);  
analogWrite(newLed[5], fadeValue);        
delay(30);   
}  
fadeCycle++;
if (fadeCycle == 6) { // if faded x times LIGHT IT UP
analogWrite(newLed[0], 255);
analogWrite(newLed[1], 255);  
analogWrite(newLed[2], 255);
analogWrite(newLed[3], 255);  
analogWrite(newLed[4], 255);  
analogWrite(newLed[5], 255);    
delay (60000); // pause inbetween animations
}
}
if (fadeCycle == 6) {
blinkCycle = 0; // reset
fadeCycle = 0; // reset
}
}

DIY Vanilla Extract

Recently I saw a post on Chocolate & Zucchini on making your own vanilla extract. Since this sells for nearly as much as HP printer ink at the super market I thought it would be worth looking into.

As it turns out it’s incredibly easy to make and totally worth doing. I followed this “recipe” from Chocolate & Zucchini.


Homemade Vanilla Extract
- 3 medium vanilla beans, or 1 1/2 fat ones
- 1 cup rum or vodka
...

Homemade Vanilla Extract via Chocolate & Zucchini

There really isn’t much to this. I picked up a pound of “Grade B Extract Vanilla Beans” on eBay for $20 shipped and a handle of Vodka for $17.99. As it turns out a pound of vanilla beans is an incredible amount of beans. Recipes seem to recommend anywhere from 3 to 6 beans per cup of alcohol. I used 6 and still had enough beans to make this recipe 5 or 6 times over. Something to think about when making that eBay order.

Below I’ve documented following the Chocolate & Zucchini recipe.

Sanitizing the bottle may have been overkill but I’d rather be safe than sorry. From what I’ve read online this should be “extract” by 2 months but will continue to improve in flavor for at least another 4-6 months.

Here’s what I’ve got so far after less than a week of extracting.



Looks pretty good so far!



Update: See the conclusion of this project here

Re-seasoning my cast iron skillet

I haven’t been too kind to my cast iron skillet over the years. From the looks of it (and the fact that everything put into would stick) I needed to re-season the pan.

I used a modified version of this seasoning method to “reboot” this pan.

The seasoning went pretty well, though the pan had some oil left in it after 2 hours of baking. The oil dried sticky which didn’t seem right. I threw it back on a burner, heated up the pan and gave it a wipe with paper towel and all seems well now.

First 3D head projection test

Receiving boxes from eBay is always a little bit like Christmas for me. My head was delivered over the weekend!

Whats in the boooooox!?
Nice to see you too

I’m using this YouTube video to calibrate and adjust my projector settings.

It went really well. So well in fact that I think I”m going to use a video including 4 of the five heads of the Haunted Mansion as the looping video on my porch for Halloween this year. I’ve got the following to do before 10/31.

  • Order 3 more styrofoam heads
  • Build something to secure heads in place (2×6 and some dowel rods?)
  • Make/buy a black fabric table cloth to cover the table used to hold the heads
  • Build a box to contain the projector and protect it from weather/curious hands
  • Figure out a speaker setup so people can actually hear the heads singing
  • Measure throw distance for the projector
  • Re-encode video to project at the correct size based on installation distance

Next weekend I’m going to attempt to measure out my installation site so I can adjust the video and projector distance accordingly. I imagine this is going to be the tricky part with lots of video resizing and re-encoding.

Below is a video of my single head test, looks pretty good!




Mirrored projection is awesome

My styrofoam head(s) haven’t arrived yet but my projector is out and ready to be played with. While hooking up the projector I unintentionally pointed it at a mirror mounted in my office. Turns out projecting on a mirror is a really cool effect!

The only problem I found was that you’re much more likely to get blinded by the projector (duh) looking at it like this. Though it does bounce a nice reflection. I’m thinking that might be useful when it comes time to setup the projector for Halloween. I’d rather not leave it out in the open projecting on the heads. A long mirror opposite the projector might solve this.

Spooky see-through projection
Projected reflection on the ceiling