Ardupilot Mega Rover remotely controlled with smartphone

Overview

In the standard setup of the Ardupilot Mega (APM) for Rovers you would deploy a conventional RC for manual control: the RC receiver feeds the input channels of the APM with PWM signals for Rover movement and for executing special functions such as switching flight modes.

If you replace the conventional remote control receiver with a PiKoder receiver such as the WLAN receiver PiKoder/SSC wRX, then the Ardupilot can be controlled via a smartphone, for example in the rover configuration. As an user interface, either the Android remote control apps udpRC or picCAR can be used for this application or the browser interfacedescribed in the previous article.

Setting up the rover

First, the APM is loaded with the Mission Planner with the ROVER configuration; a further adjustment of the parameters was not necessary in my case.

The following image shows the very simple hardware setup.

The PiKoder – channel 1 is connected to the APM input 1 (steering) and the PiKoder – channel 2 to the input 3 (throttle). The standard rover wiring is used at the output side (steering servo on channel 1, ESC with BEC on channel 3). In this configuration, the Ardupilot takes over the power supply of the receiver.

The Ardupilot does not respond to PWM signals that are below or exceeding the typical range of approx. 1,000 – 2,000 µs. Therefore, the minimum and maximum values of the pulse values of the PiKoder/SSC have to be adjusted, as shown in the following figure.

For this purpose, the PiKoder Control Center (PCC) is used as described in the User’s Manual for the PiKoder/SSC wRX.

This completes the set up; the function of the apps is described in the user manuals.

Outlook

The implementation of further configurations and functions has now been done and incorporated into the Android app udpRC4UGV, which is described in the continuation of this blog.

Since both the apps are open source and the receiver protocol is disclosed, you can of course also make your own modifications and extensions.

RC model control with web browser – improved user interface

A few days ago I came across the ESP8266 MikroE Buggy project.

In this project, a web server is implemented on the ESP8266 – similar to my blog Model Remote Control with Web browser. Using this concept, a browser based (and therefore operating system neutral) radio control could be easily made available. In this project, especially the HTML5 based user interface implementing a joystick caught my attention.

The software is open source and so I was able to change the program for use with a PiKoder/SSC wRX. Additionally, I adapted the code for controlling a ‘normal’ car or boat (one channel for speed, one channel for direction). The customized source code is available in a github repository.

The programming of the ESP8266 is also described in the web browser model remote control blog. An additional feature of the ESP8266 MikroE Buggy project is that the Arduino file system is used. The installation and use is described here.

Digital and precise servo tester

Overview

The servo tester presented here is equipped with a PIC controller to provide for very accurate pulse generation (pulse width: 1 ms – 2 ms) especially in comparison with a simpler construction with RC links. For this purpose, the internal oscillator is used, which is specified in the selected range of the supply voltage with an accuracy of 1 %.

Furthermore, the servo tester is characterized by the fact that, in contrast to other simpler digital devices, the supply voltage range is specified form 4.8 V – 6 V. With this, the servo tester can also be connected to the BEC connection of a speed controller. The polarity of the pulse for servo control can be adjusted by hardware (jumper setting).

In addition, the Servo Tester enables the use of servos for other applications, such as for rotating and panning surveillance cameras.

Circuit

The circuit is based on the PIC12F675, which controls the servo tester. The supply voltage of the controller is lowered to 3.3 V by a corresponding controller; this ensures the highest accuracy of the internal oscillator on the one hand and the large supply voltage range of the tester on the other hand.

However, this approach requires a driver transistor Q1, which performs the level adjustment to control the servo. The supply voltage of the servo is directly looped through, so that servos or motor controllers can be tested either with the already existing battery / BEC supply by the speed controller or by means of an additional power supply (in this configuration it must be ensured that no power is provided via the servo plug).

The jumper JP3 determines the polarity of the control pulse for the servo. Please note that the LED is a bi-color LED.

Operation

The operation is simple and intuitive. The servo tester has two different operating modes: the manual mode, in which the servo is controlled by a rotary knob P1 and the neutral position can be adjusted and the exercise mode, in which the servo is continuosly moving between the end points. The change between the two operating modes is carried out by pressing the button S1. The LED will indicate the active mode of the servo tester.

After switching on, the device is in manual mode and the servo position is adjusted by rotation of the potentiometer P1. In the pulse area outside the window of 1.45 ms and 1.55 ms, the LED lights up in green. To move the servo to the neutral position, the color of the LED within the window of 1.45 – 1.55 ms changes to yellow or both colors of the LED light up and when the neutral position of 1.5 ms is reached, red is finally displayed; no button has to be pressed and both hands are free to perform adjustment work if necessary.

The Exercise Mode offers two speeds to choose from. The LED flashes red in this mode and shows which speed was selected via its flashing frequency (0.25 s corresponding to 2 x flashing/second or 15 s (correspondingly once 2 s on, then 2 s off) from final rash to final rash). The speed is switched by turning the potentiometer: if a pulse length greater than 1.5 ms is set, then the Exercise Mode is selected at high speed, otherwise the servo is controlled slowly.

Software Download

The firmware for the servo tester (Release 1.0) is freeware, which can be used without restrictions for private, non-commercial purposes according to the underlying End User License Agreement (EULA).

Servotester kit and components

In my shop you will find a complete kit for the tester.

Open Source Arduino Digital RC Transmitter

The sketch ArduinoDTX implements a feature rich RC addressing all needs of a state-of-the-art transmitter on an Arduino. It is based on fully digital encoding of all control information in the miniSSC – protocol rather than using a PPM frame. This fully digital encoding enables transmitting over a transparent serial channel such as Bluetooth, Wifi, and XBee. As a receiver for e.g. Bluetooth a PiKoder/SSC RX would be deployed.

This digital RC transmitter is based on the Open Source project arduinorc by Richard Goutorbe and thus inheriting the respective full feature set such as:

  • up to 9 proportional channels (Nano), 6 channels by default (Uno)
  • up to 6 additional digital channels (switches)
  • 9 model memories
  • Dual rate/Exponential switch
  • Throttle cut switch
  • 2 programmable mixers
  • End point adjustment, Potentiometer and Servo calibration
  • Throttle security check at startup
  • Optional Transmitter battery low voltage alarm
  • Programmable with Linux or Windows via USB (terminal application)

The original arduinorc-sketch has been modified and became the ArduinoDTx sketch, which outputs all channel information in the miniSSC-format rather than a PPM-pulse frame on Arduino pin D6. Every time a stick position would change a miniSSC message is generated. The PPM output has been removed completely.

The ArduinoDTx sketch is open source and provided through a respective github repository under the terms of the GNU General Public License Version 3.

Prototype setup: Digital four channel RC

Schematic setup of the Arduino Digtial RC transmitter

An RC transmitter with four channels will serve as a prototype project. As shown in the image two Thumb-Joysticks are evaluated by the Arduino (Pot 1/2 and Pot 3/4 in the above schematic). The connection to the Arduino’s analog pins is through a proto-shield. This shield does also accomodate the mode switch and the LED with the respective 270R resistor.

The RC is designed for battery operation. To guarantee the required minimum voltage of 6 V for the Arduino – even when using rechargeable batteries with a nominal voltage of 1,2 V – a battery holder for five AA elements has been selected. The two side panels support your palm operating the remote control and would enhance the user comfort significantly.

Please note that the USB port of the Arduino is easily accessible. This allows you to download software upgrades but also to customize the RC to your application.

Commissioning and testing

Test setup Arduino Digtial RC transmitter

For commissioning the RC you would download the arduinodtx sketch (.ino-file) which is provided through an respective github repository. Please note that building the sketch requires the Arduino “TimerOne”-library.

After you have uploaded the sketch to your Arduino the easiest way to test the RC would be to build the “wired remote control” shown to the right using a PiKoder/SSC evalutation board. In the standard configuration the pots 1-4 would control the respective servo channels 1-4 of the PiKoder/SSC.

If you wanted to customize your RC transmitter then you would hve to follow the steps described on the arduinorc-page. All commandos for programming the arduinorc are still available to you – for more information please refer to the (arduinorc command documentation).

Using Bluetooth communication

Bluetooth shield configuration for Arduino Digtial RC transmitter

You can easily customize the digital remote control to a Bluetooth RC with an ITEAD-Bluetooth Shield and then use the PiKoder/SSC RX as a readily available and fully compatible 8 channel receiver. Since the transmission is based on a tranparent serial protocol there are no changes needed in the sketch and the complete feature set is also available for the Bluetooth RC.

The transmitter setup is shown in the image. Prior to operating the RC the connection between the wifi modules has to be configured. Please refer to the PiKoder/SSC RX User Manual for a detailed description.

Using WLAN communication

You can also easily customize the digital remote control to a Wifi RC by adding a logic level converter, a dc-dc converter, two jumpers as UART multiplexers (to allow for programming the wifi radio) and an ESP8266-01 Wifi module and then use the PiKoder/SSC wRX as a readily available and fully compatible 8 channel receiver. The hardware setup and the programming of the wifi radios is described in great detail in the blog Arduino WLAN RC Transmitter.

Additional Application Examples

In order to increase the range of your radio control you can upgrade from Bluetooth to XBee. The setup is described in the blog Arduino based XBee radio control and in the PiKoder/SSC Application Note #3: XBee Communication.