Rocket control panel finished!

I’ve basically finished my rocket control panel, except for a few software tweaks I have planned. It now has an LCD display to display pressure and status!

rocket_lcd1

I decided to have a round LCD gauge display. This is actually a rectangular 1.8″ TFT display with 160×128 resolution, mounted behind a circular 32mm diameter hole. To make a circular mask to hide the edges of the backlight, I printed a black circular frame onto an Inkjet Transparency, and sandwiched this between the LCD and the front panel. It also serves as a protective film for the LCD.

The display I’m using is the Hobbytronics TFT Serial, largely because I had one spare from another project. This display is unusual in having an on-board Arduino ATmega328 to control the display in response to a basic set of drawing commands sent over 9600 baud serial.

For this application, I wanted to have an analogue gauge effect, which meant filling circular arcs. To achieve this, I wrote a scanline polygon filling routine, which is used to draw small quads, for each 10 degree segment of the arc. To get good performance, I added this polygon fill to the LCD firmware, so that only the polygon coordinates need to be sent via serial.

The gauge is only selectively redrawn (only the parts that change) to improve performance. With these tweaks, the display is fast enough to produce a smoothly animated gauge.

The brains of the operation is a small Arduino Nano board (actually a cheap clone). This has a serial output to drive the display, and various analogue and digital I/O pins to control the rocket.

There are several switches used to operate the launcher:

  • Key switch to select low/high pressure modes (safety feature)
  • Fire button (push button, triggers the solenoid valve)
  • Arm switch (toggle switch, enables the fire button)
  • Pump switch (toggle switch, enables the compressor pump to pressurise the launcher) All switches are active low, and pull individual GPIO pins to ground. Internal GPIO pull-ups are used, rather than external resistors.

There’s a 2-channel relay board used to switch a 12V car tyre compressor (100psi maximum pressure) to pressurise the system, and a 12V solenoid valve to launch. These are controlled by two active low GPIO pins.

Pressure is measured using a car oil pressure gauge (rated 0-100psi and 18-126ohm). This is connected to an analogue input, with a 1K resistor to the 5V rail forming a potential divider. ADC raw values were recorded at several 10psi increments, and a straight line fitted in Excel to get the (hard coded) parameters needed to approximately convert ADC values to PSI.

All the connections between the controller and the main launcher go over a long 4 core screened cable, with 5-pin DIN connectors at both ends (5V, /Fire, /Pump, Pressure, Ground=Screen).

The code for the controller is up on Github here: nano-launcher. The TFT display firmware isn’t yet committed, pending a bit of clean up.

Leave a Reply

Your email address will not be published. Required fields are marked *