<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Principia Labs &#187; projects</title>
	<atom:link href="http://principialabs.com/tag/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://principialabs.com</link>
	<description>design, build, test, iterate.</description>
	<lastBuildDate>Sun, 28 Mar 2010 16:38:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Building Boarduino</title>
		<link>http://principialabs.com/building-boarduino/</link>
		<comments>http://principialabs.com/building-boarduino/#comments</comments>
		<pubDate>Sat, 26 Apr 2008 18:05:33 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[adafruit]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://principialabs.com/?p=90</guid>
		<description><![CDATA[I recently soldered up a Boarduino from Adafruit Industries. Boarduino is simply an Arduino clone with a smaller form factor, designed to plug directly into a breadboard rather than giving you the female headers of the original. I thought I&#8217;d post a few photos of the process. I really like the idea of the Boarduino, [...]]]></description>
			<content:encoded><![CDATA[<p>I recently soldered up a Boarduino from <a href="http://adafruit.com/">Adafruit Industries</a>.  Boarduino is simply an <a href="http://arduino.cc/">Arduino</a> clone with a smaller form factor, designed to plug directly into a breadboard rather than giving you the female headers of the original.  I thought I&#8217;d post a few photos of the process.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2422080500/" title="Adafruit Boarduino by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2181/2422080500_cb4a1f1114.jpg" width="500" height="375" alt="Adafruit Boarduino" /></a>
</div>

<p>I really like the idea of the Boarduino, because I found I was doing almost all of my prototyping on a  breadboard, and it seemed like I was always trying to figure out new and different <a href="/wp-content/uploads/arduino-breadboard.jpg">ways to anchor</a> the big Arduino down.</p>

<p><span id="more-53"></span></p>

<p>To get the size down, Boarduino makes a couple of design changes, most notably the elimination of the female headers on the top of the board, in exchange for the male headers on the bottom, which then plug directly into a breadboard, rather than having a rat&#8217;s nest of jumper wires running from the Arduino to the board.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2422080506/" title="Arduino NG and Boarduino by aerocapture, on Flickr"><img src="http://farm4.static.flickr.com/3281/2422080506_c9b9240048.jpg" width="500" height="375" alt="Arduino NG and Boarduino" /></a>
</div>

<p>Boarduino also eliminates the USB port and the associated USB chip, much like the <a href="http://www.arduino.cc/en/Main/ArduinoBoardMini">Arduino Mini</a>.  Instead, to program the board you need either a <a href="http://www.adafruit.com/index.php?main_page=product_info&amp;cPath=19&amp;products_id=70">USB-TTL cable</a>, which plugs into the six-pin header at the end of the board, or an FTDI breakout board like the <a href="http://www.arduino.cc/en/Main/MiniUSB">MiniUSB</a>.</p>

<p>Both the Arduino Mini and Boarduino are designed to plug into a breadboard.  The main difference between the two is that the Mini uses a permanently-soldered surface-mount chip, whereas the Boarduino uses a 28-pin socket and <acronym title="Dual Inline Package">DIP</acronym> chip, so if you blow one, you just spend six bucks and <a href="http://www.adafruit.com/index.php?main_page=product_info&amp;cPath=19&amp;products_id=56">pop in a new one</a>, rather than buying a whole new Mini.  In addition, the Arduino Mini lacks Boarduino&#8217;s 9V barrel jack and voltage regulator, so you have to design that circuit yourself.  Plus, the Boarduino is simply cooler because you get to <em>build</em> it yourself!</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2419682593/" title="The Lab by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2115/2419682593_16886f4944.jpg" width="500" height="375" alt="The Lab" /></a>
</div>

<p>The first step is getting your work area all set up, as shown in the image above.  (The WES51 really ties the room together does it not?)</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2419680469/" title="Boarduino Solder Joints by aerocapture, on Flickr"><img src="http://farm4.static.flickr.com/3192/2419680469_b485dbd90d.jpg" width="500" height="367" alt="Boarduino Solder Joints" /></a>
</div>

<p>Check out the great solder joints done by the WES51.  I used a small, stiff watercolor paintbrush and isopropyl alcohol to clean the rosin flux off the board and joints after soldering, leaving a nice, clean-looking board.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2420495394/" title="&amp;quot;Yeah, it lights up.&amp;quot; by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2105/2420495394_d46d4d5b67.jpg" width="500" height="391" alt="&amp;quot;Yeah, it lights up.&amp;quot;" /></a>
</div>

<p style="text-align: center;">Power supply finished and tested, in this case with the USB-TTL cable.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2422030032/" title="16 MHz Ceramic Oscillator by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2348/2422030032_925ddeac79.jpg" width="500" height="375" alt="16 MHz Ceramic Oscillator" /></a>
</div>

<p style="text-align: center;">Note that the Boarduino uses a 16MHz <i>ceramic</i> oscillator rather than a crystal.  This is slightly less accurate, but only on a nanosecond scale, and not relevant for most projects.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2422030058/" title="Time for the Socket by aerocapture, on Flickr"><img src="http://farm4.static.flickr.com/3234/2422030058_0a1ba4bf0c.jpg" width="500" height="375" alt="Time for the Socket" /></a>
</div>

<p style="text-align: center;">Ready to install the 28-pin socket.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2421249267/" title="Headers Soldered by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2256/2421249267_499b9889c4.jpg" width="500" height="375" alt="Headers Soldered" /></a>
</div>

<p style="text-align: center;">Socket and headers soldered in.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2421249271/" title="The ATmega168 Microcontroller by aerocapture, on Flickr"><img src="http://farm4.static.flickr.com/3148/2421249271_a1ebf0eede.jpg" width="500" height="375" alt="The ATmega168 Microcontroller" /></a>
</div>

<p style="text-align: center;">Behold the AVR ATmega168 microcontroller.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2421249275/" title="Inserting the ATmega168 by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2239/2421249275_b7e2d6d7dc.jpg" width="500" height="375" alt="Inserting the ATmega168" /></a>
</div>

<p style="text-align: center;">Inserting the ATmega168.</p>

<div style="text-align: center;">
<a href="http://www.flickr.com/photos/aerocapture/2422080494/" title="Power and USB FTDI Applied by aerocapture, on Flickr"><img src="http://farm3.static.flickr.com/2260/2422080494_28c0b47a92.jpg" width="500" height="375" alt="Power and USB FTDI Applied" /></a>
</div>

<p style="text-align: center;">Boarduino completed, powered up and ready to go.</p>

<p>Can&#8217;t get enough of those close-up solder pix?  Check out <a href="http://flickr.com/photos/aerocapture/tags/boarduino/">the rest of my Boarduino photos</a> on Flickr.</p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/building-boarduino/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Joystick Control of a Servo</title>
		<link>http://principialabs.com/joystick-control-of-a-servo/</link>
		<comments>http://principialabs.com/joystick-control-of-a-servo/#comments</comments>
		<pubDate>Thu, 27 Dec 2007 18:46:11 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[servo]]></category>

		<guid isPermaLink="false">http://principialabs.com/joystick-control-of-a-servo/</guid>
		<description><![CDATA[UPDATE: Please read Arduino-Python 4-Axis Servo Control for the most current anddetailed information on using a USB joystick to control one or more RC servos. Inspired by Armadillo Aerospace and their laptop-controlled Pixel rocket, I decided to figure out how to use an Arduino module to achieve wireless remote control of a flight vehicle. Along [...]]]></description>
			<content:encoded><![CDATA[<div class="help" style="margin: 10px 6px 24px 6px; text-align: center;"><strong>UPDATE:</strong>  Please read <a href="http://principialabs.com/arduino-python-4-axis-servo-control/">Arduino-Python 4-Axis Servo Control</a> for the most current and<br />detailed information on using a USB joystick to control one or more RC servos.</div>

<div class="video">
<embed src="http://blip.tv/play/wkeilE8A" type="application/x-shockwave-flash" width="380" height="300" allowscriptaccess="always" allowfullscreen="true"></embed>
</div>

<p>Inspired by Armadillo Aerospace and their laptop-controlled <a href="http://media.armadilloaerospace.com/wallpapers/PixelFlightWallpaper1.jpg">Pixel rocket</a>, I decided to figure out how to use an Arduino module to achieve wireless remote control of a flight vehicle.</p>

<p>Along the path to development, an achievable intermediate goal would be something like a wireless RC rover with a video camera, monitored and controlled with a laptop and joystick on a WiFi network.</p>

<p>Step one in the process is simple joystick control of a servo over a USB connection.  This project builds upon the process documented in &#8220;<a href="/arduino-serial-servo-control">Arduino Serial Servo Control</a>.&#8221;  I welcome any comments or suggestions for improving or adapting this code.</p>

<p><span id="more-43"></span></p>

<p><strong>Hardware</strong></p>

<p>The hardware setup is very simple, and is described in detail in the serial-servo article.  The <a href="http://www.google.com/products?q=jr+sport+st47+standard+servo">JR Sport ST47 standard servo</a> is wired directly to Arduino&#8217;s 5V power and ground, and the servo&#8217;s control wire is connected to Digital pin #2.  The Arduino module is connected to a PC (running Linux in our case) with a USB cable, and a standard USB joystick is also connected.</p>

<p><strong>Software</strong></p>

<p>The simple two-layer software stack includes a Python script for interpreting inputs from the joystick, and the Arduino sketch to await serial inputs from the Python script and pulse the servo.</p>

<p>Let&#8217;s start with the Python script.  This code lives on the PC, and requires the <a href="http://pyserial.sourceforge.net/">pyserial</a> and <a href="http://www.pygame.org/">pygame</a> modules to be installed, along with (obviously) Python&#8217;s standard library.  The <code>pygame</code> module is primarily designed for graphics game creation, but it has a set of very straightforward methods for interpreting joysticks and other non-standard input devices.  The <code>pyserial</code> module simply allows us to open a serial connection to the Arduino over a USB port.</p>

<p>The primary purpose of the Python script is to read and report on joystick inputs.  A gaming joystick may have six different axes and a multitude of buttons.  This script will sense inputs from each axis, and (if enabled) print the values of the stick positions.</p>

<p>Each joystick axis reports a range of decimal values between -1.0 and 1.0, with zero being the center position.  This script converts those values (from the X-axis) into round numbers between zero and 180 and assigns that value as a servo position.  Since the servo can travel through 180 degrees, each servo position value increments the servo horn by one degree, with the center at 90 degrees.  The integers 0-180 are then converted to ASCII characters and sent over the serial connection to the Arduino.</p>

<pre name="code" class="python">
#!/usr/bin/env python
#
# joystick-servo.py
#
# created 19 December 2007
# copyleft 2007 Brian D. Wendt
# http://principialabs.com/
#
# code adapted from:
# http://svn.lee.org/swarm/trunk/mothernode/python/multijoy.py
#
# NOTE: This script requires the following Python modules:
#  pyserial - http://pyserial.sourceforge.net/
#  pygame   - http://www.pygame.org/
# Win32 users may also need:
#  pywin32  - http://sourceforge.net/projects/pywin32/
#

import serial
import pygame

# allow multiple joysticks
joy = []

# Arduino USB port address (try "COM5" on Win32)
usbport = "/dev/ttyUSB0"

# define usb serial connection to Arduino
ser = serial.Serial(usbport, 9600)

# handle joystick event
def handleJoyEvent(e):
    if e.type == pygame.JOYAXISMOTION:
        axis = "unknown"
        if (e.dict['axis'] == 0):
            axis = "X"

        if (e.dict['axis'] == 1):
            axis = "Y"

        if (e.dict['axis'] == 2):
            axis = "Throttle"

        if (e.dict['axis'] == 3):
            axis = "Z"

        if (axis != "unknown"):
            str = "Axis: %s; Value: %f" % (axis, e.dict['value'])
            # uncomment to debug
            #output(str, e.dict['joy'])

            # Arduino joystick-servo hack
            if (axis == "X"):
                pos = e.dict['value']
                # convert joystick position to servo increment, 0-180
                move = round(pos * 90, 0)
                if (move < 0):
                    servo = int(90 - abs(move))
                else:
                    servo = int(move + 90)
                # convert position to ASCII character
                servoPosition = chr(servo)
                # and send to Arduino over serial connection
                ser.write(servoPosition)
                # uncomment to debug
                #print servo, servoPosition

    elif e.type == pygame.JOYBUTTONDOWN:
        str = "Button: %d" % (e.dict['button'])
        # uncomment to debug
        #output(str, e.dict['joy'])
        # Button 0 (trigger) to quit
        if (e.dict['button'] == 0):
            print "Bye!\n"
            ser.close()
            quit()
    else:
        pass

# print the joystick position
def output(line, stick):
    print "Joystick: %d; %s" % (stick, line)

# wait for joystick input
def joystickControl():
    while True:
        e = pygame.event.wait()
        if (e.type == pygame.JOYAXISMOTION or e.type == pygame.JOYBUTTONDOWN):
            handleJoyEvent(e)

# main method
def main():
    # initialize pygame
    pygame.joystick.init()
    pygame.display.init()
    if not pygame.joystick.get_count():
        print "\nPlease connect a joystick and run again.\n"
        quit()
    print "\n%d joystick(s) detected." % pygame.joystick.get_count()
    for i in range(pygame.joystick.get_count()):
        myjoy = pygame.joystick.Joystick(i)
        myjoy.init()
        joy.append(myjoy)
        print "Joystick %d: " % (i) + joy[i].get_name()
    print "Depress trigger (button 0) to quit.\n"

    # run joystick listener loop
    joystickControl()

# allow use as a module or standalone script
if __name__ == "__main__":
    main()
</pre>

<p>Now for the Arduino sketch.  This code merely waits for serial input from the PC, does a little math on the decimal values of the transmitted ASCII characters, then pulses the servo to the corresponding position.  If no new serial input is received from the PC (i.e., the joystick is not moved), then the Arduino will maintain the last known position of the servo horn with an identical pulsewidth every 20ms.  As always, the minPulse and maxPulse values should be tweaked to work with your particular servo model.</p>

<pre name="code" class="arduino">
/*
 * JoystickSerialServo
 * --------------
 * Servo control with a PC and Joystick
 *
 * Created 19 December 2007
 * copyleft 2007 Brian D. Wendt
 * http://principialabs.com/
 *
 * Adapted from code by Tom Igoe
 * http://itp.nyu.edu/physcomp/Labs/Servo
 */

/** Adjust these values for your servo and setup, if necessary **/
int servoPin     =  2;    // control pin for servo motor
int minPulse     =  600;  // minimum servo position
int maxPulse     =  2400; // maximum servo position
int refreshTime  =  20;   // time (ms) between pulses (50Hz)

/** The Arduino will calculate these values for you **/
int centerServo;         // center servo position
int pulseWidth;          // servo pulse width
int servoPosition;       // commanded servo position, 0-180 degrees
int pulseRange;          // max pulse - min pulse
long lastPulse   = 0;    // recorded time (ms) of the last pulse


void setup() {
  pinMode(servoPin, OUTPUT);  // Set servo pin as an output pin
  pulseRange  = maxPulse - minPulse;
  centerServo = maxPulse - ((pulseRange)/2);
  pulseWidth  = centerServo;   // Give the servo a starting point (or it floats)
  Serial.begin(9600);
}

void loop() {
  // wait for serial input
  if (Serial.available() > 0) {
    // read the incoming byte:
    servoPosition = Serial.read();

    // compute pulseWidth from servoPosition
    pulseWidth = minPulse + (servoPosition * (pulseRange/180));

    // stop servo pulse at min and max
    if (pulseWidth > maxPulse) { pulseWidth = maxPulse; }
    if (pulseWidth < minPulse) { pulseWidth = minPulse; }

    // debug
    //Serial.println(servoPosition);
  }

  // pulse the servo every 20 ms (refreshTime) with current pulseWidth
  // this will hold the servo's position if unchanged, or move it if changed
  if (millis() - lastPulse >= refreshTime) {
    digitalWrite(servoPin, HIGH);   // start the pulse
    delayMicroseconds(pulseWidth);  // pulse width
    digitalWrite(servoPin, LOW);    // stop the pulse
    lastPulse = millis();           // save the time of the last pulse
  }
}
</pre>

<p>This may not be the most elegant solution to the joystick servo control problem, but it does serve as a nice "Hello Servo" project, to let you see what's going on at the lower levels of input and output.</p>

<p>The next step in the process is to remove the USB cable to the Arduino, and control the servo by sending serial data over a WiFi or <a href="http://en.wikipedia.org/wiki/ZigBee">ZigBee</a> network.  Also, for a real remote robotics project, the code will need to be modified so that each joystick axis controls a separate servo, e.g. pitch, roll, yaw, and throttle.  Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/joystick-control-of-a-servo/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Arduino Pulse Width Modulation</title>
		<link>http://principialabs.com/arduino-pulse-width-modulation/</link>
		<comments>http://principialabs.com/arduino-pulse-width-modulation/#comments</comments>
		<pubDate>Sat, 08 Dec 2007 18:31:10 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[pwm]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://principialabs.com/arduino-pulse-width-modulation/</guid>
		<description><![CDATA[The digital pins on the Arduino board can be set (with code) to output either HIGH (5V) or LOW (0V) &#8212; essentially ON or OFF. This is great for applications like blinking LEDs or activating relays. But what if we wanted an output voltage somewhere in between 0V and 5V? This might be useful in [...]]]></description>
			<content:encoded><![CDATA[<div class="video">
<embed src="http://blip.tv/play/wkegzGEA" type="application/x-shockwave-flash" width="380" height="300" allowscriptaccess="always" allowfullscreen="true"></embed>
</div>

<p>The digital pins on the Arduino board can be set (with code) to output either HIGH (5V) or LOW (0V) &#8212; essentially ON or OFF.  This is great for applications like blinking LEDs or activating relays.</p>

<p>But what if we wanted an output voltage somewhere <em>in between</em> 0V and 5V?  This might be useful in applications like controlling the speed of a DC motor, or &#8220;dimming&#8221; an LED.</p>

<p>Well, the digital pins cannot directly produce an analog voltage; as we&#8217;ve said, they&#8217;re either HIGH or LOW.  But it turns out we can <em>simulate</em> these &#8220;in-between&#8221; voltages using a technique called Pulse Width Modulation, or PWM.</p>

<p><span id="more-40"></span></p>

<p>First off, <em>don&#8217;t panic</em>.  PWM sounds complicated, but as we&#8217;ll see, the concept is very simple, and the implementation is even easier, especially on the Arduino.</p>

<p>Let&#8217;s say we want to make an LED shine with half of its normal intensity when supplied with 5 volts.  Since we can&#8217;t use the Arduino&#8217;s digital pins to <em>directly</em> supply 2.5V, we&#8217;ll &#8220;pulse&#8221; the output pin on and off &#8212; really fast.  You may have noticed this effect when you played with the Arduino&#8217;s &#8220;Blink&#8221; sketch.  If you blink an LED fast enough &#8212; that is, if the delay between blinks is <em>short enough</em> &#8212; the LED will appear to be lit continuously, but just a little bit dimmer than it was originally.</p>

<p>It&#8217;s easy to visualize this concept using the graphs below.  When you plot voltage over time, you can see that the pin is pulsing between HIGH and LOW at regular intervals.  Since this on-off pulsing is happening so quickly, the connected LED will &#8220;see&#8221; the result as a 50% reduction in the normal voltage (in this example), and will glow at roughly half its normal intensity.</p>

<div style="text-align: center;"><img src="/files/pwm-graph1.gif" alt="PWM graph" /><br /><small>Image credit: <a href="http://www.tigoe.net/pcomp/analogout.shtml" alt="">Tom Igoe</a></small></div>

<p>We can vary the output voltage percentage (the &#8220;effective voltage&#8221;) by regulating &#8212; or &#8220;modulating&#8221; &#8212; the width of the pulse.  For example, if we make the HIGH pulse 25% as &#8220;wide&#8221; (in time) as the LOW pulse, the LED will appear to glow with 25% intensity.</p>

<div style="text-align: center;"><img src="/files/pwm-graph2.gif" alt="PWM graph" /><br /><small>Image credit: <a href="http://www.tigoe.net/pcomp/analogout.shtml" alt="">Tom Igoe</a></small></div>

<p>&#8220;Okay, great,&#8221; you&#8217;re saying, &#8220;But how do I do this on the Arduino?&#8221;  Well, there are a couple of ways.  First, you could write a sketch that blinks the LED between HIGH and LOW really fast, as we discussed above.  However, this approach requires the full attention of the Arduino all the time; that is, if you want the Arduino to do anything else, you&#8217;ll be interrupting the pulse loop.</p>

<p>Luckily, the Arduino designers have already solved this problem for us with three dedicated pins and the <code>analogWrite()</code> command.</p>

<p>Notice on the Arduino board there are three digital pins (9-11) which are labeled PWM.  Devices (like LEDs) connected to these pins can employ continuous pulse width modulation using only the <code>analogWrite()</code> command like so:</p>

<pre name="code" class="arduino">
/*
 * A simple PWM example
 */

int pin         =  11;     // LED connected to PWM pin 11
int pulsewidth  =  127;    // Any value between 0 and 255

void setup() {
  // None required for analogWrite!
}

void loop() {
  analogWrite(pin, pulsewidth);
}
</pre>

<p>The example above should cause the connected LED to glow at about 50% intensity (255/2 = 127ish).  Play around with the value of the <code>pulsewidth</code> variable and note the changes in LED brightness.</p>

<p>Now, let&#8217;s take this concept one step further.  What if we <em>varied</em> the effective voltage to the LED over time?  If we could devise a way to &#8220;fade&#8221; the <code>pulsewidth</code> from zero to 255 and back again, then the LED would pulsate, as in the video above.  Here&#8217;s the code for that, using three LEDs this time, connected to pins 9-11:</p>

<pre name="code" class="arduino">
/*
 * Pulsating LEDs with Pulse Width Modulation
 */

int green   = 11;            // Digital pin 11 - Green LED
int red     = 10;            // Digital pin 10 - Red LED
int blue    = 9;             // Digital pin 9  - Blue LED
int time    = 5;             // define delay element
int pulsewidth;              // define pulsewidth (0-255)

void setup() {
  // None required for analogWrite!
}

void loop() {
  // slowly fade the LEDs to full brightness
  for (pulsewidth=0; pulsewidth <= 255; pulsewidth++){
    analogWrite(green, pulsewidth);
    analogWrite(red, pulsewidth);
    analogWrite(blue, pulsewidth);
    delay(time);
  }
  // slowly dim the LEDs
  for (pulsewidth=255; pulsewidth >= 0; pulsewidth--){
    analogWrite(green, pulsewidth);
    analogWrite(red, pulsewidth);
    analogWrite(blue, pulsewidth);
    delay(time);
  }
}
</pre>

<p>Cool, huh?</p>

<p><strong>References</strong></p>

<ol>
<li>Tom Igoe, &#8220;<a href="http://www.tigoe.net/pcomp/analogout.shtml">Analog Output</a>&#8220;</li>
<li>Sebastian Tomczak, &#8220;<a href="http://little-scale.blogspot.com/2007/09/pwm-and-you-quick-primer.html">PWM and You: A Quick Primer</a>&#8220;</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/arduino-pulse-width-modulation/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Building a Liquid-Fuel Rocket Engine</title>
		<link>http://principialabs.com/building-a-liquid-fuel-rocket-engine/</link>
		<comments>http://principialabs.com/building-a-liquid-fuel-rocket-engine/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 20:06:19 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[rocketry]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://principialabs.com/building-a-liquid-fuel-rocket-engine/</guid>
		<description><![CDATA[Building a liquid-propellant rocket engine is pretty much the pinnacle of amateur engineering projects. The 1967 book How to Design, Build and Test Small Liquid-Fuel Rocket Engines can be read online, or you can download the entire file in zip format. From the introduction: The purpose of this publication is to provide the serious amateur [...]]]></description>
			<content:encoded><![CDATA[<p>Building a liquid-propellant rocket engine is pretty much the pinnacle of amateur engineering projects.</p>

<p>The 1967 book <a href="http://www.risacher.org/rocket/">How to Design, Build and Test Small Liquid-Fuel Rocket Engines</a> can be read online, or you can download the entire file in <a href="/pdf/rocket.zip">zip</a> format.</p>

<p>From the introduction:</p>

<blockquote>
  <p>The purpose of this publication is to provide the serious amateur builder with design information, fabrication procedures, test equipment requirements, and safe operating procedures for small liquid-fuel rocket engines.</p>
</blockquote>

<p><span id="more-23"></span></p>

<p>Also, don&#8217;t forget the bible:</p>

<p><a href="http://www.amazon.com/gp/product/0471326429/"><img src="/images/rpe.jpg" alt="Rocket Propulsion Elements" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/building-a-liquid-fuel-rocket-engine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wave Bubble Cellphone Jammer</title>
		<link>http://principialabs.com/wave-bubble-cellphone-jammer/</link>
		<comments>http://principialabs.com/wave-bubble-cellphone-jammer/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 19:50:57 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[adafruit]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[wave bubble]]></category>

		<guid isPermaLink="false">http://principialabs.com/wave-bubble-cellphone-jammer/</guid>
		<description><![CDATA[MAKE Blog pointed me to this extremely cool project called a Wave Bubble. Essentially, this device is a portable, battery-powered radio frequency jammer, that will effectively disable cellphone and other RF communication (RFID, GPS, WiFi) within about a 2-meter radius of the user. The design of the Wave Bubble comes from an MIT EE/CS masters [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.makezine.com/blog/archive/2006/12/wave_bubble_ope.html">MAKE Blog</a> pointed me to this extremely cool project called a Wave Bubble.  Essentially, this device is a portable, battery-powered radio frequency jammer, that will effectively disable cellphone and other RF communication (RFID, GPS, WiFi) within about a 2-meter radius of the user.</p>

<p>The design of the Wave Bubble comes from an MIT EE/CS masters thesis entitled &#8220;<a href="http://www.ladyada.net/pub/research.html">Social Defense Mechanisms: Tools for Reclaiming our Personal Space</a>,&#8221; in which the author describes the tradition of designing and using electronic devices as social commentary, known as &#8220;Design Noir.&#8221;</p>

<p>In addition to providing a detailed description and circuit diagrams for builing the Wave Bubble, the thesis is also rife with intelligent commentary on the psycho-social implications of using electronic products  and is quite an enjoyable read.</p>

<p>From the thesis:</p>

<blockquote>
  <p>Manufacture and use of Wave Bubble is not exempt from FCC regulations.  Anyone who decides to build and use it is performing an act of civil disobedience.</p>
</blockquote>

<p>I love it!  More information and some great photos are available at <a href="http://www.ladyada.net/make/wavebubble/index.html">ladyada.net</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/wave-bubble-cellphone-jammer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Electronic Launch Control System</title>
		<link>http://principialabs.com/electronic-launch-control-system/</link>
		<comments>http://principialabs.com/electronic-launch-control-system/#comments</comments>
		<pubDate>Fri, 12 Oct 2007 23:02:06 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[rocketry]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://principialabs.com/electronic-launch-control-system/</guid>
		<description><![CDATA[New: Check out the circuit schematics and parts list forbuilding your own LC-3 model rocket launch controller The simplest model rocket launch controller is the Estes Electron Beam, which is powered by four AA batteries and comes with 17 feet of launch wire and micro clips for attaching an Estes igniter. This system is adequate [...]]]></description>
			<content:encoded><![CDATA[<div class="new"><b>New:</b> <em>Check out the <a href="/electronic-launch-control-system/#schematics">circuit schematics and parts list</a> for<br />building your own LC-3 model rocket launch controller</em></div>

<p>The simplest model rocket launch controller is the <a href="http://www.google.com/search?q=Estes+Electron+Beam">Estes Electron Beam</a>, which is powered by four AA batteries and comes with 17 feet of launch wire and micro clips for attaching an Estes igniter.  This system is adequate for launching small models with a single black powder motor.  However, for firing a cluster of motors, or for igniting composites, a battery with more amps is required.  In addition, spectators of high-power launches will
need to be farther away from the launch pad than 17 feet.  Unfortunately, electrical resistance in a long launch wire negates some of the advantages of using a larger battery.  This problem can be solved by using a relay switch located near the launch pad, allowing the main battery to sit as close to the motor igniters as possible, while the launch controller remains at a safe distance.</p>

<p><b>The LC-3 Electronic Relay</b></p>

<p>The LC-3 is the third iteration of Principia&#8217;s electronic Launch Control system. It is based on a <a href="http://www.info-central.org/support_relaylauncher.shtml">similar design</a> by Eric Ohmit, but differs primarily in that the controller is powered independently of the
main battery.  The full system (pictured below, left) consists of a Control Box,
a Relay Box, a pair of connector cables to the battery and the igniters,
<a href="http://www.info-central.org/support_clipwhip.shtml">clip whips</a>
for multiple igniters, and 100 feet of RJ-11
(telephone) cord to connect the control box with the relay. [Click any photo to enlarge.]
</p>

<div style="text-align: center;">
<a href="/images/full_system_lg.jpg" >
<img src="/images/full_system_sm.jpg" alt="Full System" title="Click to enlarge"
style="border: none;" /></a>
<a href="/images/lc3_lg.jpg" >
<img src="/images/lc3_sm.jpg" alt="LC-3" title="Click to enlarge"
style="border: none;" /></a>
</div>

<p>The <b>Control Box</b> (pictured above, right) incorporates a key-operated arm/safe switch, which ensures that
only the designated range safety officer (RSO) can initiate a launch. In addition,
the control box provides a green LED continuity indication, which tells the operator
that the circuit is complete and that the battery and igniters have been properly
connected.  Continuity is confirmed by flipping the red &#8220;Continuity&#8221; switch to the
&#8216;on&#8217; position and noting the illumination of the green LED.  The LC-3 is then armed with the key switch, which causes the red &#8220;Arm&#8221; LED to light, and a high-pitched piezo buzzer will sound, indicating to all spectators that the rocket is ready to fire.
When both the green &#8220;Continuity&#8221; LED and the red &#8220;Arm&#8221; LED are illuminated, the red &#8220;Launch&#8221;
button will become active and also illuminate, and the relay can then be engaged
by depressing the button. If all goes well, the motor will light and the rocket
will launch.</p>

<p><span id="more-20"></span></p>

<div style="text-align: center;">
<a href="/images/relay_box_lg.jpg" >
<img src="/images/relay_box_sm.jpg" alt="Relay Box" title="Click to enlarge" style="border: none;" /></a>
<a href="/images/clip_whips_lg.jpg" >
<img src="/images/clip_whips_sm.jpg" alt="Relay Box" title="Click to enlarge" style="border: none;" /></a>
</div>

<p>The <b>Relay Box</b> (pictured above, left) is the heart of the LC-3 system.
On the front of the box is the RJ-11 port, which connects the relay to the Control
Box via the 100&#8242; telephone cable.  The left end contains a removable (and therefore
easily replaceable) 20A fuse, which protects the circuits from overload in the event that
the igniter does not fire once the relay is activated. The top of the Relay Box
has clearly-labeled banana jacks for connecting the cables to the 12V battery and
the igniters.</p>

<p>A set of <b>Clip Whips</b> (pictured above, right) allows the LC-3 to be connected
to up to four igniters simultaneously.  Each pair of copper micro-alligator clips
is color-coded for ease of use, and all four pairs return to one pair of conducting
connectors, which are then clipped to the LC-3 igniter cable. Wire for the
battery cables, igniter cables and clip whips is highly conductive copper &#8220;monster
cable&#8221; speaker wire.</p>

<p><b>Building the LC-3</b></p>

<p>Designing and constructing your own launch control system is a fun and
rewarding project that requires only a few inexpensive and readily-available parts,
and will teach you a great deal about electronics and circuits.  Natural follow-ons
to this type of project include building
<a href="http://arduino.cc/">microcontroller</a>
applications, printed circuit board design, and robotics.</p>

<div style="text-align: center;">
<a href="/images/relay_inside_lg.jpg" >
<img src="/images/relay_inside_sm.jpg" alt="Relay Box Inside" title="Click to enlarge" style="border: none;" /></a>
<a href="/images/lc3_inside_lg.jpg" >
<img src="/images/lc3_inside_sm.jpg" alt="Relay Box" title="Click to enlarge" style="border: none;" /></a>
</div>

<p>The <b>inside of the Relay Box</b> (pictured above, left) may seem crowded, but has only
four components. The first and most important is a simple 12V automotive electro-mechanical
relay, which is fixed in the lower left corner of the metal enclosure with
epoxy. (You can see the eight metal terminals sticking out of the top.)
A relay is simply a switch which can be activated remotely by applying a
voltage to it.  (Note the wiring diagram for the relay tacked to the underside
of the enclosure lid.)  In our case, the Control Box sends 12V of current (provided
by eight AA batteries) out to the relay, which causes the relay switch to close, completing
the circuit between a big 12V motorcycle battery (which we have out at the launch
pad) and the rocket motor igniters.  The other three components in the Relay Box
are (1) the piezo buzzer (black, circular, upper left); (2) the RJ-11 jack (off-white with
four screw terminals, center), and; (3) the fuse holder (black, upper right).  All
components, including the relay, can be purchased at any Radio Shack for just a few
bucks.
</p>

<p>The <b>inside of the Control Box</b> (pictured above, right) is fairly clean in
comparison (other than the abysmal soldering job), with the AA battery pack
taking up most of the room. This photo provides a better view of the RJ-11
terminal, which has been epoxied to the side of the enclosure.  The rectangular
holes for the RJ-11 jacks were cut in both boxes by first drilling and then finishing
with microsaws and files, available at any hobby shop. Note that the key switch
had to be epoxied to the back of the faceplate to keep the housing from rotating
when the key is turned.  All components for a similar control box are available
at Radio Shack, although more interesting switches, buttons and enclosures can be
had online through vendors such as
<a href="http://www.digikey.com/">Digi-Key</a>,
<a href="http://www.alliedelec.com/">Allied</a>,
and others.

</p>

<p><b>Designing the Circuits</b></p>

<p>An <a href="/images/launcher_schematic.gif" >electrical schematic</a>
for a relay controller similar to the LC-3 as well as tutorials for building basic
and multipad launch controllers can be found in the
<a href="http://www.info-central.org/infocentral.shtml">INFOcentral section of Rocketry Online</a>. [View a reference for reading
<a href="http://www.kpsec.freeuk.com/symbol.htm">circuit symbols</a>
and circuit diagrams.]
Note on the schematic that the wires labeled 1-4, which travel between the Control
Box and the Relay Box, are all contained in a single RJ-11 telephone cable, which
has four separate wires/channels inside.  The schematic only shows one 12V power
source, while the LC-3 uses two separate sources, one inside the Control Box (the
eight AAs), and one connected to the Relay Box (the motorcycle battery).  It would
be possible to use just the single big 12V, but this would require two extra channels
in the 100&#8242; launch wire, and may result in &#8220;relay buzz&#8221; when the Launch button is
depressed.  Relay buzz is caused by the relay switch opening and closing rapidly
as the Launch button is held closed.
</p>

<p><p>
Bear in mind that the ohm values of the resistors are very important in this type
of design, as it is the resistance in the circuit that keeps the igniter from firing
before the relay is actuated.  You&#8217;ll notice that there is a <i>complete circuit</i> from
the big 12V, through the green continuity LEDs (in the relay box and the control box),
through the 4.7k resistor, and out to the igniter, with the relay in its &#8216;open&#8217;
condition.  This is how the continuity of the circuit is confirmed.  When the relay
closes, the current from the big 12V simply <i>bypasses</i> the two green LEDs
and the resistor, and is sent unhindered to the igniters.  Without sufficient
resistance values, the igniter would fire as soon as it&#8217;s connected.</p>

<p></p>
<p>
This design incorporates a safety test button in the relay box, a feature
which ensures that the relay is actually open before you connect the igniter.
The LC-3 does not have this safety button, but it is a good idea, since consistently
creating an electrical short with a big motorcycle battery (which is what you&#8217;re
doing when you send current to the igniter) is a great way to fuse a relay into
the closed position.  The 20A fuse in the LC-3 is designed to blow before this
happens, but it&#8217;s nice to have confirmation before you connect the hot clips to a
loaded composite rocket motor.</p></p>

<p><a name="schematics"></a>
<b>LC-3 Circuit Schematics</b></p>

<p><em>[UPDATE: 3/15/2008]</em> For those who would like to build the LC-3 exactly as originally designed, I&#8217;ve posted the schematics and a nearly-complete parts list below.  I&#8217;ve made my best effort to label the components on the schematics with the specific part numbers from the list below.  Substitutions can be made, of course, but bear in mind the importance of resistor values  &#8212; especially in the igniter continuity circuit.  For simplicity&#8217;s sake, the Dialight 12V panel-mount LEDs I&#8217;ve included here have built-in current-limiting resistors.  However, you should always use a multimeter to test actual Ohm values in the complete circuit before connecting it to an igniter.  I&#8217;d strongly recommend reading the <a href="/pdf/launchsystems.pdf">Estes Learning Guide for Model Rocket Launch Systems</a>, and building a couple of test circuits before you go wiring up an LC-3 clone and connecting it to a live motor.  Safety first, people!  :)</p>

<div style="text-align: center;">

<a href='http://principialabs.com/wp-content/uploads/control-box.png' title='Control Box Schematic'><img src='http://principialabs.com/wp-content/uploads/control-box.thumbnail.png' alt='Control Box Schematic' /></a>

<a href='http://principialabs.com/wp-content/uploads/relay.png' title='Relay Box Schematic'><img src='http://principialabs.com/wp-content/uploads/relay.thumbnail.png' alt='Relay Box Schematic' /></a>

</div>

<p><strong>Note:</strong> As published, there is one minor (or possibly major) difference between the LC-3 as pictured above and the schematics &#8212; there is no 90dB Piezo Pulse (Radio Shack 273-066) buzzer in the Relay Box (the Control Box still has one).  If anyone&#8217;s interested, just leave a note below and I&#8217;ll explain how to incorporate this buzzer into the system.  It&#8217;s a simple splice, but it involves changing an LED and resistor in the Control Box as well, to keep the same total resistance in the continuity circuit.</p>

<p><b>LC-3 Parts List</b></p>

<p>While most of the important parts for the LC-3 can be obtained at any Radio Shack, a few of the cool buttons, lights, and enclosures will have to be procured elsewhere.  The best online resource for locating electronic parts is <a href="http://octopart.com/">Octopart.com</a>, which will find just about any obscure component you can think of, and provide a price list from several of the major online vendors.  In the list below, all Radio Shack components have their part numbers included; to locate a part from their online store, simply Google &#8220;Radio Shack&#8221; and the part number.  For all other components, I&#8217;ve included links to Octopart or the manufacturer&#8217;s data sheet.</p>

<table>
 <thead><tr>
   <th>Qty.</th>
   <th>Part Name</th>
   <th>Notes</th>
 </tr></thead>
<tbody>

 <tr class="odd">
   <td>1</td>
   <td>12VDC/10A DPDT Plug-in Relay (Radio Shack 275-218)</td>
   <td>The main igniter relay.</td>
 </tr>

 <tr class="even">
   <td>1</td>
   <td><a href="http://octopart.com/info/Hammond/1595CBK">Hammond 1595CBK Project Enclosure</a></td>
   <td>The Control Box.</td>
 </tr>

 <tr class="odd">
   <td>1</td>
   <td>Nylon Binding Posts (Radio Shack 274-661)</td>
   <td>Relay Box banana jacks.</td>
 </tr>

 <tr class="even">
   <td>1</td>
   <td>Aluminum Project Enclosure (Radio Shack 270-238)</td>
   <td>The Relay Box.</td>
 </tr>

 <tr class="odd">
   <td>1</td>
   <td>Panel-Mount Fuse Holder (Radio Shack 270-367)</td>
   <td>Relay Box fuse socket.</td>
 </tr>

 <tr class="even">
   <td>2</td>
   <td><a href="http://octopart.com/info/Dialight/607-2212-130">Dialight 607 Series 7mm Panel-Mount LEDs (12V)</a></td>
   <td>Control Box LED indicators.</td>
 </tr>

 <tr class="odd">
   <td>2</td>
   <td>Solderless Banana plugs (2-pack) (Radio Shack 274-721)</td>
   <td>Cable connects for Relay Box.</td>
 </tr>

 <tr class="even">
   <td>1</td>
   <td><a href="/pdf/keyswitch.pdf">Nikkai CK-L12B 19mm SPDT Tubular Keyswitch</a></td>
   <td>Control Box keyswitch.</td>
 </tr>

 <tr class="odd">
   <td>2</td>
   <td><a href="http://www.whoopis.com/howtos/telco-basics/jack.jpg">RJ-11 Telephone Jack with 4 Screw Terminals</a></td>
   <td>One for each box.</td>
 </tr>

 <tr class="even">
   <td>1</td>
   <td><a href="http://www.cablesforless.com/browseproducts/100-Feet-Phone-Cord-Black.html">100&#8242; 4-conductor RJ-11 Telephone Cable</a></td>
   <td>Connects Control to Relay.</td>
 </tr>

 <tr class="odd">
   <td>2</td>
   <td><a href="http://octopart.com/info/Idec/AL6H-M14P-R">IDEC AL6H-M14P-R SPDT Illuminated Pushbutton</a></td>
   <td>The launch button.</td>
 </tr>

 <tr class="even">
   <td>1</td>
   <td>Micro 1-1/8&#8243; Smooth Clips (Radio Shack 270-373)</td>
   <td>Igniter clips.</td>
 </tr>

 <tr class="odd">
   <td>1</td>
   <td>20A 1-1/4&#215;1/4&#8243; Glass Fuse (Radio Shack 270-1074)</td>
   <td>Relay box safety fuse.</td>
 </tr>

 <tr class="even">
   <td>1</td>
   <td>Piezo Element (Radio Shack 273-073)</td>
   <td>Control Box piezo.</td>
 </tr>

 <tr class="odd">
   <td>1</td>
   <td>90dB Piezo Pulse (Radio Shack 273-066)</td>
   <td>Relay Box buzzer. (optional)</td>
 </tr>

</tbody></table>

<p>For more information on this topic, see the
<a href="http://www.info-central.org/infocentral.shtml">Rocketry Online INFOcentral</a>
pages mentioned above, download the Estes
<a href="/pdf/launchsystems.pdf">Learning Guide for Model Rocket Launch Systems</a>, and read G. Harry Stine&#8217;s
<a href="http://www.wiley.com/WileyCDA/WileyTitle/productCd-0471472425.html">Handbook of Model Rocketry</a>,
the definitive reference on the subject. Good luck!</p>

<p><b>Other Launch Controller Projects around the Web</b></p>

<ol>
<li><a href="http://www.ukrocketman.com/rocketry/controller.shtml">
UKRocketman&#8217;s 4-Channel Launch Controller for Hybrids/Liquids/Solids</a></li>
<li><a href="http://www.vatsaas.org/RTV/Support/relay/launcher.aspx">Rocket Team Vatsaas Electronic Launch Controller</a></li>
<li><a href="http://www.kevincook.net/Hobbies/Rocketry/LaunchController/">Kevin Cook&#8217;s &#8220;Awesome Model Rocket Launch Controller Project&#8221;</a></li>
<li><a href="http://www.uoguelph.ca/~antoon/gadgets/rocket.html">Time-Delayed Model-Rocket Launch Control</a></li>
<li><a href="http://www.42nd-dimension.com/Rocketry/launcher.html">Matt Stum&#8217;s Relay Launch Controller</a></li>
<li><a href="http://www.info-central.org/support_relaylauncher.shtml">Eric Ohmit&#8217;s Launch Controller</a></li>
<li><a href="http://www.jimwools.com/rocketslaunchctl.php">How a Relay Launch Controller Works</a></li>
<li><a href="http://www.google.com/search?q=electronic+launch+controller">Google Search: &#8220;electronic launch controller&#8221;</a></li>

</ol>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/electronic-launch-control-system/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>CATO: Catastrophic Engine Failure</title>
		<link>http://principialabs.com/cato-catastrophic-engine-failure/</link>
		<comments>http://principialabs.com/cato-catastrophic-engine-failure/#comments</comments>
		<pubDate>Fri, 12 Oct 2007 20:43:15 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[rocketry]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://principialabs.com/cato-catastrophic-engine-failure/</guid>
		<description><![CDATA[The Rocket-Mounted Video Camera Project came to an abrupt end as the V-2 model rocket Prima Donna suffered a catastrophic failure (CATO) on its first launch attempt. Although tragic, the CATO was captured on video from multiple angles, and represents a classic case of a rare Estes engine failure. [Scroll down for videos.] An examination [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="/rocket-mounted-digital-video-camera">Rocket-Mounted Video Camera Project</a> came to an abrupt end as the V-2 model rocket <em>Prima Donna</em> suffered a catastrophic failure (CATO) on its first launch attempt.  Although tragic, the CATO was captured on video from multiple angles, and represents a classic case of a rare Estes engine failure.  [Scroll down for videos.]</p>

<p><img src="/images/cato_enhanced400.png" alt="CATO" /></p>

<p>An examination of the video and debris is currently underway, but the consensus is that the extreme cold (-15°C) caused the propellant grain to separate from the interior wall of the rocket motor case.</p>

<p><span id="more-19"></span></p>

<p>When the motor was ignited, the rising pressure in the combustion chamber forced the unburned portion of the propellant violently up and out of the case, destroying the engine mount and tailcone.  The propellant grain was then ejected out the top of the airframe, cracking the base of the nosecone, and continued to sail roughly twenty meters into the air.  All of this happened in an instant.</p>

<p>For more information on Estes engine design and catastrophic failure, see &#8220;<a href="http://uscoopers.org/rockets/catos/howcatoshappen.htm">How CATOs Happen</a>.&#8221;</p>

<p><strong>CATO Videos</strong></p>

<p><em>Camera 3: Wide angle, handheld</em>
<embed style="width:500px; height:402px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-3525339469886701178&#038;hl=en" flashvars=""> </embed></p>

<p><em>Camera 2: Wide angle, fixed</em>
<embed style="width:500px; height:402px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-5067085043654987574&#038;hl=en" flashvars=""> </embed></p>

<p><em>Camera 1: Launchpad closeup, fixed (frame-by-frame)</em>
<embed style="width:500px; height:402px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-5287197406328009916&#038;hl=en" flashvars=""> </embed></p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/cato-catastrophic-engine-failure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rocket Stability and Performance</title>
		<link>http://principialabs.com/rocket-stability-and-performance/</link>
		<comments>http://principialabs.com/rocket-stability-and-performance/#comments</comments>
		<pubDate>Fri, 12 Oct 2007 19:29:19 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[rocketry]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://principialabs.com/rocket-stability-and-performance/</guid>
		<description><![CDATA[The Rocket-Mounted Video Camera project is nearing completion. Prior to the flight test phase, however, prudence demands that we run a few simulations to ensure that the rocket will have a safe and stable flight. Initial Evaluation Before beginning construction, we made a few ballpark calculations using (a free trial version of) RockSim, a Windows-based [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="/rocket-mounted-digital-video-camera">Rocket-Mounted Video Camera</a> project is nearing completion.  Prior to the flight test phase, however, prudence demands that we run a few simulations to ensure that the rocket will have a safe and stable flight.</p>

<p><strong>Initial Evaluation</strong></p>

<p>Before beginning construction, we made a few ballpark calculations using (a free trial version of) <a href="http://www.apogeerockets.com/rocksim.asp">RockSim</a>, a Windows-based model rocket design tool, to verify that the addition of the camera wouldn&#8217;t adversely affect the model&#8217;s flight characteristics.  To increase performance, we also swapped the specified D12 engine for a higher-impulse E9.</p>

<p>The images below show the results of this evaluation.  You can see from the flight profile graph on the left that the predicted maximum altitude with the E9 motor is nearly 1000 feet.  The stability diagram on the right shows the center of gravity (CG) position with the E9 engine, but without the addition of the video camera in the nose.</p>

<div style="text-align: center;">
<a href="/images/flight_profile_E9-8.jpg" >
<img src="/images/flight_profile_E9-8_sm.jpg" alt="Flight Profile" title="Click to enlarge"
style="border: none;" /></a>
<a href="/images/rocksim_2d.jpg" >
<img src="/images/rocksim_2d_sm.jpg" alt="CP/CG Analysis" title="Click to enlarge"
style="border: none;" /></a>
</div>

<p>Although the CG was a little further aft than is desirable, we determined that the addition of the video camera and battery pack to the nose of the rocket would only improve stability, and that the E9 motor would help compensate for the loss of performance that the camera&#8217;s weight would create.  Based on this preliminary analysis, we decided to go ahead with rocket construction, using an Estes E9-8 engine, the video PCB and a 2AAA battery pack.</p>

<p>Now that the build is complete and the camera is installed, we need to revisit these calculations with the actual mass measurements, to assure that we have an accurate picture of the flight profile before the first test flight.</p>

<p><span id="more-18"></span></p>

<p><strong>Rocket Stability</strong></p>

<p>Like the feathers of an arrow, the fins of a model rocket keep it flying straight and true.  Air moving over the fins creates a lift force which helps to straighten out the rocket&#8217;s flight path when small perturbations like wind gusts or engine thrust asymmetry attempt to push it off course.  The position of two imaginary points on the rocket body, the Center of Gravity (CG) and the Center of Pressure (CP), determine how stable the rocket flight will be.</p>

<p>As with any flight vehicle, forces on a rocket will cause it to pivot about its CG.  The CG of the rocket is best determined when the model is prepped and ready to fly: that is, after the engine, recovery system and heat-resistant wadding are installed.</p>

<p>In the preliminary analysis, we used RockSim to estimate the CG position on the rocket&#8217;s fuselage based on the average masses of engines, parachutes, and modeling clay (in the nosecone, to move the CG forward).  Now that the actual build is complete, we can determine the true flight CG by prepping the rocket for flight as described above, and balancing it.</p>

<p>Using this method, we determined that the CG of our model is 286mm from the aft end of the tailcone.  This includes the installed E9-8 engine, the parachute and wadding, the video camera and 2AAA battery pack, along with some modeling clay in the very tip of the nosecone.  The clay is necessary because the Canadian Arrow kit is undesirably tail-heavy by design.</p>

<p>Now, for a stable rocket flight, the CG needs to be at least one <em>caliber</em> (the diameter of the fuselage) forward of the CP.  We know that the CG position can change depending on how we load the rocket (i.e., where we put the weight).  The Center of Pressure, however, is dependent only on the design of the rocket.  The rocket&#8217;s length and the shape, size and position of the fins determine the location of the CP.  The CP can be determined longhand using the <a href="http://my.execpc.com/~culp/rockets/Barrowman.html">Barrowman Equations</a>, or automagically by using a program like RockSim or <a href="http://www.spacecad.com/">SpaceCAD</a>.</p>

<p>Since we didn&#8217;t alter the design of the rocket aerodynamically, the CP we found using RockSim in our preliminary analysis will still be correct.  In our case, the CP is 208mm from the aft end of the tailcone.  The fuselage diameter is 66mm, and the difference between CP and CG is 78mm &#8212; about 1.18 calibers stability.  This isn&#8217;t ideal, but it is better than the marginal 0.95 that we came up with originally.</p>

<p>With these calculations we can be reasonably assured that our rocket won&#8217;t go spiralling off into oblivion on its first flight.</p>

<p>For more detailed information on this topic, consult the <a href="http://exploration.grc.nasa.gov/education/rocket/rktstab.html">Rocket Stability</a> page from NASA&#8217;s &#8220;Beginner&#8217;s Guide to Rockets.&#8221;</p>

<p><strong>Rocket Performance</strong></p>

<p>The performance of our rocket &#8212; acceleration, velocity, altitude &#8212; depends on the vehicle&#8217;s weight, aerodynamic drag, and the engine&#8217;s thrust and burn time.  Because the biggest engine Estes makes is the E9, we figured we&#8217;d throw that sucker in and be good to go.  The preliminary analysis showed no problems.  But during the course of the build, our rocket got a little &#8230; uh &#8230; heavy.</p>

<p>The <a href="/pdf/estes_engine_chart.pdf">Estes Engine Chart</a> (PDF 20K) recommends 283 grams as the maximum total liftoff weight for a model rocket using the E9-8 engine.  Well, our little prima donna weighed in this afternoon at a hefty 363 grams.  My first concern was that this fatty wouldn&#8217;t even get off the pad with an E9, but that turned out not to be the case.</p>

<p>The same chart lists maximum liftoff weights for the E9-6 and E9-4 at 340g and 425g respectively.  All three E-impulse engines have the same propellant weight, the same total impulse, the same max thrust, and the same thrust duration.  So why the difference in max recommended liftoff mass?</p>

<p>The answer, of course, is the ejection delay.  Heavier rocket, shorter ejection delay.  Why?  Well, since the thrust curve of all three engines are identical, the boost phase for a given rocket riding all three engines should be identical.  But it&#8217;s all about the coast phase.  The time from engine burnout to apogee is (obviously) less for a heavier rocket than for a lighter one.  So, my theory was that with the long-delay engines &#8212; the E9-8 and E9-6 &#8212; the ejection charge would occur way after apogee, with the vehicle velocity steadily increasing as it plummeted back to earth.</p>

<p>I needed to run some simulations.</p>

<p>Since it had been more than 30 days since I first downloaded RockSim, the trial period had expired and I was locked out of the software.  Damn!  But, not to worry, there is always <a href="http://webalt.markworld.com/webalt.html">Markworld!</a></p>

<p>Mark Sullivan has created a simple and effective HTML rocket altitude predictor that can be used for performance calculations.  Just fill in some data fields about your rocket and engine type, and voila!</p>

<p>I ran three simulations, one for each E-impulse engine type, to determine max altitude, velocity and the point of parachute deployment.  The results are as follows:</p>

<p><strong>Estes E9-4</strong></p>

<p><img src="/images/E9-4.gif" alt="E9-4" title="E9-4" />
<br />
The E9-4 graph is characteristic of the perfect model rocket flight: a quick boost to apogee, velocity goes to zero, and the recovery system is deployed shortly afterward.  (The three dots on the blue altitude curve mark engine burnout, apogee and ejection.) Maximum altitude is significantly lower than originally predicted &#8212; 136 meters (448 ft) &#8212; due to the increased mass of the finished rocket.  The airframe glides at a constant velocity under the canopy to a soft touchdown rougly 29 seconds after liftoff at a gentle 6.2 m/s.  Chute deployment occurs at a velocity of 3.15 m/s, creating a shock on the airframe of 1 g.  Nice flight.</p>

<p><strong>Estes E9-6</strong></p>

<p><img src="/images/E9-6.gif" alt="E9-6" title="E9-6" />
<br />
Notice that the boost profile and max altitude of the E9-6 are <em>identical</em> to that of the E9-4, since the thrust profile is the same.  What differs is the time and velocity of the chute deployment.  In this case, ejection occurs at 21.04 m/s, creating a shock of 10.38 g.  That&#8217;s a big difference, and we&#8217;re endangering our rocket by creating unnecessary stress on the shock cord and recovery system.</p>

<p><strong>Estes E9-8</strong></p>

<p><img src="/images/E9-8.gif" alt="E9-8" title="E9-8" />
<br />
We&#8217;ve got three of these engines sitting in the package and ready to fire.  They&#8217;ll boost the rocket to apogee just as well as the other two E-impulse, but recovery stress borders on unacceptable.  Descent velocity climbs to a whopping 33.25 m/s, creating a shock of <strong>27.50 g!</strong>  We might try these engines just for fun, but it&#8217;s clear that there is a significant danger of losing the vehicle.</p>

<p>So, we know now that our rocket is safe and ready to fly, and that the E-impulse engines should be sufficient to huck this hefty beast off the launchpad.  But our choice of an 8-second ejection delay is unacceptable for the first flight test.  We&#8217;ll pick up a pack of E9-4s before we head out to the range.</p>

<p>For more detailed information on model rocket performance, visit NASA&#8217;s <a href="http://exploration.grc.nasa.gov/education/rocket/rktengperf.html">Rocket Engine Performance</a> page.</p>

<p>Next: <a href="/cato-catastrophic-engine-failure">Launch Day Videos</a></p>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/rocket-stability-and-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arduino Project #1: Morse Code</title>
		<link>http://principialabs.com/arduino-project-1-morse-code/</link>
		<comments>http://principialabs.com/arduino-project-1-morse-code/#comments</comments>
		<pubDate>Fri, 12 Oct 2007 18:20:57 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[projects]]></category>

		<guid isPermaLink="false">http://principialabs.com/arduino-project-1-morse-code/</guid>
		<description><![CDATA[It&#8217;s hard to believe how rewarding it can be making something this pointless! This is my version of &#8220;Hello World&#8221; on the Arduino. Instead of just flashing an LED on and off, this variation flashes a three-letter Morse code navaid identifier (something familiar to aviators). The Arduino is a wonderful new open-source physical computing platform [...]]]></description>
			<content:encoded><![CDATA[<div class="video"><embed style="width:400px; height:326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=7597826180816981605&#038;hl=en" flashvars=""> </embed></div>

<p>It&#8217;s hard to believe how rewarding it can be making something this pointless!  This is my version of &#8220;Hello World&#8221; on the Arduino.   Instead of just flashing an LED on and off, this variation flashes a three-letter Morse code navaid identifier (something familiar to aviators).</p>

<p>The Arduino is a wonderful new open-source physical computing platform and programming environment.  It is based on the Atmel ATmega8 microcontroller, and is cheap and easy to learn.  Microcontrollers can be used in everything from automation and robotics to interactive art projects.  Get the skinny at <a href="http://arduino.cc/">http://arduino.cc/</a>.</p>

<p><span id="more-17"></span></p>

<p>Here&#8217;s a (silent) video of the Morse LED flasher.  See if you can guess the identifier!  (Try not to fall asleep watching the blinkety-blinks.)</p>

<p>The code (abridged):</p>

<pre  name="code" class="arduino">
/* LED morse code blink
 * ------------
 *
 * Blinks an LED connected to a digital pin.
 * Pin 13 on the Arduino board is used because
 * it has a resistor attached to it, needing only an LED
 *
 */

  int ledPin = 13;  // digital pin 13

  void setup()
  {
  pinMode(ledPin, OUTPUT);  // sets pin 13 as output
  }

  void loop()
  {
  // V
  digitalWrite(ledPin, HIGH); // dot
  delay(200);
  digitalWrite(ledPin, LOW);
  delay(100);

  digitalWrite(ledPin, HIGH); // dot
  delay(200);
  digitalWrite(ledPin, LOW);
  delay(100);

  digitalWrite(ledPin, HIGH); // dot
  delay(200);
  digitalWrite(ledPin, LOW);
  delay(100);

  digitalWrite(ledPin, HIGH); // dash
  delay(600);
  digitalWrite(ledPin, LOW);
  delay(800);

  // ...

  // you get the picture!

  delay(3000);  // wait 3sec before repeat

  }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/arduino-project-1-morse-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rocket-Mounted Digital Video Camera</title>
		<link>http://principialabs.com/rocket-mounted-digital-video-camera/</link>
		<comments>http://principialabs.com/rocket-mounted-digital-video-camera/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 21:42:07 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[electronics]]></category>
		<category><![CDATA[rocketry]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://principialabs.com/rocket-mounted-digital-video-camera/</guid>
		<description><![CDATA[The idea comes from MAKE Magazine, Vol. 7: Hack a $30, &#8220;single-use&#8221; camcorder and fly it on a model rocket. The project involves disassembly of the plastic camera housing, soldering a stripped USB cable onto the camera&#8217;s circuit board, hacking the board&#8217;s embedded software to make it reusable, then mounting it in the nosecone of [...]]]></description>
			<content:encoded><![CDATA[<p>The idea comes from <a href="http://www.makezine.com/07/camerarocket/">MAKE Magazine, Vol. 7</a>: Hack a $30, &#8220;single-use&#8221;  camcorder and fly it on a model rocket.  The project involves disassembly of the plastic camera housing, soldering a stripped USB cable onto the camera&#8217;s circuit board, hacking the board&#8217;s embedded software to make it reusable, then mounting it in the nosecone of an Estes rocket kit.  With persistence, the project can be completed in a long weekend, and the results are spectacular.</p>

<p><b>The CVS &#8220;Single-Use&#8221; Camcorder</b></p>

<div style="float: right; padding-left: 10px;">
<a href="/images/cvs_front.jpg" >
<img src="/images/cvs_front_sm.jpg" alt="Camera Front" title="Click to enlarge"
style="border: none;" /></a>
<a href="/images/cvs_back.jpg" >
<img src="/images/cvs_back_sm.jpg" alt="Camera Rear" title="Click to enlarge"
style="border: none;" /></a>
</div>

<p>The <a href="http://www.puredigitalinc.com/products/otucvideo.html">Pure Digital One-Time Use Video Camcorder</a>
is marketed by CVS and Rite-Aid pharmacies as an inexpensive and user-friendly device for capturing family memories,
vacation outings and the like.  With only three buttons, it is simple enough for anyone to use.  A 1.5-inch color LCD serves as a viewfinder, and allows you to watch a playback of the most recent clip.  The camera&#8217;s <a href="http://en.wikipedia.org/wiki/Firmware">firmware</a> and data are stored on a Samsung 128MB non-volatile <a href="http://en.wikipedia.org/wiki/Flash_memory">flash memory</a> chip which holds roughly 20 minutes of digital video.</p>

<p>The palm-sized camera costs less than thirty bucks, but there&#8217;s a
catch.  When your 20 minutes are up, you take the camera back to CVS, where they charge you a $13 processing fee to download the video data and burn it onto a DVD for you.  The camera&#8217;s memory is then cleared, but you don&#8217;t get to keep it; it gets sent back to the manufacturer for repackaging and resale.  Well, with a little tinkering and some steady-handed soldering, we&#8217;ll make our own camera interface, turning this product into a compact, reliable and &#8212; best of all &#8212; reusable digital video platform.</p>

<p><span id="more-16"></span></p>

<p><b>Camera Hacking 101</b></p>

<div style="float: right; padding-left: 10px;">
<a href="/images/interface.jpg" >
<img src="/images/interface_sm.jpg" alt="CVS Interface" title="Click to enlarge"
style="border: none;" /></a>
</div>

<p><p>Peeling off the sticker on the top end of the camera reveals its secret: a proprietary, card-edge connector that only fits the
plug behind the counter at CVS.  Luckily, it uses standard USB protocol to communicate, so interfacing with the camera is simply a
matter of soldering a cable onto the correct contacts on the circuit board.</p></p>

<p>To disassemble the camcorder, first remove the battery cover from the rear of the case, then unlock the gray battery holder inside and remove it.  Unpeeling the four corners of the sticker on the back of the case reveals four tiny Phillips-head screws.  Remove them and snap off the back of the case to expose the printed circuit board (PCB).</p>

<p>Looking at the PCB, you&#8217;ll notice two more tiny black Phillips-head screws near the lower left and right edges of the board.  Remove these to release the PCB from its standoff mounts.  There is a small, four-pin connector on the lower left (underside) corner of the PCB that connects the circuit board to the batteries.  Pull the board straight up from this corner, and it will come free of the case.</p>

<div style="text-align: center;">
<a href="/images/pcb_rear.jpg" >
<img src="/images/pcb_rear_sm.jpg" alt="PCB Rear" title="Click to enlarge"
style="border: none;" /></a>
<a href="/images/pcb_front.jpg" >
<img src="/images/pcb_front_sm.jpg" alt="PCB Front" title="Click to enlarge"
style="border: none;" /></a>
</div>

<p>Now the tricky part:  We&#8217;ll solder a USB cable to the PCB&#8217;s card-edge contacts so we can connect the camcorder to a PC. </p>

<p><b>Rigging the USB Interface</b></p>

<p><p>Find yourself an old USB cable (maybe from an unused USB mouse or other device you won&#8217;t miss) and snip off the far end of the cord.  Strip the insulation to reveal four smaller wires (and possibly some metal mesh <a href="http://en.wikipedia.org/wiki/Electromagnetic_shielding">RF shielding</a>), colored red, black, green and white.  </p></p>

<p>If you can get your hands on a <a href="http://www.testequipmentdepot.com/weller/images/wes51.jpg">decent soldering iron</a> with a fine-pointed tip, the following procedure will be much easier.  The contacts on the PCB are very close together, and any solder that accidentally flows between contacts will foul the connection &#8212; or worse.  You can see from the photos that an iron that&#8217;s too large (as mine was) can quickly make a mess of the job.  Also, using needle-nose pliers or (preferably) a small <a href="http://www.sparkfun.com/commerce/advanced_search_result.php?keywords=hemostat">hemostat</a> to hold the wires to the PCB while soldering will make things go much more smoothly.</p>

<div style="text-align: center;">
<a href="/images/bad_solder.jpg" >
<img src="/images/bad_solder_sm.jpg" alt="Bad Solder" title="Click to enlarge"
style="border: none;" /></a>
<a href="/images/video_pcb.jpg" >
<img src="/images/video_pcb_sm.jpg" alt="USB Connected" title="Click to enlarge"
style="border: none;" /></a>
</div>

<p>Notice that there are ten gold contacts on the PCB&#8217;s edge connector.  With the connector facing you and the camera lens pointing at you, label the connectors 1-10 from left to right.  Now, solder the wires to the circuit board&#8217;s edge connector in this order: red, black, green and white, to contacts 6 through 9 respectively.  (If the computer indicates a problem later, try swapping the green and white wires.)  Take your time.</p>

<p><b>Connecting the Camcorder to a PC</b></p>

<p><p>The forums at <a href="http://camerahacks.10.forumer.com/index.php?c=5">CameraHacking.com</a> are the primary resource for the most current information on hacking the Pure Digital cameras.  These bright folks have <i>legally</i> reverse-engineered the hardware and software in both still and video camera models, allowing them to be reused for a variety of applications.  [For more detailed information on how all this was done, visit <a href="http://www.maushammer.com/systems/cvscamcorder/">John Maushammer's website</a>.]</p></p>

<p>As you might imagine, Pure Digital updates the firmware and security software in each new model of camera, and your workaround solution may vary slightly from this description, depending on your camera&#8217;s model number and firmware version.  The following applies to Model 220, firmware version 33.04.</p>

<p>The camera&#8217;s model number can be found on the FCC sticker on the bottom of the camera case exterior.  To discover your firmware version, re-connect the camcorder PCB to the battery pack and verify that the camera is turned off.  Hold down the &#8220;Record&#8221; and &#8220;Delete&#8221; buttons, then press the power button to turn the camera on.  This should bring up the camera&#8217;s Configuration Screen which looks something like:</p>

<pre>
FW-VERSION: 33.04
CAMERA ID: GD5060******
PCB VER: B1
</pre>

<p>If you haven&#8217;t already, shoot a few minutes of test footage.  Make sure everything still works, and that you can save and play back a short video clip on the camera.  Now plug the camera into your PC&#8217;s USB port.  Windows should recognize the camera as a &#8220;Saturn&#8221;, and ask to install a driver.  This message indicates that you have connected the USB wires correctly.  Click &#8220;Cancel&#8221;, since you have no driver yet. (See CameraHacking.com for MacOS and Linux support.)</p>

<p><div style="float:right;padding:10px 0 0 10px;">
    <a href="/images/Saturn_Ops.jpg" >
    <img src="/images/Saturn_Ops_sm.jpg" alt="Saturn Ops Software" title="Click to enlarge"
    style="border: none;" /></a>
    </div>
We will manage our Saturn camera using a small graphical client called &#8220;Ops&#8221; (see screenshot, right).  [In Roman mythology, Ops was the wife of Saturn.]  The Ops software can be used to download videos stored on the camera&#8217;s flash chip and save them to your PC.  You can also use Ops to alter the camera&#8217;s firmware or increase the video resolution.  The entire Saturn file tree is accessible using Ops. </p>

<p><br />
<br />
<p>To convince Windows to interface with Saturn, we&#8217;ll need to download a hardware driver (just like any other device) and we&#8217;ll need Ops.  You can scour CameraHacking.com to find these items, or you can simply use Ryan David&#8217;s <a href="http://ryandavid773.googlepages.com/ocs">One-Click Setup</a>.  This will install the most current driver and the Ops client automatically.  Be sure and get the latest version from the download page.
</p></p>

<p>Once all the software and drivers are installed, we&#8217;ll connect the camera to the PC with the USB cable and fire up the Ops client.  Complete instructions for using Ops are available in the FAQ section of CameraHacking.com, but the basic procdeure is: Open Camera -> Unlock -> Download All Movies -> Close Camcorder.  That&#8217;s it!  [If you have problems unlocking your camera, you may want to check out
<a href="http://freelowell.com/downloads/camcorderpage/Camerahacking.html">this site</a>.]</p>

<p><b>Playing the Videos</b></p>

<p><p>Videos from the Saturn camera are saved as .AVI files and are encoded using the open-source <a href="http://www.xvidmovies.com/info/">XviD codec</a>, which, like DivX, is an imlementation of the MPEG-4 standard.  In order to play these clips on a Windows PC, we&#8217;ll need to <a href="http://www.xvidmovies.com/codec/">download</a> this codec.  Once we&#8217;ve installed the XviD codec, we will be able to play XviD videos using Windows Media Player or any other XviD-enabled player. </p></p>

<p><b>Building the Rocket</b></p>

<p><p>The model rocket we&#8217;ll use to fly the camcorder is the <a href="http://www.estesrockets.com/products.php?number=2188">Estes X-Prize Canadian Arrow</a>.  The design is essentially a stretched version of the classic WWII German V-2 rocket, but our main concern is to find a kit with a nosecone diameter large enough to accommodate the video PCB.  The Estes Fat Boy kit, while quite a bit shorter, would also serve our purposes.  Since we are going to modify the kit slightly from it&#8217;s original configuration, we&#8217;ll use <a href="http://www.apogeerockets.com/rocksim.asp">Rocksim</a> design and simulation software to ensure our modifications won&#8217;t affect the flight characteristics of the rocket.</p></p>

<p>Next: <a href="/rocket-stability-and-performance">Rocket Stability and Performance</a></p>

<div style="text-align: center;">
<a href="/images/rocksim_3d.jpg" >
<img src="/images/rocksim_3d_sm.jpg" alt="Rocksim" title="Click to enlarge"
style="border: none;" /></a>
<a href="/images/v2_build.jpg" >
<img src="/images/v2_build_sm.jpg" alt="Building the Kit" title="Click to enlarge"
style="border: none;" /></a>
</div>

<div style="text-align: center;">
<a href="/images/the_eye.jpg" >
<img src="/images/the_eye_sm.jpg" alt="Lens Cutout" title="Click to enlarge"
style="border: none;" /></a>
<a href="/images/standoffs_top.jpg" >
<img src="/images/standoffs_top_sm.jpg" alt="Standoffs - Top View" title="Click to enlarge"
style="border: none;" /></a>
</div>

<div style="text-align: center;">
<a href="/images/mounted_cam.jpg" >
<img src="/images/mounted_cam_sm.jpg" alt="Mounted Camera" title="Click to enlarge"
style="border: none;" /></a>
<a href="/images/progress2.jpg" >
<img src="/images/progress2_sm.jpg" alt="Making Progress" title="Click to enlarge"
style="border: none;" /></a>
</div>
]]></content:encoded>
			<wfw:commentRss>http://principialabs.com/rocket-mounted-digital-video-camera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
