Welcome Guest, you are in: Login

FUBAR Labs Hackerspace Wiki



Search the wiki

Back to the Main Rocket Page


This page contains information and resources related to the software and hardware I use to run my engines.

By hardware I specifically mean electrical components. Details regarding any non-electrical components such as plumbing or structural can be found on the Rocket Engine Test Stand page


I would like the software/hardware designs I use to run my engine to be freely available for others to use, modify, etc... In practice, however, most individuals that build engines will design their own custom code/hardware since this is a fairly bespoke process.

My hope thus is that some of the approaches I’m using can be shared with others and improved upon to form some sort of best practice. For example, some of the libraries I’m using to calculate thrust, mass flow or read sensors may be generally helpful to others. However, the code specifically used to run my engine may not be useful to anyone but myself. Regardless, I still feel the benefit of publishing these designs outweighs any negatives.


This section discusses the software I wrote to control my engine, igniter and read/output sensor data.


Software can be downloaded from GitHub here. I am not always good about keeping changes synched with GitHub so please ask if you are looking for something that does not appear to be available.


From a software design perspective the code I use currently connects via a serial interface to an Arduino Uno. This is achieved either wirelessly via an XBee Radio Unit or via a hard line USB cable. For actual testing I always use the XBee in order to keep a safe distance from the test stand. For development it can be easier to just use a hard line.
Engine Controller Serial Interface

Engine Controller Serial Interface

The program is a simple text based command line interface for doing things like testing valves, reading sensors, configuration and running the engine.

There is one main program, which then calls a series of libraries for doing things like opening/closing servo valves, reading sensors, and calculating.

The Arduino Uno uses a 16 MHz processor, which is getting somewhat outdated given the much faster boards that are starting to become available. However, I’ve still found that it is adequate for my testing. When I run an engine test I can read and print sensor data approximately once every 16 milliseconds. This is fine for my current needs.

Data Produced

When the engine runs it spits out csv sensor data to the serial terminal rather than writing to a data logger. For me this is just easier because I can copy/paste it into Excel and start doing analysis.

The following information is produced currently:
  • Fuel/Oxidizer Pressure
  • Fuel/Oxidizer Flow Rate
  • Fuel/Oxidizer Servo Valve Position
  • Igniter/Engine Pressure
  • Igniter/Engine Flow Rate
  • Igniter/Engine Temp
  • Engine Force (calculated)
  • Engine Force (measured via load-cell)

I would like to add outputs for Isp and mixture ratio as well as breakout further the flow rate between igniter and main engine but currently the Arduino Uno does not have enough resources to do this. Printing strings especially causes a big performance hit to the Arduino. So currently I’m calculating these values manually in Excel.

Safety Features

The code implements the following safety features:
  • As soon as the Arduino starts or is re-set it will close all valves and turn off the igniter.
  • As soon as any operation is done (eg. calibrate, read sensors, test-run, etc...) it will automatically try and close all valves and turn off the igniter. This is just in case they were somehow opened during the operation.
  • Any user input during a test run will automatically stop the test and close all valves.

Additionally, I’ve added some code to turn off the engine/igniter if it is outside certain operating conditions (eg. pressure/temp too high or low). As of Nov 2014, I’ve yet to uncomment this code as I’m somewhat leery of accidentally reading a bad sensor value, which would cause the engine to stop and create an unpredictable situation.


The hardware is a mixture of circuit boards, valves, sensors and spark plugs. The design of these components is discussed in the section below.

Circuit Designs

Since my background is in software not hardware I was really excited to learn about this field. Thankfully, with the explosion of rhw maker/DIY movement there are a ton of great resources for learning about electronics design. I initially spent a lot of time on Sparkfun. They have lots of great tutorials for getting started in electronics. Once I started to get comfortable I was able to branch out a bit although I still consider myself an electronics novice.

Circuit Architecture

Board Layout on Test Stand

Board Layout on Test Stand

There are 7 boards that I use on my test stand. They are mixture of boards I’ve designed as well as off the shelf boards. My preference is generally for off the shelf rather than custom because the prior is generally more robust so I only built my own when no other options were available.

Close up of Thermocouple Amplifiers

Close up of Thermocouple Amplifiers

The boards I use are:
  1. Arduino Uno: “Brains” runs my Engine Controller code.
  2. Xbee & Shield: Used for communication between the serial interface on my laptop and the Arduino. The shield mates with the Arduino and exposes all of the Arduino I/O. There is also a mating dongle that must be plugged into the laptop in order to communicate with the Xbee that is mated with the Arduino. This approach is getting somewhat dated with the more modern boards that support WiFi.
  3. Main Custom Board: Provides power as well as control for the solenoid valves.
  4. Spark Controller Custom Board: Turns on/off the spark igniter
  5. Pololu Micro: Controls servo valves for the main engine
  6. Spark Controller: controls the spark frequency of the igniter spark plug.
  7. Thermocoupler Amplifier Board: reads thermocouple (temperature) values from a Type K thermocouple

Custom Boards

There are 2 custom boards I built...
  • The main board provides 3 power rails: 5V, 7V, and 12V for sensors, servos/Arduino, and solenoids respectively.
  • The other board is an interface to the ignition controller. It is physically isolated from the rest of the hardware via an opto-isolator and connects to the ignition controller board. The opto-isolation prevents the high voltage of the sparkplug from interfering with the other sensors. This board also has its own power supply

Main Board - Power Supply and Solenoid Valve Control

Main Board - Power Supply and Solenoid Valve Control

Spark Controller - Custom Board

Spark Controller - Custom Board

Close up of the Spark Controller Boards

Close up of the Spark Controller Boards

The spark controller board is a cheap unit with an analog dial that controls the frequency of the spark plugs spark. Presumably it does this via PWM. This approach was recommended to me by R. Watzlavick who used the same board. At some point I would like to add this to my own custom board since this particular board appears to be fairly cheap but it is working fine for the time being.

The Pololu Micro is connected to my main board for power and the Arduino Uno to control the servos. The servos use an interface I wrote between the Pololu and the Arduino. I wrote this specifically because I could not find anything else that performs this function. This is an example of something that could be generally useful outside of rocketry.

Finally I use a simple thermocouple amplifier board Thermocoupler Amplifier Board from Adafruit to read temperatures. This is the best/cheap off-the-shelf board I’ve found. It connects to my main custom board for power and the Arduino Uno for reading temperature values.

Fabrication for Custom Boards

One of my chief learning goals from a hardware perspective was to design a board that could be printed by a fab shop rather than just relying on etching or prototype boards. This is not to diminish either of these 2 approaches it was just that I wanted to go through the whole process of fabricating a board to really understand all the little nuances.

I designed my boards using EagleCAD, which is a fairly solid CAD program. It is more sophisticated than basic programs like EagleCAD and has a nice free version that can be used for non-commercial projects. The limiting factors in the free version are basically 2 sided boards with max dimensions 100 x 80mm. These were fine for my purposes.

Download Custom Boards

Lessons Learned

I made plenty of mistakes designing the board but a few notables are:
  • The traces should have been a bit wider to support the power flows (up to around 3.5 Amps and 7 Volts)
  • Separate the high/low current paths and avoid ground-loop scenarios (See this link for details)
  • The voltage regulators I’m using are the LM style adjustable voltage regulators (see LM317TG as an example). I believe these are also referred to as linear voltage regulators. These have poor efficiency at higher power loads and require large heat sinks in order to prevent them from overheating. For future boards I should look at using a more efficient voltage regulator (eg. such as a switching regulator).

Also, I was directed to the Sparkfun According to Pete videos (#34 and #35) for additional tips on PCB layouts.

Additional Electronics

The additional electrical components I use on my engine are:

ScrewTurn Wiki version Some of the icons created by FamFamFam.