Exhibition / Gallery
Speech based 2.4GHz long range (1km+) radio control
Topic: Speech based 2.4GHz long range (1km+) radio control
(Read 2006 times)
Speech based 2.4GHz long range (1km+) radio control
May 07, 2013, 04:50 pm
: May 17, 2013, 02:22 pm by icahone
The main idea is quite simple: get a speech recognition module, bind it to a microcontroller, generate appropriate PPM signal, send it to a HF module. Receive the signal with a standard receiver and get the servos move, many kilometers away.
This way one have to wear a headset and video googles only while FPV driving with both hands free.
I am not sure what to do with both hands free so I let everybody guess what to use them for :-)
this solution is too slow for controlling anything that moves fast but may be appropriate for small rovers and such.
The lag is ~0.5-1 sec.
Now that the first test were already done I decided to share the idea also here.
Most similar projects use the speech module to drive a car directly, i.e. servos are hooked right to the Arduino.
: easy to do
: user has to be within the audio range of the device, very small range
Then there are some projects which use the 2.4GHZ Xbee modules to extend the range.
: wider range (100m, maybe?)
: harder to complete, still not suitable for FPV because of range limit
: range limited only by the used transmitter and receiver modules, can be customized to any RC equipment
: need a bit od understanding of PPM signal technology, Arduino interrupts and timers
For FPV purpose, I assume at least 1km of range for real freedom. The chosen TX/RX is from Frsky (with telemetry), which is a really cheapo solution but reliable. Plus, the telemetry signalize (by beeping) when at the edge of the range.
The hardware chosen
Veear EasyVR module (shield) with mic (60$)
Arduino Uno (20$)
8 ohm 3W speaker
Frsky DHT diy trasmitter module (20$)
Frsky D8R-II telemetry receiver (20$)
The FPV gear (optional):
5.8GHz 200mw/400mW TX/RX system (~80$)
video googles (250$)
RHCP CL antenna pair (40$)
For the code I borrowed the PPM generator code written by Hasi and the example script provided for the EasyVR module.
For testing the PPM output, I have made a simple mono audio cable.
One side of it goes to the PC microphone, and the other side to the arduino digital output pin where the PPM signal comes out.
The PPM output and channel behaviour is tested either by the PPM Audio program, or by program called Zelscope.
The PPM Audio is really suitable just for checking the PPM signal presence, for real testing having the Zelscope is a must.
This virtual scope shows as well the quality of the signal as well any misshapes that can occur.
The module can be bought from many dealers, such us Robotshop, Sparkfun, Tigal, or even from Ebay. it is available either
"naked" or as a shield. Comes with a microphone. I have bought the shield version.
What we need for the project:
Arduino library: http://www.instructables.com/id/Arduino-Voice-recognition-Basic/step3/EasyVR-Library/
EasyVR Commander: http://download.tigal.com/veear/EasyVR-Commander-3.4.10-QS-5.2.1.zip
The library contain example scripts that can be used. The EasyVR module is simply pressed into the Arduino Uno.
The module has 4 pins for jumpering, UP,SW,HW and PC. For communication with Arduino or PC the pin is recommended to get jumpered to SW or PC.
The module uses kinda software bridge (initialized in Arduino code) for communication with the EasyVR Commander, when the bridge is not ready the communication can not be done.
The Commander is used to configure different groups for speech commands, create, edit and delete commands and teaching them to the module. The configuration is quite straightforward, more about it is written in the EasyVR manual.
Frsky HF module and receiver
These can be bought from many places, best to buy it from Hobbyking, where it is cheap.
The DHT (DJT can be used as well) diy module has only plus, minus and PPM input. Be aware that the ground of the Arduino and the DHT module have to be common for correct functionality. For this, the easiest way is to power Arduino from the Jack input (any 2s lipo will do the job), then power the DHT module from Arduino's Vin and GND pins. The module's PPM input is connected to the Arduino's digital 9 or 10 pin, according to the PPM generator code used.
Any receiver compatible with the DHT module can be used.
One can use any HF module and receiver that understands standard PPM protocol with either negative or positive shift.
The PPM encoder
Any PPM generating code (PPM encoder) can do the job, which uses timer interrupts for signal generation. The main thing is, when using interrupts then the PPM encoder's code runs in the background. One has only have to change the value of the variables, representing different channels.
These values range from 900 to 2100 (values in microseconds) and depend on the speech commands of the EasyVR module. Upon saying different phrases these values gets altered in the code, causing modification of the signal.
The problem is that the EasyVR code uses SoftwareSerial by default, which interferes with the timer of the PPM encoder. So the code had to be modified to use HardwareSerial instead.
this modification disables communication between the PC and the Arduino as the EasyVR jumper pin has to be set to HW. So anytime when new code needs to get uloaded into Arduino, the EasyVR jumper pin has to be set back to either SW or PC, and for the correct functionality it needs to be set to HW.
With Frsky DHT module tested, the following values are working well:
- signal frame length 22500us
- signal pulse width 300us
- channel signal width 900-2100us
- 8 channels
- signal shift positive
The example code provided by the manufacturer is sufficient for customization.
It is useful to lit the LED on the EasyVR module while listening or sending out a beep sound so it is clear when the modul is listening and when listening is finished.
I am using this solution on my rover. As it is driven 4WD and have 2 servos for steering I had to write a code for mixing the channels for throttle and steering.
Control is quite responsive, the only issue seems to be the microphone sensitivity to nearby noises.
Unfortunately, what is 100% in a quiet room that is not as good in the open area.
Possible solution will be the usage of kinda headset with noise canceling microphone.
Video about testing the PPM signal is here:
Servo movement tested here:
The video of first test drive is available here:
Note: the videos may contain foreign language (Hungarian)
For now, FPV gear is not mounted yet. A 200mW 5.8GHz system is planned to be used with Gopro camera and RHCP CL antennas.
It will be the same proven system which I am using on my multirotor recently.
The code will be extended by control of 3 more channels, for the pan/tilt head, where the FPV camera will be mounted, as well as the turret system which allows automatic firing of BB bullets.