The Tactigon Meets GPS

By on May 14, 2018
Pin It


We test with the wearable application and three-dimensional gesture detection prototype device, by making the GPS receiver interact with the onboard IMU in order to improve position detection process.

The Tactigon, as explained in the dedicated article n issue No. 220, is an intelligent device (and moreover Arduino-compatible) that allows to crete a controller capable of detecting three-dimensional gestures and environmental parameters such as temperature and pressure, which is suitable to develop user interfaces for electronic games, for industrial and service robots, machinery, drones and advanced model radiometers management. The board is ideal for movements capture and also for applications in augmented reality. The board is decidedly tiny, so that it can be incorporated into wearable systems and, for example, in a glove to detect and transmit the movement of the arm and the hand at a distance.

This little bijou is governed by a 32-bit microcontroller by ST Microelectronics, 32 MHz clock operating, equipped with 80 kB of RAM, 512 kB of program memory and 16 kB of EEPROM. The Tactigon ( is also equipped with Bluetooth Low Energy wireless connection and it has a 10 degree of freedom IMU on board with an accelerometer, gyroscope and magnetometer, temperature and barometric pressure sensors. The hardware is completed with a charge controller for the lithium battery that powers it, 5 GPIO and a serial port (on GROVE connector) available to the user.

The product, born in the Next Industries laboratories, was presented at the latest Maker Faire in Rome and is compatible with the latest versions of the Arduino IDE, from which it is integrated as third-party hardware. The supplied IMU library is able to return the quaternions that are the result of a calculation made on the accelerometer, gyroscope and magnetometer values. This means that a fall or jump or movement of an object can be detected pretty easily.

The Tactigon has seemed immediately to us a very interesting device and we “praised” it in our post; by virtue of its potential, it has seemed right to us to prepare and describe some of its applications, the first of which is the subject of this article. Here we propose to combine the data extracted from the IMU to those of a GPS receiver, in order to accurately place movements in space.

Inertal Platforms

Before entering into the heart of the project, a premise is necessary on the characteristics of the Inertial Measurement Unit (IMU) and on their behavior in case of determination of a movement: it is possible to determine the position reached by a person in motion by exploiting the ability of the inertial platform to detect movements in space, both their intensity and the corresponding direction; in order to do this you need to reset data when you are in the starting position, which must be known (and it becomes the reference zero).

However, the fact of using only an inertial platform to calculate a displacement leads to an inaccurate result; in fact, by integrating accelerations, and, consequently, speed to obtain space we obtain a growing error during time. Because of the integration, a constant error in the acceleration causes a linear error in the speed and a quadratic error in the position.

The most precise inertial navigation instruments can reach 600 meters of error in about an hour from starting point and therefore require a “zero” update (the reference from which to start detecting displacements to determine the position).

Combining the detection technique based on IMU data to the more common GPS one, it is possible to obtain a position detection system much more precise than that obtained by adopting only one of the systems.

The Kalman filtering, in particular, provides the theoretical structure for the combination of information coming from different sensors.

That’s why we decided to pair a GPS receiver with The Tactigon: by delegating the position to the GPS, and the pitching, rolling and yawing angles to The Tactigon, we can take the best from both worlds: precise position (in order of meters) and very precise angles (or quaternions if we prefer).

Euler Angles

The Euler angles (shown in Pic. 1) describe the position of a solid XYZ reference system with a rigid body through a series of rotations starting from a fixed reference system xyz. The two reference systems coincide in the origin. When the xy and XY planes are separated, they intersect in a straight line, also passing through the origin, which is defined as node line N. The X axis coincides with the line of the nodes.

Provided libraries also allow the use of quaternions. These are less intuitive than Euler angles since they were introduced as extensions of complex numbers. The quaternion structure is presented as follows:

a+ bi + cj + dk

where a, b, c, and d are real numbers, while i, j and k are symbols that behave similarly to the imaginary component of complex numbers. The quaternions form a real vector space of dimension 4. The real coefficients a, b, c, d are subdivided into a scalar (a) and vector parts (b, c, d). The quaternions, in practice, give us all the information necessary to rotate a vector with only 4 numbers, instead of the 9 numbers required by using the rotation matrices.

Now the idea is to connect a GPS receiver to track the movements and then to associate a position to the data detected by the integrated sensors, such as roll angle, pitch and yaw, or acceleration. The GROVE connector allows to use a breakout board with only one cable.

This combination allows us to create a wearable product for tracking, like a collar for animals, to be able to find them in the case of escape, a helmet or a belt, to be used on construction site, to monitor the position of workers and any vibrations, blows or falls. The solution can also be used in sport: by assembling the device on a motorcycle it is possible, for example, to keep the bending angle under control and associate this data with a spatial coordinate to be superimposed on Google Maps.

In this post we are going to connect the GPS receiver to The Tactigon and we will send the positioning data (that it collects) to the USB Serial, to display the data on the U-Center software provided by the manufacturer of the used GPS receiver.

GPS Receiver

The GPS (Global Positioning System) is the global positioning system (and location) born from the American NAVSTAR (NAVIGATION Satellite Timing And Ranging) several decades ago for military use and then extended to civil use, complemented by systems of localization error correction (due to the fact that the military released only a gross signal for civil use) such as DGPS, WAAS / EGNOS and others, thanks to which today any user can accurately track (even less than one meter) their position for various purposes. We are used, thanks to Google Maps and APIs, to search for the most varied applications for this system, from tracking the route during training to the geolocation of photographs to get to the real-time sharing of your position.

Let’s see, shortly, how you can get your own coordinates using a GPS receiver. From the GPS it is possible to obtain time and coordinates, with any weather condition and in every point on the earth, with the premise that at least four satellites are in contact with the receiver. The operating principle is based on trilateration, measuring the time taken by the radio signal to travel the satellite-receiver distance. The receiver, however, is not aware of the signal time transmission by the satellite, the data sent by satellite is precisely the transmission time. The receiver then calculates the exact propagation distance from the satellite based on the difference between the time received and the synchronized time on board. For this reason, therefore, at least 4 visible satellites are needed to solve a system of four unknowns (latitude, longitude, altitude and time).

The sent message includes, in addition to the time, other necessary information to the receiver to resolve the position, like:

UTC time (Universal Time Coordinate);

satellite ephemeris;

satellite health status;

correction of the satellite clock;

delay effects of the signal due to the ionosphere;

correlation with UTC time;

state of the constellation (of satellites);

identification number of the satellite that transmits the data string.

The receiver, therefore, while calculating the time difference between message reception and transmission, receives parameters of the orbit from which the position of the satellite derives, thus obtaining the necessary data to define the position.

What is required

For this project we need the following hardware components:

The Tactigon;

GROVE GPS Breakout board;

USB / mini USB cable;

3.7V lithium-ion battery.

In this case, the dimensions are important because if you want to make a glove for gesture control applications or a smart t-shirt for sports applications the fact of having a small and efficient product in terms of energy saving is important. The Tactigon hits both targets and, as it can be deduced from the images in these pages, the dimensions of the device are all-reduced.

The connection of the hardware components can be seen in Pic. 3: the GPS receiver connects with the supplied cable to the UART of The Tactigon board and to the board itself (via the special connector dedicated to the battery); the lithium-ion cell is also connected and allows the device to operate even if on movement.

As far as it concerns the software, on our computer (which we will interface to the hardware) we need the Arduino IDE and the U-Center program.

ARDUINO firmware

The Arduino sketch written by us for the project management is very simple: after the inclusion of the libraries and the assignment of the lines, the firmware takes data from the UART and routes them to the USB serial. This way you can use the U-Center GPS software for testing and debug purposes. Used libraries are:

#include <tactigon_led.h>

#include <tactigon_BLE.h>

#include <tactigon_UserSerial.h>

#include <tactigon_IO.h>

The tactigon_UserSerial.h library allows us to associate the callbacks to be launched when a byte or row has been received via UART. The init method allows the baud-rate setting. The tactigon_IO.h library is required, since the GROVE connector power is enabled when the GPIO4 pin is high. This allows the user to turn the device on and off to save battery power. The snippet is shown in Listing 1 sets GPIO4 as output, HIGH, and assigns the callback to be used when data is received on UART.


//init gpps
gpp4.init(T_GPP::GPP4, T_GPP::GPP_OUT);
//init user serial

The callback code takes care of routing the data received from UART in the USB serial port; you see it in Listing 2. Every 64 characters we start a new line.


void cbUartRxByte(uint8_t bb) {
Serial.write(&bb, 1);
if (count == 64) {
count = 0;

You can then analyze and use this data or send them via Bluetooth LE to your smartphone or other devices.


We can use The Tactigon as a tracking device, recording position but also accelerations and angles (Yaw, Roll, and Pitch). Applications, therefore, coupling the Tactigon to a GPS receiver, are many, above all by being able to exploit the high calculation capacity offered by the microcontroller and the integrated Bluetooth Low Energy communication. The offered GPIOs allow further expansion with different sensors in order to create a personalized device. The programmability through IDE Arduino, together with the examples available on the Next Industries website, allow realizing your ideas in a simple and effective way.

In short, The Tactigon works for many applications: test it!

From openstore

TACTIGONBASIC – BLUETOOTH on board environmental sensors 

About Boris Landoni

Boris Landoni is the technical manager of Skilled in the GSM field, embraces the Open Source philosophy and its projects are available to the community.

One Comment

  1. Pingback: LIGHTS CONTROL THROUGH GESTURE | Open Electronics

Leave a Reply

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