Chasing balloons across the country is one of the best, and probably the most exciting, parts of high altitude ballooning, using a car kitted out with aerials, radios and at least one computer to decode the radio transmissions from the balloon and show the balloon on a map. I have a PC (home-built using a mini-ITX motherboard and a touch-screen monitor) to do this, but many of the functions could be done more simply, and more reliably, and for a *lot* less power consumption, on a Raspberry Pi. So I set out to build a Pi-based computer with these features:

  • Run from car 12V battery
  • Upload position of chase car to the map at spacenear.us
  • Stream video from the car to batc.tv
  • Show basic balloon telemetry
  • Show a compass pointing to the balloon, with distance from car to balloon

carpi

To do this I needed:

  • Model A Raspberry Pi
  • UBlox GPS receiver
  • Miniature monitor
  • Pi Camera
  • Pi Case
  • 12V Micro USB adapter
  • 2 small switches
  • Wifi Adapter

My car has a MiFi device and the Pi connects to that by WiFi.

Monitor

There are many tiny monitors available that are sold on ebay and elsewhere as “rear view screens” for cars.  They run on 12V at low power, and have a composite video input which the Pi can drive directly.  They usally have 2 such inputs so you could also use them with a rear-view camera for example.  I bought a 4.3″ folding model which is slightly better resolution than the smaller ones:

LCD

Just supply 12V power (only about 150mA needed), connect the Pi and power that up (for a car just use a good car Micro USB adapter).  You may need to adjust the “overscan” settings to centre and size the picture correctly.

GPS

This is needed so the Pi knows where it is, so it can upload the car position and so it can calculate where the balloon is relative to the car.  I used a UBlox module but for this application any GPS receiver with a “TTL Level” serial output will do.  Connect to the GND, 3.3V and serial Rx pins on the GPIO connector.

gps

Camera

The Pi Camera is the obvious choice, as it is cheap, good quality and has very very low CPU overhead.

PiCam

 

Software

I split the task into several programs which share a block of memory that contains the GPS and balloon data.  The programs are:

  • gps.c – Reads the GPS data and stores the important data (latitude, longitude etc.)
  • balloon.c – Reads the balloon telemetry by connecting to dl-fldigi (running on my car PC – as yet we don’t have a Pi-based solution for that)
  • chase.c – Uploads the car position to spacenear.us
  • batc – bash shell script that uses ffmpeg and raspivid to stream video to batc.tv
  • lcd.c – Reads the GPS and balloon data and displays the results on the monitor using the OpenVG C library

Both batc and chase.c read switches connected to the GPIO ports to enable/disable the batc streaming and chase car upload.

batc Streaming

Streaming works really well with the Pi camera – much smoother than when I did this before using a webcam.

batc

 

I can stop and start the streaming using a switch.  This is tested using a small shell script which starts or kills ffmpeg and raspivid accordingly.  The status of the switch is shown on the LCD.

Chase Car Upload

This is pretty easy to do, using the GPS data read elsewhere.  The result is that the car position is always visible on spacenear.us (assuming an internet connection):

bw

I can stop and start the upload using a switch, which is read by the chase.c program.  The status of the switch is shown on the LCD.

LCD

At present the LCD simply shows a “direction-finding” screen.  This is probably the most useful screen when chasing, as it tells you the direction to drive in and how far to go.  It’s certainly easier to use something like this when driving than a full map.

monThe compass shows the direction to the balloon, calculated from the positions of the balloon and car, and relative to the direction that the car is headed.  The small circles show:

  • H – Green if HAB data being received
  • G – Green if GPS data being received
  • C – Green if chase car data being uploaded to spacenear.us
  • B – Green if video being streamed to batc.tv

I’ve yet to package this up and install in the chase car, but that’s next.

 

2 Replies to “Chase Car Raspberry Pi Computer”

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.