Introduction: Speech Based (EasyVR) 2.4GHz Long Range (1km+) Radio Control
Meet my project ==> Arduino based RC control with speech recognition module (EasyVR)
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, more 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 :-)
Note: this solution is too slow for controlling anything that moves fast but may be appropriate fro small rovers and such.
Most similar projects use the speech module to drive a car directly, i.e. servos are hooked right to the Arduino.
Plus: easy to do
Minus: 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.
Plus: wider range (100m, maybe?)
Minus: harder to complete, still not suitable for FPV because of range limit
Plus: range limited only by the used transmitter and receiver modules, can be customized to any RC equipment
Minus: 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: https://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.
Note: 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.
Note that 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: https://www.youtube.com/watch?v=wy--dcPDkxs
Servo movement tested here: https://www.youtube.com/watch?v=7wMpf1I6KZM
The video of first test drive is avaiilable here: http://www.youtube.com/watch?v=PdtaiYcidfs
Note: the videos may contain foreign language (Hungarian)
For now, FPV gear is not present 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.
Finally found time for finishing the project (first draft, at least).
Feed and capacity:
The Well D93 has been modified a bit and positioned upside down. The chamber for the BB bullets has been reversed as well.
For now, a simple tube has been added for feeding the chamber. The capacity of the tube is ~30 BBs.
First I tried to power the gun with 6V from a DC-DC converter but the fire rate was as high that it caused malfunction while feeding, so I decided for 5V.
By using this voltage, feeding is correct and the fire rate is still affordable.
The only problem was that the cheapo chinese DC converter provided insufficient current for the gun so it could not work.
I had to order another one, with 5A throughput current. It was delivered a few days ago and built onto the vehicle.
The trigger has been taken out and replaced by an RC channel controlled electronics. It triggers when the channel PWM rate is over 50%.
The Arduino code has been modified accordingly. Fire duration has been set to 500ms.
The fpv gear:
For now, the vehicle got my old 200mW 5.8G trasmitter with a very light and small 520TVL 5V camera. Only bench test has been made so far.
Video shot in the field will follow soon.
As the tilt servo holds the full weight of the gun platform it can be easily damaged while rasing in the field.
The weapon will be initially set into a parking position and raised only when armed.
For this, some modification in the Arduino code is needed.
The fpv range may be insufficient, first field tests will show ho much. Consider using a 900MHZ gear.
The bench test of all functions (including weapon firing):
(warning, commands and description in Hungarian language only - yet)