A few years ago I started building robot cars which could drive in my living room or outdoors. Some of the vehicles are equipped with a standard USB GPS mouse. But I was again and again disappointed how inaccurate the received GPS position from an USB GPS mouse is. The accuracy of the position received was round about 4 meters. I used no Kalman filter at this time to enhance the accuracy of the received GPS position. After this experience I started with the search for a precise GPS solution I could afford and build into my model robot cars. I frequently read on different web sites about a so called RTK library and a so called differential GPS calculation. I searched for words “differential GPS” and found a few products using a differential implementation of two GPS modules. But those professional solutions are very expensive. They normally cost thousands of Euros which is too expensive for a hobby like mine building model robot cars with a Raspberry Pi. I could not afford such a professional differential GPS solution.

As you see on the picture below my outdoor robot is equipped with an USB GPS mouse with an accuracy of ca. 4 meters.

Discoverer with gps antenna

Discoverer with gps antenna

During my research I found a promising solution with the GNSS positioning and a Raspberry Pi which uses the RTKLIB to calculate a much more accurate position. The acronym GNSS stands for “global navigation satellite system”. The GNSS solution I took an even closer look at the “RasPiGNSS Aldebaran” solution I found during my research. With this module I a positioning with an accuracy of a few centimeters should be possible in the RTK mode (RTK = real time kinematic). With a high accuracy in this case the positioning of the robot car is possible in a circle with a diameter of 20 centimeters. This means the robot is somewhere inside this 20 cm circle. But the setup is a little bit complex and not just a plug and play solution like an USB GPS mouse.

I will document the progress of my project here on my blog and write separate posts about the installation, the operation of the system and which experiences I did with “RasPiGNSS Aldebaran” solution.

Overview RTK GPS Solution setup

The RTK GPS architecture respectively the setup consists of two main parts. One is the base station and one is the mobile unit which is installed inside the rover. The solution I bought costs for the base station round about 300,-€. The mobile unit which will be mounted on top of the robot is a little bit cheaper and costs round about 250,-€. At the end I have to spend much less money than for a professional solution and should reach the same accuracy hopefully. After finishing the setup I will update the total costs I spend to setup the GNSS positioning solution.

RasPiGNSS modules

RasPiGNSS modules

The setup consists of a base station which is stationary and a mobile unit which is installed inside the robot car. The base station knows his positions and transmits the received GPS position via a RTCM3 stream to the mobile unit. The mobile unit is connected via a radio connection with the base station and receives the GPS stream from the base station and her own GPS position. This enables the mobile unit to correct the failure in the GPS signal between both GPS positions and to calculate her own precise position. For the setup I will describe you need the following hardware.

Base station:

  • Raspberry Pi 1 Model B (or newer)
  • Micro-SD Karte (>= 8GB)
  • GPS module RasPiGNSS “Aldebaran”
  • GPS antenna TW-2410
  • XBee Pro radio module
  • XBee USB adapter
  • W-LAN module
  • case (water proof)

Mobile station:

The mobile station which is build inside the robot gets the same technical setup like the base station with two differences. For the mobile station I recommend a Raspberry Pi 2 Model B or a newer model. The GPS antenna for the mobile station could be a cheaper model. You could buy the cheaper TW-4421 model. I will not publish a detailed list of the hardware for the mobile station because it is nearly the same.

The two RasPiGNSS Aldebaran GPS modules I use are shown in the picture below. They fit perfect on top of the Raspberry Pi as you see.

RasPiGNSS mounted

RasPiGNSS mounted

Build your own robot car with the Raspberry Pi!

Build your own robot car with the Raspberry Pi!

Step by step to your own robot car
This book guides you in two parts through the project phases with the aim of building an individual, autonomously driving robot car. In the first part of the book you will learn the basics of robotics and the interaction of hardware, electricity and software. You build the chassis and wire the individual components - details can be found in the appropriate, richly illustrated chapters. An introduction to software installation and programming with Scratch and Python completes the first part. You do not need any previous knowledge in robotics and programming. In the second part of the book, you will familiarize yourself with the sensors required for autonomous driving. With the acquired knowledge you can individualize and further develop your robot car as you wish. The knowledge you acquire in this book will enable you to implement your own projects with the Raspberry Pi.

This book offers you that:
  • Simply get into robotics with the Rasperberry Pi without prior knowledge
  • Numerous illustrations, tables, circuit diagrams
  • Information boxes with useful tips also for other Raspberry Pi projects
  • Project code with syntax highlighting
  • Two car projects: remote-controlled robot car via WLAN and self-driving car
  • Hardware tips and recommendations for suitable accessories - Extensive project material as download: Raspbian image, parts list, chassis artwork and code
  • Special features: Easy and robust cabling, use of high-precision time-of-flight laser distance measurement sensors, introduction to servo motors and suitable servo controllers, control via gamepad, use of an OLED display
Your Rasbperry Pi driving instructor
Ingmar Stapel studied computer engineering and is currently working internationally as IT project manager and enterprise technical architect; in addition, he has been intensively involved with Raspberry Pi and robotics for years. He likes to share this knowledge with interested people from the tinkering scene at meet-ups on robotics. On his private blogs he also writes about many current technology trends.

Supplier RasPiGNSS “Aldebaran”

The RasPiGNSS “Aldebaran” module is available via the online shop www.drfasching.at which is located in Austria. You could also buy the antennas you need for your setup. The owner of the shop will help you to buy the correct antenna for your needs. I discussed the best solution for my setup with him via e-mail and got a perfect support and fast delivery.

Homepage and shop: www.drfasching.at

A presentation is also available explaining the RasPiGNSS module which was presented at a Linux day. I like to download the PDF file it is available for download from the following link: GLT16_Vortrag_FFasching.pdf

All the other components I needed to setup the solution like the Raspberry Pi I bought from Amazon.


All the electronic components like the Raspberry Pi, RasPiGNSS modules and GPS antennas could be bought via internet very easy. It was very easy to put all the components together and to setup the system. I had to research for a while to find the best XBee Pro modules for the communication between the base station and mobile station. I searched for XBee modules with an external antenna connector to extend the range with an external antenna.

Article list - GPS module RasPiGNSS:

Precise GPS GNSS positioning with a Raspberry Pi and the RTKLIB – introduction
Precise GPS GNSS positioning with a Raspberry Pi and the RTKLIB – theoretical setup
Precise GPS GNSS positioning with a Raspberry Pi and the RTKLIB – GPS antenna setup
Precise GPS GNSS positioning with a Raspberry Pi and the RTKLIB – software installation
Precise GPS GNSS positioning with a Raspberry Pi and the RTKLIB – configuration RTKLIB base station
Precise GPS GNSS positioning with a Raspberry Pi and the RTKLIB – configuration RTKLIB mobile unit
Precise GPS GNSS positioning with a Raspberry Pi and the RTKLIB – XBee serial data transmission
(Visited 15,667 times, 3 visits today)