A few months back, Raspberry Pi brought out a very very nice little case for the Pi Zero, including 3 different front plates one of which accepts the Sony Pi camera.  After several minutes measuring the internal dimensions, I reckoned I could just about fit the parts for a HAB tracker inside, and came up with this:

Just add batteries.

That one was for 434MHz, and I wanted another for 868MHz, so I thought I’d document the build in case anyone else wants to make one.

DIY

First, you need these parts for the build:

  1. Raspberry Pi Zero or Zero W
  2. Pi Zero case
  3. Pi Sony Camera
  4. Some solid core hookup wire
  5. UBlox GPS with chip antenna from Uputronics
  6. LoRa module from Uputronics
  7. SD card 8GB or larger

Plus a soldering iron, solder, wire cutters and a Dremel with cutting disc.  I assume that you also have the parts required to power and operate a Pi Zero (all the Zero suppliers provide kits).  For a flight, you will also need 3 Lithium AAA or AA cells, flexible hookup wire, plus Styrofoam or similar to enclose and protect the tracker.

If you are new to soldering, practice on something else first!  We are going to solder wires directly to the Pi GPIO holes, plus those on the radio and GPS boards, which isn’t the most delicate soldering operation ever but may be daunting for those with no soldering experience.

GPS

First, cut 4 short long* lengths of the solid-core wire, and solder to the Pi Zero as shown (making sure that the wires are on the top of the board!).

  • IMPORTANT – Although this build worked for me, I have heard from others who have had poor or non-existent GPS reception due to electrical noise received from the Pi by the GPS antenna.  So please, use longer wires so that the GPS module is around 50mm from the Pi board.  That significantly reduces the received noise and enables the GPS receiver to get a good position lock.

I’ve left a very short piece of insulation on the bottom-right wire, but you can remove that completely if you wish.

Next, bend the two top-right wires out of the way, and fold over the leftmost wire and cut to the length shown – this wire will connect to the Vcc hole (top one) on the GPS.

The next part is moderately fiddly: Push the short wire on the left into the Vcc hole, and then push the GPS module over the short bottom-right wire so that this wire goes through the GND hole on the GPS module:

Then push the GPS module down flat on top of the SD socket on the Pi, and solder those 2 wires (Vcc and GND) on the GPS module:

Those last 2 wires can now be bent round and connected to the GPS; the wire in the right of the above photo (Tx on the Pi) above goes to the RXD hole whilst the other (Rx on the Pi) goes to the TXD hole:

Cut the wires to length, bare the ends, push slightly into the holes then solder them.

That’s the GPS sorted.

LoRa

This is the radio module for communication with the ground.  This has a few more connections to make, and is a bit more fiddly.

First, place wires in these holes as shown, and solder them in place:

Be sure to use the correct holes, by counting from the right edge of the Pi Zero; don’t do it relative to any components because those can vary in position (the Zero and Zero W have the CPU in a different position, for a start!).

Now add 3 bare wires as shown:

The next step is optional.  We need to provide some mechanical security for the radio, to keep if slightly away from the Pi so nothing gets shorted.  This could be a double-sided sticky pad or, as here, a 4th solid wire but this time soldered directly to a capacitor on the Pi.  If that sounds daunting, use the pad!  Here’s the wire, ‘cos that’s how I roll:

Once soldered, remove the insulation.

Now it’s time to place the LoRa module on those 3/4 bare wires:

If you are using a sticky pad, place it now, on the underside of the LoRa module, then push the module down so it’s stuck to the Pi.

If instead you are using the 4th wire, push the LoRa module down but maintain a 1-2mm gap between it and any components on the Pi.

Then cut to length and solder them to the LoRa module.

Now we can cut each of the other wires to length and solder them to the LoRa module:

Until we have the tracker completely soldered together:

 Case

Using a Dremel or similar with cutting disc, cut a slot in the case for the GPS module to poke out.  This will take some trial-and-error till the module fits comfortably.

Then drill a hole in the opposite end, in line with the corner pin on the LoRa module.  The hole diameter needs to be wide enough to push a wire through it.

Connect the short flat camera cable (which came with the case) to the Pi, then insert in the case.

Aerial

Cut a piece of wire to length (164mm for 434MHz), bare and tin and few mm at one end, insert through the hole and solder to the corner pin on the LoRa module.  Finally, connect the camera to the cable, push fit the camera into the lid, and close the lid on the case.

SD Card

First, follow the standard instructions to build a standard PITS SD image.

We then need to modify the configuration file (/boot/pisky.txt) to tell it that we are using this tracker instead of a standard PITS tracker.  Here’s a sample pisky.txt file to work with:

payload=CHANGEME
disable_monitor=N
frequency=434.250
baud=300
camera=Y
low_width=320
low_height=240
high=2000
high_width=640
high_height=480
image_packets=4
enable_bmp085=N
external_temperature=1
logging=GPS,Telemetry
Disable_RTTY=Y
info_messages=2
gps_device=/dev/ttyAMA0

full_low_width=640
full_low_height=480
full_high_width=2592
full_high_height=1944
full_image_period=60

LORA_Frequency_1=434.200
LORA_Payload_1=CHANGEME
LORA_Mode_1=1
LORA_DIO0_1=23
LORA_DIO5_1=29

The lines in bold are important:

  • Disable_RTTY=Y  – this disables RTTY (we don’t have a PITS RTTY transmitter)
  • gps_device=/dev/ttyAMA0 – this specified that we have a serial GPS not I2C as on PITS
  • LORA_Frequency_1=434.200 – this sets the frequency of our LoRa module
  • LORA_Payload_1=CHANGEME – you must set this to a name for your flight
  • LORA_Mode_1=1 – this sets LoRa mode 1 which is the only usually used for SSDV
  • LORA_DIO0_1=23 – this specifies the Pi pin we connected the LoRa DIO0 pin to
  • LORA_DIO5_1=29 – this specifies the Pi pin we connected the LoRa DIO5 pin to

Finally

You will need to have or make a LoRa gateway to receive transmissions from your tracker.

You will also need to provide a power supply to the tracker.  This can be any USB powerbank with enough capacity, however the batteries may stop working if they get cold during flight.  An alternative is a powerbank that takes AA cells, in which case you can use Eneergizer AA Lithiums.  Finally, and this is the option you will want for a lightweight payload, simply solder 3 Energizer Lithium cells directly to the 5V/GND pads on the Pi.

26 Replies to “DIY Lightweight Pi Tracker with SSDV”

    1. No – has not RTTY, PSU or temp. sensor, so at the minimum you have to add a suitable lightweight power supply. Also, of course, requires soldering (and is fairly tricky to build).. PITS Zero will be back in stock soon.

  1. Can we connect digital microscope with a built in camera to Pi In The Sky and transmit images or videos captured from it?

  2. I’m interested in using this for a school project on an electric car. To get information from the car during a race rather like Formula 1 Pi Teams. We only need basic feed such as the position (actual, not in race) and a couple of other data feeds maybe. Images are not needed (only as an additional bit of fun maybe). Could this set up do that? The track is too big for Wifi and has no mobile reception. So I remembered these high altitude balloons send useful data down such as altitude and temperature. I’m thinking of road speed and battery state. Any advice greatfully received.

  3. Hi Dave,

    I am about to start a project like this with a school group.

    I know the PITS offers RTTY on top of this self build, but what are the advantages of that? It seems location tracking via LoRa is sufficient, if not better, so what does RTTY provide?

    You have provided a great tutorial on building a gateway to monitor location via LoRa gateway and habhub but I have found nothing as simple for RTTY tracking.

    Would you recommend the PITS for newbies over this self build LoRa?

  4. How easy would it be to add RTTY to this?

    Or is the LoRa network in the UK sufficient with just LoRa on this tracker?

    1. I’ve not tried RTTY on these yet, but it is certainly possible. Needs putting into a mode where the frequency is controlled by a DIO pin, then attach that to the Pi serial output. It’s on my to-do list 🙂

      The UK HAB LoRa network certainly is good enough, yes; I’ve flown LoRa on its own plenty of times.

  5. Hi Dave,
    I have build the tracker but have some probs.
    Its first runs and transmit 2 pictures, after it no more pictures will be send.
    also the GPS telemetry shows only 0.000 0.000 .. and at the end 2*C60D etc.
    Did you have any suggestion whats wrong?

  6. issue found: “gps_device=/dev/ttyS0” does not work for a pi_zero (not a W) on Stretch – /dev/ttyAMA0 worked instead.

      1. Being the exception to the rule, my new built Pi Zero tracker did not show any GPS from the ttyAMA0 but from ttyS0 it works as a charm. Raspberry Pi Zero W V 1.1

          1. ZeroW has Bluetooth so the gpio UART is using a miniUART on ttyS0 (same as a Pi3’s)

            Zero does not so uses the full UART for gpio on ttyAMA0

            If you use /dev/serial0 it will point to whichever is correct for that Pi.

        1. Because you didn’t disable Bluetooth as per the setting up an image. Though for GPS you probably don’t need to anymore, I know I don’t.

          Pi V3 and Pi Zero W

          You need to disable the bluetooth module, and map the freed serial port to the GPIO pins. To do this, edit /boot/config.txt:

          sudo nano /boot/config.txt

          then go to the end of the file and add a new line containing this:

          dtoverlay=pi3-disable-bt

          Exit the editor, saving your changes.

          Now type this command:

          sudo systemctl disable hciuart

          Still using /dev/serial0 should make it work no matter which pi or setup.

  7. Hi David, nice project that Lo-Ra camera Pi !
    Question #1:
    I’m trying to find the code you wrote for this on GitHUB.
    I browsed the 23 repositories… nothing found so far… Can you help me please ?
    Question #2: you hooked up Raspberry Pi zero header PIN 17 (3.3V) to Lo-Ra pin #4 (DIO0) instead PIN3 (3.3v):
    Is that a mistake ?
    Thanks in advance
    Mike, VE2TIH

    1. #1 It’s the standard Pi In The Sky software on github see https://github.com/PiInTheSky/pits

      #2 It’s wired correctly. The red 3.3V wire connects to the 4th hole down which is Vcc. Maybe it looks to you that it connects to the 3rd (DIO0), or maybe you’re only counting the soldered connections (the 1st hole isn’t soldered), but it is most definitely correct.

  8. Hello Dave.
    I am impressed by your experience in the field of trackers and balloons. I want to send a balloon with a tracker based on raspbery pi 0. The device transmitting by design is to be Pi0 itself,
     according to the project https://github.com/F5OEO/rpitx. At the moment I give frame aprs by installing rpitx, csdr and direwolf. From the ground station, a small antenna in the 144,800 Mhz band, I am heard by a distance of 40 km. In the first place, direwolf prepares the appropriate wav file. Then the command “cat direwalf.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo rpitx -m RF -i -f 144800” transmits this in degipeaters. Unfortunately I do not know how to send a jpg file in the form of ssdv in this way. I installed the conversion program https://github.com/fsphil/ssdv. I am converting a jpg file to a binary but I stopped at this … Can you help me with this problem? How do I put the ssdv binary file in the aprs package so that I can transmit it using rpitx in the manner given above.

    1. APRS doesn’t have the bandwidth to send images, so that’s a non-starter, at least if you use the standard APRS frequency where you shouldn’t transmit more than say 1 packet per minute. Also, APRS uses FM modulation which looses you several dB of link budget relative to say RTTY or LoRa. I really wouldn’t consider APRS for images.

      To send SSDV you need to be able to send 256 byte packets which the SSDV decoder can then stitch together. I tend to use LoRa for this but RTTY is (still) popular.

  9. Whats the best way to make this up without directly soldering to the Pis GPIO? I thought about maybe using a 40 pin header with some breadboard soldered to it and then using that?

  10. I’m a complete newcomer to this and am interested in constructing a balloon and camera to launch. I’ve been researching the net and finding many good sites and links but am not sure where to really start. I guess the tracker and receiver is the bit I’m going to need to get right. I realise you can build your own or buy ready made units. There seems to be a lot to choose from and I’m not clear about what other parts need to be connected to transmit and receive the signals, can it be used in the Uk and does it require a mobile sim for data transmission. I’d appreciate any help anyone could offer please.

  11. Hi Dave,
    Thankyou very much for this design and post. Your posts have been very useful to me so thankyou very much. Just wondering if you have a schematic diagram or list of what connections need to be made from each part as this would make it a little easier for me to do.

    Thanks

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.