Saturday, November 28, 2015

GPS using an RTL-SDR stick

Using a $20 RTL-SDR stick with 1ppm TXCO and a simple mod to power an active GPS antenna, it is possible to download and decode GPS signals in real time.

Software

Both packages are Open Source, with a default build target is Windows.
Both packages are Open Source (GPL2 and BSD 2-clause, respectively). The default build target for both packages is Windows, although RTKLIB has been compiled under Linux.

Please note that GNSS-SDRLIB is not to be confused with GNSS-SDR!

Resources
Useful presentation by the author of GNSS-SDRGUI for a summer school course. Also check the manuals included with GNSS-SDRLIB and RTKLIB.

Step-By-Step Implementation
  1. Ensure RTL-SDR stick is working in Windows. If your driver is not working, try using the Zadig driver installation method outlined here.
  2. Install GNSS-SDRLIB and RTKLIB to any convenient directory
  3. Open GNSS-SDRGUI and select the following options
    1. Input Type: RTL-SDR
    2. [x] RTCM MSM, Port 9999
    3. Change "output interval" dropdown to 10 hz
    4. [x] Plot Tracking
    5. [x] All GPS, GLOSNASS, Galileo satellites 
    6. (optional) enter approximate lat/lon into MISC and click the "..." button to get  current satellite locations in relation to your location.
  4. Click "Start", a number of command consoles will open then close for each satellite being tracked.
  5. Click "M" for log
  6. Now, open RTKNAVI
    1. Click on the "I" button
      1. check "rover", type TCP Client, format RTCM3
      2. click OPT button and set address to "localhost" and port to "9999"
      3. click OK
      4. Click OK
    2. Click on the "start" button
    3. Within a few seconds you should see satellites in the Rover:Base SNR pane
    4. Once a solution exists it will update lat/lon in the left pane
    5. Click "Plot" to generate a plot of the random walk of lat/lon over time

This is what your GNSS-SDRGUI should look like:



This is what your RTKNAVI input should look like:


If everything is working you should get a GPS solution, as shown in this video



I was also able to decode a sample recorded by a RTL-SDR stick connected to an Intel Compute Stick which could serve as a portable GPS receiver.

Next Actions
Try using GNSS-SDR and/or GNURadio to decode the GNSS signal; this would provide native, Linux compatible headless execution and a cursory Google suggests this has been done successfully with the RTL-SDR stick. 

Micro FPV Part II

TBD ... updated camera 'backpack', power filtering, etc.

Tuesday, June 9, 2015

Micro FPV


CAMERA - CM205 5.8 GHz Camera (Banggood, $21)

http://www.banggood.com/CM205-5_8G-FPV-Wireless-Mini-CMOS-Camera-p-88782.html


5v nominal voltage but has a regulator in the barrel plug which will accept 1S (3.7v) voltages.

RECEIVER - RC805 5.8 GHz Receiver (Banggood, $19)

http://www.banggood.com/FPV-5_8G-8CH-200mW-AV-Wireless-Receiver-RC805-p-73202.html

Shipping from China took 13 days. It comes with a JST plug, takes 7-12v 

Goggles - Quanum DIY FPV - $30

http://www.hobbyking.com/hobbyking/store/__53706__Quanum_DIY_FPV_Goggle_Set_with_Monitor_KIT_.html

Also takes 7-12v. Also comes with a JST adapter (not shown)

JST Connectors - $3.99

You will need these to make power harnesses 

PUTTING IT ALL TOGETHER

The receiver and the goggles can be powered by a 2S LiPo using a JST Y-harness. For testing I used a 12V 1A wall wart with a JST connector soldered on.

The camera will run off of a 1s LiPo (3.7v) just fine. DO NOT CUT OFF THE BARREL CONNECTOR! Inside the barrel connector housing is a voltage regulator which you need (the LiPo voltage will vary depending on charge level). Instead carefully cut off the black plastic housing, you will find a circuit board embedded in white plastic. Cutting away at the plastic near the tip of the circuit board near the barrel will reveal the solder pads. Desolder the barrel connector, solder on a JST or whatever connector you desire.

Useful thread for the video camera: http://www.rcgroups.com/forums/showthread.php?t=2291466

Then you can make another Y-harness so that a single 1S LiPo can power both the camera and your vehicle.

Here's my assembly video and initial performance:


TOTAL COST
$73 


STATUS

I have all the harnesses built but I haven't assembled the headset - will update when complete. Then the harnesses need to be trimmed and things mounted, etc. etc. etc. 

RESULTS
Here's a preliminary video. Note that I've done nothing to optimize the system - its using the 1/2" antenna stub, the receiver is using the stock antenna (you really want an omnidirectional antenna) and the receiver/transmitter are sitting on my kitchen table while I'm flying in the backyard. After a false start ( dead battery ) you can see flight video starting at 1:38. Note that I crashed in the neighbor's yard on a tin roof which causes loss of signal.