Browse Source

Added Arduino FrSky Telemetry site

Thomas Buck 7 years ago
parent
commit
bf3f5f2283
1 changed files with 69 additions and 0 deletions
  1. 69
    0
      input/blog/2016/2016_11_05_frsky_telemetry.md

+ 69
- 0
input/blog/2016/2016_11_05_frsky_telemetry.md View File

@@ -0,0 +1,69 @@
1
+title: Blog
2
+post: Arduino FrSky Telemetry
3
+date: 2016-11-05
4
+comments: true
5
+flattr: true
6
+github: https://github.com/xythobuz/FrSky-Telemetry-Arduino
7
+parent: projects
8
+position: 90
9
+---
10
+
11
+## {{ page["post"] }}
12
+<!--%
13
+from datetime import datetime
14
+date = datetime.strptime(page["date"], "%Y-%m-%d").strftime("%B %d, %Y")
15
+print "*Posted at %s.*" % date
16
+%-->
17
+
18
+I've now built multiple model aircraft, all using the FrSky remote control and telemetry system with the FrSky DHT module included in my modified cheap RC transmitter. This system allows transmitting digital data streams and analog voltages from the aircraft back to the transmitter, which can be used to implement a battery voltage gauge and low-voltage alarm. All that's required is a simple voltage divider using two resistors, to bring the battery voltage down into a range the receiver can measure (3.3V).
19
+
20
+To output the telemetry data, the FrSky transmitter module has an RS232 serial port. To connect it to an Arduino or TTL-level USB-UART adapter, you need to use an adaptor or [modify your transmitter module, removing the level shifter](http://majek.mamy.to/en/frsky-dht-ttl-mod/).
21
+
22
+To display the received data with the Arduino, I'm using [this cheap I2C OLED display from HobbyKing](https://www.hobbyking.com/en_us/multiwii-oled-display-module-i2c-128x64-dot-mwc.html).
23
+
24
+<div class="lightgallery">
25
+    <a href="https://i.imgur.com/4W3O9zr.png">
26
+        <img src="https://i.imgur.com/pa8UJW8.png" alt="Schematic">
27
+    </a>
28
+</div>
29
+
30
+The FrSky telemetry protocol transmits two ADC values and a serial data stream. Currently, the received serial user data is simply displayed but not used further. One of the two ADC values can be converted to a voltage using a simple algorithm: Just apply two different (known) voltages to the ADC input and note the ADC output value received (it's displayed on the OLED). Then enter these two voltage-value datapairs in to the `options.h` file and all intermediate values will be interpolated. For example:
31
+
32
+    // Analog Sample Min Value
33
+    const static int16_t batteryValuesMin[MODEL_COUNT] = {
34
+        231,
35
+        169
36
+    };
37
+    
38
+    // Battery Voltage when Min Value has been reached
39
+    // Voltage is stored with factor 100, so 388 -> 3.88V
40
+    const static int16_t batteryVoltagesMin[MODEL_COUNT] = {
41
+        388,
42
+        900
43
+    };
44
+
45
+This means, for Model 1 a value of 231 equals 3.88V, and for Model 2 a value of 169 means 9.00V. As you can see, multiple models with different voltage dividers and battery ranges can be used this way, and each one can have individual alarms set.
46
+
47
+<div class="lightgallery">
48
+    <a href="http://i.imgur.com/U6wNsI4.jpg">
49
+        <img src="http://i.imgur.com/Uuro1FN.png" alt="Photo 1">
50
+    </a>
51
+    <a href="http://i.imgur.com/cExsBPu.jpg">
52
+        <img src="http://i.imgur.com/MOI2jv5.png" alt="Photo 2">
53
+    </a>
54
+    <a href="http://i.imgur.com/C18T33u.jpg">
55
+        <img src="http://i.imgur.com/ve6bCwT.png" alt="Photo 3">
56
+    </a>
57
+</div>
58
+
59
+I've used an Arduino Pro Mini and could easily fit it, the OLED, beeper, switched and LED into my existing RC transmitter. The sketch should run without changes on any Arduino based on the Atmega328.
60
+
61
+### License
62
+
63
+    ----------------------------------------------------------------------------
64
+    "THE BEER-WARE LICENSE" (Revision 42):
65
+    <xythobuz@xythobuz.de> wrote this file.  As long as you retain this notice
66
+    you can do whatever you want with this stuff. If we meet some day, and you
67
+    think this stuff is worth it, you can buy me a beer in return.   Thomas Buck
68
+    ----------------------------------------------------------------------------
69
+

Loading…
Cancel
Save