Compare commits
7 Commits
54b89e7cb1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 24e5b5afe6 | |||
| fa1c728187 | |||
| e22e6e8ab3 | |||
| 7c979dbd01 | |||
| 1c1eddc872 | |||
| 3232c7e5c4 | |||
| b4774d4b77 |
61
README.md
61
README.md
@@ -1,4 +1,6 @@
|
|||||||
[](https://gitea.rabe11.de/FCS/Winden-Telemetry/releases)
|
[](https://gitea.rabe11.de/FCS/Winden-Telemetry/releases)
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
# Winden-Telemetry
|
# Winden-Telemetry
|
||||||
|
|
||||||
@@ -27,12 +29,14 @@
|
|||||||
- [ ] Übertragung Rundumleuchten Signal an Start
|
- [ ] Übertragung Rundumleuchten Signal an Start
|
||||||
- [x] Luftdrucksensor für Höhe und Vario
|
- [x] Luftdrucksensor für Höhe und Vario
|
||||||
|
|
||||||
### Aufbau
|
## Aufbau
|
||||||
|
|
||||||
Pin Layout Heltec WiFi LoRa (v3)
|
Pin Layout Heltec WiFi LoRa (v3)
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
### Anschlusszuordnung
|
||||||
| Heltec WiFi LoRa (v3) Pin | MP1584 |SG90 Pin | BMP180 Pin | MS4525 Pin | LED Ring Pin |
|
| Heltec WiFi LoRa (v3) Pin | MP1584 |SG90 Pin | BMP180 Pin | MS4525 Pin | LED Ring Pin |
|
||||||
| --- | --- | --- | --- | --- | --- |
|
| --- | --- | --- | --- | --- | --- |
|
||||||
| GND | OUT -| GND | GND | GND | GND |
|
| GND | OUT -| GND | GND | GND | GND |
|
||||||
@@ -41,4 +45,57 @@ Pin Layout Heltec WiFi LoRa (v3)
|
|||||||
| GPIO 7| | 1 PWM (Orange)| | |
|
| GPIO 7| | 1 PWM (Orange)| | |
|
||||||
| GPIO19| | | SDA| SDA |
|
| GPIO19| | | SDA| SDA |
|
||||||
| GPIO20| | | SCL| SCL|
|
| GPIO20| | | SCL| SCL|
|
||||||
| 5V | OUT + | VCC | | |
|
| 5V | OUT + | VCC | | |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## PCB
|
||||||
|
Die Platine ist so gestaltet das sie Induvidul bestückt werden kann, je nach Verwendung
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
[Schaltplan](img/Winden_Telemetry_Schematic.pdf)
|
||||||
|
|
||||||
|
| Bauteil | Modul Segelflugzeug | Modul Winde | Modul SKP |
|
||||||
|
| --- |--- |--- |--- |
|
||||||
|
| J1 | x | x | x | optional|
|
||||||
|
| A1 | x | x | x | optional|
|
||||||
|
| I2C_1 | MS4525 | optional| optional|
|
||||||
|
| I2C_2 | BMP180 | optional| optional|
|
||||||
|
| I2C_3 | optional| optional| optional|
|
||||||
|
| I2C_4 | optional| optional| optional|
|
||||||
|
| GPIO3 | optional| optional| optional|
|
||||||
|
| GPIO4 | optional| optional| optional|
|
||||||
|
| GPIO5 | optional| Eingang Warnleuchte |optional|
|
||||||
|
| GPIO6 | optional| LED Ring | optional|
|
||||||
|
| GPIO7 | optional| Servo | für Relais|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Programmablauf Segelflugzeug
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TD
|
||||||
|
A(["Start"])
|
||||||
|
A --> B{"ist Senden an?"}
|
||||||
|
B --> | Ja | C{"Sende Timer <90 sec"}
|
||||||
|
B --> | Nein | E{"low speed timer <90 sec"}
|
||||||
|
|
||||||
|
C --> | Nein | F["Sende Schleppen komplett"] -->G["Starte Low Speed Timer"]
|
||||||
|
C --> | Ja | D["Sende Speed"]
|
||||||
|
|
||||||
|
|
||||||
|
D --> Z["Warte 1 Sekunde"]
|
||||||
|
G ----> H["Senden aus"] -->Z
|
||||||
|
|
||||||
|
Z --> B
|
||||||
|
|
||||||
|
E --> | nein | I{"Speed < 30 km/h"}
|
||||||
|
I --> | nein |J["Senden an"] --> D
|
||||||
|
I --> | ja|Z
|
||||||
|
E --> | ja|Z
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
BIN
img/Winden_Telemetry_PCB.png
Normal file
BIN
img/Winden_Telemetry_PCB.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 485 KiB |
BIN
img/Winden_Telemetry_PCB_back.png
Normal file
BIN
img/Winden_Telemetry_PCB_back.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 130 KiB |
BIN
img/Winden_Telemetry_PCB_front.png
Normal file
BIN
img/Winden_Telemetry_PCB_front.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 138 KiB |
BIN
img/Winden_Telemetry_Schematic.pdf
Normal file
BIN
img/Winden_Telemetry_Schematic.pdf
Normal file
Binary file not shown.
@@ -9,8 +9,8 @@
|
|||||||
; https://docs.platformio.org/page/projectconf.html
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
[platformio]
|
[platformio]
|
||||||
build_cache_dir=./.pio/.build_cache
|
build_cache_dir = ./.pio/.build_cache
|
||||||
cache_dir=./.pio/.cache_dir
|
cache_dir = ./.pio/.cache_dir
|
||||||
|
|
||||||
[common]
|
[common]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
@@ -28,34 +28,35 @@ build_flags =
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
olikraus/U8g2@^2.36.15
|
olikraus/U8g2@^2.36.15
|
||||||
jgromes/RadioLib@^7.4.0
|
jgromes/RadioLib@^7.4.0
|
||||||
|
bblanchon/ArduinoJson@^7.4.2
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
extra_scripts = pre:extra_script.py
|
extra_scripts = pre:extra_script.py
|
||||||
|
|
||||||
[env:heltec_wifi_lora_32_V3_sailplane]
|
[env:heltec_wifi_lora_32_V3_sailplane]
|
||||||
extends = common
|
extends = common
|
||||||
board = heltec_wifi_lora_32_V3
|
board = heltec_wifi_lora_32_V3
|
||||||
lib_deps = ${common.lib_deps}
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
bolderflight/Bolder Flight Systems MS4525@^1.1.3
|
bolderflight/Bolder Flight Systems MS4525@^1.1.3
|
||||||
bolderflight/Bolder Flight Systems Unit Conversions@^5.0.0
|
bolderflight/Bolder Flight Systems Unit Conversions@^5.0.0
|
||||||
bolderflight/Bolder Flight Systems Airdata Calculations@^4.0.0
|
bolderflight/Bolder Flight Systems Airdata Calculations@^4.0.0
|
||||||
adafruit/Adafruit BMP085 Library @ ^1.2.4
|
adafruit/Adafruit BMP085 Library @ ^1.2.4
|
||||||
lib_ignore =
|
lib_ignore =
|
||||||
winde
|
winde
|
||||||
|
|
||||||
|
|
||||||
build_flags = ${common.build_flags}
|
build_flags = ${common.build_flags}
|
||||||
-D DEVICE_SAILPLANE
|
-D DEVICE_SAILPLANE
|
||||||
|
upload_port = COM8
|
||||||
|
monitor_port = COM8
|
||||||
[env:heltec_wifi_lora_32_V3_winde]
|
[env:heltec_wifi_lora_32_V3_winde]
|
||||||
extends = common
|
extends = common
|
||||||
board = heltec_wifi_lora_32_V3
|
board = heltec_wifi_lora_32_V3
|
||||||
lib_deps = ${common.lib_deps}
|
lib_deps =
|
||||||
|
${common.lib_deps}
|
||||||
adafruit/Adafruit NeoPixel@^1.15.2
|
adafruit/Adafruit NeoPixel@^1.15.2
|
||||||
madhephaestus/ESP32Servo@^3.0.9
|
madhephaestus/ESP32Servo@^3.0.9
|
||||||
|
lib_ignore =
|
||||||
lib_ignore =
|
|
||||||
sailplane
|
sailplane
|
||||||
build_flags = ${common.build_flags}
|
build_flags = ${common.build_flags}
|
||||||
-D DEVICE_WINDE
|
-D DEVICE_WINDE
|
||||||
|
upload_port = COM9
|
||||||
|
monitor_port = COM9
|
||||||
68
src/main.cpp
68
src/main.cpp
@@ -2,13 +2,14 @@
|
|||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include <U8g2lib.h>
|
#include <U8g2lib.h>
|
||||||
#include <RadioLib.h>
|
#include <RadioLib.h>
|
||||||
|
#include <ArduinoJson.h>
|
||||||
#ifdef DEVICE_WINDE
|
#ifdef DEVICE_WINDE
|
||||||
#include <tacho.h>
|
#include <tacho.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEVICE_SAILPLANE
|
#ifdef DEVICE_SAILPLANE
|
||||||
#include <airspeed.h>
|
#include <airspeed.h>
|
||||||
|
JsonDocument sailplane_data;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SX1262 radio = new Module(LORA_NSS, LORA_DIO1, LORA_NRST, LORA_BUSY);
|
SX1262 radio = new Module(LORA_NSS, LORA_DIO1, LORA_NRST, LORA_BUSY);
|
||||||
@@ -89,6 +90,37 @@ void setup()
|
|||||||
u8g2.sendBuffer();
|
u8g2.sendBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void draw_rssi(int Rssi){
|
||||||
|
u8g2.drawFrame(102,8,4,3);
|
||||||
|
u8g2.drawFrame(107,6,4,5);
|
||||||
|
u8g2.drawFrame(112,4,4,7);
|
||||||
|
u8g2.drawFrame(117,2,4,9);
|
||||||
|
u8g2.drawFrame(122,0,4,11);
|
||||||
|
|
||||||
|
if ((Rssi > -120) && Rssi < 0 )
|
||||||
|
{
|
||||||
|
u8g2.drawBox(102,8,4,3);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((Rssi > -100) && Rssi < 0 )
|
||||||
|
{
|
||||||
|
u8g2.drawBox(107,6,4,5);
|
||||||
|
}
|
||||||
|
if ((Rssi > -85) && Rssi < 0 )
|
||||||
|
{
|
||||||
|
u8g2.drawBox(112,4,4,7);
|
||||||
|
}
|
||||||
|
if ((Rssi > -70) && Rssi < 0 )
|
||||||
|
{
|
||||||
|
u8g2.drawBox(117,2,4,9);
|
||||||
|
}
|
||||||
|
if ((Rssi > -55) && Rssi < 0 )
|
||||||
|
{
|
||||||
|
u8g2.drawBox(122,0,4,11);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
#ifdef DEVICE_SAILPLANE
|
#ifdef DEVICE_SAILPLANE
|
||||||
@@ -102,8 +134,14 @@ void loop()
|
|||||||
u8g2.print(vel_kmh);
|
u8g2.print(vel_kmh);
|
||||||
u8g2.sendBuffer();
|
u8g2.sendBuffer();
|
||||||
if (vel_kmh > 30)
|
if (vel_kmh > 30)
|
||||||
{
|
{
|
||||||
String data = String(vel_kmh);
|
sailplane_data["from"]= "D-1234";
|
||||||
|
sailplane_data["telemetry"]["speed"]=vel_kmh;
|
||||||
|
sailplane_data["telemetry"]["min"]=70;
|
||||||
|
sailplane_data["telemetry"]["max"]=150;
|
||||||
|
String data;
|
||||||
|
serializeJson(sailplane_data,data);
|
||||||
|
//String data = String(vel_kmh);
|
||||||
int state = radio.transmit(data);
|
int state = radio.transmit(data);
|
||||||
if (state == RADIOLIB_ERR_NONE)
|
if (state == RADIOLIB_ERR_NONE)
|
||||||
{
|
{
|
||||||
@@ -157,6 +195,8 @@ void loop()
|
|||||||
// you can read received data as an Arduino String
|
// you can read received data as an Arduino String
|
||||||
String str;
|
String str;
|
||||||
int state = radio.readData(str);
|
int state = radio.readData(str);
|
||||||
|
JsonDocument received;
|
||||||
|
deserializeJson(received,str);
|
||||||
|
|
||||||
// you can also read received data as byte array
|
// you can also read received data as byte array
|
||||||
/*
|
/*
|
||||||
@@ -166,16 +206,28 @@ void loop()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (state == RADIOLIB_ERR_NONE)
|
if (state == RADIOLIB_ERR_NONE)
|
||||||
{
|
{
|
||||||
|
String data_from=received["from"];
|
||||||
|
int data_speed=received["telemetry"]["speed"];
|
||||||
|
int data_min=received["telemetry"]["min"];
|
||||||
|
int data_max=received["telemetry"]["max"];
|
||||||
// packet was successfully received
|
// packet was successfully received
|
||||||
u8g2.clearBuffer();
|
u8g2.clearBuffer();
|
||||||
u8g2.setFont(u8g2_font_logisoso42_tr);
|
u8g2.setFont(u8g2_font_ncenB10_tr);
|
||||||
u8g2.setCursor(0, 60);
|
u8g2.setCursor(0, 10);
|
||||||
u8g2.print(str);
|
u8g2.print(data_from);
|
||||||
|
u8g2.setCursor(0, 64);
|
||||||
|
u8g2.print(data_min);
|
||||||
|
u8g2.setCursor(64, 64);
|
||||||
|
u8g2.print(data_max);
|
||||||
|
u8g2.setFont(u8g2_font_logisoso32_tr);
|
||||||
|
u8g2.setCursor(0, 50);
|
||||||
|
u8g2.print(data_speed);
|
||||||
|
draw_rssi(radio.getRSSI());
|
||||||
u8g2.sendBuffer();
|
u8g2.sendBuffer();
|
||||||
Serial.println(str);
|
Serial.println(str);
|
||||||
int speed = str.toInt();
|
int speed = str.toInt();
|
||||||
set_tacho(speed, 70, 150);
|
set_tacho(data_speed, data_min, data_max);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user