Battle tank - with Voice Control
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


i am sooo interested in IR
IR communication
There are several possible ways to implement a specific protocol. The most resource demanding one, I believe, will be decoding the TV remote control signal. I did a small study and implementation before, the commands are in 48 bit long. Decoding it may use a lot of resource on the MCU, if not additional hardware is used.
Theorectically I think I can modulate the USART signal at 38kHz. The demodulation side can feed the signal directly to the USART RXD. But I have not tried this yet.
In this robot, as I decide to use one MCU, and the USART RXD is already used by the RF module, the IR signal is not specific. It means that when I fried the IR gun. I have to turn off the IR receiver interrupts. Otherwise it will kill itself immediately.
Great!!
I wish my dad made me cool toys. Great work! Also could you give me a clue about the chase material.
It is aluminium material for
tankbase
what are the mesurements for the tankbase? you are making me wanting to build one. lol
It is about 3" x 7", 2"
It is about 3" x 7", 2" tall (exclude wheels and tracks). I made it too small and I suggest a bigger dimension.
It is quite interesting to play with a tank..go ahead !
ok
you should in my opinion use
You say it's not inventive..
You say it's not inventive.. Well.. it could be quite easily; Add one player mode.. with 2 tanks, one Ai controlled :)
And score counter!
nice idea. You could include
Very good ideas !
Very good work clcheunghk.
Very good work clcheunghk.
What is the RF module? Is it the same one you used in your ultrasonic scanner?
I have not worked with microcontrollers before, but am interested in controlling them from a PC and am wondering the most reliable/cost effective way. These seem interesting, 1200 bps serial - with 1000m range, but the price is too much.
This looks much more reasonable, and I believe Fritsl has made several projects with them or some derivative.
GroG
my robots
my garden
Hi GroGI use the same one
Hi GroG
I use the same one that I mentioned previously, about $2 for a pair of ASK at 315MHz. Reliability and distance are not my concerns. Anything within 10 meters is ok. Since I am not flying a plane, I don't need very reliable one neither.
I think ASK is less reliable. How about the nordic chips, like this one. It is more affordable, around $15-30, 20-100m Range at 250kbps - 1 Mbps ! At this speed you can do photo, music, voice, movie streaming !I never try them before but I find it quite popular in my region.
Here is a good reference -
Here is a good reference - it has a variety of modules listed here and it shows you how to implement several protocols, most being geared to home automation. I was wondering - if my PC has a transmitter and the little mobile robot has a reciever, is it really necessary to have a PIC on the mobile robot? Can't a 4 bit serial to parallel chip be used on the robot? For example 2 bits for each motor?
It depends on how little is
It depends on how little is your robot, I believe. If you put an IR ranger, light sensor, speed controller, touch sensor, voice output and etc. on your little robot, it will become unmanagable. Even if you just have one IR ranger, and you still need to encode the signal in a proper way and send it back to your PC.
Unless your robot is very very simple, it is desirable to have a MCU on your robot side. However, I would like to use AVR instead PIC. 8-)
Woah! Awesome voice
So ... I'm confused. Is
Sphinx can never run on
Sphinx can never run on ATMega88. Voice recognition software requires lots of resource to run. It can run on a PC or a handheld, depending on the version.
In the video, it is running from my PC, my PC interpret the command, then remote control the tank.
Sphinx is quite complicated. I think go for Microsoft engine is easier. But I prefer Sphinx as the reasons I state above. You can go to my blog for more information to run Sphinx.
Oooh I see, ok. That makes
Hi clcheunghk ,I decided to
Hi clcheunghk ,
I decided to order some sample Atmega88s. I was wondering if you could describe your programmer and the tools you are currently using? I would greatly appreciate any info you might give a complete noobie.
Regards,
GroG
Hi GroGI was also a complete
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
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 !
GroG