Industrielle Fertigung
Industrielles Internet der Dinge | Industrielle Materialien | Gerätewartung und Reparatur | Industrielle Programmierung |
home  MfgRobots >> Industrielle Fertigung >  >> Manufacturing Technology >> Herstellungsprozess

GPS-Datenlogger, Echtzeitkurve, maximale Höhe und maximale Geschwindigkeit

Komponenten und Verbrauchsmaterialien

Arduino UNO
arduino uno
× 1
Jumper (Sammelschiene), Jumperkabelsatz
× 1
Arduino Proto Shield
× 1
1,8-Zoll-TFT-SPI-LCD-Bildschirm mit MicroSD-Sockel
oder eine andere mit SD-Karte
× 1
u-blox gps neo 6m
× 1

Notwendige Werkzeuge und Maschinen

Lötkolben (generisch)
Lötdraht, bleifrei
Abisolierzange und -schneider, 18-10 AWG / 0,75-4 mm² Kapazität Drähte

Über dieses Projekt

EINFÜHRUNG

Ich praktiziere Modellflug und weiß gerne die Geschwindigkeit und Höhe meiner Flugzeuge. leider sind kommerzielle GPS-Datenlogger sehr teuer.

Also habe ich mich entschieden, für weniger als 50€ einen GPS-Datenlogger auf Arduino-Basis zu bauen.

Mein erster Prototyp basiert auf Arduino Uno R3 mit einem Sainsmart ST7735-Bildschirm mit integrierter SD-Karte und einem NEO 6M V2 GPS-Modul.

Im zweiten Projekt würde ich einen Arduino Nano mit einem SSD1306 OLED-Bildschirm, dem gleichen GPS-Modul und einer Micro-SD-Karte verwenden. Das Gewicht mit Koffer soll ca. 40 Gramm betragen und lässt sich problemlos in ein mittelgroßes Flugzeug (Größe L 50 mm X L 30 mm X H 22 mm) integrieren.

Es wird mein nächstes Projekt (ich warte auf die Materialien.)

TEST

Es ist nicht einfach, einen Arduino-Bildschirm in einem Auto zu filmen, aber ich habe es geschafft und Sie können das Ergebnis im Video sehen.

Der nächste Test wird mit dem neuen, kleineren und leichteren Prototyp an einem ferngesteuerten Flugzeug sein. Fortsetzung folgt!


Code

  • GPS-Datenlogger
  • Sauvegarde-SD
GPS-Datenlogger Arduino
#include #include #include  #define cs 10#define dc 9#define rst 8 #include #include  Adafruit_ST7735 tft =Adafruit_ST7735(cs, dc, rst);statische Konstante int RXPin =4, TXPin =3; //GPS-Kommunikation statisch 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, speed1 =0;int high1 =0;; Einrichtung ungültig () {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("Initialisierung"); }void loop () { tft.setTextSize (1); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); // Affichage des informations a chaque bonne empfangssatellit 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("Breitengrad:"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print (gps.location.lat(), 6); tft.setCursor(5, 58); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("Längengrad:"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print (gps.location.lng(), 6); // Affichage-Ecran-Datum tft.setCursor (5, 7); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("Datum:"); 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-Höhe 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-Akt:"); 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(" "); // Horizontale Abm. der Präzision (100ths-i32) Serial.print ("HDOP ="); Serial.println (gps.hdop.value()); smartDelay(400); aufrechtzuerhalten. aufrechtzuerhalten. do { 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); // Auto l'cran a 64 Pixel de haut xh++; tft.drawPixel(xh,nouvelleValeurh,ST7735_CYAN); wenn (xh>123) {xh=80; tft.fillRect(82,72,43,35,ST7735_BLACK); }}void vmax () {// vitese maximale Geschwindigkeit berechnen 1 =(gps.speed.kmph (); if (speed1> maxspeed) { maxspeed =speed1; aufrechtzuerhalten. aufrechtzuerhalten. aufrechtzuerhalten. if (high1> maxhigh) { maxhigh =high1; } }
sauvegarde SDArduino
Datenlogger
#include #include#include #include  #define cs 10#define dc 9#define rst 8 #include #include Adafruit_ST7735 tft =Adafruit_ST7735(cs, dc, rst);statische Konstante int RXPin =4, TXPin =3; //GPS-Kommunikationstatisch 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 maxspeed =0, speed1 =0;int high1 =0;;void setup () { 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("Initialisierung"); tft.setCursor(5, 70); tft.print("init SD"); Verzögerung (1000); if(!SD.begin(cs_sd)) //Bedingung wird auf der Karte angezeigt und wird im Appareil angezeigt { tft.setCursor(5, 82); tft.print("Standard-SD"); Rückkehr; } tft.setCursor(5, 82); tft.print("Karte SD OK"); Verzögerung (1000); tft.fillScreen(ST7735_BLACK); Dateidaten =SD.open("donnees.txt",FILE_WRITE); // Ouvre le fichier "donnees.txt" data.println(""); data.println("Dmarrage Akquisition"); // Ecrit dans ce fichier data.close(); }void loop () { tft.setTextSize (1); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); // Affichage des informations a chaque bonne empfangssatellit 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("Breitengrad:"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print (gps.location.lat(), 6); tft.setCursor(5, 58); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("Längengrad:"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print (gps.location.lng(), 6); // Affichage-Ecran-Datum tft.setCursor (5, 7); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("Datum:"); 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 Date=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-Höhe 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-Akt:"); 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(" "); // Horizontale Abm. der Präzision (100ths-i32) Serial.print ("HDOP ="); Serial.println (gps.hdop.value()); smartDelay(400); // Ecriture of donnes dans le fichier texte File data=SD.open("donnees.txt",FILE_WRITE); data.println(Datum + " " + 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(); aufrechtzuerhalten. aufrechtzuerhalten. do { 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); // Auto l'cran a 64 Pixel de haut xh++; tft.drawPixel(xh,nouvelleValeurh,ST7735_CYAN); wenn (xh>123) {xh=80; tft.fillRect(82,72,43,35,ST7735_BLACK); }}void vmax () {// vitese maximale Geschwindigkeit berechnen 1 =(gps.speed.kmph (); if (speed1> maxspeed) { maxspeed =speed1; aufrechtzuerhalten. aufrechtzuerhalten. aufrechtzuerhalten. if (high1> maxhigh) { maxhigh =high1; } }

Schaltpläne


Herstellungsprozess

  1. Erstellen Sie mit Samsung SAMIIO, Arduino UNO und Raspberry Pi in wenigen Minuten einen Brandmelder
  2. Echtzeit-Datenerfassung von Solarmodulen mit Arduino
  3. So bauen Sie einen Arduino-Energiemonitor und einen Datenlogger
  4. LCD-Animation und -Spiele
  5. Temperatur- und Feuchtigkeitsdatenlogger
  6. Einfacher UNO-Rechner
  7. Beharrlichkeit der Vision
  8. u-blox LEA-6H 02 GPS-Modul mit Arduino und Python
  9. 4x4x4 LED-Würfel mit Arduino Uno und 1sheeld
  10. Python3- und Arduino-Kommunikation