Shop our Airplanes Products Drone Products Sales
Thread Tools
Mar 05, 2018, 07:49 AM
Registered User
Cesco's Avatar
Thread OP

Esp8266 RC with ESPNOW

I present a little project using the ESP8266 as transmitter and receiver for RC. Done with arduino for esp8266 ide.
It uses PPMSUM imput to transmitter and PPMSUM output from receiver. It uses the ack-less ESPNOW protocol.
This runs on a $4 esp8266 board like the W1-mini and is not a finished product but a base to develop your own stuff.

The switch between receiver and transmitter firmware is done by enabling or commenting the "#define server" line. Server means receiver.
Receiver PPM out is D8, Transmitter PPM in is D4., easily reconfigurable.

You got to flash the server (receiver) first and write down the MAC. Use arduino serial monitor to see the MAC. You have to add this MAC in the transmitter "remoteMac[]" filed of the firmware. This tells the transmitter to which receiver it is connected, its the "binding".

This does 8 channels and 10 frames/sec. You can easily boost it to 100 channels and much higher refresh rate. Also rssi-feedback / sbus / telemetry in-out should be simple to add. One receiver can service up to 8 transmitters, ideal for autonomous longrange planes where takeoff and landing are manual and at differet locations.

If you test this leave a note.
Last edited by Cesco; Mar 05, 2018 at 01:33 PM.
Sign up now
to remove ads between posts
Mar 07, 2018, 04:59 PM
Registered User
quax's Avatar
Thanks for your information. I didn't now about ESPNOW and will try it. With the standard client-server mode I had alway problems with continuous communication.
Mar 08, 2018, 05:52 AM
Registered User
Cesco's Avatar
Thread OP
I have not tried long range but near range it works smoothly.

I try to use the back-channel for FPV. I use a OV2640 camera in jpeg mode and intend to send the compressed image over esp-now back to the transmitter. I use an esp32 for the cam, the 8266 doesent have enough pins. However i was not able to reliably grab pictures from the cam. There are sporadic errors in the jpeg stream and i couldnt figure out what is wrong. Examples attached.

Attached also the esp8266 firmware with 4 pwm outputs for tracked vehicles.
First pic is old version with arduino for PPMSUM to PWM conversion, last pic is direct PWM generation with the esp8266.
Last edited by Cesco; Mar 18, 2018 at 12:42 PM.
Mar 15, 2018, 07:11 AM
Registered User
Cesco's Avatar
Thread OP
The EspCopter.

Esp8266, mpu6050, four 0xF5 esc with 128kbaud.
Flies like a wet sponge. You have been warned.

The attached firmware is just for illustration, not finished in any way, but i have flown it sucessfully.
Last edited by Cesco; Mar 26, 2018 at 04:04 PM.
Mar 15, 2018, 09:42 PM
Registered User
Nice projects. Now you've challenged somebody to make a wet sponge quadcopter. :-)
Mar 16, 2018, 12:03 PM
Registered User
Cesco's Avatar
Thread OP
Here is the improved version. It now has a failsafe. Because i was outside with it

ACC needs to be calibrated by entering "A" in the serial console. Copter must be level during calibration. It stores acc calibration in flash so you must always re-calibrate after flashing the thing.

The level PID are way too tame, but the angle pid are good for me now.
I guess i should make it mechanically more stable. The esp8266 is held with 1 nylon screw, and the 6050 is glued on top.

You have to up the transmitter rate to 50hz instead of 10hz,
change delay(100) ; to delay(20); in the transmitter code.
Last edited by Cesco; Mar 26, 2018 at 04:04 PM.
Mar 17, 2018, 03:08 AM
Registered User
Nice project
How about delay Cesco ?
Mar 17, 2018, 06:57 AM
Registered User
Cesco's Avatar
Thread OP
The first flights i was using the TX firmware from the crawler. This has only 10hz update and made the copter "wet sponge" like, difficult to fly.
Now i upped that to 50hz udate and its much better.
Angle mode flyes nicely while in level mode the PID are far off and i have seen some jerking around.

Delay .. i dont know. I guess more than a conventional radio.
Mar 17, 2018, 11:01 AM
Registered User
50Hz update rate seem to be fine but the range is shorter. Did you have any plan to improve the range ?
Mar 17, 2018, 07:22 PM
Registered User
Congrats! Your project got a write-up on

Perhaps you could explain exactly how you wired the ESP to the ESCs on the quadcopter?
Mar 18, 2018, 03:10 AM
Registered User

Tracked vehicle

Can you give me some brief details of the mechanics of the tracked vehicle you showed in an earlier post? Length, width, source of tacks, spec of motrs and gearboxes, would be really great. I am working on a project for a crawling vehicle which carries a camera.
Mar 18, 2018, 07:39 AM
Registered User
Cesco's Avatar
Thread OP
TY for the info SeeTeeZee.
They got some stuff wrong at hackaday

> One transmitter (referred to as the server in the source code)
Wrong, receiver is server, transmitter the client.

> specifically uses the example of long-range aircraft flying in formation;
Never mentioned formation.

> with the ESP’s handling all the over the air communication.
The first version did output a PPM stream which was fed to an arduino. Second version got rid of the arduino and produced 4 PWM channels. Third version is the copter version and got a 6050 gyro/acc added, runs an IMU and a PID. Output is a serial data stream which the ESC can read.

> To be clear, you still need a traditional PPM-compatible RC receiver
No you dont. You only need a ppm generator, which can be a RC transmitter.

> They aren’t directly responsible ... for running the speed controls,
Yes they are.

Originally Posted by SeeTeeZee
Perhaps you could explain exactly how you wired the ESP to the ESCs on the quadcopter?
The esc input are all wired to the serial output pin #2 of the esp. Name is D4, GPIO02, TXD1. Yes, 4 esc input pins are wired to one esp8266 output pin. Star config. Every esc has its own number and selects its value from the serial data stream. It's a like a simpler and faster SBUS.
This protocol is described here:
The inventor of the serial protocol is "The father of all opensource BL controllers" Mr. Quax. Both SimonK and BLHeli are derived from his work. He calls it the 0xF5 protocol.

You can probably adapt the code to have 4 normal esc outputs. Look at the "tracked vehicle" vers. 2 and adapt pwm to 1-2 ms.
Last edited by Cesco; Mar 18, 2018 at 01:50 PM.
Mar 20, 2018, 01:30 AM
Registered User
This is really cool! Thank you for sharing.

If I have understood this correctly, this replaces the control link from a remote/PPM source to the vehicle with ESP8266s? In theory, could you use this to time share a single controller/PPM source to control multiple vehicles?
Mar 21, 2018, 08:32 AM
Registered User
Cesco's Avatar
Thread OP
Originally Posted by falense
this replaces the control link from a remote/PPM source to the vehicle with ESP8266s?
The first version yes.
Last version controls the whole quadcopter.

Originally Posted by falense
use this to time share a single controller/PPM source to control multiple vehicles?
If the transmitter knows the MAC of each vehicle yes.
Mar 23, 2018, 11:28 AM
Registered User
Cesco's Avatar
Thread OP
I got a version for normal esc's now. Did not test yet. Ask me if you want test it.

EspCopter test flight:

ESPCopter (0 min 44 sec)

Here is gyrodata ofver espnow telemetry channel

EspCopter telemetry (0 min 15 sec)
Last edited by Cesco; Mar 23, 2018 at 02:25 PM.

Quick Reply

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Mini-HowTo Breadboard STM32F3 FCs, 8Khz Betaflight with ESP8266 WiFi Telemetry MGeo DIY Electronics 129 Sep 20, 2017 05:04 AM
Discussion How to control quad with arduino/ESP8266 and TX Module without remote gandolfi DIY Electronics 2 Feb 24, 2017 04:20 PM
Mini-HowTo Ultra Cheap WiFi Telemetry Modul ESP8266 with transparent-seiral-bridge kabauterman Multirotor Drone Electronics 4 Jan 19, 2017 09:07 PM
Help! Topic: PPM Creation Problem [Controlling Quadcopter using ESP8266] HansCo Multirotor Drone Electronics 4 Oct 11, 2016 03:22 PM
Discussion Build CJMCU controller via wifi with esp8266 module thinking Scratchbuilt Multirotor Drones 2 Sep 09, 2015 12:31 AM