IOC Robotic's Lab

WHAT IS POZYX

Pozyx: UWB (ultra-wide band) Radio-positioning system. It's composed by 4 anchors and 1 or more tags.
Pozyx Server - Code for Arduino (.ino): Sends position and sensors data from the Arduino to the PC by the serial port.
Pozyx Client - C++ program: Recieves data from the serial port and keeps it structurated for later use.

HOW IT WORKS

Sending a radio signal and waiting for a response, the tag estimates its distance to the anchor. Thus knowing it's located somewhere in a circumference of a radius equal to that distance centered on the anchor. By doing this with 3 different anchors and merging the results the system calculates its relative position to a point of reference (defined by the user at the anchors' setting).
Tags also have an IMU among other sensors with which you can obtain the following information of each one:
Pressure, acceleration, magnetic field, angular velocity, Euler angles, quaternions, lineal acceleration, gravity vector, temperature.

HOW TO MAKE IT WORK

  1. Connect each one of the 4 anchors we have in the laboratory to its own power suply.
  2. Connect the tags you are about to use to a power supply or a PC using a USB-microUSB cable.
  3. Stack one of the tags on top of the Arduino board and connect this to a PC.
  4. Use the Arduino IDE and the code you can find in the git repos (https://gitioc.upc.edu, filter by "pozyx") to upload the program to the board.
  5. Execute the C++ program to recieve and save the data on the PC connected to the Arduino.
    NOTE Before doing so, modify the parameters you may need for the experiment.
    NOTE Make sure you have correctly selected the right type of Arduino board and the port to which it's connected.


PARAMETERS

struct dades_t ----------------------------------------------- Structure containing 4 types of variables:
---uint16_t id -------------------------------------------------- The one with the id of the tag.
---coordinates_t coordinades --------------------------- A type of variable defined in the Pozyx library that will save the position data.
---sensor_raw_t imu --------------------------------------- Another predefined type in the library that saves all sensors' data.
---pos_error_t error ----------------------------------------- Another predefined variable that saves the error made in the calculus of the last given position.

union dades_u ----------------------------------------------- Union of a dades_t variable with an array of bytes(size of which = num. of bytes of dades_t).

const int num_tags ----------------------------------------- Number of tags used simultaneously (local tag not included).

uint16_t tags[num_tags] --------------------------------- The id codes of all inalambric tags to be used.
---------------------------------------------------------------------- NOTE The id of each tag is written on it.

uint16_t id_local --------------------------------------------- Id of the local tag (the one connected to the Arduino).

const uint8_t num_anchors ----------------------------- Number of anchors.

uint16_t anchors[num_anchors] ----------------------- The id codes of all the anchors.

int32_t anchors_x[num_anchors] --------------------- Coordinate x of the anchors.
int32_t anchors_y[num_anchors] --------------------- Coordinate y of the anchors.
int32_t heights[num_anchors] -------------------------- Coordinate z of the anchors.
---------------------------------------------------------------------- NOTE All types of positioning data, including these, are given in milimeters (mm).

uint8_t algorithm --------------------------------------------- Algorithm used by the program to compute the position (defined in the librery).

uint8_t dimension -------------------------------------------- Type of dimension to be used.

int32_t height -------------------------------------------------- Fixed height of the tags in case of using the 2.5D dimension.

DEBUG PARAMETERS

int32_t tempsDelay ----------------------------------------- Time between iterations of the program (recieving/sending data).

boolean printarPortSerie ---------------------------------- True in order to print with char the position and sensor data through the serial port.

boolean use_processing ---------------------------------- True to use the processing scheme to visualize the position of all anchors and tags.
---------------------------------------------------------------------- NOTE printarPortSerie has to be true for this to work!

FAQ

If the program doesn't work try uploading the code again.
If the problem persist try pushing the RESET button in the Arduino board.
If the problem hasn't been solved yet try unplugging all the tags and the Arduino itself and plug them again starting always with this one.\\\