산업 제조
산업용 사물 인터넷 | 산업자재 | 장비 유지 보수 및 수리 | 산업 프로그래밍 |
home  MfgRobots >> 산업 제조 >  >> Manufacturing Technology >> 제조공정

GPS 데이터 로거, 실시간 곡선, 최대 높이 및 최대 속도

구성품 및 소모품

Arduino UNO
아두이노 우노
× 1
점퍼(버스바), 점퍼 리드 세트
× 1
Arduino Proto Shield
× 1
1.8" TFT SPI LCD 화면(MicroSD 소켓 포함)
SD 카드가 있는 기타
× 1
u-blox gps 네오 6m
× 1

필요한 도구 및 기계

납땜 인두(일반)
납땜 와이어, 무연
와이어 스트리퍼 및 절단기, 18-10 AWG / 0.75-4mm² 용량 전선

이 프로젝트 정보

소개

저는 에어로모델링을 연습하고 있으며 제 비행기의 속도와 고도를 알고 싶습니다. 불행히도 상업용 GPS 데이터 로거는 매우 비쌉니다.

그래서 50유로 미만의 비용으로 Arduino 기반의 GPS 데이터 로거를 만들기로 결정했습니다.

내 첫 번째 프로토타입은 통합 SD 카드와 NEO 6M V2 GPS 모듈이 있는 Sainsmart ST7735 화면이 있는 Arduino Uno R3를 기반으로 합니다.

두 번째 프로젝트에서는 SSD1306 OLED 화면, 동일한 GPS 모듈 및 마이크로 SD 카드가 있는 Arduino Nano를 사용합니다. 케이스를 포함한 무게는 약 40g이어야 하며 중형 항공기(크기 L 50mm X l 30mm X H 22mm)에 쉽게 통합될 수 있습니다.

차기작입니다(자료 기다리고 있습니다.)

테스트

아두이노 화면을 차에서 찍는다는게 쉽지 않은데 제가 해봤는데 그 결과를 영상으로 보실 수 있어요.

다음 테스트는 무선 조종 항공기에서 더 작고 더 가벼운 프로토타입을 사용하는 것입니다. 계속됩니다!


<섹션 클래스="섹션 컨테이너 섹션 축소 가능" id="코드">

코드

<울>
  • GPS 데이터 로거
  • 소베가르드 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); 정적 const int RXPin =4, TXPin =3; //GPS 통신 정적 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;; 무효 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.setTextSize(1); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); // chaque bonne 수신 위성에 정보를 첨부합니다. while (ss.available()> 0){ gps.encode(ss.read()); if (gps.location.isUpdated()){ 간부(); 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); //에크란 날짜 부착 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()); // ecran heure affichage 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.min()); tft.print(" "); tft.print(gps.time.second()); tft.print(" "); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.setCursor(3, 30); //에크란 고도 부착 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("최대값 :"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(최대고); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(" "); 쿠르베(); // 에크란 비테세 affichage tft.setCursor(5, 115); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("V액트:"); 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(최대속도); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(" "); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); 쿠르베(); //위성 이름 지정 tft.setCursor(5, 147); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("토성명칭 :"); 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()); 스마트 지연(400); } }}// 수신 거부 스마트 지연(unsigned long ms){ unsigned long start =millis(); do { 동안 (ss.available()) gps.encode(ss.read()); } while (millis() - 시작 123) { x=80; tft.fillRect(82,110,43,30,ST7735_BLACK); }} 무효 courbeh() { int nouvelleValeurh; // 최대 변환(350km/h) en 픽셀 nouvelleValeurh =map((gps.altitude.meters()), 0, 1000, 104, 72); // car l'cran a 64픽셀 de haut xh++; tft.drawPixel(xh,nouvelleValeurh,ST7735_CYAN); if (xh>123) { xh=80; tft.fillRect(82,72,43,35,ST7735_BLACK); }}vmax() 무효 {// 최대 속도 계산1 =(gps.speed.kmph()); if ( 속도1> 최대 속도) { 최대 속도 =속도1; } } void hmax() {// 최대 고도 계산 high1 =(gps.altitude.meters()); if ( high1> maxhigh ) { maxhigh =high1; } }
    소베가르드 SD아두이노
    데이터 로거
    #include #include#include #include  #define cs 10#define dc 9#define rst 8 #include #include Adafruit_ST7735 tft =Adafruit_ST7735(cs, dc, rst); 정적 const int RXPin =4, TXPin =3; //GPS 통신 정적 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; 무효 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("SD 초기화"); 지연(1000); if(!SD.begin(cs_sd)) //조건에 따라 다름 SD est prsente dans l'appareil { tft.setCursor(5, 82); tft.print("기본 SD"); 반품; } tft.setCursor(5, 82); tft.print("SD 카드 주문 가능"); 지연(1000); tft.fillScreen(ST7735_BLACK); 파일 데이터 =SD.open("donnees.txt",FILE_WRITE); // 영화 "donnees.txt" data.println(""); data.println("Dmarrage 획득"); // Ecrit dans ce fichier data.close(); } 무효 루프(){ tft.setTextSize(1); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); // chaque bonne 수신 위성에 정보를 첨부합니다. while (ss.available()> 0){ gps.encode(ss.read()); if (gps.location.isUpdated()){ 간부(); 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); //에크란 날짜 부착 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()); 문자열 날짜=문자열(gps.date.day())+(" ")+(gps.date.month())+(" ")+(gps.date.year()); // ecran heure affichage 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.min()); tft.print(" "); tft.print(gps.time.second()); tft.print(" "); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.setCursor(3, 30); 문자열 Temps=문자열(gps.time.hour()+1)+(" ")+(gps.time.minute())+(" ")+(gps.time.second()); //에크란 고도 부착 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("최대값 :"); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(최대고); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(" "); 쿠르베(); // 에크란 비테세 affichage tft.setCursor(5, 115); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("V액트:"); 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(최대속도); tft.setTextColor(ST7735_CYAN,ST7735_BLACK); tft.print(" "); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); 쿠르베(); //위성 이름 지정 tft.setCursor(5, 147); tft.setTextColor(ST7735_GREEN,ST7735_BLACK); tft.print("토성명칭 :"); 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()); 스마트 지연(400); // Ecriture des donnes dans le fichier texte File data=SD.open("donnees.txt",FILE_WRITE); data.println(날짜 + " " + Temps + " " + String(gps.location.lat(), 6)+" "+String(gps.location.lng(), 6)+(" ")+String( gps.altitude.meters(),0)+(" ")+문자열(최대고)+(" ")+문자열(gps.speed.kmph(),0)+(" ")+문자열(최대 속도)); data.close(); } }}// 수신 거부 스마트 지연(unsigned long ms){ unsigned long start =millis(); do { 동안 (ss.available()) gps.encode(ss.read()); } while (millis() - 시작 123) { x=80; tft.fillRect(82,110,43,30,ST7735_BLACK); }} 무효 courbeh() { int nouvelleValeurh; // 최대 변환(350km/h) en 픽셀 nouvelleValeurh =map((gps.altitude.meters()), 0, 1000, 104, 72); // car l'cran a 64픽셀 de haut xh++; tft.drawPixel(xh,nouvelleValeurh,ST7735_CYAN); if (xh>123) { xh=80; tft.fillRect(82,72,43,35,ST7735_BLACK); }}void vmax() {// 계산 최대 속도1 =(gps.speed.kmph()); if ( 속도1> 최대 속도) { 최대 속도 =속도1; } } void hmax() {// 최대 고도 계산 high1 =(gps.altitude.meters()); if ( high1> maxhigh ) { maxhigh =high1; } }

    회로도


    제조공정

    1. Samsung SAMIIO, Arduino UNO 및 Raspberry Pi로 몇 분 만에 화재 감지기 만들기
    2. Arduino를 사용한 태양 전지판의 실시간 데이터 수집
    3. Arduino 에너지 모니터 및 데이터 로거를 구축하는 방법
    4. LCD 애니메이션 및 게임
    5. 온도 및 습도 데이터 로거
    6. 간단한 UNO 계산기
    7. 시력의 지속성
    8. U-blox LEA-6H 02 GPS 모듈(Arduino 및 Python 포함)
    9. 4x4x4 LED 큐브(Arduino Uno 및 1쉴드 포함
    10. Python3 및 Arduino 통신