Let's Make Robots!

Battle tank - with Voice Control

remote control, sound effect, shooting with laser and IR, detect IR, control electronic applicants

Before going on developing the Home Explorer, I have to make a battle tank with shooting capability for my son...because I promised him several months ago. The battle tanks are remote controlled and made to shoot each other by laser or infrared. It has these features:

- remote control

- moving in eight directions, 2 speed

- rotating canon tower

- laser gun, to shoot a target

- IR gun, to shoot a target, or turn on some electronics applicants

- IR detector, when it is shot by another tank or by a TV remote control, the tank will be frozen for several seconds

- Sound effect

- Voice control, see the third movie

This is not an innovative project. But it is quite a challenge to put it together in a small tank with one MCU (atmega88):





Voice Control

I make use of the CMU Sphinx http://cmusphinx.sourceforge.net/html/cmusphinx.php to make the voice control part.

Sphinx is a powerful speaker-independent continuous speech recognition engine. It is open source and come with very rich features. I use Sphinx, not only it is open source, but also it has pocket version that is tuned for handheld / mobile devices. In the near future we shall be able to use mobile devices to control our robot at a reasonable cost. A pocket version means that your robot will listen to your commands, without going through the PC.

Comparing with Microsoft technology, it is relative difficult to make it work initially. There are a large number of development tools created for R&D purpose. It is not very handy to make a simple command oriented robot control program.

Since I don't have a handheld device, I use Sphinx 3 on my PC in this project. Together with a wireless mic, I shall be a ble to control any robots at home with my PC as the speech recognition engine.

mic => PC => Sphinx 3 => robot control program => RF module => robot

In the future, it will be:

mic => pocketsphinx on the robot


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Hi GroG

I was also a complete noobie half year ago, I am sure you will catch up quickly. Here is my experience to start up with AVR:

1. I pick AVR atmega instead of PIC, mainly because of the availability of free GNU C compiler and, I could not find a good supplier in my region with reasonable prices.

2.  If you consider atmega88, you may also think about atmega168. The program memory on atmega88 is only 8K. A bootloader takes about 1K, and if you use floating point library, it will take another 1-2K memory. Sometimes (not always) your robot controllers may need more memory. 

However, I can get atmega88 20MHz here, but not atmega168 20MHz. If you plan to run at high speed, may be there are not many choices ?

For speed and cost reason, I would pick atmega88 20MHz, for program size, I would need atmega168 sometimes.

3. I use mainly AVR Studio to develop C programs for atmegas. 

4. I believe you are familar with http://www.avrfreaks.net ? Good forums and good help can be found there.

5. I mainly use a mkII compatible programmer. I use it only to initialize the MCUs. I prefer to use TWI (I2C) bootloader to load programs to the MCUs. During development, I may have several MCUs to be programmed at the same time. If you standardize on TWI bootloader, you can easily program them without plug and unplug. Thus I just use the programmer to program the fuse and load the bootloader to MCU. After that, I can download programs via TWI.

6. Because I standardize the communications with TWI, My PC need to communicate with the MCU thru TWI. I have developed a simple USART to TWI gateway, so that on the PC side, all programs are communicating with the MCU thru RS232. I bought a USB RS232 device also, it can run at 1Mbps. (I usually run it at 250kbps).

If you consider also to standard on TWI, you can also get a PC to TWI bridge....I believe at a reasonable cost...with openservo.com

7. Since I don't have a CRO, I also develop a very simple CRO using atmega88 and python. You can check on my blog for more information.

8. I have also made a "current control module", after I burnt out some components due to incorrect wiring. It is a module to monitor how much current is using. It will alarm and cut off power when limit exceeded. It is very useful, especially if you are dealing with motor controller development. It safes me a lot of money already !

9. I use mainly python on PC side.  Too many packages and tools on the net. I use mainly PyScripter for editing purpose. Very good python editor.

I prefer DIY for most of the above components, not only because of the cost, but also I want a consistent and solid foundation for later development (except the simple CRO, I think bought a small one is justified). Other than C and python, I use specific packages (like opencv, sphinx, ...) for the specific purpose. Not many generic tools are used. 

 Hope this little sharing helps.




Fantastic information Clcheunghk !   Thank you very much.  It will take me a while to put to use all of your excellent information, but I am very excited to begin.  Just waiting on parts at the moment.  

 Thanks !


i would lik to know the voice recognition part alone..since it might help for my project..can u say how to proceed with sphinx? im new to dis..i ll make my bot to do its particular operation thro rf..but i need to know before how to interact voice to rf through pc..can u please help me

Since shpinx is designed to be a speaker independing continuous speech recognition system, it is quite comprehensive and hence complicated. To set it up for a simple commanding system, you can check on my blog:



I believe some other systems are available and more simple, e.g. the Microsoft Speech SDK. I tried that before I believe it can do the work also. I pick sphinx because it is more flexible and its support on handheld devices.

Use either sphinx or other systems, you need some system integration skills to pass the result back to your robot. 

hiiii i am new in robotics and i like ur robot. i also want to make a robot with ATMEGA128 but i dont how to use this...........


plz send ur reply to manish.manjhi7@gmail.com. i am eagerly waiting  for ur reply



If you are new start small. Start making an LED blink, then maybe add a servo, etc until you understand how everythign works. Otherwise you will get frustrated and not make any progress.

It is a big topic.

First of all, you have to decide what platform to be used, and that should match your skill set. You have to know a bit of electronics. Then try some sample projects with servos and motors.

There are quite a number of tutorials in this site.  AVR freaks is very good site if you are interested to use ATmega chips http://www.avrfreaks.net/index.php?name=PNphpBB2&file=index

I'm currently working on Home Automation program using different RF modules and Sphinx on Linux OS. Your robot experiment give me a good idea how to interface Sphinx with RF modules but There are few things that are not quite clear to me yet. 

My question is based on ram33's question.... What I would like to know is what are the components involved in interacting with sphinx and robot. Mainly, I would like to know what you used for "RF modules". How .Sph file format is used in transmitting RF signal to receiver (robot)? My guess is the robot plays as RF receiver... correct me if i am wrong.

 The part that I am really confused and would like to understand is how Sphinx communicates with robot control program (fyi - I'm software Engineer)? After Sphinx recognizes your speech, does it fire up some type of robot control program????

Sphinx 3 => robot control program => RF module => robot ?????????????

 Eager waiting to hear from you soon.

Any guidance is appreciated 




The design is quite straight forward:


Sphinx 3 => command receiver (a python program, communicate through name pipe) => RF module transmitter => RF module receiver in Robot

What you mean by conunicate through name pipe? Can you give me a bit detail how Sphinx 3 communicate with comand receiver and how name pipe communicates with RF transmiter? I should be able to use any type of program instead of python, can't I?