Looky here, Mikey.
If yeh wanna learn yer smarts like I be…
Just ask logically-garbled questions and then hope that a kind soul like Pete will come allong, magically decode your pagefull of questions, and put things into really small words.
Thanks, Pete!
Methinks I’ll stick around with Mike’s design (with the altered components for a better range, of course) and give it a try, since he was so nice as to send me a board.
Once I get to the point where I’ve found the limitations of the “loudness” hardware, I’ll rearrange things and make one like yours.
They’re both just too interesting to pass up, and definitely within my pricerange.
Who knows, maybe I’ll trip over a better way to use the “loudness” comparison and get some decent info out of that.
Maybe theirin lies a way to guess the forewards/backwards direction of the sound…
Sorry, I forgot about sending you the board last weekend, I will have it out this weekend, I promise!
Sorry!
As for smarts, I think you surpassed this old geezer…
JK
You have come a long way since the beginning though. Proves you have really taken the bull by the horn and learned a great deal on your own. Yeeeehaaawww!
Although I’ll be playing with Mike’s loudness circuit for a while once I replace my programmer, in the meantime I’ve been putting together a circuit for my biped’s car that uses both loudness and speed as Pete did.
I’ve decided to go ahead and make it with 3 mics though, so the bot will know which direction (forewards/backwards) the sound is coming from as well.
I’ve finally come to the point where I’ve run out of ADC pins, though (and my micro has 13!).
So instead of keeping them seperate as in Mike’s circuit, I’m going to combine the three with another opamp.
In your circuit, Pete, it looks like you use 110k resistors before the 3rd opamp to divide each seperate voltage in half before smushing the two together.
So, methinks I’ll just take the output of my 3 opamps and use a 200k’s and a 100k to divide each into thirds before smushing all 3 together.
I’m a bit confused as to the gain resistor across your opamps.
Mike’s circuit uses 1M.
Did you split up the gain into two stages by using 300k in the first and 110k in the second?
If so, how do you determine the overall gain of the two stages?
I’m thinking that it’s not simply multaplicative, since that’d give you a 30M total…
well nick, considering you asked me to help out on this on AIM, heres wat i think
you need to make this thing realllllyy power, the rover i mean, so that it can carry and little perron in it, (I.E. me), from there, you have me blindfolded while you recklessy race around you house, if i scream you know you’ve hit something, and also, i would point to the noise when i hear one and from wat direction, if all works out, you shouldn’t need a new me for a day…or two
Nick, perhaps Pete can chime in on the question regarding the gain resistors for the op amp. I know that the resistor acts as a feed back loop. Higher resistance provides less feedback to the neg input of the op amp. This causes the op amp to “think” it needs to amplify more.
Best way to describe it is like our ears are the neg input and when we adjust the volume on the stereo, we “listen” for the loudness. We keep cranking up the volume till we get the desired output level. Now if you put ear muffs on your ears (the resistors) you will not hear the volume as much, so you keep cranking the output so that it’s loud enough for you to hear it through the muffs.
The resistors on the op amp take the output and “trick” the op amp into thinking it needs to crank out more and more.
This is in a nutshell how I understand it. Pete might want to put me in a straight jacket, but that’s my analogy of it.
In my circuit, the 3rd amp does a summation of the 2 signals, but it does not amplify the summation (because of the value of the feedback R). It is a simple ‘mixer’.
On your circuit with 3 sources instead of two, you should still use 100K’s all around. The reason is that the R’s for each channel are part of the equation for each other channel.
But if you want to add overall gain to the mixer, just increase the feedback R. The gain of the circuit is about proportional to Rf/Ri, so if the Rf were 200K, the gain is doubled. [This is a simplification, but it’s close enough for now.]
My first stage has a gain of less than 300 (actually 300/1.1). Mike’s circuit is going for a rather high gain (about 1000). My own version hasn’t really been ‘road-tested’ yet, so I could end up changing the Rf values. Mike’s mics are different, as is his A/D.
It is multiplicative across the stages, but the first stage is 300, and the second stage is 1, so overall it’s still 300.
Regarding the need for the feedback resistors:
An op-amp is fundamentally a very high-gain device. Without using negative feedback, it would run ‘full throttle’ all the time - it is called “running open loop”. This may sound like a good thing, but in reality it makes it unstable, and you wouldn’t be able to predict the exact gain for each amp. If you look at U5 on my schematic, those are ‘comparators’, which are essentially a special type of op-amp that is designed to run open-loop. Why? Because a comparator is intended to have its output be either all on or all off (a digital signal). By comparison, the regular op-amps are intended to amplify signals proportionally; that is, they run “linear”.
Mathematically, you could say that the output of an op-amp is y=mx+b (remember that from basic algebra?), where x is the input, m is the gain, b is the DC offset, and y is the output.
Ahhhh!
I love when things come full circle and finally click together.
I had been multiplying the gain resistor values when I needed to be multiplying the calculated gain of each stage.
That makes so much sense, since gain is reported without any units, the lack of which is produced by division of Rf/Ri.
Good ol’ function of a line, how well I remember thee…
I’ll be soldering it together tomorrow, probably.
If all goes well, I’ll be able to test it even before I get a replacement programmer for my robot PICs.
In school, the other students (slowpokes) just finished building their 16F877’s boards (which means that I’ve done that a week ago and have started programming in assembler ).
So, as soon as I learn enough assembler to multiply (there’s no multiplication built into this chip!) and access the ADC, I’ll be able to test it.
(Sigh)
Ya gotta luv archives. Here I was, contemplating just how to add audio direction-finding without re-inventing the wheel (again), when a site search reveals this.
Exactly what I had in mind. Complete. Whole.
Just thought you should know that old posts never die… and are appreciated by the cogniscenti.
Greetings kdwyer, this circuit is old, and although it works, its performance fell a little short. I have a new circuit design that eliminates the use of the ADC chip and performs much better. You can build two copies of the new design for left and right ears and write code to do fancy things like finding angles. I will try to remember to post the updated schematic tonight if you’re interested.
Now I’m interested too… And a few days have gone by. Slacker!
if all you are doing is trying to measure the difference between left and right, could you not have used the two mics more like a comparator? one to the inverting input, one to the non? I guess the issue would then be measuring the output. You don’t want infinite gain, because that would tell you left and right, but not by how much. And if you want to measure the output, you almost need a +5v and -5v with 741 chips, but that can’t be read easily by the atom. Anywho, didn’t see the original posts so I’m not sure what you tried, but I’ve always been interested in op-amps. My first robot was a line follower using 4 op-amp comparators.
Ok the note in my hand worked! Here it is, see attached. The values are base values. When you bread board this circuit, you can experiment with C1, R2, R3, R5 values for desired sensitivity.