Author Topic: Robotic hearing?  (Read 2278 times)

0 Members and 1 Guest are viewing this topic.

Offline vinniewryanTopic starter

  • Full Member
  • ***
  • Posts: 56
  • Helpful? 2
Robotic hearing?
« on: June 22, 2011, 01:05:00 PM »
I'm beginning a personal project that uses a microphone to control a robot. Basically all I need to build is a simple circuit that allows the robot to decipher the frequency it's hearing to execute different commands. For instance, if I say LAAAA and my voice is at 2000hz, the robot will do something. If my voice is at 1000hz, it will do something else. I see this using a cheap electret mic, then OP amp, then a band-pass filter, then an ADC. Sound correct? I really just need to figure out if there are any cost saving tricks so I can use as minimal amount of IC's and spendy componants as possible.
« Last Edit: June 22, 2011, 01:06:40 PM by vinniewryan »

Offline vinniewryanTopic starter

  • Full Member
  • ***
  • Posts: 56
  • Helpful? 2
Re: Robotic hearing?
« Reply #1 on: June 22, 2011, 01:17:34 PM »
Also, it needs to use ADC to recognize frequency, no freq counters. Is there a simple R/C type bandpass filter that could do the job? The audio quality doesn't matter as long as I get a decent ADC value.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Robotic hearing?
« Reply #2 on: June 22, 2011, 04:01:10 PM »
Hi,

One thing that springs to mind is a swept filter with a high Q, but even that wouldn't rely on the A/D-C - to use that reliably, you'd need to sample at least 16kHz (as speech has components up to 8kHz) and for a clear distinction, at least 8 times faster.

If you drop the A/D-C as the prime mover here and if the range of commands is in the low end, tone decoders would be a better choice - perhaps a single one will do, if the frequency can be swept fast enough (it needs some time to lock its PLL).

You could try recording samples of the commands with the A/D-C at what speed you can get and analyze them at your PC, to see if you can cut some corners and make a "compressed" library of commands, but you'd ned to be fairly consistent in how you speak the commands - frequency usually isn't the problem, intonation, difference between fricatives and non-fricatives, length and such is harder to keep constant.


BTW. You can help differentiate two similar commands by using drawn out words for one and short sharp words for the other.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline vinniewryanTopic starter

  • Full Member
  • ***
  • Posts: 56
  • Helpful? 2
Re: Robotic hearing?
« Reply #3 on: June 22, 2011, 04:51:20 PM »
All great suggestions and you've given me a few things to try.

Important note: Each bot only listens to one frequency so each bot will be tuned for just one frequency.

To be a little more descriptive, my initial method would basically convert amplitude of a filtered frequency to voltage. I wanted to try and keep everything made up of cheap passive components since the audio quality doesn't matter, so I was going to use an RLC filter for high and low pass to narrow the frequency spectrum after the mic/transistor amp. Then using an R/C I can convert that frequency to voltage which can be read by an ADC.

Idea: Could I not connect a mic to a crystal that's tuned to the frequency I want to listen for? When the mic picks up that frequency the crystal would resonate and generate an output that can be amplified. This would eliminate the need for filters.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Robotic hearing?
« Reply #4 on: June 22, 2011, 07:28:25 PM »
Hi,

Important note: Each bot only listens to one frequency so each bot will be tuned for just one frequency.
Then a tone decoder (like NE567/XR567) is the most sensible solution.


To be a little more descriptive, my initial method would basically convert amplitude of a filtered frequency to voltage. I wanted to try and keep everything made up of cheap passive components since the audio quality doesn't matter
You won't get a very steep filter with passives, as the impedance of each section needs to be (at least) 10 times the previous one and with no actives as buffers, you quickly run out.
If eg. your mike is 1kOhm, and the A/D-C input is 1MOhm, you'll have room for just two stages - that's a very "soft"/Low-Q filter.


Idea: Could I not connect a mic to a crystal that's tuned to the frequency I want to listen for? When the mic picks up that frequency the crystal would resonate and generate an output that can be amplified. This would eliminate the need for filters.
You are right that X-tals can be used as very narrow BP filters, but they're so narrow that you'd have to use 5 or more X-tals for each, to get a usable pass band (due to tolerances of the X-tals). It doesn't eliminate a filter though, it IS a filter, but it's far better suited in HF circuits - you'd have a hard time finding X-tals for the speech range anyway (even if you've got an extraordinary shrill voice  ;D)

Go with the '567, it's an 8-pin DIP and it gives a digital output (frequency detected/not detected).


Edit:
Perhaps this will help:
http://members.cox.net/rbirac3/Snuffy/tone_detect.htm
« Last Edit: June 22, 2011, 07:34:33 PM by Soeren »
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline vinniewryanTopic starter

  • Full Member
  • ***
  • Posts: 56
  • Helpful? 2
Re: Robotic hearing?
« Reply #5 on: June 23, 2011, 10:11:04 AM »
The 567 would work if it had a variable output. I need the output to be proportional to the inconing signal's amplitude.  :-\

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Robotic hearing?
« Reply #6 on: June 23, 2011, 12:03:12 PM »
Hi,

The 567 would work if it had a variable output. I need the output to be proportional to the inconing signal's amplitude.  :-\
You could use the output of the '567 as a "frequency correct" signal and only then measure the amplitude (after rectification).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline vinniewryanTopic starter

  • Full Member
  • ***
  • Posts: 56
  • Helpful? 2
Re: Robotic hearing?
« Reply #7 on: June 23, 2011, 12:29:00 PM »
I like this idea, and it seems the 567 can be calibrated to filter a chosen frequency range so that could certainly work as the band pass. As I do some testing I'm trying to figure out a cheaper solution than an electret mic. I'm even considering a magnet glued to some paper mounted near a coil as the mic. Or even a photo sensor with light reflecting off a thin plastic reed. Maybe a cheap vibration sensor, I'll look into that as a possibility as well.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Robotic hearing?
« Reply #8 on: June 23, 2011, 12:54:12 PM »
Hi,

[...] I'm trying to figure out a cheaper solution than an electret mic.
Err... Why?
Electret mikes are dirt cheap (2 for $1 at Electronics Goldmine)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline vinniewryanTopic starter

  • Full Member
  • ***
  • Posts: 56
  • Helpful? 2
Re: Robotic hearing?
« Reply #9 on: June 23, 2011, 01:16:30 PM »
Well, this project is an idea that if it works out, would have to come to a total cost of less than 1 dollar. I'm not even sure it's possible so I need to shave cost wherever possible in order to make it work out. If I can replace a 0.50 cent mic with a 0.05 cent magnet and a 0.10 cent SMD coil, it could make all the difference.

Offline vinniewryanTopic starter

  • Full Member
  • ***
  • Posts: 56
  • Helpful? 2
Re: Robotic hearing?
« Reply #10 on: June 27, 2011, 02:13:10 PM »
Ah, I found a way to bypass basically everything. I'm using an LED to bounce light off of a piece of elastic material onto a light sensor in such a way that when the elastomer vibrates due to sound waves, will cause the reflected light to generate a wave which will be measured by the ADC of a PIC10.

Now to find a cheap micro SMD solar cell and NiMH button cell. I love my job.

Offline vinniewryanTopic starter

  • Full Member
  • ***
  • Posts: 56
  • Helpful? 2
Re: Robotic hearing?
« Reply #11 on: July 01, 2011, 10:39:56 AM »
http://www.clare.com/Products/SolarCell.htm - I found these solar cells on digi-key. SMD package, 4V, 50ua output. Perfect for tiny low power PIC applications.

The first prototype will be an LED that reacts to sound. The intensity of light increases as the specific frequency's amplitude increases. I'll use the same LED for both illuminative visual effect, and to reflect off of the elastomer so the light sensor can determine frequency and volume. I'll use a 1F super cap for power and the above solar cell, probably the 100ua cell to constantly charge the cap.

This would allow the circuit to run for about an hour after every 50 hours of charge assuming I can get the current consumption down to less than 0.3mah, so that kind of sucks. I'm certain there will be more higher output SMD solar cells in the near future, it's just a matter of time now before this idea becomes a realistic no-battery-ever device.

Thoughts?


EDIT: So after some calculation, I should be able to get 5ma @ 2v after a 50 hour charge. The problem here is that the 2V won't hold for long in the super cap so I'll have to include other circuitry to keep a constant 2V output. Perhaps a jewel thief with a regulator?
« Last Edit: July 01, 2011, 11:45:35 AM by vinniewryan »

Offline vinniewryanTopic starter

  • Full Member
  • ***
  • Posts: 56
  • Helpful? 2
Re: Robotic hearing?
« Reply #12 on: July 01, 2011, 12:25:02 PM »
After further consideration, scratch the solar cell. I'm just gonna make an a/c charger for the caps with an ac/dc converter on the cap (for A-polarity). Charge the super cap for 15-25 seconds and it runs for a few hours.

Perhaps someone can help me calculate just how long a 1F capacitor would run a circuit at 2V regulated, I=3mah? I can charge the cap >2V to keep voltage high enough for the regulator if necessary.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Robotic hearing?
« Reply #13 on: July 01, 2011, 03:52:28 PM »
Perhaps someone can help me calculate just how long a 1F capacitor would run a circuit at 2V regulated, I=3mah? I can charge the cap >2V to keep voltage high enough for the regulator if necessary.
Every regulator will have a voltage drop.
Every charge and discharge will have losses.

You'll have to factor in those losses in this very basic formula:
C = I * t / Udrop

Which means that if you tolerate a drop from eg. 2.5V to 2V (i.e. 0.5V), have a current drain of 3mA and a 1F cap the time will be around 167 seconds (less than 3 minutes - and that's not counting the losses).

The smallest NiMH button cells will have plenty more juice a charge than a supercap.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

 


data_list