Industriële fabricage
Industrieel internet der dingen | Industriële materialen | Onderhoud en reparatie van apparatuur | Industriële programmering |
home  MfgRobots >> Industriële fabricage >  >> Manufacturing Technology >> Productieproces

GPS-datalogger, realtime curve, maximale hoogte en maximale snelheid

Componenten en benodigdheden

Arduino UNO
arduino uno
× 1
Jumper (busbar), jumperkabelset
× 1
Arduino Proto Shield
× 1
1.8" TFT SPI LCD-scherm met MicroSD-aansluiting
of een andere met SD-kaart
× 1
u-blox gps neo 6m
× 1

Benodigde gereedschappen en machines

Soldeerbout (algemeen)
Soldeerdraad, loodvrij
Draadstripper en snijder, 18-10 AWG / 0,75-4 mm² Capaciteit Draden

Over dit project

INLEIDING

Ik beoefen aeromodellering en ik vind het leuk om de snelheid en hoogte van mijn vliegtuigen te weten. helaas zijn commerciële GPS-dataloggers erg duur.

Dus besloot ik een GPS-datalogger te maken op basis van Arduino voor minder dan € 50.

Mijn eerste prototype is gebaseerd op Arduino Uno R3 met een Sainsmart ST7735-scherm met geïntegreerde SD-kaart en een NEO 6M V2 GPS-module.

In het tweede project zou ik een Arduino Nano gebruiken met een SSD1306 OLED-scherm, dezelfde GPS-module en een micro SD-kaart. Het gewicht met koffer moet rond de 40 gram zijn en kan gemakkelijk worden geïntegreerd in een middelgroot vliegtuig (maat L 50 mm X l 30 mm X H 22 mm).

Het wordt mijn volgende project (ik wacht op de materialen.)

TEST

Het is niet eenvoudig om een ​​scherm van Arduino in een auto te filmen, maar het is me gelukt en je kunt het resultaat zien op de video.

De volgende test zal zijn met het nieuwe, kleinere en lichtere prototype op een radiografisch bestuurbaar vliegtuig. Wordt vervolgd!


Code

  • gps datalogger
  • sauvegarde SD
gps datalogger Arduino
#include #include #include  #define cs 10#define dc 9#define rst 8 #include #include  Adafruit_ST7735 tft =Adafruit_ST7735 (cs, dc, rst); statische const int RXPin =4, TXPin =3; //GPS-communicatiestatic 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;;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("initialisatie"); }void loop(){ tft.setTextSize(1); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); // affichage des informations a chaque bonne ontvangstsatelliet while (ss.available()> 0){ gps.encode(ss.read()); if (gps.locatie.isUpdated()){ kader(); tft.setCursor(5, 44); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("Breedte:"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(gps.locatie.lat(), 6); tft.setCursor(5, 58); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("Lengte :"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(gps.locatie.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.datum.dag()); tft.print(" "); tft.print(gps.datum.maand()); tft.print(" "); tft.print(gps.datum.jaar()); //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 hoogte tft.setCursor (5, 80); tft.print("Hm :"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print (gps.hoogte.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(" "); courbe (); //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.snelheid.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(" "); // Horizontaal afm. van precisie (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(); doen { 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; // conversie vitesse max (350 km/u) en pixel nouvelleValeurh =map((gps.altitude.meters()), 0, 1000, 104, 72); // auto l'cran a 64 pixels de haut xh++; tft.drawPixel(xh,nouvelleValeurh,ST7735_CYAN); als (xh>123) { xh=80; tft.fillRect(82,72,43,35,ST7735_BLACK); }}void vmax() {// calcul vitese maximale snelheid1 =(gps.speed.kmph()); if (snelheid1> maxspeed) {maxspeed =snelheid1; } } void hmax() {// calcul hoogte maximum high1 =(gps.altitude.meters()); if (high1> maxhigh) { maxhigh =high1; } }
sauvegarde SDArduino
datalogger
#include #include#include #include  #define cs 10#define dc 9#define rst 8 #include #include Adafruit_ST7735 tft =Adafruit_ST7735(cs, dc, rst);static const int RXPin =4, TXPin =3; //GPS-communicatiestatisch 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("initialisatie"); tft.setCursor(5, 70); tft.print("init SD"); vertraging (1000); if(!SD.begin(cs_sd)) //Condition vrifiant si la carte SD prsente dans l'appareil { tft.setCursor(5, 82); tft.print("Standaard SD"); opbrengst; } tft.setCursor(5, 82); tft.print("Kaart SD OK"); vertraging (1000); tft.fillScreen(ST7735_BLACK); Bestandsgegevens =SD.open("donnees.txt",FILE_WRITE); // Bekijk het bestand "donnees.txt" data.println(""); data.println("Dmarrage acquisitie"); // Ecrit dans ce ficier data.close(); }void loop(){ tft.setTextSize(1); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); // affichage des informations a chaque bonne ontvangstsatelliet while (ss.available()> 0){ gps.encode(ss.read()); if (gps.locatie.isUpdated()){ kader(); tft.setCursor(5, 44); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("Breedte:"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(gps.locatie.lat(), 6); tft.setCursor(5, 58); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("Lengte :"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(gps.locatie.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.datum.dag()); tft.print(" "); tft.print(gps.datum.maand()); tft.print(" "); tft.print(gps.datum.jaar()); String Datum=String(gps.datum.dag())+(" ")+(gps.datum.maand())+(" ")+(gps.datum.jaar()); //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 hoogte tft.setCursor (5, 80); tft.print("Hm :"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print (gps.hoogte.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(" "); courbe (); //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.snelheid.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(" "); // Horizontaal afm. van precisie (100ths-i32) Serial.print("HDOP ="); Serial.println(gps.hdop.value()); smartDelay(400); // Ecriture des donnes dans le fihier texte Bestand 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)); gegevens.sluiten(); } }}// delai pour une bonne recptionstatic void smartDelay(unsigned long ms){ unsigned long start =millis(); doen { 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; // conversie vitesse max (350 km/u) en pixel nouvelleValeurh =map((gps.altitude.meters()), 0, 1000, 104, 72); // auto l'cran a 64 pixels de haut xh++; tft.drawPixel(xh,nouvelleValeurh,ST7735_CYAN); als (xh>123) { xh=80; tft.fillRect(82,72,43,35,ST7735_BLACK); }}void vmax() {// calcul vitese maximale snelheid1 =(gps.speed.kmph()); if (snelheid1> maxspeed) {maxspeed =snelheid1; } } void hmax() {// calcul hoogte maximum high1 =(gps.altitude.meters()); if (high1> maxhigh) { maxhigh =high1; } }

Schema's


Productieproces

  1. Maak binnen enkele minuten een branddetector met Samsung SAMIIO, Arduino UNO en Raspberry Pi
  2. Real-time data-acquisitie van zonnepaneel met behulp van Arduino
  3. Een Arduino-energiemonitor en datalogger bouwen
  4. LCD-animatie en gaming
  5. Temperatuur- en vochtigheidsdatalogger
  6. Eenvoudige UNO-rekenmachine
  7. Persistentie van visie
  8. u-blox LEA-6H 02 GPS-module met Arduino en Python
  9. 4x4x4 LED-kubus met Arduino Uno en 1sheeld
  10. Python3- en Arduino-communicatie
  11. FM-radio met Arduino en RDA8057M