Forum Index
Sound Sensor to ZX-XX
Goto page 1, 2
 
Author Message
zbasicandy



Joined: 26 Jan 2006

Posted: 03 August 2006, 12:06 PM    Post subject: Sound Sensor to ZX-XX

Ever needed a sound sensor attached to a ZX-xx Microcontroller?
Here it is.

We use this sound sensor it to pick-up alarms from the following devices which generate a high decibel sound output:
(The sound sensor (Electret Mike) is place near the device.)

Carbon Dioxide CO2 Detectors/Alarms.
Carbon Monoxide Detectors/Alarms.
Smoke & Fire Alarms.
LPG Sensors Detectors/Alarms.
Natural Gas Detectors/Alarms.
Water Warning Leak Detection Alarm (www.smarthome.com)
Burglar Alarms.
Emergency Weather Alarms.

See http://www.futurlec.com/Gas_Sensors.shtml
for special gas sensors.

Programmable Weather Station Alarms.
(La Crosse models # 23xx)
http://www.lacrossetechnology.com/
1. Time alarm
2. Indoor temperature high alarm and low alarm
3. Outdoor temperature high alarm and low alarm
4. Indoor humidity high alarm and low alarm
5. Outdoor humidity high alarm and low alarm
6. Wind chill high alarm and low alarm 24
7. Dew point alarm high alarm and low alarm
8. Rainfall 24h alarm
9. Rainfall 1h alarm
10. Pressure high alarm and low alarm
11. Wind speed high alarm and low alarm
12. Wind direction alarm
13. Storm warning alarm

The operation of the sound sensor is very simple. The Electret Mic just outputs a few millivolts. The LM741 has a gain factor of ~1000 to feed into the ZX-xx analog input. By using the Zbasic command GetADC(pinx,single) the value will range from 0.0 to 1.0 volts. Loud sounds will have a larger "voltage output/input" That's it ... have fun.
Smile Smile Smile



Sound_R1.zip
 Description:
Schematic of Sound Sensor R1

Download
 Filename:  Sound_R1.zip
 Filesize:  4.2 KB
 Downloaded:  836 Time(s)

Back to top
GTBecker



Joined: 18 Jan 2006
Location: Cape Coral

Posted: 03 August 2006, 16:19 PM    Post subject: Sound Sensor to ZX-XX

Quote:
Schematic of Sound Sensor R1

The LM741 does not operate well as a 5-volt single supply amplifier;
it's specification is 10v minimum. The 741 design (a god-send in it's
day) is 37 years old, I understand. A contemporary device will likely
work much better.


Tom
Back to top
zbasicandy



Joined: 26 Jan 2006

Posted: 03 August 2006, 16:54 PM    Post subject: Sound Sensor

For some unknown reason it works just fine in this application.
Total parts cost ~$2.00 plus Electret Mic.
Very Happy Very Happy Very Happy
Back to top
GTBecker



Joined: 18 Jan 2006
Location: Cape Coral

Posted: 03 August 2006, 19:23 PM    Post subject: Re: Sound Sensor

zbasicandy wrote:
... some unknown reason ...
Very Happy Very Happy Very Happy


Exactly. That is not good engineering. You've specified a part in an inappropriate - and probably inoperable - environment. If it works for you, that's not good enough.
Back to top
zbasicandy



Joined: 26 Jan 2006

Posted: 03 August 2006, 19:46 PM    Post subject: Sound Sensor

Again, we will stand on the merits of this design.
If you have a better low cost circuit please feel
free to post it on another link.
------------------------------------------
ZBasicAndy's neighbor
Back to top
zbasicandy



Joined: 26 Jan 2006

Posted: 03 August 2006, 20:05 PM    Post subject: Sound Sensor

Quote:
If it works for you, that's not good enough.


To make Tom feel happy ... replace the LM741 with a CA3140E.

Very Happy Very Happy Very Happy





----------------------------------

ZBasicAndy
Back to top
GTBecker



Joined: 18 Jan 2006
Location: Cape Coral

Posted: 03 August 2006, 20:27 PM    Post subject: Re: Sound Sensor

If you want a challenge to your design, I invite you simply remove the amplifier, altogether. Connect the microphone directly to the rectifying/peak detecting diode. The opamp, even if powered properly, isn't configured for gain, anyway; it's just an inverting unity-gain stage, biased at 0.9v. Pull the IC and jumper pins 2 and 6, input to output. I'll bet that works just as poorly.

Assuming somehow the amplifier is working, still what you've done is biased the amplifier output to 0.9v above ground, then lost 0.7v of that to the series diode. Your smoothed peaks should be about 0.2v!

You built this circuit, you say, and it yielded peaks of a volt out? I doubt it. Am I wrong or just annoying?
Back to top
zbasicandy



Joined: 26 Jan 2006

Posted: 03 August 2006, 20:50 PM    Post subject: Sound Sensor

The LM741 with a CA3140E will both work.
Very Happy Very Happy Very Happy
Back to top
zbasicandy



Joined: 26 Jan 2006

Posted: 03 August 2006, 21:43 PM    Post subject: Sound Sensor

Here is a view of the thoroughly tested sound sensor.
Talk is cheap. We test before we post!

Very Happy Very Happy Very Happy


What Tom does not realize is all we are looking for is a sizable increased in amplitude of the pre-amp. The range varies between .35 to 1.0 using the GetADC(pinx,single) command. It will not pickup noises e.g. TV/Radio/HiFi unless it is close to the sound sensor. The filtering and opamp design is critical to prevent this from occurring.

Tom ... breadboard yours and make it work glitch free.





-------------------------------------------
ZBasicAndy & Neighbor Design Team
Very Happy Very Happy Very Happy



Completed Test Circuit.zip
 Description:

Download
 Filename:  Completed Test Circuit.zip
 Filesize:  148.36 KB
 Downloaded:  768 Time(s)

Back to top
GTBecker



Joined: 18 Jan 2006
Location: Cape Coral

Posted: 03 August 2006, 22:14 PM    Post subject: Sound Sensor to ZX-XX

> ... please breadboard and test it thoroughly...

Wise.

Could you please describe how your circuit works? It appears to defy
rational design and requires some explanation, don't you agree?
Back to top
zbasicandy



Joined: 26 Jan 2006

Posted: 03 August 2006, 22:15 PM    Post subject: Sound Sensor

Quote:
Connect the microphone directly to the rectifying/peak detecting diode


Tom's Design flaws
#1 The output of any Electret Mike is just a few millivolts! Good luck in trying to increase this signal to the ADC input without an opamp amplifier!!!! Elementary Electronics 101

#2. Impedance mismatch will occur if you don't interface the Electret mike properly. You will lose your signal. Elementary Electronics 101

Very Happy Very Happy Very Happy
Back to top
GTBecker



Joined: 18 Jan 2006
Location: Cape Coral

Posted: 03 August 2006, 22:40 PM    Post subject: Re: Sound Sensor

> ... GetADC(pinx,single) the value will range from 0.0 to 1.0 volts...
> ... The range varies between .35 to 1.0 using the GetADC(pinx,single)...

Which is correct? If the latter is correct, you've got a serious problem, Andy. It is not possible to produce a five-volt output from your circuit. I don't believe it will even yield a legitimate volt, so I doubt the former, too. Do you have a scope?

> ... without an opamp amplifier...

Your schematic shows R13 and R17 are both 1k. If that is correct your amplifier has no gain, Andy.
Back to top
zbasicandy



Joined: 26 Jan 2006

Posted: 03 August 2006, 22:59 PM    Post subject: Sound Sensor

From the original post.
Quote:
The operation of the sound sensor is very simple. The Electret Mic just outputs a few millivolts. The LM741 has a gain factor of ~1000 to feed into the ZX-xx analog input


I did not review the schematic ... R17 should be 1 Meg.
I just fired my neighbor.


Quote:
Connect the microphone directly to the rectifying/peak detecting diode


Tom's Design flaws
#1 The output of any Electret Mike is just a few millivolts! Good luck in trying to increase this signal to the ADC input without an opamp amplifier!!!! Elementary Electronics 101

#2. Impedance mismatch will occur if you don't interface the Electret mike properly. You will lose your signal. Elementary Electronics 101

Post your circuit when you ever get it to work.

Smile Smile Smile
Back to top
GTBecker



Joined: 18 Jan 2006
Location: Cape Coral

Posted: 03 August 2006, 23:03 PM    Post subject: Re: Sound Sensor

> ... R17 should be 1 Meg.

OK, that makes some sense (if the amplifier works at all). What about the output voltage? How do you get five volts - or even one volt - out of that circuit?
Back to top
zbasicandy



Joined: 26 Jan 2006

Posted: 03 August 2006, 23:38 PM    Post subject: Sound Sensor

The output is @ 3.06 VDC. When there is a loud noise the amplifer
amplifies the input signal 1000 times to several hundred millivolts RMS A.C.
Thats why we get a "signal range" from (single-float) .35 to ~1.0 on the
analog input. That's our circuit which works! If you don't believe us please
build this circuit yourself!

Now what about "your no gain" circuit that you designed that is
better with impedance mismatches, more expensive and works?

Very Happy Very Happy Very Happy
Back to top
Display posts from previous:   
Page 1 of 2

 



ZBasic Microcontrollers Home
All content Copyright © 2005, 2006, 2007, 2008 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group