{"id":501,"date":"2015-11-24T23:34:36","date_gmt":"2015-11-24T23:34:36","guid":{"rendered":"http:\/\/int03.co.uk\/blog\/?p=501"},"modified":"2019-02-11T21:44:00","modified_gmt":"2019-02-11T21:44:00","slug":"rocket-control-panel-finished","status":"publish","type":"post","link":"https:\/\/int03.co.uk\/blog\/2015\/11\/24\/rocket-control-panel-finished\/","title":{"rendered":"Rocket control panel finished!"},"content":{"rendered":"<p>I&#8217;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!<\/p>\n<p><a href=\"http:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/11\/rocket_lcd1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-502\" src=\"http:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/11\/rocket_lcd1.jpg\" alt=\"rocket_lcd1\" width=\"800\" height=\"428\" srcset=\"https:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/11\/rocket_lcd1.jpg 800w, https:\/\/int03.co.uk\/blog\/wp-content\/uploads\/2015\/11\/rocket_lcd1-300x161.jpg 300w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>I decided to have a round LCD gauge display. This is actually a rectangular 1.8&#8243; TFT display with&nbsp;160&#215;128 resolution, mounted behind a circular 32mm diameter hole. To make&nbsp;a circular mask to hide the edges of the backlight, I printed a black circular frame onto an&nbsp;Inkjet Transparency, and sandwiched this between the LCD and the front panel. It also serves as a protective film for the LCD.<\/p>\n<p>The display I&#8217;m using is the <a href=\"http:\/\/www.hobbytronics.co.uk\/tft-serial-display-18\" target=\"_blank\">Hobbytronics TFT Serial<\/a>, largely because&nbsp;I had one spare from another project. This display is unusual in having an on-board&nbsp;Arduino&nbsp;ATmega328 to control the display in response to a basic set of drawing commands sent over 9600 baud serial.<\/p>\n<p>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&nbsp;10 degree segment of the arc. To get good&nbsp;performance, I added this polygon fill to the LCD firmware, so that only the polygon coordinates need to be sent via serial.<\/p>\n<p>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.<\/p>\n<p>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.<\/p>\n<p>There are several switches used to operate&nbsp;the launcher:<\/p>\n<ul>\n<li>Key switch to select low\/high pressure modes (safety feature)<\/li>\n<li>Fire button (push button, triggers the solenoid valve)<\/li>\n<li>Arm switch (toggle switch, enables the fire button)<\/li>\n<li>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.<\/li>\n<\/ul>\n<p>There&#8217;s a <a href=\"http:\/\/www.sainsmart.com\/arduino-compatibles-1\/relay\/2-channel-relay\/sainsmart-2-channel-5v-relay-module-for-arduino-raspberry-pi.html\" target=\"_blank\">2-channel relay board<\/a> 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.<\/p>\n<p>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.<\/p>\n<p>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).<\/p>\n<p>The code for the controller is up on Github here:&nbsp;<a href=\"https:\/\/github.com\/jam3sward\/nano-launcher\" target=\"_blank\">nano-launcher<\/a>. The&nbsp;TFT display firmware isn&#8217;t yet committed, pending a bit of clean up.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;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! I decided to have a round LCD gauge display. This is actually a rectangular 1.8&#8243; TFT display with&nbsp;160&#215;128 resolution, mounted behind a circular 32mm diameter hole. To make&nbsp;a &hellip; <a href=\"https:\/\/int03.co.uk\/blog\/2015\/11\/24\/rocket-control-panel-finished\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Rocket control panel finished!<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/posts\/501"}],"collection":[{"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=501"}],"version-history":[{"count":3,"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/posts\/501\/revisions"}],"predecessor-version":[{"id":776,"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/posts\/501\/revisions\/776"}],"wp:attachment":[{"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/int03.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}