Sound Pressure Sensor for Arduino Based on ZX-sound Board





Introduction: Sound Pressure Sensor for Arduino Based on ZX-sound Board

About: I am a physician by trade. After a career in the pharmeceutical world I decided to take it a bit slower and do things I like. Other than my hobbies that involves grassroots medicine in S.E.&P Asia. I have bu...

There are a number of sound sensors available for the Arduino, some of them fairly cheap so when I needed one, I thought that building one myself was lunacy and I set out to buy one.
First thought of course was to check out as they always have a hoist of goodies available at reasonable quality and pretty good price and they do not charge for postage.

Unfortunately the sound module there (with an LM393) did not get many good reviews (note, they do have a new one now) and when I checked Sparkfun, it seemed that their original sound BreakOutBoard, the BOB-08669 (with an OPA344) had a bit of a rocky start with lots of complaints and they replaced it with the BOB-09964, the difference between the two being some changes in resistor and capacitor values. Also the new BOB apparently did not make many users happy, + at USD 7.95 +S&H it wasn't really altogether a great deal either.

So my hunt went on. Well there really are a lot of circuits available: with 1 transistor, with many transistors with 1 op-amp with 2 op-amps.
However, I came upon a ready build board that had users enthusiastic: The zx-soundboard from Inex. They are a Thai company under a Singaporean mother company and have many distributors in Europe. Sadly however, none of these distributors seemed to have any information about this board. Fortunately they provide a clear circuit so that had to be the one. (In the mean time I found out it costs 7.57 euro in France.)

So why provide an instructable on such a simple thing. Well, 2 reasons:

  1. The Circuit Inex provides in my opinion is wrong
  2. If I design a PCB I best provide that to other would be builders

At first glance the circuit I designed is identical to the Inex schedule:
IC1a is used as a non-inverting amplifier. It offers a higher impedance than the inverting amplifier. The gain of the non-inverting amplifier is determined by 1+R4/R3 and is 40dB (100x).

In most cases it is possible to DC couple the circuit. However in this case it is necessary to ensure that the non-inverting has a DC path to earth for the very small input current that is needed. This can be achieved by resistor, R2 in the diagram. The value of this may typically be 100 kΩ or more. If this resistor is not inserted the output of the operational amplifier will be driven into one of the voltage rails.

When adding a resistor in this manner the capacitor-resistor combination forms a high pass filter with a cut-off frequency. The cut off point occurs at a frequency where the capacitive reactance is equal to the resistance. This is expressed in the Formula 1/2πRC. For the used combination it is =16Hz.

It is around IC1b where the Inex circuit goes wrong: The output from IC1a in the Inex circuit goes to the inverting entrance, labelled as 'pin 5'. However, the TLC272 has its inverting input on pin 6 and it's non-inverting input on pin 5.

So.. which was wrong the entrance or the pin number? I presumed the entrance was wrong as it seemed very unlogical to use the inverting input and I came across some people who had build the board succesfully and I presumed they just had followed the pin numbering and did not bother to question the design and thus unknowingly used the right entrance.

Anyway, why is Op-amp 1b even necessary? Wel, if the output of IC1a is fed directly to an ADC (as in the Arduino) there will be very strong fluctuations in the reading and as such the signal is not really representing the total sound pressure. We do that with op-amp IC1b that is used as a comparator with a reference voltage on the inverting entrance (pin 6). When fed with 5Volt, the Voltage on the inverting entrance will be 72mV ((5000/69)*1)
As long as V+ < V-, Vo will be low, but when the sound level rises above 72mV, IC1b will make the output go high.
With a gain of 100 in IC1a, a voltage of 720uV from the microphone would be enough. The Voltage build up over C3 is depending on the number of times the Output goes high and thus is an indication for the sound pressure. The delay in the RC filter at the SPL output is 3.3ms 150Ω*22uF in which 150Ω is the internall pull up of the TLC272.

Bill of materials.
1x TLC 272 dual op-amp: €0.35
1x 8 pin IC holder. €0.15
1x electret microphone: €0.75
1x 22kΩ €0.10
2x 100kΩ €0.20
2x 1kΩ €0.20
1x 68kΩ €0.10
1x 12Ω €0.10
1x 100nF €0.15
1x 470uF €0.10
1x 22uF €0.10

Grandtotal €2.40
Furthermore: piece of Circuitboard 3 pieces of wire, solder, solderingiron

A copy of the fritzingfile for the PCB is found here

For those who do not want to build and can't find the ZX board, there is always the Freetronics board, that also has proper sound level detection >71 mV.
You may also want to build this one, that is somewhat similar to the Freetronics board to the extend it has a sound pressure output and an audio output.

Step 1: Sound Pressure Sensor for Arduino Based on ZX-sound Board: the PCB

I have added a print design that can be used for direct toner transfer. Placement of the components can be found in the figure.
The picture I have provided of the finished circuit deviates only slightly as initially I had made some provisions on the board to easily exchange the connections on pin 5 and 6 (in case I had made the wrong assumption.



    • Casting Contest

      Casting Contest
    • Make it Move Contest

      Make it Move Contest
    • Clocks Contest

      Clocks Contest

    We have a be nice policy.
    Please be positive and constructive.




    The link to the Fritzing file has gone dead. Would love to use the file if you can share it again.

    1 reply

    Indeed, for some reason dropbox at one time either emptied or otherwise lost my files and I am afraid I didnt really keep a back up. But it is a real simple circuit, easy to setup in Fritzing in a few minutes.
    I was quite happy with the quality of this board, but various asian webshops now also sell cheap (and decent) sound modules. So you may wantto rethink if you really want to do a self build on this ;-)

    What is the lowest SPL in dB (quiet place) you can measure with your circuit?

    My circuit stuck at 5x dB.

    2 replies

    Ivan, I never measured any decibels so i am afraid I cannot help you there. I do remember though that I already could measure a fairly low soundvolume but I have no idea how many decibels that was

    Got it! thanks for your reply


    Hi, probably a small typo in your text


    The gain of the non-inverting amplifier is determined by 1+R4/R1 and is 40dB (100x).


    --> I suppose this should be 1 + R4/R3

    1 reply

    Yes correct. stupid of me. Thank u for pointing it out

    the TLC272 has an operating voltage starting at 3.3 volt. Ideally therefore it should work as is.I have not tested it at that voltage though

    Do you have any idea of what decibel range you can detect with this sensor?

    1 reply

    I have not measured that as I do not have the gear. It reacts to normal speech at 1 meter away

    hey also tell me what is the wrong thing as mentioned above

    1 reply

    That is actually described in the text: the + and - entrances of the 2nd opamp were switched around.

    Manoj, you probably don't mean bad but questions starting with 'hey answer me' or 'hey also tell me' may seen by some people as a rather harsh, if not impolite way to start off and they may not be inclined to reply

    hey any body answer me in the above circuit when does the output goes high.
    it is when v+is greater than v ref or v-.but above it said in reverse.and how the reference voltage raises with sound pressure

    2 replies

    'Above' it says
    "As long as V- < V+, Vo will be low, but when the sound level rises above 72mV, IC1b will make the output go high."
    And it seems I made a mistake there: if V+>V- the output will be high.
    Thanks for pointing that out

    'Above' it says
    "As long as V- < V+, Vo will be low, but when the sound level rises above 72mV, IC1b will make the output go high."
    And it seems I made a mistake there: if V+>V- the output will be high.
    Thanks for pointing that out

    Did you ever use this for anything? You mentioned sending the output to the arduino ADC. I'm interesting in this as well. The problem is the sampling rate, even with tweaking the pre scaler values, can only achieve enough to sample audio at 8khz. I am going to try it just the same but I am curious if you had already done this and if you had audio files captured by the arduino. I'd be most interested to hear how they sound.

    2 replies

    If you are interested in Audio sampling try this one

    no i did not do any audiosampling because this board just is not that suitable for that. It gives an output related to the actual sound pressure.

    I have built a board that does two things: amplify the actual wave signal and output that and give a spl indication and i will post that shortly

    Added the fritzing file for download as well. It is in the introduction