nkruzan / hx_espnow_rc

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Work in progress]

Goals:

  • transmit 16 RC channels
  • transmit RSSI, A1, A2 telemetry
  • transmit bidirectional telemetry stream
  • build external module for Jumper T-Lite
  • build receiver based on Wemos D1 Mini board (Servo/PWM outputs)
  • build ESP-01 based SBUS output receiver
  • build ESP32 based SBUS output receiver, LR mode
  • external module for Jumper T-Lite: select active configuration by CH16 value
  • test range with xq-02a amplifier
  • external module for Jumper T-Lite: multiple configurations in xml file
  • external module for Jumper T-Lite: bluetooth gamepad mode
  • external module for Jumper T-Lite: telemetry bridge ( A1,A2,RSSI -> SPORT pin translate, SPORT stream -> SPORT pin, Mavlink stream -> SPORT pin translate)
  • external module for Jumper T-Lite: SPORT telemetry quering

hx_espnow_rc

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

alt text

alt text

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

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

Used in DIY ESP32 based quadcopter: https://github.com/RomanLut/mahowii

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

You can build transmitter external module and SBUS/PWM receiver using guides below.

See building guides:

Range

2 dbi dipole antenna on transmitter with:

  • PCB antenna provide range less then 150m.
  • whip antenna with stripping wire provide range ~250m
  • 2dbi dipole antenna provide range ~1Km (!)

5 dbi dipole antenna on transmitter with:

  • 2dbi dipole antenna provide range ~1.3Km (!)
  • 2dbi dipole antenna and ESP32 LR receiver provide range ~1.8Km (!)

Moxon antenna with:

  • 2dbi dipole antenna and ESP32 LR receiver provide range ~1.7Km (!)

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.

2dbi dipole antenna on transmitter <-> 2dbi dipole on receiver provide range up to 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

5dbi TP-Link antenna with RP-SMA-SMA adapter on transmitter <-> 2dbi dipole on receiver provide range up to 1.3Km:

alt text

alt text

5dbi TP-Link antenna with RP-SMA-SMA adapter on transmitter <-> 2dbi dipole on receiver, ESP32 LR mode provide range up to 1.8Km(!):

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

DIY Moxon antenna on transmitter https://www.thingiverse.com/thing:5148464 <-> 2dbi dipole or receiver provide range up to 1.8Km:

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.

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

Telemetry

Telemetry stream is transparent and CRC protected. Data is ensured to be delivered without distorion, unless failsave or overflow condition araise. Stream can be used to transfer Mavlink, MCP, Sport, LTM etc. telemetry. Data rate is ~57kBit/sec. Additionally library transmits A1 and A2 (32-bit) values for simple telemetry.

See packets timing: https://github.com/RomanLut/hx_espnow_rc/blob/main/doc/rfpower/rfpower.md

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 receviers.

See development guide: https://github.com/RomanLut/hx_espnow_rc/blob/main/doc/development.md

Quick start

  • get two ESP32 Devkit boards
  • flash one with test_esp32_devkit_rx project
  • flash second with test_esp32_devkit_tx project
  • see statistic in terminal

Continue with development guide: https://github.com/RomanLut/hx_espnow_rc/blob/main/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

About

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

License:MIT License


Languages

Language:C++ 97.2%Language:C 2.8%