工業製造
産業用モノのインターネット | 工業材料 | 機器のメンテナンスと修理 | 産業プログラミング |
home  MfgRobots >> 工業製造 >  >> Manufacturing Technology >> 製造プロセス

GPSデータロガー、リアルタイムカーブ、最大高さ、最大速度

コンポーネントと消耗品

>
Arduino UNO
arduino uno
× 1
ジャンパー(バスバー)、ジャンパーリードセット
× 1
Arduinoプロトシールド
× 1
1.8 "MicroSDソケット付きTFTSPILCDスクリーン
またはSDカードを使用する別の方法
× 1
u-blox gps neo 6m
× 1

必要なツールとマシン

>
はんだごて(汎用)
はんだワイヤー、鉛フリー
ワイヤーストリッパーとカッター、18-10 AWG /0.75-4mm²キャパシティワイヤー

このプロジェクトについて

はじめに

私はエアロモデリングを練習していて、飛行機の速度と高度を知りたいです。残念ながら、商用GPSデータロガーは非常に高価です。

そこで、ArduinoをベースにしたGPSデータロガーを50ユーロ未満で作ることにしました。

私の最初のプロトタイプは、SDカードとNEO 6M V2GPSモジュールが統合されたSainsmartST7735画面を備えたArduinoUnoR3に基づいています。

2番目のプロジェクトでは、SSD1306 OLED画面、同じGPSモジュール、およびマイクロSDカードを備えたArduinoNanoを使用します。ケース付きの重量は約40グラムで、中型航空機(サイズL 50 mm X l 30mm X H 22mm)に簡単に組み込むことができます。

次のプロジェクトになります(資料を待っています)

テスト

車の中でArduinoの画面を撮影するのは簡単ではありませんが、私が撮影したので、結果をビデオで見ることができます。

次のテストは、ラジコン航空機の新しい、より小さく、より軽いプロトタイプで行われます。続く!


コード

  • gpsデータロガー
  • sauvegarde SD
gpsデータロガー Arduino
 #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通信staticconst 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( "初期化"); } void loop(){tft.setTextSize(1); tft.setTextColor(ST7735_GREEN、ST7735_BLACK); // affichage des informations 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( "緯度:"); tft.setTextColor(ST7735_CYAN、ST7735_BLACK); tft.print(gps.location.lat()、6); tft.setCursor(5、58); tft.setTextColor(ST7735_GREEN、ST7735_BLACK); tft.print( "経度:"); tft.setTextColor(ST7735_CYAN、ST7735_BLACK); tft.print(gps.location.lng()、6); // efichage ecran date tft.setCursor(5、7); tft.setTextColor(ST7735_GREEN、ST7735_BLACK); tft.print( "日付:"); 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()); // efichage 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); // efichage ecran altitude 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); 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(); // efichage 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( ""); //水平方向の薄暗い。 of Precision(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(); 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); // car l'cran 64 pixel de haut xh ++; tft.drawPixel(xh、nouvelleValeurh、ST7735_CYAN); if(xh> 123){xh =80; tft.fillRect(82,72,43,35、ST7735_BLACK); }} void vmax(){// vitese maximum speed1 =(gps.speed.kmph());を計算します。 if(speed1> maxspeed){maxspeed =speed1; }} void hmax(){//高度の最大値を計算するhigh1 =(gps.altitude.meters()); if(high1> maxhigh){maxhigh =high1; }} 
sauvegarde SD Arduino
データロガー
 #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通信staticconst 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( "初期化"); tft.setCursor(5、70); tft.print( "init SD"); delay(1000); if(!SD.begin(cs_sd))//条件vrifiant si la carte SD est prsente dans l'appareil {tft.setCursor(5、82); tft.print( "Defaut SD");戻る; } tft.setCursor(5、82); tft.print( "Carte SD OK"); delay(1000); tft.fillScreen(ST7735_BLACK);ファイルデータ=SD.open( "donnees.txt"、FILE_WRITE); // Ouvre le fichier "donnees.txt" data.println( ""); data.println( "Dmarrageacquisition"); // Ecrit dans ce fichier data.close(); } void loop(){tft.setTextSize(1); tft.setTextColor(ST7735_GREEN、ST7735_BLACK); // affichage des informations 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( "緯度:"); tft.setTextColor(ST7735_CYAN、ST7735_BLACK); tft.print(gps.location.lat()、6); tft.setCursor(5、58); tft.setTextColor(ST7735_GREEN、ST7735_BLACK); tft.print( "経度:"); tft.setTextColor(ST7735_CYAN、ST7735_BLACK); tft.print(gps.location.lng()、6); // efichage ecran date tft.setCursor(5、7); tft.setTextColor(ST7735_GREEN、ST7735_BLACK); tft.print( "日付:"); 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()); // efichage 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()); // efichage ecran altitude 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); 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(); // efichage 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( ""); //水平方向の薄暗い。 of Precision(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(); 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); // car l'cran 64 pixel de haut xh ++; tft.drawPixel(xh、nouvelleValeurh、ST7735_CYAN); if(xh> 123){xh =80; tft.fillRect(82,72,43,35、ST7735_BLACK); }} void vmax(){// vitese maximum speed1 =(gps.speed.kmph());を計算します。 if(speed1> maxspeed){maxspeed =speed1; }} void hmax(){//高度の最大値を計算するhigh1 =(gps.altitude.meters()); if(high1> maxhigh){maxhigh =high1; }} 

回路図


製造プロセス

  1. Samsung SAMIIO、Arduino UNO、RaspberryPiで数分で火災探知機を作る
  2. Arduinoを使用したソーラーパネルのリアルタイムデータ取得
  3. Arduinoエネルギーモニターとデータロガーを構築する方法
  4. LCDアニメーションとゲーム
  5. 温度および湿度データロガー
  6. シンプルなUNO計算機
  7. 視覚の持続性
  8. u-blox LEA-6H 02GPSモジュールとArduinoおよびPython
  9. ArduinoUnoと1sheeldを備えた4x4x4LEDキューブ
  10. Python3とArduinoコミュニケーション
  11. ArduinoとRDA8057Mを使用したFMラジオ