Friday, 8 November 2013

NERD-1 HAB Development begins!


The prospect of developing a High Altitude Balloon payload doesn't fill me with dread, after all "embedded software engineer" is my day job. It is a varied job including PC, Linux and other programming but it is mostly microcontrollers and associated electronics.

What did fill me with dread was the prospect of going out and getting some development kit! I like to switch off from work when I get home so I have never duplicated a development set up at home to resist the temptation to carry on working. So how was I going to go about this on a small budget?

The obvious solution was to use one of the educational and hobbyist systems like the RaspberryPI, Arduino, Propeller or BeagleBoards which have become increasingly popular. I hadn't kept abreast of any of them but after examining the work of HAB enthusiasts and some very rudimentary research I decided to try one out and the cheapest was the Arduino route.

So a quick trip off to eBay and I got hold of an 'Funduino' (an Arduino UNO clone) board for £9 and ordered a uBlox GPS module/breakout board from China (which is still to arrive) as well as a couple of radio modules including the Radiometrix NTX-2 used in many HAB flights.

We call me impressed, after installing the Arduino development system I had the board flashing an LED within 30 seconds! When I was learning electronics and computing back in the early 1980s at school I would have killed for a platform like this!

I took the liberty of downloading Steve Smith's (G0TDJ) ProjectHAB VAYU ino file as a starting point. This ino or 'sketch' file is Arduino terminology for a project. They may be called 'sketches' but rarely has any of my software ever been called a work of art!

This iteration of VAYU uses the RFM22B radio module controlled by SPI, whereas the NTX-2 is much simpler to control using a digital output and a few resistors. There are many handy guides on the UKHAS Wiki

The GPS data will be coming in serially on the UART the same as VAYU so it was trivial to make the modifications and remove the SPI control to get a barebones flight computer running. I was able to breadboard the NTX-2 and had it successfully transmitting from my lounge floor. It even passed its first environmental test of having one of my dogs lick the circuit board while powered up!

UNO and breadboarded NTX-2
The RTTY transmission being received in another room.
However the current payload might be a bit heavy even for a large latex.
 
The Payload!

The blue mouse shaped device on the left hand of the laptop is an old Haicom HI-204 GPS module which I have had kicking around for years. It is actually a serial device which once powered up starts outputting NMEA data at 4800 baud, this model has an intergrated serial-usb adapter.

When not running the Arduino IDE the UNO board appears as a standard serial port on the PC and can accept or output data, so all I needed to do was route the serial data from one port to another.

I of course made more work for myself by deciding to taking the open source SharpGPS C# based windows program and customising it. As well as decoding it can now forward the data and NMEA sentences from a GPS device on one port to another serial port. It can now log the raw data and play back logs to emulate a device for testing.

The nice thing is this program informs me of the location data, fix status and information about satellites and if and when I iron out some of the remaining bugs and quirks it will make a nice utility which I will make available. Here are some screenshots of it in action.





Now to the next stage....




No comments: