What are "pull ups" and "Schmidt Triggers"?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I guess these are probably pretty basic questions... my sister-in-law
is an EE student working on a PICMicro microcontroller project.  She
asked for my help with it since I've got quite a bit of
(microprocessor) assembler programming experience.  Well, as I'm sure
you know, microcontrollers and mircoprocessors are quite a bit
different from each other, but I'm fascinated by hardware (even though
I know less than nothing about it, being a former computer science
major), so I'm having fun trying to learn this stuff.

I bought the Predko "Customizing Microcontrollers" book and I'm about
1/4 of the way through it - the assembler part makes intuitive sense
to me, but of course the EE part is throwing me off.  I understand the
basics, but Predko keeps referring to pull-ups and Schmidt triggers,
and I can't figure out what he's talking about.

I guess a pull-up is a resistor that you place in front a voltage
source (e.g. a battery?) to cause current to flow to it... but I
thought resistors caused current *not* to flow (or to have a hard time
flowing).  What does this "pull up" thing do?

Schmidt triggers I really don't understand... I have a pretty good
idea what diodes and transistors are (diodes are N-doped silicon and
P-doped silicon that cause current to only flow in one direction, and
transistors are combinations on N & P doped silicon what cause current
to only flow veritcally when another current is applied horizontally
or vice versa), but the Schmidt triggers he uses all the time are
confusing to me... what are they and what do they do?

Thanks for taking the time to answer some probably very beginner

Re: What are "pull ups" and "Schmidt Triggers"?
Both pull-ups and Schmitt triggers are techniqes for dealing will
connections to the outside world.
You have a couple of common problems when you hook a switch (e.g. push
button) to a digital input:

1) the usual way of using a switch is to connect one side to ground and the
other side to your digital input. A pull-up resistor supplies a little
current to "pull" the input node voltage up to Vcc when the switch is not
closed. You use a fairly large resistor - 10k (10,000 ohms) is typical. A
pull up resistor is a good idea whenever you have a node that might "float"
(become disconnected from anything in your system). A floating pin can wind
up at any voltage: maybe "low", maybe "hi", or (worst) maybe in between
where it can actually damage the digital input.

2) A schmitt trigger is used to deal with the possible "in between" voltage
at an input. Some digital inputs will oscillate if the input voltage is near
their transistion voltage. A Schmitt trigger uses hysterisis (a small amount
of positive feedback) to make sure that this doesn't happen.

Quoted text here. Click to load it

You're welcome You're really delaing with EE, here. A good understanding of
Kirkoff's laws will go a long way in helping you get this stuff. I turned up
this page in google:

http://ffden-2.phys.uaf.edu/211.fall2000.web.projects/Jeremie%20Smith/page3 .


Re: What are "pull ups" and "Schmidt Triggers"?
As you know logic is either 5v or 0v, and the pullup keeps the inputs tied up
at 5v instead of just flappinhg around in the breeze adding garbage and to the
other digital dat being read.data

If the signals dont have nice clean steep edges on them, fast logic might
interpret a little noise glitch on the input edge as several fast pulses, so
Schmidt figured out that an inverter with some positive feedback would switch
back and forth, but with a couple of volts of hystersis in a window about about
2 1/2 volts. Works good for cleaning up external signals.

Re: What are "pull ups" and "Schmidt Triggers"?

Quoted text here. Click to load it

Basically, a Pull-Up Resistor is connected from the positive voltage
source to a digital input pin to "pull" the voltage on this pin up to
+V. Open input pins on CMOS digital inputs are "floating" (oszillating)
otherwiseodue to its very high input impedance (resistance) and this
would cause a unnececary power consumption.
You cannot connect the input pin directly to +V, if you connect a output
signal line from a previous stage: You have a short line if the output
signal goes to 0V.

Quoted text here. Click to load it

A Schmitt Trigger is a special digital circuit, at which avoids the
"sharp switching point" of a ordinary digital input stage. They are
useful for example if an input signal rise or fall time is very slow.
More details in every good digital design book.

Quoted text here. Click to load it

No problem, but I recommend some reading of basic digital gate design,
than things would become clear soon.


Bernhard Roessmann
Don't Fear The Penguins!

Re: What are "pull ups" and "Schmidt Triggers"?
If you're in a bookstore, you might take a look at "Designing Embedded
Hardware" fromO'Reilly. There's an "Electronics 101" chapter that might help
with resistors and capacitors. Not a great book, but not bad.

Re: What are "pull ups" and "Schmidt Triggers"?
On 18 Jul 2003 11:09:16 -0700, snipped-for-privacy@travelocity.com

Quoted text here. Click to load it

"Pull up" is a broad term.  But as a general guide (which isn't
perfect), it refers to a resistor, MOSFET, or even a more
complex circuit which is used to 'drag' a signal line towards a
voltage rail.  Yeah, I know.  That doesn't say it, right?

Well, imagine a simple pushbutton switch connected to an input
pin of a micro.  You tie one end to a "0" (ground, say) or else
to a "1" (Vcc, say), and then hook up the other end to the input
pin.  Right?  But what's the value the micro will read if the
switch isn't pressed?  Pressed, yes.  We know.  But unpressed?

Adding a resistor with one end hooked to that input pin and the
other end to the opposite symbol than the switch is tied to, a
"0"-ground for example if the switch is hooked to the "1"-Vcc,
makes it a sure answer.  In other words, if the switch isn't
activated, then the input will, through the resistor, "see" the
other value.  That way, you have a sure fire result either way.
The resistor "pulls down" or "pulls up" to the opposite
condition that the switch does, when activated.

In CMOS, because the inputs are so high impedance and can almost
"see" random radio waves floating in the air around you, it's a
good idea to tie all unused inputs through a resistor to either
ground or Vcc, or something nice and solid.  Otherwise, that
input might float from seeing a "0" to seeing a "1" and then
back again, almost at random and at lightening speeds.  And
this, in CMOS, can suck up a lot of current.

Quoted text here. Click to load it

Schmidts are used for "shaping up" an input and/or handling some
noise in the process.. and includes some hysteresis to do that.
Hysteresis is a simple idea.

Let's say there is some noise riding on top of a signal that is
rising from 0V to 5V and that the signal is rising along some
slope.  The noise is mostly in some +/-0.3V band, let's say.
We'll select a threshold of 2.5V, too.  As the voltage nears the
2.5V, the noise will sometimes kick it over the 2.5V and the
input will think it sees a "1".  But almost immediately, noise
will diminish or head in the other direction and the signal will
look again like a "0".  So as the signal rises near and then
through the 2.5V line, the input will occasionally see and then
more frequently see a "1" appearing.  But it will be a noisy
conversion and there will be a lot of "0"/"1" transitions back
and forth as the voltage passes through the line.

Now, imagine we pick two voltage values, 1V and 4V.  If the
input has decided that there is a "0", it then requires that the
voltage go through at least 4V before it changes its mind and
decides it is a "1".  And once it decides the input is a "1",
then it requires that the voltage go back though and below 1V
before it changes its mind again and decides it is a "0".
That's the "hysteresis" part of it, the 1V and 4V guiding rules.

Now, the noise isn't really a problem.  The input holds its
interpretation of a "0" until the voltage clears 4V.  By then,
now that it is considered a "1", it's *very* unlikely that noise
will cause it to suddenly drop back below 1V so that it can
again appear to be a "0".  Similarly, those considerations work
well in the other direction.

This detail can also work very well in shaping a sine wave which
has a little noise on it, for example, into a clean square wave.

Schmidt triggers with hysteresis can be built with just two BJT
transistors, using positive feedback.


Re: What are "pull ups" and "Schmidt Triggers"?
On Fri, 18 Jul 2003 19:30:28 GMT, Jonathan Kirwan

Quoted text here. Click to load it

Just in case you are wondering what one might look like:

                    +V           +V
                    |            |
                    |            |
                    \ R3         \ R4
                    / 25k        / 15k
                    \            \
                    |            |
                    |   220k     +--------------> OUT
                    +---/\/\---- | ----,
                    |   R2       |     |
                    |            |     |
          220k    |/c Q1      Q2 c\|   |
  IN >----/\/\----|   NPN    NPN   |---'
          R1      |\e   2N3904   e/|
                    |            |
                           \ R5
                           / 100

With +V=5V, this will switch OUT to about 100mV when IN reaches
about 0.4V and will switch OUT to 5V when IN reaches about 1.5V.
That's just a bit over 1V of hysteresis.  It doesn't match TTL
or CMOS levels, but it gives you an idea.  (R5 can be simply
dropped, as I just added it to tell you about something else.)

If you boost R5 up to, say, 5K, then the two thresholds are 1V
and 3V or so.  However, the output won't get close to 0V,
anymore.  It will toggle between almost 1.5V and 5V, instead.

Anyway, this is just one example.  It uses positive feedback.
See if you can trace out how that happens.


Site Timeline