Manufaktur industri
Industri Internet of Things | bahan industri | Pemeliharaan dan Perbaikan Peralatan | Pemrograman industri |
home  MfgRobots >> Manufaktur industri >  >> Manufacturing Technology >> Proses manufaktur

Logger Data GPS, Kurva Real-Time, Tinggi Maks, dan Kecepatan Maks

Komponen dan persediaan

Arduino UNO
arduino uno
× 1
Jumper (Busbar), Kumpulan Lead Jumper
× 1
Arduino Proto Shield
× 1
1.8" Layar LCD TFT SPI dengan Soket MicroSD
atau lainnya dengan kartu SD
× 1
u-blox gps neo 6m
× 1

Alat dan mesin yang diperlukan

Besi solder (generik)
Kawat Solder, Bebas Timah
Pemotong &Pemotong Kawat, 18-10 AWG / 0,75-4mm² Kabel Kapasitas

Tentang proyek ini

PENDAHULUAN

Saya berlatih aeromodelling dan saya ingin mengetahui kecepatan dan ketinggian pesawat saya. sayangnya, data logger GPS komersial sangat mahal.

Jadi saya memutuskan untuk membuat pencatat data GPS berbasis Arduino dengan biaya kurang dari €50.

Prototipe pertama saya didasarkan pada Arduino Uno R3 dengan layar Sainsmart ST7735 dengan kartu SD terintegrasi dan modul GPS NEO 6M V2.

Dalam proyek kedua saya akan menggunakan Arduino Nano dengan layar OLED SSD1306, modul GPS yang sama, dan kartu micro SD. Berat dengan casing harus sekitar 40 gram dan dapat dengan mudah diintegrasikan ke dalam pesawat berukuran sedang (ukuran L 50 mm X l 30mm X T 22mm).

Ini akan menjadi proyek saya berikutnya (saya menunggu materinya.)

UJI

Tidak mudah untuk memfilmkan layar Arduino di dalam mobil, tetapi saya melakukannya dan Anda dapat melihat hasilnya di video.

Tes berikutnya akan dilakukan dengan prototipe baru yang lebih kecil dan lebih ringan pada pesawat yang dikendalikan radio. Bersambung!


Kode

  • pencatat data gps
  • SD Sauvegarde
pencatat data gps Arduino
#include #include #include  #define cs 10#define dc 9#define rst 8 #include #include  Adafruit_ST7735 tft =Adafruit_ST7735(cs, dc, rst);konstans statis RXPin =4, TXPin =3; //Konstitusi statis komunikasi GPS 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;;pengaturan batal(){ 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("initilisasi"); }void loop(){ tft.setTextSize(1); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); // affichage des informations chaque bonne penerima satelit while (ss.available()> 0){ gps.encode(ss.read()); if (gps.location.isUpdated()){ kader(); tft.setCursor(5, 44); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("Lintang :"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(gps.location.lat(), 6); tft.setCursor(5, 58); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("Bujur :"); 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("tanggal :"); 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("heur :"); 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 ketinggian tft.setCursor(5, 80); tft.print("H m :"); 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); maksimal(); 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 tindakan:"); 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); vmaks(); tft.print("vmaks:"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(kecepatan maksimal); 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("Nomor Sat :"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(gps.satellites.value()); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(""); // Horisontal Redup. dari Presisi (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 =milis(); lakukan { 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; // konversi vitesse max (350 km/j) en pixel nouvelleValeurh =peta((gps.altitude.meters()), 0, 1000, 104, 72); // mobil l'cran a 64 piksel de haut xh++; tft.drawPixel(xh,nouvelleValeurh,ST7735_CYAN); if (xh>123) { xh=80; tft.fillRect(82,72,43,35,ST7735_BLACK); }}void vmax() {// menghitung kecepatan maksimum1 =(gps.speed.kmph()); if ( speed1> maxspeed) { maxspeed =speed1; } } void hmax() {// hitung ketinggian maksimum 1 =(gps.altitude.meters()); if ( tinggi1> maxhigh) { maxhigh =tinggi1; } }
sauvegarde SDArduino
data logger
#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; //komunikasi GPS statis 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;;pengaturan batal(){ 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("initilisasi"); tft.setCursor(5, 70); tft.print("init SD"); penundaan (1000); if(!SD.begin(cs_sd)) //Kondisi vrifiant si la carte SD est prsente dans l'appareil { tft.setCursor(5, 82); tft.print("Defaut SD"); kembali; } tft.setCursor(5, 82); tft.print("Carte SD OK"); penundaan (1000); tft.fillScreen(ST7735_BLACK); Data file =SD.open("donnees.txt",FILE_WRITE); // Ouvre le fichier "donnees.txt" data.println(""); data.println("Akuisisi Dmarrage"); // Ecrit dans ce fichier data.close(); }void loop(){ tft.setTextSize(1); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); // affichage des informations chaque bonne penerima satelit while (ss.available()> 0){ gps.encode(ss.read()); if (gps.location.isUpdated()){ kader(); tft.setCursor(5, 44); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("Lintang :"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(gps.location.lat(), 6); tft.setCursor(5, 58); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("Bujur :"); 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("tanggal :"); 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 Tanggal=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("heur :"); 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 ketinggian tft.setCursor(5, 80); tft.print("H m :"); 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); maksimal(); 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 tindakan:"); 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); vmaks(); tft.print("vmaks:"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(kecepatan maksimal); 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("Nomor Sat :"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(gps.satellites.value()); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(""); // Horisontal Redup. dari Presisi (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(Tanggal + " " + Suhu + " " + 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.tutup(); } }}// delai pour une bonne recptionstatic void smartDelay(unsigned long ms){ unsigned long start =milis(); lakukan { 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; // konversi vitesse max (350 km/j) en pixel nouvelleValeurh =peta((gps.altitude.meters()), 0, 1000, 104, 72); // mobil l'cran a 64 piksel de haut xh++; tft.drawPixel(xh,nouvelleValeurh,ST7735_CYAN); if (xh>123) { xh=80; tft.fillRect(82,72,43,35,ST7735_BLACK); }}void vmax() {// menghitung kecepatan maksimum1 =(gps.speed.kmph()); if ( speed1> maxspeed) { maxspeed =speed1; } } void hmax() {// hitung ketinggian maksimum 1 =(gps.altitude.meters()); if ( tinggi1> maxhigh) { maxhigh =tinggi1; } }

Skema


Proses manufaktur

  1. Buat pendeteksi kebakaran dalam hitungan menit dengan Samsung SAMIIO, Arduino UNO, dan Raspberry Pi
  2. Akuisisi Data Real-Time Panel Surya Menggunakan Arduino
  3. Cara Membuat Monitor Energi Arduino dan Data Logger
  4. Animasi dan Permainan LCD
  5. Pencatat Data Suhu dan Kelembaban
  6. Kalkulator UNO sederhana
  7. Kegigihan Visi
  8. u-blox LEA-6H 02 Modul GPS dengan Arduino dan Python
  9. 4x4x4 LED cube dengan Arduino Uno dan 1sheeld
  10. Python3 dan Komunikasi Arduino