Arduino WLAN RC Transmitter

The Open Source Arduino sketch arduinodtx implements a feature rich state-of-the-art RC transmitter with a serial command output (PiKoder/SSC resp. PiKoder/PPM compatible). The transmitter commands would be sent via a transparent serial channel.

Therefore, a wifi communication module such as an ESP8266-01 can be used in concert with a PiKoder/SSC wRX wifi based receiver to easily build a feature rich radio control.

In addition to the components for the basic setup of the arduinodtx you would need a logic level converter, a dc-dc converter, two jumpers as UART multiplexer and the wifi module as shown in the image above. The wiring of these building blocks is shown below (you would have connect all signals with identical names):

The setup is fairly simple and can be easily done on a prototype board. Please note that Arduino signals are shown in blue.

Then you would have to configure the transmitter’s wifi radio to establish a transparent link to your receiver radio – similar to binding a transmitter and receiver in a standard rc environment. This would be done by setting the jumpers as shown above to connect the radio directly to your computer. Please refer to ESP8266-01 Sketch for the PiKoder/SSC wRX for more information. If you would want to program the ESP8266-01 while in place you would have to add the additional components for the programmer to the prototype board.

Please note also the setting of the jumpers for D0/D1. Please make sure that the Arduino would not interfere with any direct communication with the ESP8266-01 by connecting the Arduino´s RESET signal to GND.

After completing the programming of the ESP8266-01, the adjusting of the jumpers, restarting of the Arduino and rebooting your RC would be fully operational.

ESP8266-01 Sketch for the PiKoder/SSC wRX receiver

The PiKoder/SSC wRX uses the ESP8266-01 module configured as an Access Point (AP) to implement a transparent serial communication channel between a transmitter a PiKoder/SSC. The ESP8266-01 can be programmed as needed based on its default firmware by using respective AT commands. However, given the number of parameters used for the commands this approach is complex and rather error prone. In addition, the verification of the programming is difficult and mistakes very often require to re-flash the ESP8266.

It has turned out to be significantly easier to flash the ESP8266-01 with a dedicated sketch, which implements all the features required for the serial communication and offers an additional command interface for setting the AP parameters needed.

This sketch udpRC_ESP8266-01 is Open Source and is provided via github for download. The sketch will be compiled and uploaded to the ESP8266-01 via the Arduino IDE as described in the blog RC with your webbrowser.

The use of the re-programmed module is very simple and intuitive. After rebooting the sketch would check the non-volatile memory of the ESP8266 for a valid parameter set. If no parameters are found then the default values will be used. After rebooting the the Controller is ready to operate.

The screenshot shows the user interface and the available commends. After rebooting the ESP8266-01 sents a more or less unreadable stream of characters to indicate that it is ready.

Entering the command ‘$?<cr><lf>’ will echo the current parameter setting. The SSID of the AP would be changed with the command ‘$s=’ followed by <cr><lf> and for changing the password you would use ‘$p=’. The revised parameter will be stored right away but will only be applied after a reboot. You can always check the changed parameter settings with ‘$?<cr><lf>’.

Arduino based XBee radio control

Combine the Arduino based open source digital radio control arduinodtx with an intelligent serial servo controller such as the PiKoder/SSC, an Arduino XBee shield and an XBee module to easily build a feature rich radio control.

A transparent transmission is used, so that no adjustments to the Arduino software or the PiKoder/SSC firmware are required; the full range of functions of the remote control is available.

The setup of the transmitter including the jumper configuration is shown below – for details regarding the wiring please refer to the arduinodtx webpage.

xbee-digital-rc_404p

The configuration of the receiver comprised of an XBee breakout adapter, the PiKoder/SSC board and a dc-dc converter to generate the 3,3 Volt required by the receiver is shown below. For more details – including the programming of the XBee modules – please refer to the PiKoder/SSC Application Note #3: XBee Communication.

complete-receiver-unit

Prototyp receiver setup

Radio control with your webbrowser

If your rc model would offer an access point and run a webserver, then you could control your model with a webbrowser running on your smartphone – no matter whether this is a Windows or Android device or an iPhone.

The PiKoder/SSC wRX (see below) is well suited as a hardware platform for this concept: the ESP8266-01 offers the access point and runs the webserver, the PiKoder/SSC manages all realtime aspects of controlling the servos and the electronic speed control.

pikoder_ssc_wrx-catalogue-image-png

PiKoder/SSC wRX

The standard configuration of the PiKoder/SSC wRX requires the ESP8266-01 to act as a transparent bridge. Since we will be needing a webserver, we would have to flash this wifi controller with a new firmware. This can be easily accomplished by using the latest Arduino IDE which is supporting generic ESP8266 modules.

The new controller firmware is open source and would be available through the github repository makerprojects/httpRC. After downloading open the sketch in the Arduino IDE. At the beginning of the source code you will find the settings recommended for compiling the program. [Update December 27, 2018: The httpRC sketch has been completely revised and updated. Please check this blog for more details.]

In order to flash the ESP8266-01 you will need an USB-Serial converter, since the wifi module does not feature a USB port. Please keep in mind also, that the ESP8266 requires a supply voltage of 3,3 Volts – the board is not 5 V tolerant! The offering of USB-Serial converter offering a 3,3 Volt supply as well as 3,3 Volt signal level is limited; therefore it might be easier to use a converter with 5 V supply and 3,3 V signal level such as the PL2303TA readily available at ebay (shown below) and build your own converter from 5 V to 3,3 V.

usb-connector-ebay

USB-Serial connector

Since you would need a “reset” and “program” button for flashing the module you might consider to construct the little adapter shown below using a prototype board.

programmieradapter-esp8266

Programming adapter for the ESP8266-01

The schematic for the programming is shown below.

esp8266_flash_prog_board_sch

The conversion of the 5 V provided by the USB-Serial adapter to 3,3 V follows the design of the PiKoder/SSC wRX and requires a standard low drop voltage controller LF 33 CV ( please refer to the following excerpt of the PiKoder/SSC wRX schematic; the 5 V input would be to the left, the output is to the right).

spannungsanpassung

Unfortunately the flashing of the ESP8266 does not start automatically as you might be used to when downloading a program into your Arduino but has to be initiated manually. You would push the RST and PROG button simultaneously and release the RST button while still holding the PROG button. After releasing the PROG button, the module would be in flash mode. Now you would start uploading the program. Now you would start uploading the program. Once the upload is complete your controller would require another reset prior to being operational. Once the upload is complete your controller would require another reset prior to being operational.