Searching \ for '[EE:] LM324 as schmidt trigger' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=lm324+schmidt+trigger
Search entire site for: 'LM324 as schmidt trigger'.

Exact match. Not showing close matches.
PICList Thread
'[EE:] LM324 as schmidt trigger'
2004\01\01@143039 by Jim Tellier

picon face
Having no luck finding my old op-amp app notes & such.... I'm looking for a way to use '324s as ST threshold detectors in the following way:
The input signal is a voltage representing two states of a sensor: 'a'=30mV, and 'b'=75mV.
I'd like to establish a threshold voltage reference of about 60mV, and have the device output
switch from 'high' to 'low' (i.e. drive a PIC input port) when the input signal exceeds the threshold.
My thought is to use a 324 in a single-ended (5V) supply mode, a zener-based divider arrangement
for the reference voltage, and a rather weak pullup on the output.
Any thoughts on whether this is a good approach, or circuit suggestions, alternatives, pointers to
sources, etc. are appreciated.
Thanks!

Jim-the-mostly-digital-and-software-guy :^)

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu

2004\01\01@152305 by Hopkins

flavicon
face
Why not use a PIC with a comparator input?
*************************************************

Roy Hopkins

.....rdhopkinsKILLspamspam@spam@ihug.co.nz

*************************************************
Having no luck finding my old op-amp app notes & such.... I'm looking for a
way to use '324s
as ST threshold detectors in the following way:
The input signal is a voltage representing two states of a sensor: 'a'=30mV,
and 'b'=75mV.
I'd like to establish a threshold voltage reference of about 60mV, and have
the device output
switch from 'high' to 'low' (i.e. drive a PIC input port) when the input
signal exceeds the threshold.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 30/12/2003

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamKILLspammitvma.mit.edu

2004\01\01@153341 by Jinx

face picon face
> The input signal is a voltage representing two states
> of a sensor: 'a'=30mV, and 'b'=75mV. I'd like to establish
> a threshold voltage reference of about 60mV

As there are 4 amps in the package, one could be used as
a DC amplifier to make the state difference more distinct

The 324 d/s shows such a configuration and a comparator
with hysteresis, both running off a single-ended 5V supply

http://www.national.com/ds/LM/LM324.pdf

You could arrange the amplification/level shifting so that the
0-1 output of the LM324 is either side of the PIC's threshold,
so you might'nt necessarily need an external comparator

--
http://www.piclist.com hint: To leave the PICList
.....piclist-unsubscribe-requestKILLspamspam.....mitvma.mit.edu

2004\01\01@154415 by Jim Tellier

picon face
Hopkins wrote:
> Why not use a PIC with a comparator input?
> *************************************************
Well, it's possible, I agree.  Didn't think in that
direction originally because the sensors (8) are located
several feet from the "controller" logic, and I didn't
want to try running the low voltage signals too far.
So my thinking was to put the threshold detectors *at*
the sensor location, and run the logic levels back to
the controller.   But since the sensors are all located
physically close to each other, maybe a single PIC at the
sensors might be the ticket.  I'll need to round-robin poll
the sensors (unless there's a PIC with 8 a/d ports?), but
then I could encode the results and send I2C back to the
controller.  Hmm....
Thanks for the thoughts!
Jim

>
> --
> http://www.piclist.com hint: To leave the PICList
> EraseMEpiclist-unsubscribe-requestspam_OUTspamTakeThisOuTmitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
piclist-unsubscribe-requestspamspam_OUTmitvma.mit.edu

2004\01\01@155906 by Martin McCormick

flavicon
face
       It will work and, if your power supply for the PIC is
regulated at 5 volts, you can use any voltage you derive from that
supply as a reference voltage.

       If you run an op-amp with no feedback network at all, (open
loop), the output will swing high if the + input exceeds the voltage
on the - input.  In other words, it forms a comparator.  To make a
Schmidt Trigger, you need to introduce some positive feedback to give
it a bit of historesis.  The amount of historesis depends upon what
you want the circuit to do, but the idea is that when one crosses the
threshold from low to high, it is going to take a little more or less
voltage to switch back again than it did to change state in the first
place.  In other words, it kind of snaps over in to its present state
and tries to stay there.

       Just as an example, let's say we run a 100-K resistor from VCC
to the + input on one of the LM324 sections.  We run a 10-K resistor
to ground so that the + input sees about .5 volts.  If you put an input
signal on the - input, the output will swing quickly between 0 and +5
volts when the - input hovers around .5 volts.

       To add historesis, you will need a third resistor between the
output of the LM324 section and the junction of the + input, the 10-K
resistor and the 100-K resistor.

       When the LM324 output is high, the divider looks like two
100-K resistors in parallel in series with a 10-K resistor.

       When the output is low, the 100-K resistor from the output is
now on the low end of the divider in parallel with the 10-K resistor.
The effect is to move the reference voltage between a high and low
state level.

       That is really all there is to doing what you are asking
about.

Martin McCormick WB5AGZ  Stillwater, OK
OSU Information Technology Division Network Operations Group

Jim Tellier writes:
{Quote hidden}

--
http://www.piclist.com hint: To leave the PICList
KILLspampiclist-unsubscribe-requestKILLspamspammitvma.mit.edu

2004\01\01@162020 by Olin Lathrop

face picon face
Jim Tellier wrote:
> ... unless there's a PIC with 8 a/d ports?

Yes, as even a cursory look at the line card will reveal.

*****************************************************************
Embed Inc, embedded system specialists in Littleton Massachusetts
(978) 742-9014, http://www.embedinc.com

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu

2004\01\01@162434 by Jinx

face picon face
> I'll need to round-robin poll the sensors

A 4051 analogue multiplexer would work. I've used one for
sampling several photodiodes with a 16F628

> (unless there's a PIC with 8 a/d ports?)

There are several

asp.microchip.com/wwwParamChart/chart.aspx?branchID=1005&mid=&gdir=10
10

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestspamBeGonespammitvma.mit.edu

2004\01\01@163058 by Jim Tellier

picon face
Thanks for the good explanation Martin! It's been a long time since I've
putz'd with op-amps!
And Jinx, thanks for the pointer to the datasheet!  I never would've thought
there would be so many usage examples for such a simple device!
Since I replied a little while ago to Hopkins' post suggesting direct use of
a PIC, I've actually realized that putting a 16F676 (with 8 a/d channels)
right at the sensors' location might just be the ticket; I'll have to think
about the approach a bit more, but it just might reduce my parts count (e.g.
trim pots, resistors etc) and put more flexibility in s/w to boot.
 Thanks for the help, everyone!
Jim

{Original Message removed}

2004\01\01@163515 by Jim Tellier

picon face
Jinx,
  Thanks again.  Funny, my recollection was that 5 a/d's was the most I'd
seen, but I'd not needed to deal with so many analog sensors at once, prior
to this project.   I've actually got a tube full of 16F676's that will fit
the bill nicely!
Jim
>
> > (unless there's a PIC with 8 a/d ports?)
>
> There are several
>
>
asp.microchip.com/wwwParamChart/chart.aspx?branchID=1005&mid=&gdir=10
> 10
>
> --
> http://www.piclist.com hint: To leave the PICList
> TakeThisOuTpiclist-unsubscribe-requestEraseMEspamspam_OUTmitvma.mit.edu

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestspamTakeThisOuTmitvma.mit.edu

2004\01\01@165005 by Spehro Pefhany

picon face
At 11:29 AM 1/1/2004 -0800, you wrote:
>Having no luck finding my old op-amp app notes & such.... I'm looking for
>a way to use '324s
>as ST threshold detectors in the following way:
>The input signal is a voltage representing two states of a sensor:
>'a'=30mV, and 'b'=75mV.
>I'd like to establish a threshold voltage reference of about 60mV, and
>have the device output
>switch from 'high' to 'low' (i.e. drive a PIC input port) when the input
>signal exceeds the threshold.

That's not a Schmitt (note the spelling) trigger, it's just a comparator.
The ST has hysteresis- for example, you might add a taste of positive
feedback so that the output turns off at 65mV and on at 55mV nominal.

>My thought is to use a 324 in a single-ended (5V) supply mode, a
>zener-based divider arrangement
>for the reference voltage, and a rather weak pullup on the output.

You don't need a pullup if you use a TTL-level input on the PIC.

>Any thoughts on whether this is a good approach, or circuit suggestions,
>alternatives, pointers to
>sources, etc. are appreciated.
>Thanks!

Vos(max) is 7mV at 25°C for the LM324. That limits the untrimmed accuracy.
Let's suppose we want to establish a nominal 52.5mV threshold with
+/-5mV of hysteresis. Let's apply the signal to the inverting input so that
the input signal has minimal loading.

                In  ___       |\|
                o--|___|------|-\          Out
                    R4        |  >--+-------o
                            +-|+/   |
                            | |/|   |75+30
                            |       |
                            |  R1   |
                            |  ___  |
                    +-------+-|___|-+
                    |       |
                   .-.     .-.
                   | | R3  | | R2
                   | |     | |
                   '-'     '-'
                    |       |
                  5.0VDC    GND

Let's arbitrarily set R1 to 1M0 1%. The voltage swing at the
output will be about 0 to 3.6VDC with a 5V supply, so obviously
R2||R3 = 1M*0.01/(3.59) = 2.79 K. If we pick R2 = 2K87 1% and
thus R3 = 294K 1%. Using R4 = 3K0 5% knocks 0.75mV of error
off the input due to bias current, so it's not all that
important to have it in there.

Suppose supply voltage is 4% off and resistors 1% off and
Vos is 7mV, we could have as much as ~10mV of error (at 25°C),
more at higher temperatures.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffEraseMEspam.....interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: To leave the PICList
EraseMEpiclist-unsubscribe-requestspammitvma.mit.edu

2004\01\01@234307 by Martin McCormick

flavicon
face
       This discussion of using an LM324 as Schmidt Trigger is kind
of interesting because I just got through connecting a LM324 as a
level shifter to a 16F84a so that I can drive 4 CD4016 switches in
various configurations but with 12 volts as Vdd for the 4016 gates.

       That lets one switch a higher-level audio signal through the
CD4016 than one could get by using 5 volts as VDD.

       Since the LM324 is getting its logic-level inputs from a PIC,
one doesn't even have to make it a Schmidt Trigger because the inputs
will either be almost 0 or almost 5 volts.  I just created a 2.5-volt
reference voltage with 2 100-K resistors and fed the - input of any
LM324 section that would be a non-inverting gate, and fed the + input
of any section that would be an inverter.  The outputs faithfully
switch between almost 0 and almost 12 volts.

       I don't know how fast one could use the LM324 in this
configuration, but I only needed it to work up to a few kilohertz.

       I am sure there are better chips for this purpose if one needs
higher speeds.

Martin McCormick WB5AGZ  Stillwater, OK
OSU Information Technology Division Network Operations Group

--
http://www.piclist.com hint: To leave the PICList
RemoveMEpiclist-unsubscribe-requestEraseMEspamEraseMEmitvma.mit.edu

2004\01\02@123929 by Richard Graziano

picon face
A schmidt trigger application usually requires a faster switching speed that
the slewing rate of the LM324.  If all of the timing requirements are
defined and an error budget is determined, then the characteristics of the
LM324 circuit can be evaluated within that context before any actual
breadboarding takes place.


{Original Message removed}

2004\01\02@150303 by Peter L. Peres

picon face
You cannot use a pullup, you have to use a pulldown (1k should work). Do
get the LM324 data sheet if you do not have it.

Peter

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads

2004\01\03@183101 by Martin McCormick

flavicon
face
       I am not sure if the response below was meant for me or for
another poster.  I have neither a pull-up nor a pull-down on this
circuit but a +2.5-V reference voltage.  I then directly connect any
PIC outputs directly to the other LM324 input of the stage being
switched so that anything below 2.5 volts is seen as low and anything
above 2.5 volts is high and causes the output stage to slam over to
the opposite state.

       Another poster reminded us of the
slower slewing rate of the LM324.  This is quite true and must be
considered when designing this circuit.

       I would call it a cluge.  I have a bunch of LM324's on hand
and the switching rate is between 40 or 50 HZ and a few kilohertz.  I
will be surprised if it really works at the very high end, but this
was a quick and dirty solution designed as much to use up existing
parts as provide 0-12 volt logic levels from 0-5 volts.

       Voltage comparators such as the LM339 may also be good if not
better for this purpose except that their outputs are open collector
or maybe open drain which means that, when referenced to ground, they
will show a short to ground when low and nothing at all when high.

       I certainly wouldn't recommend using an audio op-amp if you
are designing that circuit and want the fastest switching speed
possible.  There are level converters designed as such and, if you can
get them and they are cost-effective, it is better to use them.


Martin McCormick WB5AGZ  Stillwater, OK
OSU Information Technology Division Network Operations Group

"Peter L. Peres" writes:
>You cannot use a pullup, you have to use a pulldown (1k should work). Do
>get the LM324 data sheet if you do not have it.
>
>Peter
>
>--
>http://www.piclist.com hint: PICList Posts must start with ONE topic:
>[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads
>

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\01\04@142614 by Peter L. Peres

picon face
>"Peter L. Peres" writes:
>>You cannot use a pullup, you have to use a pulldown (1k should work). Do
>>get the LM324 data sheet if you do not have it.

Sorry for being cryptic. The LM324 will not pull the output down to GND
(it cannot sink current when this happens). Therefore a hysteresis
positive feedback resistor cannot be used when the input is only 65mV
unless a pulldown is used at the output of the LM324. With the pulldown
the output will go down to 0V and so you can use a hysteresis resistor. If
you look in the datasheet you will see that it can only sink a few uA at
200mV Vo and 15V supply. If you look at the internal schematic you will
see immediately why this is so. It is probably better if you make your
circuit work without hysteresis.

You need about 60dB gain and the amp will be suitable up to about 1kHz,
with a 1k pulldown and 500k hysteresis resistor I think. If you do not use
hysteresis then forget about the pulldown too.

Peter

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\01\04@161755 by Spehro Pefhany

picon face
At 09:17 PM 1/4/2004 +0200, you wrote:
> >"Peter L. Peres" writes:
> >>You cannot use a pullup, you have to use a pulldown (1k should work). Do
> >>get the LM324 data sheet if you do not have it.
>
>Sorry for being cryptic. The LM324 will not pull the output down to GND
>(it cannot sink current when this happens). Therefore a hysteresis
>positive feedback resistor cannot be used when the input is only 65mV
>unless a pulldown is used at the output of the LM324.

Really?

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
RemoveMEspeffspam_OUTspamKILLspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\01\05@163745 by Peter L. Peres

picon face
>>Sorry for being cryptic. The LM324 will not pull the output down to GND
>>(it cannot sink current when this happens). Therefore a hysteresis
>>positive feedback resistor cannot be used when the input is only 65mV
>>unless a pulldown is used at the output of the LM324.
>
> Really?

National LM324 datasheet (ed. 1994) p.5 graph "Output Characteristics,
Current Sinking", 5V supply line crosses the abscissa at about 10mV, 1uA
sink.  This is 10kOhms Ro without a load or a wire attached, and it gets
worse with lower output voltage.

Same datasheet, p.8 "Driving TTL" shows what needs to be done to achieve
Vil for a TTL chip input (which sources much less than a mA). A TTL
compatible CMOS input will not need such a strong pulldown, but with a
wire of some length attached, some noise, a scope probe, and pretensions
to make the hysteresis work as expected while pushing the frequency up
towards 1kHz a pulldown is required imho. Maybe 240 ohms is drastic.

The same datasheet contains a number of applications which some will find
useful.

Peter

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspamspammitvma.mit.edu with SET PICList DIGEST in the body

2004\01\05@191323 by Roy J. Gromlich

picon face
----- Original Message -----
From: "Peter L. Peres" <EraseMEplpspamspamspamBeGoneACTCOM.CO.IL>
To: <RemoveMEPICLISTKILLspamspamMITVMA.MIT.EDU>
Sent: Monday, January 05, 2004 4:27 PM
Subject: Re: [EE:] LM324 as schmidt trigger


{Quote hidden}

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservSTOPspamspamEraseMEmitvma.mit.edu with SET PICList DIGEST in the body

2004\01\05@191531 by Roy J. Gromlich

picon face
There is an LM-324V which is the low-voltage version of the chip.
It is rated forrail-to-rail operation and has symetric source-sink
capability.  I do not have the data sheet here, but it is on the
National web site ---- I have used the chip with good results in
circuits where pulling within 50-100mVolts of the supply rails
is important.  It can only source/sink about 5-7 mA, do the high
and low voltages depend on the load you put on it.

Roy

{Original Message removed}

2004\01\06@153134 by Spehro Pefhany

picon face
At 07:11 PM 1/5/2004 -0500, you wrote:
>----- Original Message -----
>From: "Peter L. Peres" <KILLspamplpspamBeGonespamACTCOM.CO.IL>
>To: <EraseMEPICLISTspamEraseMEMITVMA.MIT.EDU>
>Sent: Monday, January 05, 2004 4:27 PM
>Subject: Re: [EE:] LM324 as schmidt trigger
>
>
> > >>Sorry for being cryptic. The LM324 will not pull the output down to GND
> > >>(it cannot sink current when this happens). Therefore a hysteresis
> > >>positive feedback resistor cannot be used when the input is only 65mV
> > >>unless a pulldown is used at the output of the LM324.
> > >
> > > Really?
> >
> > National LM324 datasheet (ed. 1994) p.5 graph "Output Characteristics,
> > Current Sinking", 5V supply line crosses the abscissa at about 10mV, 1uA
> > sink.  This is 10kOhms Ro without a load or a wire attached, and it gets
> > worse with lower output voltage.

So what? In the circuit I posted it's divided down by 350:1, so the output
swing affects the threshold by 0.0mV/+10.2mV (~+/- 5mV). Even if the output
only swung from 1.5V (rather than 10mV) to 3.5V you *could* still use +ve
feedback with a 60mV signal, just it would require some parts to get logic
levels at the output. The 10mV divided by 350:1 yields ~30uV. Try working
the numbers through if you don't see how this works- ascii-matic reposted
at end.

The main limitation is that the LM324 is a bit marginal wrt Vos for this
application without trimming (+/-7mV maximum at 25°C, with *no* maximum
TCVos specified. There are much better performing (and much more expensive)
choices.

> > Same datasheet, p.8 "Driving TTL" shows what needs to be done to achieve
> > Vil for a TTL chip input (which sources much less than a mA). A TTL
> > compatible CMOS input will not need such a strong pulldown, but with a
> > wire of some length attached, some noise, a scope probe, and pretensions
> > to make the hysteresis work as expected while pushing the frequency up
> > towards 1kHz a pulldown is required imho. Maybe 240 ohms is drastic.

No pulldown at all is required (or desirable). Vout(low) will be around 10mV,
just as you say above. Normal TTL input level is 800mV for inputs and 400mV
for outputs (400mV of noise immunity guaranteed). BTW, adding a very high
resistance pulldown won't reduce the ~10mV output saturation voltage much,
as it's coming from the *internal* base current (in the 50uA current sink),
not the externally applied current. Adding a pulldown will reduce
Vout(high).

BTW, using an op-amp as a comparator is attractive in certain special
applications, but there are many cases where it is not a good idea.
The internally compensated op-amps have slow response times and slew
rates, but high gain. If the input signal is larger than a few hundred
mV, many parts have stuff connected to the inputs inside, not shown on
the data sheets (since they tend not to show schematics anymore) that
will cause current to flow in or out of the inputs when the differential
voltage gets high. This is of little concern in an op-amp application,
but can affect proper operation of circuits with comparators. In some
cases, even the finest engineer can't determine this in advance as it's
NOT indicated on the data sheet in ANY WAY.

As previously posted, but with values indicated:

                In            |\|
                o-------------|-\          Out
                              |  >--+-------o
                            +-|+/   |
                            | |/|   |
                            |       |
                            |  1M0  |
                            |  ___  |
                    +-------+-|___|-+
                    |       |
                   .-.     .-.
            294K   | |     | | 2K79
                   | |     | |
                   '-'     '-'
                    |       |
                  5.0VDC    GND

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
@spam@speff@spam@spamspam_OUTinterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: To leave the PICList
spamBeGonepiclist-unsubscribe-requestspamKILLspammitvma.mit.edu

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...