Author Topic: Talking robot - processing power  (Read 2280 times)

0 Members and 1 Guest are viewing this topic.

Offline TsukubadaiseiTopic starter

  • Robot Overlord
  • ****
  • Posts: 293
  • Helpful? 0
Talking robot - processing power
« on: June 07, 2008, 01:48:09 AM »
Hi. So there is this SoR contest and I am building the robot for it. If you have read my description I might add some speech feature in the robot.
I have decided that I am not going to use a real voice synthethizer because they sound really bad. My strategy right now is use a SD card reader and a mp3/wav decoder chip. The chip will be the VS1011(http://www.vlsi.fi/en/products/vs1011.html), but I am not going to make my own board because I hate soldering small ICs so I am going to order one of those:http://strawberry-linux.com/catalog/items?code=30011 . So far so good. The problem is: I have to stream the mp3 from the card to the IC using serial. In other words: the controller would be an interface. The problem is I have no idea if this kind of process will take "fast enough"(the mp3 files will be between 0.1 and 0.5MB).I am afraid it might slow down too much the controller leadind error due to delay. Have someone here haver tried transferring or manipulating relatively big amounts of data(like images or sounds) with microcontrollers? What are your opinions?

By the way one of the solutions I thought would be using a secondary microcontroller. I send some small data like a number from the main controller to the secondary one. And the secondary do the actual file transfer between the decoder and the card. the disadvantage is the extra trouble and higher cost.
A.I.(yes those are my initials)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,699
  • Helpful? 173
    • Society of Robots
Re: Talking robot - processing power
« Reply #1 on: June 08, 2008, 11:00:37 AM »
Quote
The problem is I have no idea if this kind of process will take "fast enough"(the mp3 files will be between 0.1 and 0.5MB)
Just a thought . . . perhaps encode the mp3 files at a really low bitrate, like 32bit?

So if you have a 100k file, and your serial is 115200bps, it'll take about .9s to do the transfer . . . kinda long . . .

Offline SixRingz

  • Full Member
  • ***
  • Posts: 76
  • Helpful? 0
  • Bit's and pc's = Robot.
Re: Talking robot - processing power
« Reply #2 on: June 08, 2008, 11:28:13 AM »
Quote
So if you have a 100k file, and your serial is 115200bps, it'll take about .9s to do the transfer . . . kinda long . . .
Ok, forgive me if I'm totally off here (not a serial god) but shouldn't that be even higher transfer times? A 100kb file is 800.000 bits?

800.000/115200 = 6,944444 seconds.

In any case, it seems a dedicated MCU to take care of the mp3:s is probably a good idea unless they are to be played when the robot isn't doing anything else. Another more complicated solution would be to program context switching (multi tasking) on the MCU, but I'm not sure how good that would work trying to mp3 stream, but it is certainly possible. I've even done it on an AVR butterfly.
Grounding things properly means burying them in the backyard...

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,699
  • Helpful? 173
    • Society of Robots
Re: Talking robot - processing power
« Reply #3 on: June 08, 2008, 12:41:46 PM »
oops . . . yea . . . you're right . . . ;D

who ever decided a byte should be 8 bits instead of 10 anyway :P

seen this yet?
http://www.societyofrobots.com/robotforum/index.php?topic=3365.0

Offline bens

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 335
  • Helpful? 3
Re: Talking robot - processing power
« Reply #4 on: June 08, 2008, 03:32:47 PM »
who ever decided a byte should be 8 bits instead of 10 anyway :P
When it comes to serial, the byte basically is 10 bits: start bit, 8 data bits, one (or two) stop bit(s).  You're looking at around 8.7 seconds to transfer a 100kB file.

- Ben

Offline TsukubadaiseiTopic starter

  • Robot Overlord
  • ****
  • Posts: 293
  • Helpful? 0
Re: Talking robot - processing power
« Reply #5 on: June 09, 2008, 08:36:23 AM »
oops . . . yea . . . you're right . . . ;D

who ever decided a byte should be 8 bits instead of 10 anyway :P

seen this yet?
http://www.societyofrobots.com/robotforum/index.php?topic=3365.0

That is excellent stuff. I will have a look at that. Thanks.

Thanks for the calculations as well. Somehow I forgot how to calculate file transfer time. Shame on me. By I would like to mention that you guys must double the results because the controller downloads the file from the SD and then uploads it to the mp3 player. So that is 2 file transfers. I will do my best to compress the sound files and reduce the quality to the minimum. But that is just the beggining of the problems, I am also worried about the number of serial ports I need to use. Each controller (a SH/tiny and an ATmega128)have 2 serial ports. and the secondary controller used for the mp3 needs 3 ports(one for the mp3 chip, one for the card reader and one to comunicate with the primary controller).

Edit: I have just lookat them. The uMP3 is basically my extra controller+codec chip solution. The good thing is that it is not messy and troublesome. Bad thing is that it is almost 2 times more expensive. And I would have to import it. But I  might still consider it if I get lazy enough, but not enough to give up voice feedback.
The other product is just too bulky. Anyway thank you.
« Last Edit: June 09, 2008, 09:12:26 AM by Tsukubadaisei »
A.I.(yes those are my initials)

 


Get Your Ad Here

data_list