Question:
Use comparator or ADC?
Cally
2012-08-12 02:21:49 UTC
I'm working on a sound sensor which produces an AC signal to be connected to a PC through a parallel port. Since I'm a beginner in this electrical stuff, I want to know, should I just use a comparator to give a DC voltage before the signal enters the PC or buy an ADC instead?
Three answers:
billrussell42
2012-08-12 03:54:52 UTC
If you just want to know if the signal is above or below a certain (DC) level at a certain instant of time, then a comparator will work.



An ADC will give you a DC value, again, at a given instant of time, for the signal.



But since the signal is AC, I don't think you will get much useful information from the above, unless you make a large number of readings and use that to get the RMS voltage of the AC waveform.



Another alternative is to use a set of diodes and filters to convert the AC signal to DC and apply that DC to the comparator or ADC to give you a reading that can be converted to an AC input voltage.
charcinders
2012-08-12 11:30:05 UTC
It depends what you want to do with the signal. I.e. do you just want to detect whether there is a sound or not, or do you want to analyse the sound signal in some way? It's hard to tell you what is best without making assumptions about what you are trying to do, which may be wrong.



You can think of a comparator as a 1-bit ADC. It converts an analog signal into either a logic 0 or logic 1 depending on the relative voltages of the signals on its + and - inputs. So if your sound sensor produces an AC voltage, that voltage will vary around some DC voltage, maybe 0V. If you feed the output of the sound sensor into one input of the comparator and apply 0V to the other input, then the output of the comparator will be a stream of logic 0s and 1s. That would tell you that there is a sound there and give you some information about its frequency, but none about its amplitude.



An ADC would be better if you want to have more information about the signal, such as its amplitude and waveform. Note that you will have to match the signal level of the sound sensor output to the input range of the ADC. It's no good having a signal level of 1mV and putting it into an ADC with a full-scale range of 5V.

Also note that the parallel port is only 8 bits wide, so you will be limited to using an 8-bit ADC, unless you use a serially-addressed device and "bit-bang" some of the port pins, which is quite a complex programming task.



If you just want to get a sound signal into the PC where your program can access it, why not just use the audio input jack? Just about every PC has a good quality stereo 16-bit ADC for digitising sound signals.
samim doost
2012-08-12 11:14:03 UTC
how many bits does your parallel port has? . If it has 16 bit then use 16bit ADC or any other ADC. Look at the datasheet of few ADC ICs which I listed below.

http://www.ti.com/lit/ds/symlink/pcm1807.pdf

http://www.ti.com/lit/ds/symlink/pcm1807.pdf

http://www.nxp.com/documents/data_sheet/UDA1361TS.pdf





look at the image that will give you some idea about ADC



http://www.planetoftunes.com/digiaudio/dig_media/sampling_in_4_bit_convertor.gif



I


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...