Sound Sensor to ZX-XX
-
- Posts: 193
- Joined: 25 January 2006, 19:56 PM
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.
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.
- Attachments
-
- Sound_R1.zip
- Schematic of Sound Sensor R1
- (4.2 KiB) Downloaded 3884 times
Sound Sensor to ZX-XX
The LM741 does not operate well as a 5-volt single supply amplifier;Schematic of Sound Sensor R1
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
Tom
-
- Posts: 193
- Joined: 25 January 2006, 19:56 PM
Sound Sensor
For some unknown reason it works just fine in this application.
Total parts cost ~$2.00 plus Electret Mic.
Total parts cost ~$2.00 plus Electret Mic.
Re: Sound Sensor
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.zbasicandy wrote:... some unknown reason ...
Tom
-
- Posts: 193
- Joined: 25 January 2006, 19:56 PM
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
If you have a better low cost circuit please feel
free to post it on another link.
------------------------------------------
ZBasicAndy's neighbor
-
- Posts: 193
- Joined: 25 January 2006, 19:56 PM
Sound Sensor
To make Tom feel happy ... replace the LM741 with a CA3140E.If it works for you, that's not good enough.
----------------------------------
ZBasicAndy
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?
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?
Tom
-
- Posts: 193
- Joined: 25 January 2006, 19:56 PM
Sound Sensor
The LM741 with a CA3140E will both work.
-
- Posts: 193
- Joined: 25 January 2006, 19:56 PM
Sound Sensor
Here is a view of the thoroughly tested sound sensor.
Talk is cheap. We test before we post!
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
Talk is cheap. We test before we post!
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
- Attachments
-
- Completed Test Circuit.zip
- (148.36 KiB) Downloaded 3776 times
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?
Wise.
Could you please describe how your circuit works? It appears to defy
rational design and requires some explanation, don't you agree?
Tom
-
- Posts: 193
- Joined: 25 January 2006, 19:56 PM
Sound Sensor
Tom's Design flawsConnect the microphone directly to the rectifying/peak detecting diode
#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
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.
> ... 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.
Tom
-
- Posts: 193
- Joined: 25 January 2006, 19:56 PM
Sound Sensor
From the original post.
I just fired my neighbor.
#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.
I did not review the schematic ... R17 should be 1 Meg.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 just fired my neighbor.
Tom's Design flawsConnect the microphone directly to the rectifying/peak detecting diode
#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.
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?
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?
Tom
-
- Posts: 193
- Joined: 25 January 2006, 19:56 PM
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?
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?