Wifi based RC with Arduino

The Arduino based open source digital radio control arduinodtx is build around transparent serial communication. 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):

schaltplan-wrx-configuration

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. To avoid any interference from the Arduino it is necessary to upload the “DoNothing”-sketch to your Arduino:

void setup() {
// do nothing…
}

void loop() {
// do nothing…
}

The ESP8266 will be programmed using the standard AT command interface. This requires either your Arduino IDE’s Serial monitor or another terminal application running on your PC. The following description is based on the open source program Tera Term which can be downloaded for free.

You would start by setting up the serial port according to the default parameters of the ESP8266. Select „Setup“, then „Serial port…“ and you would see the following screen:

serial-port-setup

Select the serial port connected to your Arduino and select the “Baud rate” 115200. Then you would have to adjust the terminal setting by selecting „Setup“ followed by „Terminal…“:

terminal-settings

Match the configuration shown above. Now communication can be established. Please initiate a reset and you will see a cryptic message indicating a complete reset:

startup-message

The first step is changing the baud rate to 9600 baud. Please type the command „AT+UART=9600,8,1,0,0“. After hitting “Enter” the ESP would acknowledge command execution with OK:

screenshot029

Since the Baud rate for the port was changed you would have to make the respective change also in your terminal program by going from 115200 to 9600 Baud (see above).

Now you can start to program the radio’s wifi parameter. Since the receiver is offering an access point (ap) you would have to run the transmitter in station mode to log into the receiver’s ap. You would enter “AT+CWMODE=1” to get the right setting.

screenshot031

The next step requires you to enter the network parameters of the ap. The correct command would be “AT+CWJAP=”SSID”+”PASSWORD”” with SSID representing your receiver’s SSID and the respective (optional) PASSWORD. Please note that you have to turn on your PiKoder/SSC wRX receiver to allow the controller to acquire an IP address and connect to the ap – otherwise you will receive error messages similar to the ones shown in the screen print:

screenshot032

The final step will save all parameters and set the transparent mode. Based on the default configuration of the PiKoder/SSC wRX you would enter: “AT+SAVETRANSLINK=1,”192.168.4.255″,12001,”UDP”,12000″.

screenshot033

This completes the programming of the radio. After reconfiguring the jumpers of the UART multiplexer to the right position and resetting the Arduino your transmitter would be completed.

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.

The XBee communication link would be setup in transparent mode. Therefore, no changes are required in the Arduino sketch or the PiKoder/SSC firmware. The complete feature set of the radio control would be 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

Receiver module prototype