Wall-E Robot Arduino EasyVR3 (Updated) New Video With Voice Commands..Funny!)

by Kevr102 in Circuits > Arduino

27955 Views, 256 Favorites, 0 Comments

Wall-E Robot Arduino EasyVR3 (Updated) New Video With Voice Commands..Funny!)

IMG_9738.JPG
Wall E Arduino Voice commands
IMG_0351.JPG
Wall e's doing a Synchronised..ish duet with a copyright free song called Everybody Poops.
download 1.jpg
download 3.jpg
download 4.jpg

Whilst looking through videos on Youtube one day(Like you do) I came across a video with a Diy Arduino based Wall e, I thought wow! what a brilliant idea, I didn't at that time even know what Arduino was so I began looking into it.

I wanted to have a go at building one of these awesome little robots, just to look at them brings a smile to my face and I'm no kid believe me, then I watched the movie and that intrigued me even more.

I think that was the start of me getting to know more about Arduino and then actually seriously thinking about building a Wall e, everything looked so complicated, actually cutting a Wall e up in the first place looked a bit daunting, then the electrical part of it as well, Servo's??? what's a Servo, what do they do? Anyway that was back then(It was a couple of years ago:)). With a lot of patience and time I finally got a functional Wall e robot which could do what I wanted it to do(Sometimes).

There are quite a few videos of Wall e Robots on Youtube etc and there are also various tutorials as well, let me show you how I make these Wall e robots, the build is pretty much straight forward(Which is easy for me to say now) we are stripping out the internals of the Wall e and replacing with 6 Servos and some Electronics, the complicated part to this Robot is when using the Easyvr3 Voice recognition is the code, and how you get to it.

My build is loosely based on a Robot by DIY(makers) on Youtube, there is a link to their website, it is in Spanish but can be Translated, there are step by step photos of the build so I wont go into too much detail in this Instructable, mine is more or less the same with Servo installation so I will focus more on the electronics and code, but with a few pointers along the way with the build.

My Wall e build is Arduino Nano based and its used in conjunction with a Nano Servo shield and EasyVR3 Voice recognition module, the idea being that you will give Voice commands and Wall e will carry out the commands.

As for the Arduino code, this code is driven by the EasyVR3 module using EasyVR Commander, this software allows you to input voice commands then it turns these commands into code and in turn uses actions for the movements, it also allows you to input the Wall e sounds using another piece of EasyVR software called Quick Synth, these sounds can be called up simultaneously with the actions.

I wont be uploading the Arduino code at the end of this Instructable there is little point, the code is generated within the EasyVR software and would only work with my voice, I will give good guidance with Screen shots on how the code is generated using the EasyVR Commander and Quick Synth software, and also using Audacity to change the format of MP3's.

So we are agreed that the code is unique only for your bot as it will only recognise your voice and the commands you have given it in the code, my hope in this Instructable is to show you how I approached the build of this Wall e, there is a fair bit of cutting of plastic etc to house the Servos, and a very small cavity for all the components so using the Nano and servo shield is an ideal solution to this problem, ideally the Wall e should be purchased as one listed for parts etc and ideally it should be the model with the blue Led eyes, after this build it can not be put back to its original format.

There is one action with the Wall e where I have come unstuck, I cannot input a Object avoidance sketch into the actions within the code, if anyone knows how to do this then please let me know, but as for everything else, it does what it says on the tin.

This is quite a costly build with the EasyVR3 module bumping the cost up significantly.

Its quite a lengthy Instructable so lets get started:

Instructable updated 02.07.2021 Video uploaded showing various Voice commands..

Instructable updated 05.07.2021 with more build photos.

Instructable updated 10.07.2021 with more photos of the final stages.

All music Tracks are Copyright free courtesy of Audionautixs.com..Jason Shaw

Supplies

Wall e plastic toy model as described 7" tall(Blue LED eyes)

EasyVR3 Voice Recognition Module, without the shield

Arduino Nano

Arduino Nano Servo Shield

2 x 360deg Servos(For the Tracks)

3 x Servos ideally with metal gears(Arms and Horizontal head movement)

2 x micro servos(Metal Gears)(Vertical head movement)

9v Batteries

Quick USB Adapter cable

Sharp IR Sensor(Optional)

Micro on/off switch

Tools etc

Dremel

Hot glue gun

CA Glue

Tweezers

Soldering Iron

Solder

Heat Shrink

Preparation and Base Servo Installation

IMG_0474.JPG
IMG_0469.JPG
IMG_0475.JPG
IMG_0476.JPG
IMG_0477.JPG
IMG_9402.JPG
IMG_9403.JPG
IMG_0478.JPG
IMG_9404.JPG
IMG_9405.JPG

The Wall e has to be completely stripped of all its components, Tracks and drive train removed, at the the end of this there will be 4 main components, the base, the body, the top part and the head and neck module,

If we start with the base, we have to remove the drive train, cut through the Axle flush with the drive train wheel, then cut away the plastic to leave a flat surface to house the 2 x 360 degree servo's for the tracks, pay attention to how the drive train will be aligned up to the servos, this is crucial!

The cutting doesn't have to be perfect when installing the Servos, the Servos are held in place using Hot Glue and this fills any gaps you may have.

The cross shaped servo adapter is mounted centrally to the drive train wheel using 4 small screws, use a small drill to pilot the holes first.

Once the the drive trains are pushed onto the Servo, we can insert the Screw through the mounting holes in the body and secure the drive train to the base(See Photo)

The bottom section Servo fitment is now complete, the servo cables will need to be cut and soldered as they are too long, or they can be coiled and secured adjacent to the Servos and hot glued in place, with space being at a premium I shortened, and soldered, use heat shrink to isolate and protect the cables.

When the Wall e was taken apart, you will have noticed a speaker in the base, we will use the same speaker for sounds generated from the Easyvr module.

The Top Section Servo Installation

IMG_9412.JPG
IMG_0470.JPG
IMG_0471.JPG
IMG_0473.JPG
IMG_0472.JPG
IMG_9411.JPG
IMG_9414 - Copy.JPG
IMG_0302.JPG
IMG_0481.JPG
Screenshot 2021-07-05 120443.png
IMG_0479.JPG
IMG_0480.JPG
IMG_0488.JPG
IMG_0482.JPG

Much the same as the base of the Wall e the next stage is to remove plastic so we can install the servos for arm movement and horizontal head movement.

Align the Servos as in the photos and hot glue in place.

There is some cutting out needed to install the head horizonal servo, and be sure to leave provision at the back of the neck area to allow for the cables from the head to go into the body.

I leave the Servo cables at full length as the top section needs to be removed to allow access to the Voice recognition module to re-program with the Quick USB Adapter cable.

I install the microphone into the top part of the body as well, some of the tops have a recess with a hole, some have a black plastic square, depending on which Wall e you have.

We can now move onto the head servo:

Update:

Added some more photos of the build, and additionally for the Wall_E Arm and Horizontal head Atachments, Ideally we need to use a round Servo horn/adapter, I found some for a previous build but had to design and 3D print 3, STL file is attached if anyone wants to print some, these will only fit MG90S Micro Servos, the ones I have used have metal gears and spline, no holes in the round adapter as I don't use them ,apart from the hole to screw it onto the Servo.

Wall E Head/Eye Servo Installation

IMG_0305.JPG
IMG_0306.JPG
IMG_0307.JPG
IMG_0308.JPG
IMG_0309.JPG
IMG_0310.JPG
IMG_0311.JPG
IMG_0312.JPG
IMG_0313.JPG
IMG_0315.JPG
IMG_0314.JPG
IMG_0317.JPG
IMG_0316.JPG
IMG_0318.JPG
IMG_0299.JPG
IMG_0485.JPG

First job with the head section is to remove the neck section, be careful pulling the wires out from the LED's we then clip off the original rubber dummy cables and remove the plastic holding pieces attaching the head to the central connector rod.(See photos for clarity) we can leave the metal rod in position but its not used and I have one Wall e with it in place and one with it removed.

Now undo the securing screws on both sets of eye component back section and remove the back part of the eye body this is in 2 sections per eye module again be careful with the LED wires.

I came across an issue, I was checking to see if the LED's for the eyes worked, they did for a Nano second, I put 5volts through them and I suspect that they were 3v D'oh! anyway I had some 5v blue Led's so just removed the old and in with the new, these are just held in with a dab of hot glue.

One of my Wall e builds didn't have the LED's for the eyes so I used some blue masking tape, and a couple of 5v blue led's, It did the trick

We now have to cut more plastic so the Servo fits inside this section, Micro servos are used for this process, half metal gears are the Servos I use.

Rather than explain, look at the photos, which show in detail what needs to cut, this whole operation is a very tight fit, hot glue or CA glue is used to hold top and bottom sections together once the Servo's are installed.

The cables from the LED's are routed over the top of the Servos and go out through the back, LED cables through one section and the Servo cable, we need to either install a dummy servo or make a dummy servo for one of the eye sections as only 1 Servo is used but 2 servo arms are there to keep things aligned.

Please be aware that with the Servos installed, its a bit of a chore trying to get everything back in place, so I cut of the mounting lugs and and used drops of CA glue to hold in place.

The neck angle needs to have some plastic removed, the servo horns from the head section need to fit into this cavity, I just pumped some hot glue in to secure, this did the trick as well.

I cut the the little tabs off the bottom of the neck section, threaded the cables in the space behind the neck and then initially during servo tests, fitted a round servo adapter and I just held in place with double sided tape, Then when satisfied with Servo angles, I used a screw to secure the neck in position with a dab of CA glue.

Installing the Electronics in the Wall E

IMG_0483.JPG
IMG_0301.JPG
IMG_0303.JPG
IMG_0512.JPG
IMG_0513.JPG
IMG_0514.JPG
IMG_0515.JPG
IMG_0516.JPG
IMG_0517.JPG
IMG_0518.JPG
IMG_0520.JPG
IMG_0521.JPG
IMG_0522.JPG
IMG_0523.JPG
IMG_0524.JPG
IMG_0525.JPG

In this section we cover the electronics installation.

We need an Arduino Nano, be careful with some of the Arduino Nano clones when you are trying to download code, some have the old bootloader installed, as mine did and this needs to be checked for the code to be downloaded.

Prior to installing the Nano to the base, I soldered a 9v Battery connector to the under side of the power connector, in turn the power side of the cable will have a Micro on/off switch this is fitted to the rear of the Wall e Body.

I'm using 9v Rechargeable batteries for my Wall e's The batteries I use have micro usb connectors and makes charging really easy, they came in a pack of 4 and 4 can be charged at the same time.

The Arduino Nano is attached to the Nano Servo shield, this shield is great for our purpose as it only has a small footprint and space is at a Premium, with the speaker already in place and held in place, I use the left hand speaker cover screw hole to secure the Nano and shield, (this leaves ample room to the right hand side for the 9v Battery), the usb connector on the nano needs to be at the rear of the wall e for ease of programming, and you do need to re-program quite a few times initially to get things right, especially Servo alignment.

As for the EasyVR3 installation, I used some double sided tape and placed this to the front inside panel with the Quick USB connector pointing up, again, good access is needed as there are numerous code changes during initial testing.

So no one gets confused here, The Voice commands and actions code are programmed using the EasyVR3 Commander software using the Quick USB 6 pin connector, The QuickSynth 5 software is used to input sounds into the EasyVR Commander through the same cable and these sounds are used simultaneously with the actions to move the Servos.

So the Arduino code is generated by EasyVR3 Commander, we then add servos to the code along with voice commands etc and then the final code is sent to the Wall e via the Arduino Nano....Phew! I hope I'm making sense here, I had to walk away a few times during the first build to get my head straightened out :)

That's basically the hardware installed, the connections can now be made.

Making the Connections.

Screenshot 2021-06-08 073940.png
IMG_0511.JPG
IMG_0304.JPG
IMG_0300.JPG

Unfortunately I don't have the necessary software to sketch a wiring diagram, buts its pretty straight forward, you assign a digital pin on the Arduino Nano shield to a particular Servo as in the screen shot.

On the Servo Shield the Pin numbers relate to the Nano pins, making servo connections easy, You already have the 3 way female connector on the servo cable, ensure you have it the right way round and push them onto the relevant pin numbers on the shield, Job done.

Head Vertical Servo is Pin 3

Head Horizontal Servo Pin 5

Left arm Servo Pin 6

Right arm Servo Pin 9

Left Track Servo Pin 10

Right Track Servo Pin 11

The LED's for the Eyes are Pin 2

Join the cables from the LED's in the eyes and fit female dupont connectors, again the shield makes for an easy connection as the - and + are adjacent to the S data pin.

I did fit an IR Sensor, but its not in use, if you want to fit IR sensors just assign an Analogue pin to each Sensor, picking up + and - on the shield.

With the micro switch, split the positive and solder the ends to the switch, this simply breaks the connection from the battery, I created a slot for the micro switch, and used CA glue to secure.

The connections from the EasyVR3 are TX and RX to pins 12 and 13 on the Nano pick up a 5v and ground from the shield to power the EasyVR3 I soldered 4 Pins to the EasyVR as I'm using female dupont connectors.

That's the connections complete.

EasyVR3 Programming

Screenshot 2021-06-23 220406.png
Screenshot 2021-06-23 222250.png
Screenshot 2021-06-24 084213.png

Download The commander software and The Arduino software for the Easyvr as well

Connect the Quick USB connector to the EasyVR and open up The commander software.

Press the connect Tab if it doesn't connect it will say the bridge needs updating.

In the Arduino EasyVR examples you will find the bridge settings, update these and try to connect again.

With connections made, we can now add our voice commands.

The first thing we do is add a Trigger, this trigger will wake Wall e up, the default is Robot, I've used Wake up or Wall e wake up, you can make it what you want, call it a password if you will to get things started.

For this Instructable I will use the trigger Wall e wake up!

Highlighting the trigger tab in the left hand column, now if you run your mouse along the top there are some speech bubbles, find the one that says (Add Command) this will now create another text box below where it says trigger, in this box type your trigger word, In this case its Wall e wake up, now we have to train that command, ensure the Wall e Wake up text box is blue, if its not, click within it to highlight it, then run along the speech bubbles and hover over the one that says train command, click on this and follow the instructions, press speak now and say the words in the box clearly, phase 1 and phase 2 the same words twice.

The same rules apply to the word commands, click on Index 1 Group and again find the add command speech bubble, and populate the text box with any commands you want wall e to perform, bearing in mind you have to write the code to do this, we are making servos move to voice commands and adding the Wall e recordings as well within the code, This comes later.

The software lets you know if there is something wrong when you voice the words in the text boxes when training voice commands.

Once you have all the voice commands you want, there is another tab along the top row which says (Test Group)

Click on this and say any of the words you have just trained, the spoken word will turn a light green and flash a few times, you have to click on it several times to go through the whole group.

Now we have our voice commands we can now add some Wall e sounds:

Using Audacity to Convert MP3 Files to the Correct Format

Screenshot 2021-06-25 093518.png
Screenshot 2021-06-25 093604.png
Screenshot 2021-06-25 093639.png
Screenshot 2021-06-25 093702.png
Screenshot 2021-06-25 093733.png
Screenshot 2021-06-25 093835.png

To upload sounds into the EasyVR3 they have to be in a certain format, the format is Mono 8000hz 16-bit PCM

Open Audacity and import an Audio file of your choice, with the audio file open you will notice that its not in the correct format for our purpose so we must convert it to the correct format.

Click on the tracks tab along the top of the page and then click resample, you will see the sample is 32000hz select 8000hz and press ok alternatively there is a drop down box in the bottom left corner which will do the same thing.

You will also notice that the track is already 16-bit PCM but if its not, then to the left where it says the name of the sound(In this case Eve2) click on the adjacent box select format and change the setting.

Play the converted track to ensure it plays ok, then click on file and export as a WAV file and Save to your chosen file, I made a file specifically for Wall e sounds.

When using the Quick Synth Software, if there any issues with sound formats, it wont accept them, it states the reason and its always the wrong format.

Using Quick Synth to Create Sounds for Wall E

Screenshot 2021-06-24 085425.png
Screenshot 2021-06-24 085458.png
Screenshot 2021-06-24 085804.png
Screenshot 2021-06-24 090243.png
Screenshot 2021-06-24 090434.png
Screenshot 2021-06-24 090514.png
Screenshot 2021-06-24 090633.png
Screenshot 2021-06-24 090542.png
Screenshot 2021-06-24 090613.png

Any sounds created for Wall e have to be 8000hz 16-bit PCM files, any words, noises anything really can be converted using Audacity which is a great piece of free software, any MP3 files can be manipulated within Audacity and then saved an exported as WAV files.

Once we have our saved files, we can then open the Quick Sytnth software which is part of the EasyVR software package.

We need to create a new folder in your Desktop and Name it Wall e Sounds or whatever you want, then in the Quick Synth Software we create a new file, you should already have a file somewhere with your imported Wall e sounds, some of the files can be imported off the internet the familiar Wall e voices and Eve voices, there are a few to go at, the best thing to do is import each MP3 into Audacity and convert to the correct format 8 bit 44100Hz WAV files, then export the sounds to your chosen Audacity sounds folder.

With a folder selected and renamed we can now start to build the sounds into Quick Synth in a format that the EasyVR Commander can understand.

In Quick Synth there is a Green cross, (Add Wav Files to Project) click on this and select the folder where your WAV files are stored, Highlight the sounds you want click ok and they will appear in the Quick Synth all checked.

From this point on we have to build the folder, click on the build current project tab, just go with all the defaults and select same for all each time, the files will be compressed and press ok, the final thing to do is click on the Save Current Project Tab, then click on the build current project tab again and Save current project tab again(I know, Don't ask, its the way its done:))

Importing the Quick Synth WAV Files Into EasyVR Commander

Screenshot 2021-06-24 090613.png
Screenshot 2021-06-24 090633.png
Screenshot 2021-06-24 093641.png
Screenshot 2021-06-24 093704.png
Screenshot 2021-06-24 093802.png
Screenshot 2021-06-24 094303.png

The next process is to transfer the WAV sound files into EasyVR Commander.

When we did the voice commands we had to be connected to the EasyVR 3 through the bridge function, we now need to disconnect to upload the sounds.

Once disconnected, a tab will appear along the top with a blue arrow(Update Custom Data) click on this.

Import, find the folder where your sounds are, it will be a quick synth folder, and download the files.

We now need to connect to the EasyVR3 software again and sounds will now be built into EasyVR3 Commander.

The sounds are not named at this point so its best to click on the little speaker to hear the voices, bearing in mind the speaker needs to be fitted in the Wall e and connected to the EasyVR3 to do this.

Write the sounds down at this point with their corresponding numbers.

The next process is to generate the Arduino code:

Generating the Initial Arduino Code Via the Commander Software

Screenshot 2021-06-24 101610.png
Screenshot 2021-06-24 101707.png
Screenshot 2021-06-24 101759.png
Screenshot 2021-06-24 101859.png
Screenshot 2021-06-24 113746.png
Screenshot 2021-06-24 113841.png
Screenshot 2021-06-24 115258.png
Screenshot 2021-06-24 115722.png
Screenshot 2021-06-24 120923.png
Screenshot 2021-06-24 114504.png
Screenshot 2021-06-24 114637.png

This process involves generating the Arduino code which will include all the voice commands and sounds.

To do this select the Tab(Generate Code) and name the Arduino Sketch using underscore for spacing.

This is this the initial Arduino code, we now have to add variables, functions etc.

I think the best way to show you how this works is to look at the screen shots, the sketch on the right hand side is an existing Wall e Sketch and the sketch on the left is the new sketch we just generated in EasyCommander.

The Servo library is a default library in the Arduino ide which is good.

The first set of screen shots shows us transferring from the right sketch to the left, I'm not that clear on the correct definitions etc, Arduino is a learning curve for me also.

There is a screenshot which shows listed all the voice commands we just created in the commander O Group is the trigger and Group 1 is the voice commands.

There is a screen shot which shows us copying and pasting the Servos across to the Set up part of the new sketch, this is where we Attach the Servos, this function is done once, you will also notice there are write functions as well, this is to align Arm and Head Servo positions, so when you turn the wall e on, the head and arm positions are starting off in the right positions.

The next thing we do is to find the actions created in the commander software.

scroll through the sketch until you come across void action()

This section is where we add the Servo commands which will be inline with any Voice commands we have made and also any sounds we have created.

The first thing we do is to do a list of Servo write functions to correspond with voice command Wall e wake up, so when Wall e is switched on, his head starting position is down, arms are down as though he is asleep.

You have to find the limits of your Servos, and write down the positions etc, A Normal Servo angle of degrees is

0 - 180, work out say the positions of the arms/head movements using a normal Servo example sketch and write them down, then transfer the settings when you input the Servo Write function.

Note: Remember at the start of this Instructable I said there is no point in me giving you the Arduino code, It wouldn't work, use the screen shots for reference and to help you decipher what's going on and what needs to be done.

You will notice in the Wake up Wall e Action there is some text below the servo movements, (group = GROUP_1;)

This needs to be added so after the trigger it moves to the rest of the voice command actions.

The next action is" What's Your Name" within in this code you will see

easyvr.playSound(15, EasyVR::VOL_FULL); remember the sounds we created in Quick Synth and then Commander, number 15 is the reference to one of the sounds I said to write down, choose the correct sound for the servo actions you want to create, there is also code in there to light the LED's up in Wall e's head.

So this is how the code is generated, when you are happy with any selections you have made, you connect a USB cable to the Arduino Nano, and upload the code.

When you turn Wall e on and say Wake up Wall e, he should go through the motions etc, then saying any of the voice commands once populated with Servo movements, LED's and sounds should produce actions with sounds.

Finalising and Summary

IMG_0484.JPG
IMG_0526.JPG
IMG_0527.JPG

I sourced some 9v 5400mwh batteries to power the Wall e, the ones I have have a mini usb connector and can charge 4 at a time, these work well and are quite small so they do a job and well.

I said initially I had to walk away from this project a few times, there are a few Youtube videos on how to program the Easyvr3 but for me personally I just couldn't quite grasp how it all worked, eventually it sunk in, but it was a bit daunting and very frustrating, its quite an involved project just to get to a stage where you get a functional Wall e Robot who responds to your every command(Sometimes).

I have completed 3 now and each one is different and has its own identity so to speak, they have the unavoidable Servo twitches which is funny, If you give a voice command and its not understood there is a definite Servo head twitch as though its saying no, hence my saying earlier about obeying commands "Sometimes" :)

Once everything is working correctly and you are confident with writing code to move Servos etc its a really cool project, the things you can do with it are endless, its just your imagination which will come out through the Wall e.

I did install a Sharp IR Sensor on the first Wall e I did, I can get this to work on its own within a sketch, but not in one of the actions, I'm at a loss how to do this, so if anyone knows then again please shout up!

Good luck if you have a go at doing one of these, It doesn't need to be a Wall e, the same principles apply to anything really.

I hope you can understand the processes Involved and the time it takes to carry out this project and as always thanks for looking.