Introduction: Arduino Voice Recognition Remote Control Car/Spider Robot/BB8 Aka Control Nearly Everything Using Your Voice

About: I studied Electrical Engineering and a lot of other things. I'm always driven by my passions. Please visit also my Youtube channel.

I've submitted this project to the Make it Move and to the Wireless contest...

https://www.instructables.com/contest/mim2017/

https://www.instructables.com/contest/wireless2017...

If you like it, please vote!

I wanted to control my RC 360 Degree Stunt Car (which is also the motor unit I've built for my RC Lego BB8),

https://www.instructables.com/id/Whats-Inside-My-R...

using my voice, but keeping the functionality of the original Remote Control, so, here it is!

For this Instructable, you need:

A RC Car (White or Orange)

https://rover.ebay.com/rover/1/710-53481-19255-0/1...

Please note that all the transmitters/receivers I've also used in other projects are 40Mhz

1 Arduino Nano

https://www.banggood.com/ATmega328P-Arduino-Compat...

1 Arduino Nano Shield

https://www.banggood.com/NANO-IO-Shield-Expansion-...

1 FT232 USB UART Board FT232R FT232RL To RS232 TTL Serial Module

https://www.banggood.com/FT232-USB-UART-Board-FT23...

1 Geeetech Voice Recognition Module

https://www.banggood.com/Geeetech-Voice-Recognitio...

1 4 Channel Relay

https://www.banggood.com/5V-4-Channel-Relay-Module...

Soldering on iron

https://www.banggood.com/14-in1-110V-220V-60W-EU-P...

20 Jumper wires

https://www.banggood.com/120pcs-20cm-Male-To-Femal...

Step 1: Setting Up the Voice Recognition Module... Aka the Trickiest Part of This Project

Download the driver for the FT232 USB UART, according to the operating system you use.

http://www.ftdichip.com/Drivers/VCP.htm

Download Coolterm software

http://download.cnet.com/CoolTerm/3000-2383_4-109...

Wire the FT232 USB UART module to the Geeetech voice recognition board, following this schematic https://youtu.be/Ft7RlMWt6E0

Plug the FT232 module to the USB of your Computer. Launch Coolterm app, go to connection option and to be usere to use the right COM, press the button "Re-Scan Serial Ports".

Now press the button "Connect". In the "Connection" options select: "Send String" and Choose "Hex", instead of "ASCII" (which is the default). Type "aa36", press "Send" and wait the response that has to be "Common Mode". If nothing happens, try to press the button "Send" again, and, eventually, again.

Once you are in "Common Mode", you can type "aa11" followed by send. Be prepared because as soon as you send the command, you'll start the recording session.

Speak every time the word Start/Again appears on the serial monitor. Once the module is happy about the command, will display "Command 1 finished" and you'll start the 2nd. You have to record 5 commands (i.e. Forward, Backward, Left, Right, Stop). At the end, you have to type "aa21", to save the recording session.

When you are recording, be sure your microphone is attached properly to the connector (it's a bit loose).

Once you finish this operation, unplug the FT232 Module and connect your Arduino, following this schematic https://youtu.be/Ft7RlMWt6E0

The following code allows you to switch 5 LEDs on/off, using the 5 specific commands you have previously recorded. Eventually, you can also activate 5 servos. IMPORTANT!!! When you upload the code, disconnect Tx/Rx cables from Arduino. Once the code is uploaded, re-connect the wires (Tx-Rx / Rx-Tx) and wait until the LED on the Voice Recognition Module blink every 2/3 seconds.

//#include int forwardPin= 3; int backwardPin= 5; int leftPin= 7; int rightPin=9; int talkPin=11; byte com = 0;

//Servo myServo;

void setup() { Serial.begin(9600); pinMode (forwardPin, OUTPUT); pinMode (backwardPin, OUTPUT); pinMode (leftPin, OUTPUT); pinMode (rightPin, OUTPUT); pinMode (talkPin, OUTPUT); //myServo.attach(9);

delay(2000);

Serial.write(0xAA); Serial.write(0x37); delay(1000); Serial.write(0xAA); Serial.write(0x21); }

void loop() {

while(Serial.available()) {

com = Serial.read();

switch(com) {

case 0x11: //command 1

digitalWrite (forwardPin, HIGH); delay (1000); digitalWrite (forwardPin, LOW); //myServo.write(0); break;

case 0x12: //command 2 digitalWrite (backwardPin, HIGH); delay (1000); digitalWrite (backwardPin, LOW); //myServo.write(45); break;

case 0x13: //command 3 digitalWrite (leftPin, HIGH); delay (1000); digitalWrite (leftPin, LOW); //myServo.write(90); break;

case 0x14: //command 4 digitalWrite (rightPin, HIGH); delay (1000); digitalWrite (rightPin, LOW); //myServo.write(135); break;

case 0x15: //command 5 digitalWrite (talkPin, HIGH); delay (1000); digitalWrite (talkPin, LOW); //myServo.write(180); break;

}

}

}

Step 2: Modifying the RC Remote Control

Basically you just need to extend 2 jumper wires from every button of your remote control.

I used my soldering on iron to do this job.

After the operation above, create the grooves for the wires and try to put everything inside the original box of the transmitter. You have so many things to add to it, that it's better to keep the transmitter as tidy as possible.

Step 3: Glue the Arduino Shield to the Remote Control and Add the Voice Recognition Module

I've used a small plastic box that fully covers the Arduino Nano Shield, leaving the holes for the wires and the Arduino USB cable.

I basically glue the Arduino Shield to the back of the Remote Control and the Voice Recognition Module to the box. Hopefully, it will look more compact in this way.

When you are doing this operation, try to stay away from the edges of the battery cover.

For my project I've used a rechargeable 2S 7.4V Lipo battery (which doesn't have enough "juice" for my drone),

but you'll never know... if in the future I have to reach the battery, I'll be able to do that.

Step 4: Adding the 4 Channel Relay

Following the wiring diagram, connect the 8 extension wires you have previously made,

to every single channel of the Relay.

Now connect the 5V cable and the Ground.

Connect also all the digital pins to the 4CH relay.

Ideally you want to power everything using a single battery.

I found out that a 7.4V Lipo* does the job perfectly.

*Please use all the precautions required, when you use this type of battery.

Step 5: Done!

Basically, you can give a new life to any RC stuff you may have in the attic.

Having the brain on the transmitter, allow you to avoid any modification to the car/spider/bb8 you have.

With Arduino you can execute a set of instructions, with a single command.

For instance, you can say: "Go around" adding your favourite sequence (Forward/Left/Forward/Left),

instead of executing for every command, a single instruction.

The only thing you have to do is to power always the Arduino Nano first and the transmitter after.

When you want to switch everything off, reverse the sequence. I mean, first switch the transmitter off and after the Arduino Nano.

The trasnmitter has the extensions connected to the relay and the small current of its own circuit, activates all the commands at the same time.

Of course, there is another way of making this project:

if you buy the EasyVR Voice Recognition shield (£56... Ouch!!!), you can control the RC car using your smartphone, but this module force you to fit the Arduino and the EasyVR module in your car/spiderbot/bb8.

I've also wanted to keep all the functionality of my transmitter, therefore I've followed the direction above, which is (by the way), the cheapest!!! £36 all included: Arduino board + Shield, RC Stunt Car, Voice Recognition Module, FT232 USB UART, Jumper Wires... beat that!

Step 6: Add-on Aka Adding the 5th Micro Relay to Activate BB8 Sounds

The Geeetech Voice Recognition has 5 main commands you can record and, at the beginning of this project, I've planned to use one of those to activate the sounds effects of my Lego BB8.

The relay module I bought has only 4 channels, therefore I've wired an auxiliary micro relay I had and now I can activate the sounds of my Lego BB8 using my voice...

aka I can call BB8. :-)

The instructions about the sounds unit are available in my previous Instructables...

https://www.instructables.com/id/Sounds-Unit-for-T...

https://www.instructables.com/id/Whats-Inside-My-R...

The only modification made was to add 2 wires to the connections of the button "Next", in order to connect them to the micro relay.

Now an appeal to LucasFilm and Disney, please hire me!!!

I have a brand new Star Wars robot in mind, that we'll create the perfect bond with all the previous ones!