Manufaturação industrial
Internet das coisas industrial | Materiais industriais | Manutenção e reparo de equipamentos | Programação industrial |
home  MfgRobots >> Manufaturação industrial >  >> Manufacturing Technology >> Processo de manufatura

Registrador de dados GPS, curva em tempo real, altura máxima e velocidade máxima

Componentes e suprimentos

Arduino UNO
arduino uno
× 1
Jumper (barramento), conjunto de cabos de jumper
× 1
Arduino Proto Shield
× 1
Tela LCD TFT SPI de 1,8 "com soquete MicroSD
ou outro com cartão SD
× 1
u-blox gps neo 6m
× 1

Ferramentas e máquinas necessárias

Ferro de soldar (genérico)
Arame de solda, sem chumbo
Decapador e cortador de fio, 18-10 AWG / 0,75-4 mm² Fios de capacidade

Sobre este projeto





INTRODUÇÃO


Pratico aeromodelismo e gosto de saber a velocidade e altitude dos meus aviões. infelizmente, os registradores de dados GPS comerciais são muito caros.

Decidi então fazer um data logger GPS baseado no Arduino por um custo inferior a 50 €.

Meu primeiro protótipo é baseado no Arduino Uno R3 com uma tela Sainsmart ST7735 com cartão SD integrado e um módulo GPS NEO 6M V2.

No segundo projeto eu usaria um Arduino Nano com uma tela OLED SSD1306, o mesmo módulo GPS e um cartão micro SD. O peso com a caixa deve ser em torno de 40 gramas e pode ser facilmente integrado em uma aeronave de médio porte (tamanho L 50 mm X 30 mm X A 22 mm).

Será meu próximo projeto (estou aguardando os materiais).





TESTE


Não é fácil filmar uma tela do Arduino em um carro, mas eu fiz e você pode ver o resultado no vídeo.

O próximo teste será com o novo protótipo, menor e mais leve, em uma aeronave controlada por rádio. Continua!



Código

  • registrador de dados GPS
  • sauvegarde SD
registrador de dados GPS Arduino
 #include  #include  #include  #define cs 10 # define dc 9 # define rst 8 #include  #include  Adafruit_ST7735 tft =Adafruit_ST7735 (cs, dc, rst); const estático int RXPin =4, TXPin =3; // GPS communicationstatic const uint32_t GPSBaud =9600; #define OLED_RESET 5TinyGPSPlus gps; SoftwareSerial ss (RXPin, TXPin); int x =80; int xh =80; int maxhigh =0; int maxspeed =0, velocidade1 =0; int alta1 =0;; configuração vazia () {Serial.begin (9600); ss.begin (GPSBaud); tft.initR (INITR_GREENTAB); tft.fillScreen (ST7735_BLACK); tft.setCursor (5, 58); tft.setTextSize (1); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("inicialização"); } void loop () {tft.setTextSize (1); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); // affichage des informations um satélite de recepção chaque bonne while (ss.available ()> 0) {gps.encode (ss.read ()); if (gps.location.isUpdated ()) {cadre (); tft.setCursor (5, 44); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("Latitude:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.location.lat (), 6); tft.setCursor (5, 58); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("Longitude:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.location.lng (), 6); // affichage ecran date tft.setCursor (5, 7); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("data:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.date.day ()); tft.print (""); tft.print (gps.date.month ()); tft.print (""); tft.print (gps.date.year ()); // affichage ecran heure tft.setCursor (5, 20); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("heure:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.time.hour () + 1); tft.print (""); tft.print (gps.time.minute ()); tft.print (""); tft.print (gps.time.second ()); tft.print (""); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.setCursor (3, 30); // affichage ecran altitude tft.setCursor (5, 80); tft.print ("Hm:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.altitude.meters (), 0); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (""); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.setCursor (5, 95); hmax (); tft.print ("Hmax:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (maxhigh); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (""); courbeh (); // affichage ecran vitesse tft.setCursor (5, 115); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("V act:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.speed.kmph (), 0); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (""); tft.setCursor (5, 130); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); vmax (); tft.print ("vmax:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (maxspeed); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (""); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); courbe (); // affichage ecran nombre de satellites tft.setCursor (5, 147); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("nombre de Sat:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.satellites.value ()); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (""); // Dim horizontal. de precisão (100ths-i32) Serial.print ("HDOP ="); Serial.println (gps.hdop.value ()); smartDelay (400); }}} // delai pour une bonne recptionstatic void smartDelay (unsigned long ms) {unsigned long start =millis (); fazer {while (ss.available ()) gps.encode (ss.read ()); } while (millis () - start  123) {x =80; tft.fillRect (82,110,43,30, ST7735_BLACK); }} void courbeh () {int nouvelleValeurh; // converison vitesse max (350 km / h) en pixel nouvelleValeurh =map ((gps.altitude.meters ()), 0, 1000, 104, 72); // carro l'cran a 64 pixels de haut xh ++; tft.drawPixel (xh, nouvelleValeurh, ST7735_CYAN); se (xh> 123) {xh =80; tft.fillRect (82,72,43,35, ST7735_BLACK); }} void vmax () {// calcula a velocidade máxima1 =(gps.speed.kmph ()); if (speed1> maxspeed) {maxspeed =speed1; }} void hmax () {// calcula a altitude máxima high1 =(gps.altitude.meters ()); if (high1> maxhigh) {maxhigh =high1; }} 
sauvegarde SD Arduino
registrador de dados
 #include  #include  #include  #include  #define cs 10 # define dc 9 # define rst 8 #include  #include  Adafruit_ST7735 tft =Adafruit_ST7735 (cs, dc, rst); const estático int RXPin =4, TXPin =3; // GPS communicationstatic const uint32_t GPSBaud =9600; const int cs_sd =4; #define OLED_RESET 5TinyGPSPlus gps; SoftwareSerial ss (RXPin, TXPin); int x =80; int xh =80; int maxhigh =0; int maxhigh =0; int maxspeed =0, velocidade1 =0; int alta1 =0;; configuração vazia () {Serial.begin (9600); ss.begin (GPSBaud); tft.initR (INITR_GREENTAB); tft.fillScreen (ST7735_BLACK); tft.setCursor (5, 58); tft.setTextSize (1); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("inicialização"); tft.setCursor (5, 70); tft.print ("init SD"); atraso (1000); if (! SD.begin (cs_sd)) // Condição vrifiant si la carte SD est prsente dans l'appareil {tft.setCursor (5, 82); tft.print ("Defaut SD"); Retorna; } tft.setCursor (5, 82); tft.print ("Carte SD OK"); atraso (1000); tft.fillScreen (ST7735_BLACK); Dados do arquivo =SD.open ("donnees.txt", FILE_WRITE); // Ouvre le fichier "donnees.txt" data.println (""); data.println ("aquisição Dmarrage"); // Ecrit dans ce fichier data.close (); } void loop () {tft.setTextSize (1); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); // affichage des informations um satélite de recepção chaque bonne while (ss.available ()> 0) {gps.encode (ss.read ()); if (gps.location.isUpdated ()) {cadre (); tft.setCursor (5, 44); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("Latitude:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.location.lat (), 6); tft.setCursor (5, 58); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("Longitude:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.location.lng (), 6); // affichage ecran date tft.setCursor (5, 7); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("data:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.date.day ()); tft.print (""); tft.print (gps.date.month ()); tft.print (""); tft.print (gps.date.year ()); String Data =String (gps.date.day ()) + ("") + (gps.date.month ()) + ("") + (gps.date.year ()); // affichage ecran heure tft.setCursor (5, 20); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("heure:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.time.hour () + 1); tft.print (""); tft.print (gps.time.minute ()); tft.print (""); tft.print (gps.time.second ()); tft.print (""); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.setCursor (3, 30); String Temps =String (gps.time.hour () + 1) + ("") + (gps.time.minute ()) + ("") + (gps.time.second ()); // affichage ecran altitude tft.setCursor (5, 80); tft.print ("Hm:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.altitude.meters (), 0); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (""); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.setCursor (5, 95); hmax (); tft.print ("Hmax:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (maxhigh); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (""); courbeh (); // affichage ecran vitesse tft.setCursor (5, 115); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("V act:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.speed.kmph (), 0); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (""); tft.setCursor (5, 130); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); vmax (); tft.print ("vmax:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (maxspeed); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (""); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); courbe (); // affichage ecran nombre de satellites tft.setCursor (5, 147); tft.setTextColor (ST7735_GREEN, ST7735_BLACK); tft.print ("nombre de Sat:"); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (gps.satellites.value ()); tft.setTextColor (ST7735_CYAN, ST7735_BLACK); tft.print (""); // Dim horizontal. de precisão (100ths-i32) Serial.print ("HDOP ="); Serial.println (gps.hdop.value ()); smartDelay (400); // Ecriture des donnes dans le fichier texte File data =SD.open ("donnees.txt", FILE_WRITE); data.println (Date + "" + Temps + "" + String (gps.location.lat (), 6) + "" + String (gps.location.lng (), 6) + ("") + String ( gps.altitude.meters (), 0) + ("") + String (maxhigh) + ("") + String (gps.speed.kmph (), 0) + ("") + String (maxspeed)); data.close (); }}} // delai pour une bonne recptionstatic void smartDelay (unsigned long ms) {unsigned long start =millis (); fazer {while (ss.available ()) gps.encode (ss.read ()); } while (millis () - start  123) {x =80; tft.fillRect (82,110,43,30, ST7735_BLACK); }} void courbeh () {int nouvelleValeurh; // converison vitesse max (350 km / h) en pixel nouvelleValeurh =map ((gps.altitude.meters ()), 0, 1000, 104, 72); // carro l'cran a 64 pixels de haut xh ++; tft.drawPixel (xh, nouvelleValeurh, ST7735_CYAN); se (xh> 123) {xh =80; tft.fillRect (82,72,43,35, ST7735_BLACK); }} void vmax () {// calcula velocidade máxima1 =(gps.speed.kmph ()); if (speed1> maxspeed) {maxspeed =speed1; }} void hmax () {// calcula a altitude máxima high1 =(gps.altitude.meters ()); if (high1> maxhigh) {maxhigh =high1; }} 

Esquemas


Processo de manufatura

  1. Faça um detector de incêndio em minutos com Samsung SAMIIO, Arduino UNO e Raspberry Pi
  2. Aquisição de dados em tempo real do painel solar usando Arduino
  3. Como construir um monitor de energia Arduino e registrador de dados
  4. Animação de LCD e jogos
  5. Registrador de dados de temperatura e umidade
  6. Calculadora UNO simples
  7. Persistência da visão
  8. u-blox LEA-6H 02 Módulo GPS com Arduino e Python
  9. Cubo de LED 4x4x4 com Arduino Uno e 1sheeld
  10. Comunicação Python3 e Arduino