Shop OBEX P1 Docs P2 Docs Learn Events
How Prop Demo board Mic circuit works? — Parallax Forums

How Prop Demo board Mic circuit works?

kevin@cachia.comkevin@cachia.com Posts: 23
edited 2011-02-08 07:34 in Propeller 1
I was wondering if someone could explain or had a link that would explain what and how the circuit for the Mic on the Prop demo board works. I see that it uses one line for a signal? and then looks like it tries to read some sort of feedback delay?

I e-mailed Parallax's support but they said they didn't have a document on how it actually works. I was hoping maybe someone on the forum that's more of an electronic circuit wiz wouldn't mind explaining it.

I've been reading the counters and looking at the sample code. But don't completely understand the underlining mechanics.

Thanks,
Kevin

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-07 12:28
    The Prop uses Sigma Delta Analog to Digital Conversion. There's a Wikipedia article on the subject here. Have a look particularly at some of the external links at the bottom of the page.
  • kevin@cachia.comkevin@cachia.com Posts: 23
    edited 2011-02-07 15:12
    Thanks Mike.

    I read that and some stuff I found at Maxim's site, but the Delta-Sigma design is pretty advanced and some of it goes over my head. I feel like I need a delta sigma for dummys guide...lol

    Maybe if I had an oscilloscope to see how it works in action I would get it better.

    I kind of get it. But I guess what I trying to figure out is how do the 2 pins gets used? Does one send the clock and then the other reads the feedback? The comparator part of the circuit is that handled in the prop when it's in the POS feedback mode?

    How do the caps, and resistors in the external circuit fit into the picture? Do they create like an oscillator, or is it a filter?

    So does the counter return a bit stream or a value that represents the count of 1's in a time frame?

    I'm partly asking, because I had to kind of guess at the spec/type of mic when I copied that part of the demo board. How much would this effect my reading of the circuit? i.e. I was getting 0's initially when I was trying to get it working. I wasn't sure it was something I was doing in software, or could it be the specs on the Mic aren't compatible with what is shown in the schematic of the prop board? Is my mic maybe wrong impedance or the voltage rating to low?

    Thanks,

    -Kevin
  • AndreLAndreL Posts: 1,004
    edited 2011-02-07 23:48
    Kevin, you are trying to tackle two things at once and getting brain fry :) First, read how condenser mics work -- basically all we need is something that converts sound into a voltage or current. That's step 1. Then step 2 is to convert the current or voltage into a digital signal. There are a billion ways to do both. Delta sigma is just one way to convert an analog signal to a digital one. COMPLETELY separate from how the condenser mic works. Which in short is based on a simple parallel plate cap, and the equation of C which is a function of charge, area of the plates, distance between the plates, dialectric material between the plates (how electric field lines permeate space). The very clever condenser mic uses a preset charge on the plates of the cap which is built into the mic and then as you talk, you mechanically vibrate the mic surface connected to the plates changing the distance D, this changes the voltage V on the cap as a function of time and the sound pressure, and thus generates an analog varying voltage -- voila! Now, with this analog voltage you need an A/D converter, anything will do; delta sigma, single slope, dual slope, flash converter, blah blah. The propeller chip example you are referring to uses a delta sigma, but could have used anything else.

    Anyway, my point is to first lean about capacitive mics, THEN learn about A/D conversion, then put it together -- small moves... small moves...

    Some advice about this stuff, when I did my math degree, I studied the most complex math you can imagine, stuff that 3 people on earth would ever use. Sometimes I would loose my mind. But, when I did, I always remembered it all starts with 1+0=1 and basic rules like this. So if I got stuck on step 9, but understood steps 1..8, then I would back up, same idea here, get a ROCK SOLID understanding of one piece, dead to rights, then add a tiny piece, and build on it. That's how electronics works, just take your time. But, realize this isn't making grilled cheese sandwiches, its HARD -- so, plan to put some real time in and read a lot, and try things out, like your oscope idea, so you can "see" what's going on.

    Andre'


    Andre'
  • LeonLeon Posts: 7,620
    edited 2011-02-07 23:58
    It's actually an electret microphone:

    http://en.wikipedia.org/wiki/Electret_microphone
  • BeanBean Posts: 8,129
    edited 2011-02-08 07:34
    Yes, It is an electret microphone. It acts like a varying resistance with sound.
    If you look at the schematic you will see the mic is connect to ground at one end, and a 10K resistor to Vdd at the other end. This changes the varying resistance to a varying voltage (voltage divider).

    It helps me to think of the ADC circuit as keeping the voltage at the input pin at exactly 1.65 (1/2 Vdd) by making the output pin HIGH or LOW. At each clock if the input pin is lower than 1.65 then it makes the output pin high. If the input pin is higher than 1.65, then it makes the output pin low.
    The counter value is the number of times the input pin was high when each clock occured. So the voltage is (counter_value / clocks) * Vdd

    I hope this helps...

    Bean
Sign In or Register to comment.