ALIEN – ALtitude Imaging Entering Near-space

June 12, 2009

A motherload

Yaesu FT-790R 70cm (~434 Mhz) radio

Yaesu FT-790R (70cm transceiver)

It’s been a while since you properly heard from us… that boils down to three things: Exams, Hard-work and Laziness.

However, quite a few things have happened! So it’s time for one heck of a post to describe them.

Radio work

One of the kind members of UKHAS (#highaltitude on called James Coxon (jcoxon) lent us his Yaesu FT-790R which, while being the first transceiver we’ve touched, as far as we know is very good! Simrun received the stoic brick and seemed to be able to operate it very easily. Eventually I met up with him and we set about wiring up the Radiometrix NTX2 appropriatly. Because we’re running our Atmega on 5V this proved difficult…

The TX Input to the radio is analogue and is centered around 1.2 Volts (ie. giving it 1.2 volts should produce the exact carrier frequency). It’s single side band, so giving it 0.9 Volts would result in roughly 400 KHz less. We’re using RTTY which means that the receiver will emit one of two tones at any instant, one meaning a binary 0 (a ‘space’) and one meaning a binary 1 (a ‘mark’). We chose to use baud 50 – ie. we send 50 marks/spaces a second, and the ‘protocol’ is exactly the same a standard serial interface. We’re using the parameters ‘7n1’, meaning 7 data bits (our ASCII), no parity bits, 1 ‘stop’ bit. Thus for each byte, send a ‘start’ bit as a space, send the 7 data bits, then send a mark (the stop bit). Then you can repeat the process for another byte or remain at a mark level, the idle state. We had to feed the radio 0.9V for a space and 1.2V for a mark… it’s potential divider time!

Radiometrix NTX2 Schematic - Part of the ALIEN1 Flight Computer

Radiometrix NTX2 Schematic - Part of the ALIEN1 Flight Computer

The eventual resistor configuration used is shown in my Eagle diagram to the right.

Having set that up with fixed resistors, we tuned in the radio and heard a whole load of meaningless beeps – but it sounded pretty cool. We grabbed a spare 3.5mm audio cable, connected radio to computer and started fldigi – a super open-source (free) program for decoding anything and everything to do with Amateur Radio. I had programmed the Atmega to do send Hello World (more on that later) and guess what! Up comes onto the screen ‘Hello World Hello World Hello World’. Success!

Aerial to transmit with? We grabbed the nearest piece of wire and connected it to the RF OUT – most likely a horribly incompatible antenna, but hey. Positioning it by the window we headed out to a nearby hill to see how good the range was, and got 800 metres before the beeps were really distorted. We also managed to scare and alienate some locals! Simrun decided that whenever we passed someone, he needed to test the radio… at maximum volume. Finally, we grabbed my old laptop and went out again to the field, and managed to decode it at 600m – we didn’t try 800m because the terrible battery ran out.

So all is good with the radio transmission. Let’s just ignore the failure with the Yagi.

SMS Work

Bad things happened on the w800i front. It turned out that the AT command UART was only a ‘virtual’ one – you can only access it over USB. What a pain! Recommended to us by #highaltitude, we headed over to ebay and instead got an oldschool Ericsson, the t68i, which was so old that it had no usb capabilities and the UART was exposed on the bottom – so we could hook it up to our circuit easily. I also got a USB Cable (DKU-11) for the connector which we would hack.

Step one: Fix wires to the important pins – pin 4 and pin 10. Harder than it sounds! Under the sticker on the DKU cable there’s some screws, which come out really easily. Inside, a circuit board is connected to this metal ‘thing’. Needing to remove the circuit board and get it out of the way, I fetched a hacksaw – not the best idea. You need to preserve the very fragile tabs that have solder on them, as otherwise it’s nearly impossible to fix stuff to the pins. This is a straightforward but fiddely task. If you’re going to try it, good luck!

Step two: The phone takes 2.8V – need to divide the Atmega’s 5v in half (roughly). A simple potential dividor will do the trick! I used two 2K7 resistors.

Step three: As with the GPS, I hijacked the Arduino’s FTDI chip for the inital testing. And then even worse things happened. It’s 9600 baud, and the AT commands are exactly the same as in the w800i. However, note these pitfalls – each one consumed at least 30minutes of me banging my head against a wall:

  • AT protocol needs \r\n: There are two characters that represent the end of a line on computers: a Carriage Return and a Line Feed. Windows uses CR then LF on every end of line, Linux just uses LF, and AT required CRLF… me being a linux user didn’t notice this, and thus spent lots of time and effort wondering why it wasn’t working.
  • The AT protocol echos your input by design. On top of the above problem, I was very confused as to why every character I put in was echoed back out of the TX pin (pin 5, which I had connected to debug). This is normal!
  • Between the AT+CMGS= command and the data you need a short wait – I used a 1 second wait in my programs, simple enough.

Step four: Get the Atmega to send the SMS without any desktop computer help! This was easy, and all the code used is in our SVN repo.

Step five: Solder onto PCB

Step six: Profit!

Flight Computer Work

I decided that it would be a lot simpler and smaller if the huuuge arduino wasn’t taking up space, and set about searching for a suitable Atmega, settling on the Atmega162 because: It has two UARTS (one for the GPS, one for the Phone) and Rapid Electronics didn’t have the Atmega168 in stock. Armed with this, and all the above work, I had everything I needed to begin designing the ALIEN Flight Computer! Pictures (or PDFs) speak better than words, so I’ve attached the Circuit Schematic and the Final Board Layout. Because a chemical process (Reading School Electronics Department) would be used to manufacture the PCB, I’ve used huge traces to minimise errors.

ALIEN1 Schematic · ALIEN1 Board Layout – With bottom traces · ALIEN1 Board Layout – Without bottom traces

The PCB has been manufactured and is now in good working order, programmed with the code in our repository it parses GPS data successfully, sends SMSes, flashes LEDs, and drains batteries like there’s no tomorrow.

All schematics, board layouts and code is Copyright (C) 2009 Daniel Richman and Simrun Basuita.
Further information, including possibly a GNU licensing statement is included in many code snippets and files.
Otherwise all rights are reserved.

Pictures of the last item are still to come, and payload construction is about to start very soon!

In absence of Simrun’s amazing camera that you saw in the Workshop 1 photos, I’ve used the nearest sortof-ok camera to get some photos. The green bag is an antistatic thing, that also makes the white PCB visible.

Overview of the Flight Computer

Overview of the Flight Computer

A good quality close up of the flight computer itself.

A good quality close up of the flight computer itself.

Another angle on the flight computer

Another angle on the flight computer


  1. Great updates, keep them coming! :)

    Comment by natrium42 — August 18, 2009 @ 04:15

  2. I’m interested in doing a similar project.
    Could you please provide detail as to how you send RTTY from an Arduino to a Radio?

    I have a 315Mhz transmitter for the Arduino that I can get to talk to another Arduino, and I could also purchase a Radiometrix transmitter if necessary, but not sure how to code RTTY, PSK, or whatever from and Arduino to my Ham Radio. I have a Yaesu FT-897. I can read packet radio as it exists, just not from an Arduino.


    Comment by N9YO — May 10, 2010 @ 22:42

  3. N9YO: Your first concern is legality. In the UK atleast, there are tight rules on what kind of transmitters we are allowed to fly since we are not allowed to do as the Americans do, which is fly any transmitter that their HAM license lets them use on the ground. That’s one of the main reasons that the NTX2 is the module of choice.

    The NTX2 is a FM transmitter. However, due to the nature of FM, if we provide a steady voltage to the transmitter’s TXD pin, and tune our receiver on SSB we get a nice tone; since SSB’s way of representing a continuous sine wave is identical to FM’s way of representing a “flat line”, or the steady voltage. The NTX2 does not obliterate DC voltages so we can go ahead and provide two different voltages to generate two different tones on the receiver; these two tones make up the rtty. Some trial and error is required, but typically 0.95V and 1.25V to the NTX2’s TXD pin for us made a 425Hz shift, which is good enough for rtty. These two voltages were generated using potential dividers; see the picture titled “Radiometrix NTX2 Schematic – Part of the ALIEN1 Flight Computer”. By attaching the Micro controller to “R-SPACE” and “R-MARK” we can setup the divider to either produce 0.95V or 1.25V (by pulling one high and one low, then inverting). By flipping between these two rapidly we get RTTY, when received as SSB.

    Connect the radio receiver to the computer, start fldigi, job done. (Sort of).

    I suggest you join #highaltitude on ( ) where lots of HAB people idle and will probably be able to help you; the UKHAS wiki ( ) and its tracking guide ( ) are also good resources.

    Comment by Daniel Richman — May 10, 2010 @ 23:04

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at

%d bloggers like this: