Reverse engineering my own APRS tracker…
I assembled this tracker over a year ago. As my blog post back then will have indicated, I did so in frustration having failed to produce a more elegant design on the mill. When I built this board, I really did just grab the components that I had to hand and assemble it on the spot – not from a circuit diagram, not from a design, it’s entirely hacked.
That leaves me with a problem, in a rather embarrassing second demonstration of a failure to back-up, I have no idea which pins on this board do what! If I’m going to write the flight computer software for this board, I’m going to have to reverse engineer it and figure out what is connected to what. Having failed to record this information once already, this blog post will serve as my record this time around!
As a quick heads-up for anyone reading this with designs on their own high altitude balloon flight, I recently learned about a kit that’s available from one of the members of the UK-HAS team. The idea is similar to my own flight computer in that it’s a daughter board for the Arduino Uno (or Duemilanovo) but it’s far more professionally done. It’s available with the Radiometrix MTX 434Mhz transmitter for RTTY use in the UK, and has an optional addition of the Radiometrix HX1 transmitter (as I’m using) for APRS in the US. You’ll require an amateur radio license to use it in the US, however, the 70cm band is usable in the UK without such a license. This board also uses a far more modern GPS module than the one I’m using (Mine is the LassenIQ unit which is now discontinued!) For more information about Habuino head over to http://www.habduino.org/ or purchase one now at http://ava.upuaut.net/store/index.php?route=product/product&path=75&product_id=112
Back to the reverse engineering.
I need to determine the following five pieces of information from the board..
- GPS Enable. This board has the ability to enable or disable the LassenIQ GPS module which it uses for reception of data, I need to know which numbered pin from the Arduino board will enable the GPS module.
- GPS Data. Which pin of Arduino does the GPS device send it’s data to? It should be the UART RX pin, but I should check that.
- Radio Enable. This board has a transistor added which enables the Arduino to turn the radio module on and off, I need to know which Arduino pin that transistor is connected to.
- Radio TX. Which pin of the Arduino sends data to the radio for transmission? Again, this should probably be the UART TX pin, but I should check it.
- Orientation of GPS module. I made the GPS module as a separate component which connects to those extra headers on the right of the board. Sadly the pins are not marked, so I’ll have to determine the orientation of the two connecting plugs for the module. This piece of information is critical as the incorrect orientation could easily damage the GPS module.
So, time to get started…
Fortunately I did label the header pins from the GPS module, though using electrical tape and a pencil! The markings are poor, but I can still make them out…
It’s difficult to see in the picture but the first of those two (lower) reads “4->1” and the upper one reads “8->5” these relate to the pins of the LassenIQ.
The LassenIQ pin-outs can be found in it’s datasheet which is still available here.. http://www.dpie.com/manuals/gps/trimble/Lassen%20iQ_Reference%20Manual_Rev%20B_April%202005.pdf and as the module is no longer made, a backup copy of the document here.. Lassen iQ_Reference Manual_Rev B_April 2005
The required information can be found on page 34 and looks like this…
Using this information I should be able to determine both the orientation of the plugs into the board, and the pins which connect it to the Arduino.
Looking at the board, I’ll define the front as being the direction that the label on the radio faces (Red Arrow), and the two headers as 1&2 (labels in green and blue respectively).
According to the LassenIQ Manual, the NMEA data is presented on port B of the device, and though it’s difficult to see the connection in the picture, the RX pin of the Arduino is connected to the pin I’ve circled here in green…
This necessarily means that the labeled pin is number 5 of the LassenIQ. So working left to right the pins are…
- LassenIQ pin 5, the TX-portB pin, connected to the RX pin of the Arduino UART.
- LassenIQ pin 6, the TX-portB pin, connected via a resistor to 3.3v (pull-up as required by lassen)
- LassenIQ pin 7, the prime power pin, coupled by a transistor to 3.3v (transistor on pin D7 of the Arduino)
- LassenIQ pin 8, backup power, coupled also via the the pull-up resistor to 3.3v
So the header that I’d previously labeled as header 1 is pins 5->8, and I have a plug labeled 8->5 (obviously this tells me which way to insert the plug).
I’ll now color the sides of the plug with an ugly gold marker…
Now I need to confirm the orientation of the other plug.
I can see that the pin to the left is pulled up via that resistor again, making it one of the port pins, to it’s right there is a direct GND and an LED crosses from the ground pin the the pin furthest to the right. The LED is intended to flash once per second (the LassenIQ has a PPS or pulse-per-second pin), which makes the right most pin LassenIQ pin 4. This means the pins go 1->4 from left to right. Time to align and mark the other header and plug…
Now on to the radio pins…
The Radiometrix HX1 radio module datasheet can be found here http://www.radiometrix.com/files/additional/hx1.pdf with my back-up copy here hx1 with the relevant information being on page 3…
What we’re interested in for this reverse engineering, is to determine which pin of the Arduino controls the “Enable” pin 4, and the “TXD” pin 7.
Pin 4 has a resistor connecting it to the Arduino D6 pin (to the left of the orange line I’ve drawn here)…
Interestingly the TX-Data pin of the radio module is NOT connected to the UART TX pin of the Arduino. Following the white lines that I’ve drawn on the image blow, it’s clearly connected to pin D3 of the Arduino.
This is because, in order to modulate the AFSK (Audio Frequency Shift Keying) we need a PWM (Pulse Width Modulation). Although it’s connected to what appears to be a digital pin on the prototyping board, pin 3 is programmable as an analog PWM…
From Arduino website regarding Arduino UNO = “PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analogWrite() function.”
- GPS Enable = Arduino pin D7
- GPS Data = Arduino UART RX
- Radio Enable = Arduino D6
- Radio TX = Arduino D3 (programmable as PWM)
- Orientation of GPS module is now color co-ordinated plug and headers.
Reverse engineering complete.
Thanks for Reading!