Mostrando entradas con la etiqueta GPS. Mostrar todas las entradas
Mostrando entradas con la etiqueta GPS. Mostrar todas las entradas

lunes, 15 de noviembre de 2010

Tracking system

English
 We want to take a step in our project and we met the tracking, we want to know the path that our rocket does. In another post we talk about APRS, we don't discard it yet, but we will decant to a GPS + Arduino system, the problem of this system is that we need to recover the platform to treat the data, we don't have this problem with the APRS as we receive the coordinates via radio.

GPS installation and configuration: 
We put a DB-9 female connector to the GPS, we feed it with 5 volts and connect it directly to the computer and we look at the results in the arduino's hyperterminal (speed: 4800 baud).

We can see the results in the annex #1.


The 4 sentence by default that give us the GPS are repeated periodically, we can know the meaning of each frame in the GPS specifications that you can find in the link of the Annex #2 (the GPS does not converge since we are in the lab).

Condition the GPS signal with TTL level converter. Image only use the settings to low because we only want to receive data from GPS, doeth he Transmission cable does not use GPS. 

We use a board made by us based on ATmega (Arduino), this was design  for the WikiSat project and his name is AWIP. 

We went outside with a laptop and switch on the board with the GPS, this converges almost immediately and with startling accuracy. 

As we mentioned at the beginning, the system we have chosen have not wireless transmission and therefore will have to save the data that GPS provide us. And the way this data will be stored in an EEPROM (Programmable ROM) for subsequent extraction and treatment. 

And to end we made up a safe system of ignition, it is a remote control that we call "FIREBOX". It consists of a 9 volt battery with internal circuitry and its most important function is to prevent accidentally rocket launched. First you have to turn on, some LED's warn us that the rocket is armed and the other that the GPS is aligned, once we see that the GPS is aligned, we burn the arduino to below (without wasting time and memory that we have is quite low) ignite the rocket.


Castellano
Queremos dar un paso en nuestro proyecto y nos topamos con el tracking, queremos saber el recorrido que hace nuestro cohete. En otra entrada hablamos del APRS, no lo desechamos aún pero nos vamos a decantar hacia un sistema GPS + Arduino, el problema de este sistema es que necesitamos recuperar la plataforma para poder tratar los datos mientras que con el APRS recibíamos las coordenadas via radio.

Montaje y configuración del GPS:
Ponemos un conector DB-9 hembra al GPS, lo alimentamos con 5 voltios y lo conectamos directamente al ordenador y miramos los resultados en el hiperterminal del arduino (velocidad: 4800 baud).

Podemos ver los resultados en annex #1.

Las 4 "frase" por defecto (default) que nos da el GPS se repiten periodicamente, se puede saber el significado de cada trama en las especificaciones del GPS que podeis encontrar en el enlace del Annex #2 (el GPS no converge ya que estamos dentro del laboratorio).

Acondicionamos la señal del GPS con un convertidor de nivel TTL. De la imagen solo usamos la configuración de a bajo ya que solo queremos recibir datos del GPS, el cable de transmissión hacial el GPS no lo utilizaremos.


Utilizamos una placa hecha por nosotros en base ATmega (arduino), esta se diseñó para el proyecto WikiSat y su nombre es AWIP
 
Salimos al exterior con un ordenador portátil y encendimos la placa con el GPS, este converge casi inmediatamente y con una precisión asombrosa.

Como hemos comentado al principio, el sistema que hemos elegido no dispone de transmisión inalámbrica y por lo tanto se tendrán que almacenar los datos que nos proporciona el GPS. Y la manera de almacenar estos datos sera mediante la EEPROM (memoria ROM programable) para su posterior extracción y tratado.

Ya para terminar nos inventamos un sistema seguro de ignición, se trata de un mando a distáncia que hemos llamado "FIREBOX". Consta de una pila de 9 voltios con una circuiteria interior y su funcion más importante es evitar que se lance el cohete accidentalmente. Primero se tiene que encender, unos leds nos advierten que el cohete esta armado y otro de si el GPS esta alineado, una vez vemos que el GPS esta alineado, ponemos a grabar el arduino para seguidamente (sin perder tiempo ya que la memoria que tenemos es bastante escasa) igniciar el cohete.

Annex #1:
$GPRMC,163918,V,2503.7166,N,12138.4152,E,,,121110,003.5,W*7A
$GPGGA,163918,2503.7166,N,12138.4152,E,0,00,,,M,,M,,*50
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,02,21,14,192,00,22,69,310,00*7A
$GPRMC,163919,V,2503.7166,N,12138.4152,E,,,121110,003.5,W*7B
$GPGGA,163919,2503.7166,N,12138.4152,E,0,00,,,M,,M,,*51
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,02,21,14,192,00,22,69,310,00*7A
$GPRMC,163920,V,2503.7166,N,12138.4152,E,,,121110,003.5,W*71
$GPGGA,163920,2503.7166,N,12138.4152,E,0,00,,,M,,M,,*5B
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,02,21,14,192,00,22,69,310,00*7A
$GPRMC,163921,V,2503.7166,N,12138.4152,E,,,121110,003.5,W*70
$GPGGA,163921,2503.7166,N,12138.4152,E,0,00,,,M,,M,,*5A
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,02,21,14,192,00,22,69,310,00*7A
$GPRMC,163922,V,2503.7166,N,12138.4152,E,,,121110,003.5,W*73
$GPGGA,163922,2503.7166,N,12138.4152,E,0,00,,,M,,M,,*59
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPGSV,1,1,02,21,14,192,00,22,69,310,00*7A

Annex #2:
http://static.garmincdn.com/pumac/425_TechnicalSpecification.pdf

Annex #3:
CP210x USB driver
http://www.silabs.com/products/mcu/pages/usbtouartbridgevcpdrivers.aspx

Arduino code:
// ATmega168@16MHz 5V
// Garmin GPS-18x VLC 010-00321-36
// http://www8.garmin.com/manuals/GPS18x_TechnicalSpecifications.pdf
// 1 Bounding.     Vcc (+5)
// 2 White.        Data in. The satellite sends TTL level, NMEA information, from the satellite (Function not used)
// 3 Green.        Data out. The FIRE BOX send TTL level, NMEA information, to the satellite (Function not used)
// 4 Small black.  Igniter 9Vcc. The FIRE BOX provide ground to the Igniter
// 5 Black.       *GND
// 6 Red.         *Armed. The satellite starts to record puting to LOWLEVEL (GND)
// 7 Yellow.      *GPS aligned. The satellite sends a flashing signal 5Vcc
// 8 Small black.  Igniter 9Vcc. The FIRE BOX provide Positive to the Igniter
// 9 -             Not connected
// * Means that should be connected to the satellite
// WARNING: The switches must be in OFF or DOWN position before to plug the wires into the FIREBOX
// This configuration needs a FIREBOX whit a charget 9V battery for the igniter (1.5V Bulb filled with powder and covered by epoxy)
// When de satellite has GPS coverage, the ALIGNED led will flash. Rise the ARMED switch and then rise the LAUNCH to start the ignition
// http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi?coll=0650&db=bks&fname=/SGI_EndUser/MSB3xx_UG/ch07.html
//
// Battery pack before launch 6.35V


#include <SoftwareSerial.h>
#include <EEPROM.h>
SoftwareSerial GPS = SoftwareSerial(11,13); // SoftwareSerial(rxPin, txPin)
int addr;
int val;
int onair;
byte a[13];
void setup ()
{
  pinMode(12, INPUT); // 12 is the ISP central top pin
  addr = 0;
  val = 36; // '$' 36=00100100
  onair=0;
  a[0] = 0;
  a[1] = 0;
  a[2] = 0;
  a[3] = 0;
  a[4] = 0;
  a[5] = 0;
  a[6] = 0;
  a[7] = 0;
  a[8] = 0;
  a[9] = 0;
  a[10] = 0;
  a[11] = 0;
  a[12] = 0;
  GPS.begin(4800);
  Serial.begin(115200);
}


byte Next()
{
  // BYTE, BIN, OCT, HEX, 1 = number of decimals
  val = byte(GPS.read());
  Serial.print(val, BYTE);
  if(digitalRead(12) == LOW)
  {
    onair = 1;
  }
  return val;
}

void loop()
{
// $GPGSA,A,1,,,,,,,,,,,,,,,*1E
// $GPGSV,2,1,08,02,18,099,00,04,14,066,00,09,50,112,00,22,03,255,00*77
// $GPGSV,2,2,08,25,56,278,00,27,36,117,00,29,24,198,00,30,19,263,00*7E
// $GPRMC,060937,V,4116.5264,N,00159.1348,E,,,131110,000.8,W*77
// $GPGGA,060937,4116.5264,N,00159.1348,E,0,00,,,M,,M,,*52
  if(Next()=='$')
  {
    if(Next()=='G')
    {
      if(Next()=='P')
      {
        if(Next()=='G')
        {
          if(Next()=='G')
          {
            if(Next()=='A')
            {
              //Serial.println(" GPRMC sequence");
              while(Next()!='.');
              // Latitude sequence
              a[0] = Next();
              a[1] = Next();
              a[2] = Next();
              a[3] = Next();
              while(Next()!='.');
              // Longitude sequence
              a[4] = Next();
              a[5] = Next();
              a[6] = Next();
              a[7] = Next();
/*
              while(Next()!=',');
              while(Next()!=',');
              while(Next()!=',');
              while(Next()!=',');
              while(Next()!=',');
              // Altitude sequence
              a[8] = Next();
              a[9] = Next();
              a[10] = Next();
              a[11] = Next();
              a[12] = Next();
*/
            }
            if((addr<512) && (onair==1))
            {
              Serial.println("");
              EEPROM.write(addr, a[0]);
              addr++;
              EEPROM.write(addr, a[1]);
              addr++;
              EEPROM.write(addr, a[2]);
              addr++;
              EEPROM.write(addr, a[3]);
              addr++;
              EEPROM.write(addr, a[4]);
              addr++;
              EEPROM.write(addr, a[5]);
              addr++;
              EEPROM.write(addr, a[6]);
              addr++;
              EEPROM.write(addr, a[7]);
              addr++;
/*
              EEPROM.write(addr, a[8]);
              addr++;
              EEPROM.write(addr, a[9]);
              addr++;
              EEPROM.write(addr, a[10]);
              addr++;
              EEPROM.write(addr, a[11]);
              addr++;
              EEPROM.write(addr, a[12]);
              addr++;
*/
            }
          }
        }
      }
    }
  }
}


Pictures (Fotos):

 Picture #1
Garmin GPS 18x LVC.
Picture #2
TTL level converter, we only use the botom configuration.
Convertidor de nivel TTL, nosotros solo usamos la configuración de abajo.

Link:
http://freecircuitdiagram.com/2009/03/27/simple-ttl-rs232-level-converter-using-transistor/

Picture #3
TTL level converter.
Convertidor de nivel TTL.
Picture #4
Picture #5
Picture #6
GPS + AWIP system in the stage2 nose.
Sistema GPS + AWIP en el morro de la etapa 2.
Picture #7
FIREBOX.
Picture #8
FIREBOX pins
Pins de la FIREBOX

lunes, 11 de octubre de 2010

APRS

English
Problem #2: How to report the position of our rocket and then our balloon.

Solution #2: Using an APRS (Automatic Positioning Reporting System)

What is and that is the APRS?
Their labels indicate APRS is a system that can send "reports", ie data. It is based on amateur radio and is based in part on the AX.25 amateur protocol which is a data link layer protocol derived from X.25, this is very widespread in the United States and is primarily used to send position information but also can be used to send "messages" between users. With these digital data that can easily send us enter into a computer and easily paste this position information in a program such as Google Earth. 

To create our APRS need a GPS receiver, a data converter that receives the data NMEA from the GPS receiver, encoded data in APRS packets and generates the appropriate signal for an FM transmitter programmable for frequencies between 144 MHz and 148 MHz (amateur band) and Finally we need an antenna capable of transmitting between these frequencies as efficiently as possible.
So we receive this signal with a transceiver that is responsible for dealing with the received signal to obtain the "message" that contains, in our case we expect to obtain position, altitude, heading and speed.

In the next post we will see how to make and calibrate an APRS antenna.

Castellano
Problema #2: Como reportar la posición de nuestro cohete y a la vez de nuestro globo.

Solución #2: Mediante el uso del sistema de reporte automatico de posición o APRS (Automatic Positioning Reporting System).

¿Que es y en que consiste el APRS?
El APRS como sus siglas indican es un sistema capaz de enviarnos "informes", es decir, datos. Esta basado en radio amateur y se basa en parte del protocolo AX.25 que es un protocolo para enlace de datos amateur derivado del X.25, este esta muy extendido en los Estados Unidos y se usa principalmente para enviar información de posición aúnque también se puede usar para enviar "mensajes" entre usuarios. Con estos datos digitales que se nos envian se pueden facilmente introducir en un ordenador y pegar facilmente esta información de posición en un programa como por ejemplo el google earth.

Para crear nuestro APRS necesitaremos un receptor GPS, un convertidor de datos que recibe los datos NMEA del receptor GPS, los codifica en paquetes APRS y genera la señal adecuada para un transmisor FM programable para frecuencias entre 144 MHz y 148 MHz (banda amateur) y por último necesitaremos una antena capaz de transmitir entre estas frecuencias tan eficazmente como pueda.
Así pues esta señal la recibiremos con un transceiver (transceptor) que se encargará de tratar esta señal recibida para poder obtener el "mensaje" que contiene, en nuestro caso esperamos obtener posición así como altitud, rumbo y velocidad.

En la siguiente entrada veremos como construir y calibrar una antena para el APRS.