Maker Pro
Maker Pro

Comparator for sensor

M

Manimozhi Baskaran

Jan 1, 1970
0
Hi,

I am building an application that needs to beep when the voltage output
from the sensor device is less than 0.8 Volts. I am not sure what would
be the right design that I can use for the buzzer to beep. The voltage
for the sensor is 5 V DC supply. Should I consider using 741/LM series?

Regards,
Mani
 
J

John Popelish

Jan 1, 1970
0
Manimozhi said:
Hi,

I am building an application that needs to beep when the voltage output
from the sensor device is less than 0.8 Volts. I am not sure what would
be the right design that I can use for the buzzer to beep. The voltage
for the sensor is 5 V DC supply. Should I consider using 741/LM series?

The dual comparator, LM393 has inputs that work all the way to the
negative supply rail, so it should detect .8 volts just fine. These
comparators have an open collector output that turns on a connection
to th negative rail when the - input is more positive than the + input.
http://www.fairchildsemi.com/ds/LM/LM2903I.pdf
 
J

John Fields

Jan 1, 1970
0
Hi,

I am building an application that needs to beep when the voltage output
from the sensor device is less than 0.8 Volts. I am not sure what would
be the right design that I can use for the buzzer to beep. The voltage
for the sensor is 5 V DC supply. Should I consider using 741/LM series?

---
No. Consider using a real comparator, like John Popelish suggested.

However, an LM393 may not be able to give you enough output current
to run your beeper, so if you could post what its voltage and
current requirements are we can suggest an appropriate means of
driving it. Also, if you could tell us what you're using for a
sensor we'll be able to suggest how to set up a proper "front end"
and provide any hysteresis the circuit may require.
 
M

Manimozhi Baskaran

Jan 1, 1970
0
My Infra Red sensor will detect the temperature range of -40 degree to
+60 degree centigrade variation with:
-40 degree to output a typical voltage of < 0.21 V
-20 degree to output a typical voltage of 0.21V,
-15 degree to a typical voltage of 0.3 V etc.,

I like my sensor to detect only the temperature range -40 degree to -5
degree range which would typically vary between 0. 2 V to 0.8 Volts. The
typical supply voltage to the sensor will be 5V and its supply current
will be 2 mA. The output of the sensor will be anywhere between 0.25
Volts to 4.75 Volts. The output current will be less than 2mA. What type
of circuit design should I use in order to detect the range so that it
can beep when the voltage is less than 0.8 V which I believe is what I
should use as my reference voltage.

Any assistance will be appreciated.

Thanks
Mani
 
J

John Fields

Jan 1, 1970
0
My Infra Red sensor will detect the temperature range of -40 degree to
+60 degree centigrade variation with:
-40 degree to output a typical voltage of < 0.21 V
-20 degree to output a typical voltage of 0.21V,
-15 degree to a typical voltage of 0.3 V etc.,

I like my sensor to detect only the temperature range -40 degree to -5
degree range which would typically vary between 0. 2 V to 0.8 Volts. The
typical supply voltage to the sensor will be 5V and its supply current
will be 2 mA. The output of the sensor will be anywhere between 0.25
Volts to 4.75 Volts. The output current will be less than 2mA. What type
of circuit design should I use in order to detect the range so that it
can beep when the voltage is less than 0.8 V which I believe is what I
should use as my reference voltage.

---
Please bottom-post.

I'm confused.

In your first post you said that you wanted the circuit to detect
when the sensor's output voltage was less than 0.8V, but now you say
you want the circuit to detect only the range between -40C to -5C,
which corresponds to the voltage range of 0.2V to 0.8V.

I take that to mean that if the sensor's output voltage is less than
0.2V or greater than 0.8V you don't want the beeper to beep.

You also say that the sensor's output will vary from 0.25V to 4.75V,
which means that it will never be able to get to 0.2V.

If, since you can't get to 0.2V, all you need is something which can
detect an output voltage of less than 0.8V from the sensor, you
could do something like this:


+5V>---------+---------------+--------+----------+
| | | |
[1K2] | [10K] |
| | | |
| +---|--[1M]--+ |
Rin | | | Rfb | |
VIN>--[10K]--------------+--|+\ | E
| | >------+--[1K]--B 2N4403
+--[1690]---+--|-/ LM393 C
|K | | |+
[LM385-2.5] [806] | [BEEPER]
| | | |
GND>---------+-----------+---+-------------------+

Rfb is used to provide positive feedback ("hysteresis", in this
case) around the switching point, which will keep the output of the
comparator from chattering if the input rise and fall times are
slow. With the values given for Rin and Rfb, that hysteresis will
correspond to about 1% of 0.8V, or 8mv, which should be enough if
there's not a lot of noise on the input signal.

If there is a lot of noise on the input signal, try bypassing VIN to
GND with an "appropriately" sized capacitor.
 
J

Jamie

Jan 1, 1970
0
Manimozhi said:
Hi,

I am building an application that needs to beep when the voltage output
from the sensor device is less than 0.8 Volts. I am not sure what would
be the right design that I can use for the buzzer to beep. The voltage
for the sensor is 5 V DC supply. Should I consider using 741/LM series?

Regards,
Mani
at that voltage, a simple drive to the
base of an NPN via a resistor would work to
clamp down on a PNP base driven circuit.
 
J

Jasen Betts

Jan 1, 1970
0
Hi,

I am building an application that needs to beep when the voltage output
from the sensor device is less than 0.8 Volts. I am not sure what would
be the right design that I can use for the buzzer to beep. The voltage
for the sensor is 5 V DC supply. Should I consider using 741/LM series?

Regards,
Mani

741's won't run off a single sided 5V supply, but you could do it using
1/2 a LM324 qaud op-amp to drive a piezo speaker.

There's a dual version of the 324 too, but I forget it's number,
and anyway, 324's are dirt cheap.

possibly something like this:

---+-------+----------+----------- +5
| | |
| | 100K
| | |
| | +-----[22K]-------+
560K | | 1/4 |
| |\| | |\ 324 |
(A)+-----|+\ +------|+\ |
in | | >--. | | >-----+-+--||
-------|-----|-/ `-|<--|---+--|-/ | | piezo speaker element
| |/| 1N914 | | |/ | +|
| | 100K +----[100K]-' |
| 1/4| | | |
110K 324| | === 0.2uF (B) |
| | | | |
-----+-------+----------+---+----------------+

the voltage at point (A) controls when the tone will start
it should come out pretty close to 0.8V but a trimpot (eg 50K) could be
insertted here if some fine-adjustment is needed.

the components near point (B) control the frequency increasing their value
will reduuce the frequency with the componnents shown it shopuld be a few
kilohertz which is about right for the plenty of noise from a piezo element.

Bye.
Jasen
 
J

John Fields

Jan 1, 1970
0
at that voltage, a simple drive to the
base of an NPN via a resistor would work to
clamp down on a PNP base driven circuit.
 
J

John Fields

Jan 1, 1970
0
Hi,

I am building an application that needs to beep when the voltage output
from the sensor device is less than 0.8 Volts. I am not sure what would
be the right design that I can use for the buzzer to beep. The voltage
for the sensor is 5 V DC supply. Should I consider using 741/LM series?

Regards,
Mani

741's won't run off a single sided 5V supply, but you could do it using
1/2 a LM324 qaud op-amp to drive a piezo speaker.

There's a dual version of the 324 too, but I forget it's number,
and anyway, 324's are dirt cheap.

possibly something like this:

---+-------+----------+----------- +5
| | |
| | 100K
| | |
| | +-----[22K]-------+
560K | | 1/4 |
| |\| | |\ 324 |
(A)+-----|+\ +------|+\ |
in | | >--. | | >-----+-+--||
-------|-----|-/ `-|<--|---+--|-/ | | piezo speaker element
| |/| 1N914 | | |/ | +|
| | 100K +----[100K]-' |
| 1/4| | | |
110K 324| | === 0.2uF (B) |
| | | | |
-----+-------+----------+---+----------------+

the voltage at point (A) controls when the tone will start
it should come out pretty close to 0.8V but a trimpot (eg 50K) could be
insertted here if some fine-adjustment is needed.

the components near point (B) control the frequency increasing their value
will reduuce the frequency with the componnents shown it shopuld be a few
kilohertz which is about right for the plenty of noise from a piezo element.

---
Using the 5% (carbon film?) resistors you've chosen for the
reference divider will result in an uncertainty of the switching
threshold with the low end being at 0.755V and the high end being at
0.892V.

Switching the 560K to 4220 +/- 1% and the 110K to 806 +/- 1% , both
metal film, will tighten up the error band by bringing up the lower
end to 0.788V, the high end to 0.815V, and lowering the tempco.

In actuality, a small pot would be a better choice for tempco, since
with a resistive element more likely to be isothermal than two
resistors, the drifts would track (in the pot) and the ratio between
the top and bottom resistors woulod stay the same, causing the
reference voltage to remain the same as long as the supply stayed
constant.
 
M

Manimozhi Baskaran

Jan 1, 1970
0
Hi John,

I believe that I missed your original msg on the thread. I am unable to
determine which is the right comparator chip to use for my specifications. I started
with 741 then look at LM393 suggested by John P. Also investigated on to LM324 (as Jasen had suggested). But I believe that I missed John F. idea on the thread? What would be the right option to go?

Thanks,

John said:
Hi,

I am building an application that needs to beep when the voltage output
from the sensor device is less than 0.8 Volts. I am not sure what would
be the right design that I can use for the buzzer to beep. The voltage
for the sensor is 5 V DC supply. Should I consider using 741/LM series?

Regards,
Mani
741's won't run off a single sided 5V supply, but you could do it using
1/2 a LM324 qaud op-amp to drive a piezo speaker.

There's a dual version of the 324 too, but I forget it's number,
and anyway, 324's are dirt cheap.

possibly something like this:

---+-------+----------+----------- +5
| | |
| | 100K
| | |
| | +-----[22K]-------+
560K | | 1/4 |
| |\| | |\ 324 |
(A)+-----|+\ +------|+\ |
in | | >--. | | >-----+-+--||
-------|-----|-/ `-|<--|---+--|-/ | | piezo speaker element
| |/| 1N914 | | |/ | +|
| | 100K +----[100K]-' |
| 1/4| | | |
110K 324| | === 0.2uF (B) |
| | | | |
-----+-------+----------+---+----------------+

the voltage at point (A) controls when the tone will start
it should come out pretty close to 0.8V but a trimpot (eg 50K) could be
insertted here if some fine-adjustment is needed.

the components near point (B) control the frequency increasing their value
will reduuce the frequency with the componnents shown it shopuld be a few
kilohertz which is about right for the plenty of noise from a piezo element.

---
Using the 5% (carbon film?) resistors you've chosen for the
reference divider will result in an uncertainty of the switching
threshold with the low end being at 0.755V and the high end being at
0.892V.

Switching the 560K to 4220 +/- 1% and the 110K to 806 +/- 1% , both
metal film, will tighten up the error band by bringing up the lower
end to 0.788V, the high end to 0.815V, and lowering the tempco.

In actuality, a small pot would be a better choice for tempco, since
with a resistive element more likely to be isothermal than two
resistors, the drifts would track (in the pot) and the ratio between
the top and bottom resistors woulod stay the same, causing the
reference voltage to remain the same as long as the supply stayed
constant.
 
J

John Fields

Jan 1, 1970
0
Hi John,

I believe that I missed your original msg on the thread. I am unable to
determine which is the right comparator chip to use for my specifications.
I started with 741 then look at LM393 suggested by John P.
Also investigated on to LM324 (as Jasen had suggested).
But I believe that I missed John F. idea on the thread?
What would be the right option to go?

---
The circuit you should use depends on how accurately you want to
detect the -5C point (0.8V) and how much current your beeper needs.
Can you supply that data?


Here's a copy of my earlier post:


"Please bottom-post.

I'm confused.

In your first post you said that you wanted the circuit to detect
when the sensor's output voltage was less than 0.8V, but now you say
you want the circuit to detect only the range between -40C to -5C,
which corresponds to the voltage range of 0.2V to 0.8V.

I take that to mean that if the sensor's output voltage is less than
0.2V or greater than 0.8V you don't want the beeper to beep.

You also say that the sensor's output will vary from 0.25V to 4.75V,
which means that it will never be able to get to 0.2V.

If, since you can't get to 0.2V, all you need is something which can
detect an output voltage of less than 0.8V from the sensor, you
could do something like this:


+5V>---------+---------------+--------+----------+
| | | |
[1K2] | [10K] |
| | | |
| +---|--[1M]--+ |
Rin | | | Rfb | |
VIN>--[10K]--------------+--|+\ | E
| | >------+--[1K]--B 2N4403
+--[1690]---+--|-/ LM393 C
|K | | |+
[LM385-2.5] [806] | [BEEPER]
| | | |
GND>---------+-----------+---+-------------------+

Rfb is used to provide positive feedback ("hysteresis", in this
case) around the switching point, which will keep the output of the
comparator from chattering if the input rise and fall times are
slow. With the values given for Rin and Rfb, that hysteresis will
correspond to about 1% of 0.8V, or 8mv, which should be enough if
there's not a lot of noise on the input signal.

If there is a lot of noise on the input signal, try bypassing VIN to
GND with an "appropriately" sized capacitor."
 
M

Manimozhi Baskaran

Jan 1, 1970
0
Thanks John for reposting this.

Can you please clarify this?

1690 - is this 1690 ohms across [LM385-2.5]? Is LM385 a diode to keep
the noise/power more stable?
806 - is that 806 ohms across the - ve and ground on LM393?

Regards,
Mani

John said:
Hi John,

I believe that I missed your original msg on the thread. I am unable to
determine which is the right comparator chip to use for my specifications.
I started with 741 then look at LM393 suggested by John P.
Also investigated on to LM324 (as Jasen had suggested).
But I believe that I missed John F. idea on the thread?
What would be the right option to go?

---
The circuit you should use depends on how accurately you want to
detect the -5C point (0.8V) and how much current your beeper needs.
Can you supply that data?


Here's a copy of my earlier post:


"Please bottom-post.

I'm confused.

In your first post you said that you wanted the circuit to detect
when the sensor's output voltage was less than 0.8V, but now you say
you want the circuit to detect only the range between -40C to -5C,
which corresponds to the voltage range of 0.2V to 0.8V.

I take that to mean that if the sensor's output voltage is less than
0.2V or greater than 0.8V you don't want the beeper to beep.

You also say that the sensor's output will vary from 0.25V to 4.75V,
which means that it will never be able to get to 0.2V.

If, since you can't get to 0.2V, all you need is something which can
detect an output voltage of less than 0.8V from the sensor, you
could do something like this:


+5V>---------+---------------+--------+----------+
| | | |
[1K2] | [10K] |
| | | |
| +---|--[1M]--+ |
Rin | | | Rfb | |
VIN>--[10K]--------------+--|+\ | E
| | >------+--[1K]--B 2N4403
+--[1690]---+--|-/ LM393 C
|K | | |+
[LM385-2.5] [806] | [BEEPER]
| | | |
GND>---------+-----------+---+-------------------+

Rfb is used to provide positive feedback ("hysteresis", in this
case) around the switching point, which will keep the output of the
comparator from chattering if the input rise and fall times are
slow. With the values given for Rin and Rfb, that hysteresis will
correspond to about 1% of 0.8V, or 8mv, which should be enough if
there's not a lot of noise on the input signal.

If there is a lot of noise on the input signal, try bypassing VIN to
GND with an "appropriately" sized capacitor."
 
J

John Fields

Jan 1, 1970
0
Thanks John for reposting this.

Can you please clarify this?

1690 - is this 1690 ohms across [LM385-2.5]? Is LM385 a diode to keep
the noise/power more stable?
806 - is that 806 ohms across the - ve and ground on LM393?

---
I keep asking you to bottom post, as is the custom here, but you
persist in top posting, and I keep asking for the accuracy you want
when detecting the -5C point and the current required for your
beeper to work but, for some reason, you refuse to supply that data.

If you will reformulate your post with your questions at the bottom
of the post you're replying to, and answer my questions, then I will
answer yours.

Otherwise, perhaps someone with more patience than I have at this
point will do you the courtesy.
 
Top