Introduction: Wifi PPM (no App Needed)
I wanted to control my diy micro indoor quadrocopter with my smart phone but I couldn't find a good solution for this. I had a few ESP8266 wifi modules laying around so I decided to make my own one.
The program starts a wifi access point with a HTML 5 website to control the PPM signal. The PPM signal is generated by interrupt.
Thanks to HTML5 you can control your RC device with any smart phone without any app.
You can also connect to the website with a PC and use a joystick for controlling. At the moment this works only in Firefox.
In this inscrutable I will explain how to set up the ESP8266 and how to configure the receiver in Betaflight.
Step 1: Parts List
Let's start with the parts list. You just need a few components:
- ESP8266: Any module should work. I use the ESP 12-F module: http://www.watterott.com/de/ESP8266-ESP-12F-WiFi/W...
- a 3,3V USB to Serial converter for uploading the scetch the first time. (After the first upload you can use the OTA update). Use Something like this: https://www.banggood.com/de/RobotDyn-USB-Serial-A...
- a 3,3V voltage regulator: The ESP8266 needs 3,3V. Any voltage above 3,6V will kill the device. It can also drop about 200mA peak current. If you don´t have a strong enough 3,3V supply at your RC model you need an additional voltage regulator. I use this step down regulator with a 3,9K Ohm resistor: http://www.produktinfo.conrad.com/datenblaetter/15...
- a PC with Arduino IDE: https://www.arduino.cc/en/Main/Software
- ESP8266 support for Arduino IDE. Follow these instructions: https://learn.sparkfun.com/tutorials/esp8266-thing...
- Websocket library for Arduino: https://github.com/Links2004/arduinoWebSockets
- Maybe a 3,3V/5V level shifter if your PPM decoder doesn´t support 3,3V inputs. For most quadcopter flight controllers you don´t need this.
- The WifiPPM scetch: Download file below or https://goo.gl/Qj5Gwb
- A smart phone or a PC with a joystick and Firefox
Step 2: Set Up the Electronics and Upload the Program
The first thing to do is to set the power connections to the ESP8266. You can see the wiring in the picture. Make the following connections:
RST, EN and VCC to 3,3V
GPIO15 and GND to GND
Put a small capacitor between VCC and GND (about 100 nF)
TXD to RXD of your USB2Serial device
RXD to TXD of your USB2Serial device
Put GPIO0 to GND while powerup to enter the flash mode.
After you have installed the Arduino IDE, the ESP8266 support and the websocket library open the sketch. Hold GIO0 to GND while powering up the ESP8266 to enter the flash mode. Now you can upload the sketch.
After you have uploaded the sketch, the controller will reset. You should find a WIFI Access Point named WifiPPM. If this is OK you can power down the chip and disconnect the TXD, RXD and GPIO0 wires. In the future you can update the program over OTA. To do so connect to the Access Point and go to "192.168.1.4/update" in your web browser.
Step 3: Website
Now you can connect GPIO5 to the PPM input of your flight controller or whatever you use to decode the PPM signal.
After powering up the module you can connect to the Access Point "WifiPPM". There is no password. Open the address 192.168.4.1 in your browser.
You will see the site of the first picture. On a touch device you can control the sticks with your touch screen.
If you open the site with a PC you must use Firefox. As soon as you connect a joystick, the site will change to the one you can see at the second picture. You can control the sticks with your joystick.
In the next step I will explain how to set up Betaflight, because I use it. If you use some other controller you have to go on yourself from now on.
Step 4: Setting Up Betaflight
I use the WifiPPM controller for my quadcopter with Betaflight. I explain now how to set it up.
- Connect your flight controller to the PC
- open Betaflight
- connect to the flight controller
- go to Receiver tab
- type RTAE1234 into the channel map field
- change the "Stick Low Threshold" to 1020, the "Stick Center" to 1500 and the "Stick High Threshold" to 1980
- save the changes
- open the wifiPPM website with your mobile phone and test if the adjustment is OK
Thats it. You are done. Now you can fly with your mobile phone without any additional app.
mertnesvat made it!
We have a be nice policy.
Please be positive and constructive.
It would be helpful to mention that you need to set Receiver Type to PPM from Betaflight > Configure > Receiver Type