ESP-NOW Remote Control
Intro: ESP-NOW Remote Control
Universal remote control for small vehicles or robots, using the ESP-NOW-protocol, which is similar to the low-power 2.4GHz wireless connectivity.
Up, down, right, left, button.
Small, simple, with control LED.
Basic knowledge for Arduino IDE is required.
STEP 1: Hardware: Transmitter
In the basic configuration, all you have to do is connect the pins of the joystick to the ESP32 or ESP8266 correctly (see illustration).
An LED, a switch and a converter for the LiPo battery are optional.
- Joystick -- microcontroler
- GND --> GND
- 5V --> 3.3V
- x --> SP
- y --> SN
- SW(itch) > G25
For the battery I used a buck-boost converter that changes the voltages from 1.8V - 5V to 3.3V.
The easy way:
Instead of using a battery, simply connect the ESP to a power bank with a USB cable.
STEP 2: Software
For signal transmission, we use ESP-NOW, a protocol that works on a WiFi basis, but without registration, therefore faster and with a greater range. Only the MAC address of the addressee must be known to pair the devices.
A great description of ESP-NOW can be found at:
https://randomnerdtutorials.com/esp-now-esp32-arduino-ide/
Many thanks to Sara Santos and Rui Santos!
Transmitter
The microcontroller (transmitter) detects the movements of the joystick and transmits the signal via Wifi to a device with a specific MAC address. It receives a confirmation of receipt from the receiver, and the LED on the remote control lights up as a check.
Receiver (see Step 3)
The receiver sends an acknowledgement of receipt as soon as a signal arrives. Further processing takes place in this second microcontroler.
STEP 3: Prepare the Receiver
Now you can set up another ESP8266 / ESP32 (for example in a toy car) as receiver. Don't forget to match the MAC address of the transmitter and receiver.
STEP 4: Software Upload
Basic knowledge for Arduino IDE is required.
Download Arduino IDE for free at https://www.arduino.cc/
STEP 5: Case
A housing for the remote control depends very much on which microcontroller and which power source you use. Solid cardboard or plastic plates will protect the electronics properly.
If you are also using an ESP32 D1 and a small LiPo battery, I will be happy to share the 3D print files with you.
9 Comments
Robecq 4 months ago
Do you have a link or model number to the buck converter you used?
Markus Opitz 4 months ago
Hi Robecq, I'm sorry that you had to wait so long for an answer. Anything that reduces the power supply to 3.3V, fixed or adjustable, will work as a converter, e.g. www.az-delivery.de, step-down-converter
nicolasgoubet 9 months ago
Markus Opitz 9 months ago
The LED is an indicator of whether the connection between the remote control and the end device has been established. Well, I wanted to use a converter because I didn't want to risk overloading the 3.3 input with 3.7V. Other energy sources (with a converter if necessary) are also an option here: 9V, 7.4V Lipo or simply 5V via the USB connection.
Happy making!
nicolasgoubet 9 months ago
Markus Opitz 9 months ago
https://www.seeedstudio.com/XIAO-ESP32S3-p-5627.ht...
Let me know what you have achieved.
Markus Opitz 9 months ago
https://www.instructables.com/Getting-Started-With-ESP32-C3-XIAO/
nicolasgoubet 9 months ago
What about the led ? Is this to signify a low level battery, or just to prove that the device is on ?
Build_it_Bob 10 months ago
Thanks for sharing!
Bob D