RomanLut / hx_espnow_rc

Remote control library based on ESP-NOW (PlatformIO, ESP32 and ESP8266)
MIT License
71 stars 13 forks source link

Goals:

hx_espnow_rc

Remote control library based on ESP-NOW protocol (PlatformIO, ESP32 and ESP8266)

alt text

alt text

Transmits 16 channels at 50 Hz, bidirectional telemetry(transparent stream) and RSSI, A1, A2.

Can be used as cheap RC for LOS flights or up to 2km flights. Main goal is to use it in the DIY ESP8266/ESP32 based projects.

Used in external RC Controler JR Bay module: /doc/tx_external_module.md

Used in DIY RC Controller: /doc/tx_diy_controller.md

Used in DIY ESP32 based quadcopter: https://github.com/RomanLut/Multiwii-ESP32-port

Used in DIY ESP8266 plane: https://www.youtube.com/watch?v=c9dDOX0IzME

Used in INAV 1.7.3 plane: https://www.youtube.com/watch?v=UptvxsFHDFA

Used in INAV 3.0.2 plane: https://youtu.be/GYB-UckucRA

Building guides

You can build transmitter module for RC Controller with External module bay, DIY RC controller, and SBUS/PPM/PWM/Mavlink receivers using guides below.

Transmiters

Receivers

SBUS wihh transparent bidirectional telemetry

PPM with transparrent bidirectional telemetry

PWM

Development guide: /doc/development.md

Recommended antenna: DIY Moxon antenna https://www.thingiverse.com/thing:5148464

Recommended telemetry viewer application: https://github.com/RomanLut/android-taranis-smartport-telemetry

Range

Range is up to 3Km. Below are real world test results.

Range depends on used antennas, LR mode and noise level in the area. LR mode adds ~30% to the range. LR receiver sensitiviy is -98 dbm.

As can be seen, range can be 2x higher on area with lower noise level!

Range testing is done in the clear line of sight conditions.

2 dbi dipole antenna on transmitter, PCB antenna on recever, Noise level -90dbm

Range is less then 150m.

2 dbi dipole antenna on transmitter, whip antenna with stripping wire on receiver , Noise level -90dbm

Range is ~250m

2dbi dipole antenna on transmitter and receiver, Noise level -90dbm

Range is ~1Km

alt text

Tested with INAV 1.7.3 Naze32 1s flying wing based on Eachine E58 brushed motors, with HX_ESPNOW_RC SBUS Esp-01s based receiver https://www.youtube.com/watch?v=UptvxsFHDFA.

I have got first failsave event at 950m and still could control plane at 1100m:

alt text

Failsave period is set to 1 second (so there should be at least 1 successfull packet delivery in 1 second). Note that range of actual communication is larger, but is not usefull for RC.

5 dbi dipole antenna on transmitter with 2dbi dipole antenna on receiver, Noise level -90dbm

Range is ~1.3Km

5dbi TP-Link antenna with RP-SMA-SMA

alt text

alt text

5 dbi dipole antenna on transmitter with 2dbi dipole antenna and ESP32 LR receiver, Noise level -90dbm

Range is ~1.8Km

5dbi TP-Link antenna with RP-SMA-SMA adapter, ESP32 LR mode

alt text

alt text

Tested with INAV 3.0.2 DF mini Spirit 1s flying wing, ESP32-based SBUS receiver, LR mode https://youtu.be/GYB-UckucRA

Moxon antenna on transmitter with 2dbi dipole antenna and ESP32 LR receiver, Noise level -90dbm

Range is ~1.7Km

DIY Moxon antenna on transmitter https://www.thingiverse.com/thing:5148464

alt text

alt text

Tested with INAV 3.0.2 DF mini Spirit 1s flying wing, ESP32-based SBUS receiver, LR mode.

DYI moxon antenna perform similar to 5dbi antenna, while having compact size.

Moxon antenna is recommended antenna for hx_espnow_rc project.

BetaFPV Moxon antenna (for ELRS 2.4GHz) on transmitter with 2dbi dipole on receiver, Noise level -96dbm

Range is ~2.7Km

alt text

alt text

DIY controller, Mavic mini antenna on transmitter with 2dbi dipole on receiver, Noise level -96dbm

Range is ~2.5Km

DIY RC Controller: /doc/tx_diy_controller.md

alt text

alt text

DIY controller, Mavic mini antenna with Yagi attachment on transmitter with 2dbi dipole on receiver, Noise level -96dbm

Range is ~3.1Km

DIY RC Controller: /doc/tx_diy_controller.md

alt text

alt text

FRSky Patch clone

I also tested with Frsky directional patch 7dbi antenna clone, and I was not able to get any good result with it. I got a lot of failsafe events at 700m already.

alt text

I am not sure if this is caused by poor clone quality, my ability to point in the right direction, or poor antena SWR. (I know I have to open the clone and rotate inner part in the right direction).

alt text

Packet rate

Packet rate is 50 packets/second in LR and normal modes.

See: /doc/packet_rate.md

Telemetry

Telemetry stream is transparent and CRC protected. Data is ensured to be delivered without distortion, unless failsave or overflow condition araise. Stream can be used to transfer Mavlink, MCP, Sport, LTM etc. telemetry.

Downlink data rate is ~57kBit/sec in normal mode and ~2.4kBit/sec in LR mode. Uplink data rate is ~12kBit/sec in normal mode and ~2.4kBit/sec in LR mode.

Additionally library transmits A1 and A2 (32-bit) values for simple telemetry.

Building and Flashing

Currently pre-build firmware is not provided. You have to build firmware yourself and flash ESP32/ESP8266 modules using PlatformIO https://platformio.org/

If you do not know what PlatformIO is, than this project is not for you at the current stage. Later I may try to provide pre-build binaries and detailed instructions for flashing and configuring transmitter and receivers.

See development guide: /doc/development.md

Quick start

Continue with development guide: /doc/development.md

Other projects

https://github.com/PepeTheFroggie/EspCopter

https://github.com/PepeTheFroggie/EspCopter32

https://github.com/Crypter/ESP-RCLink

https://github.com/RomanLut/mahowii

https://github.com/martin-ger/ESP_E58-Drone

https://github.com/Hermann-SW/wireless-control-Eachine-E52-drone