Beginning SSH on Ubuntu
May 29th, 2008
So let’s say you have a private LAN running in your secret underground lab. Maybe you’ve got a Linux box hardwired to a WiFi router, and maybe a Mac or Linux laptop floating around somewhere, and you need a quick way to transfer files or execute shell commands remotely.
What you need is SSH, the Secure Shell. SSH is a powerful tool which allows secure remote login over insecure networks. It provides an encrypted terminal session with strong authentication of both the server and client using public-key cryptography. This tutorial will cover the basics of SSH’s most useful features:
- Logging into a remote computer over a secure connection.
- Transferring files and directories between computers over a secure connection.
- Enabling public-key authentication.
- Passwordless authentication for use with scripts and cron jobs.
The following assumptions are made about the reader:
- You know what a terminal/command line/shell is and how to start a session.
- You have at least a basic familiarity with Linux/Mac command-line syntax.
- You’re on a private LAN with access to at least two Linux/Mac computers (or, you have a user account on a remote server that accepts SSH connections).
As always, comments, corrections, and suggestions for improvement are appreciated.
Installing OpenSSH
The Ubuntu (and MacOS X) flavor of SSH is called OpenSSH, a free, open-source implementation of the ssh protocol. It consists of two basic components, an openssh-client and an openssh-server. SSH clients communicate with SSH servers over encrypted network connections.
Arduino-Python 4-Axis Servo Control
April 8th, 2008
Although the Arduino platform is ideal for standalone applications, it really comes to life when interfaced with a PC. Connect Arduino to a personal computer and you instantly add a ton of versatility and processing power to your project.
This tutorial will describe how to use Arduino to control a bank of four independent RC servos with your PC (or Mac, or *nix Box), using a USB cable and a modular Arduino-Python software stack.
The following discussion builds upon concepts presented in two previous articles, “Arduino Serial Servo Control” and “Joystick Control of a Servo.” As always, comments, critiques, or suggestions for improving or adapting this code are welcome and appreciated.
Project Outline
The primary goal for this project was to create a software stack that allows simple and flexible control of multiple servos from any type of Python script.
The solution has two basic components: (1) an Arduino sketch that waits for serial input from a connected PC, then moves each servo to its commanded position, and; (2) a Python module on the PC that opens the serial connection and formats the data packets expected by the Arduino.
Any other Python program written to sit on top of these two layers need not worry about the messy details of serial communication, but rather can just say something like, “Move servo #2 to 90 degrees.” Or, more precisely:
servo.move(2,90)
Easy, right? Let’s get started.
Arduino Serial Servo Control
December 9th, 2007
One of the cool features of the Arduino platform is its ability to talk to other electronic devices using standard protocols. The big draw of physical computing, in my opinion, is the power it gives you to affect a limitless range of real-world objects with your PC, rather than just boring old monitors and printers.
This short tutorial will demonstrate one way to use Arduino to control a servo motor with a PC, using a USB cable and the Arduino’s serial library. It will in no way attempt to be an introduction to asynchronous serial communication, since such topics are better addressed elsewhere.
RC servos are comprised of a DC motor mechanically linked to a potentiometer. Pulse-width modulation (PWM) signals sent to the servo are translated into position commands by electronics inside the servo. When the servo is commanded to rotate, the DC motor is powered until the potentiometer reaches the value corresponding to the commanded position.
Arduino Pulse Width Modulation
December 8th, 2007
The digital pins on the Arduino board can be set (with code) to output either HIGH (5V) or LOW (0V) — 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 applications like controlling the speed of a DC motor, or “dimming” an LED.
Well, the digital pins cannot directly produce an analog voltage; as we’ve said, they’re either HIGH or LOW. But it turns out we can simulate these “in-between” voltages using a technique called Pulse Width Modulation, or PWM.
Installing Skype 2.0 on Kubuntu Gutsy 64
November 15th, 2007
Skype is a free text/audio/video chat and softphone client for PCs. Version 2.0 for Linux finally includes support for webcam video. It’s still in beta, and it’s designed for a 32-bit OS, so AMD64 users have to do a little creative tweaking to get it to work.
Thanks to this tutorial on the Ubuntu Forums, getting the latest Skype up and running is a snap. Just paste the following code into a terminal. This snippet works on 64-bit Gusty (7.10), Feisty (7.04), and Edgy (6.10) installations.
Building a Liquid-Fuel Rocket Engine
October 16th, 2007
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 builder with design information, fabrication procedures, test equipment requirements, and safe operating procedures for small liquid-fuel rocket engines.
Rocket Stability and Performance
October 12th, 2007
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 model rocket design tool, to verify that the addition of the camera wouldn’t adversely affect the model’s flight characteristics. To increase performance, we also swapped the specified D12 engine for a higher-impulse E9.
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.
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’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.
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.
Rocket-Mounted Digital Video Camera
October 11th, 2007
The idea comes from MAKE Magazine, Vol. 7: Hack a $30, “single-use” 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’s circuit board, hacking the board’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.
The CVS “Single-Use” Camcorder
The Pure Digital One-Time Use Video Camcorder 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’s firmware and data are stored on a Samsung 128MB non-volatile flash memory chip which holds roughly 20 minutes of digital video.
The palm-sized camera costs less than thirty bucks, but there’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’s memory is then cleared, but you don’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’ll make our own camera interface, turning this product into a compact, reliable and — best of all — reusable digital video platform.
Rocket Propulsion Tutorial
June 2nd, 2007

Image credit: SpaceX
Typically, two separate chemical propellants are used, a fuel (such as liquid hydrogen or kerosene), and an oxidizer (such as liquid oxygen or nitrous oxide), which provides the oxygen to sustain a burning reaction. Rockets differ from similar propulsion systems such as gas turbine engines (jets) in that they carry both their fuel and oxidizer on board, thereby needing no intake oxygen to operate. Also, the performance possible with rockets make them ideal for vehicles such as spacecraft, which need to achieve large changes in momentum and high final velocities.
A rocket operates according to Newton’s third law of motion, which states, generally, that for every action there is an equal and opposite reaction. In a chemical rocket, the fuel and oxidizer are combined in a combustion chamber, where they are exposed to a source of ignition, causing a violent chemical reaction which produces hot, rapidly expanding gases. These gases are accelerated through a throat and nozzle, where they are ejected at very high velocity, thereby imparting a change of momentum to the vehicle.




