resister's specifications
Dear members:
Sorry for asking the basics here. I am reading the Educators series book, Micro controllers by Parallax and it is asking students to make their basic circuit with 220, 470 ohms and 10K ohms resisters; mainly working with LED's and push button. How does a resister become pull or push?
I know how to read their color coded values though.
Thank you
Sorry for asking the basics here. I am reading the Educators series book, Micro controllers by Parallax and it is asking students to make their basic circuit with 220, 470 ohms and 10K ohms resisters; mainly working with LED's and push button. How does a resister become pull or push?
I know how to read their color coded values though.
Thank you
Comments
Push or pull refers to which voltage rail (+ or -) the resistor is connected. Pull UP or or push DOWN is the way I remember it. You pull UP to the + rail, and pull DOWN to the - rail. "Rail" refers to the respective power source bus.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Genius is one percent inspiration and ninety-nine percent perspiration."
Thomas Alva Edison
Yes you are right that Push up is attaching the resister to the positive rail. That means you are pulling the circuit high. Making the voltage go up I think. If that is the case, If you place a resister and a LED (in that order) between Vdd and Vss. We have pulled the resister high meaning increasing the voltage?. What are we doing here? I thought you place a resister there so that it resists the voltage and stop the LED from burning. If any thing, we have pulled the current and voltage low. However, the resister's one leg is on Vdd.
Vdd___/\/\/\___LED_______Vss
It is no fun to be new to these things!! I am reading each day with a mission though.
If you plot the Voltage/Current curve of a resistor, it's a straight line -- thus a linear device.
Now, pull-up vs. pull-down vs. 'source' or 'sink'.
The output stage of the PIC chip in the BS2 has two transistors. One connects the output pin to Vdd while the other is turned 'off'. This lets that pin 'source' current from Vdd to the circuit connected to the I/O pin.
Now, when you output a "low", the high-side resistor turns off and the low-side resistor conducts. This provides a 'low-resistance' path to ground -- or enables the pin to 'sink' current from any connected circuit.
Now, when you set that pin as an 'Input', both output transistors are turned off. That I/O pin is then said to be in a "high-impedance" state -- that I/O pin can be used to 'sense' whatever external voltage is imposed on that pin.
Now, if there's NOTHING imposed on that "Input" I/O pin, you have a high-impedance connected to no voltage -- the technical term for this is "antenna" -- it will pick up any and all noise (typically the 60 Hz AC signal). So, you want to connect some 'passive' device (like a resistor) to pull the signal up to +5, or pull the signal down to zero volts.
So there's some vocabulary for you.
So there's some vocabulary for you. Quite a few concepts there!!
If you don't mind, I have follow up questions, please bare with me:
1. What do you mean by, "The output stage of the PIC chip in the BS2 has...."
2. What do you mean by, "when you output a "low",...."
3. When you say the high and low side of the resister, would that mean one leg of the resister connected to Vdd?
This weekend I will have to get with my EE buddy to parse what you have said further regarding sink and sense, but I think I get that.
Now going back to my LED example and confusion. Would you agree that the resister is in pull up state; (+ of LED is connected to Vdd)? At this point it is not connected to any pins like P14 etc. I think I am not "out-putting" any thing, "low" or "high". To my understanding the sink and sense would not apply here. Right?
(can slow me down, but can't stop me)!!
Thanking you in anticipation.
Well, the "output stage" is the circuitry on the PIC chip on the BS2, just before the physical I/O pin.
You "output a low" by saying "LOW 3".
This changes pin 3 into an "Output", and turns on the low-side transistor, providing a connection to Vss.
Now -- driving an LED. Well, an LED is a non-linear device. Basically, once you have about 1.2 volts across it, the voltage will not increase, while the current can increase until the LED burns out. Thus, you need a "current limiting" device in the circuit -- like the resistor.
So, if you use a 470 ohm resistor in series with the LED, you get:
5 volts - 1.2 volts == 3.8 volts. 3.8 volts divided by 470 ohm == 8 milli-amps. So 8 milli-amps flows in the LED, and it doesn't burn out.
Now, the LED will only 'conduct' current in one direction. So you have a choice. You can put one leg of the LED to Vdd, the other to the resistor, and the other leg of the resistor to an I/O pin -- let's use 3 again. Now, when you do "LOW 3", the LED conducts and turns on. When you do a "HIGH 3", the LED has 5 volts on both sides of it and turns off. The I/O pin is "sinking" the needed current for the LED in this configuration -- the current goes through the LED and into the I/O pin.
Or, you could put one leg of the LED to Vss, the other to the resistor, and the other leg of the resistor to the I/O pin. Now, when you do "HIGH 3", the circuit (LED + Resistor in series) has 5 volts across it and turns on. When you do "LOW 3", the circuit has zero volts across it and turns off. In this configuration, the I/O pin is "sourcing" the needed current.
In this configuration, there IS no "pull-up" resistor, the resistor is functioning as a "current limiting" device.
You have a good day. Indebted to you.
On most internet sites and one of the forum members replied as well, "Push or pull refers to which voltage rail (+ or -) the resistor is connected. Pull UP or or push DOWN is the way I remember it. You pull UP to the + rail, and pull DOWN to the - rail. "Rail" refers to the respective power source bus. The aforesaid statement is not in compliance with how you have explained it to me. Is there some thing that I am missing? Thanks and THANKS again!!!
A "floating" line is a wire that has no voltage source on it anywhere. Without a voltage source (like a pull-up or pull-down or some output gate) on the line it HAS no distinct voltage value -- it 'floats', typically picking up noise like an antenna.
I've never heard the term "Push" used in these cases, myself. I think the terms "Source" and "Sink" current are much less ambiguous when talking about output gates, and "pull-up and pull-down resistor" less ambiguous when talking about giving a line a 'default' value.
It would seem that there is some confusion brought on by a number of things, including but not limited to semantics, memory aids, and slang translations, Bruce is right if you assume that he used "push down" as a memory aid. Pull-up and pull-down are in common use for inputs, as Allanlane says. Source and sink are applied to outputs. Since a Stamp pin can be defined as an input or an output, any resistor tied to EITHER rail and an I/O pin will have to be considered with regard to the pin's function.
Just another two cents' worth,,,
Terry
I have read about "giving line a default value" other places as well. Is the default value what the designer chooses to give its line? From my other experiences, mostly in IT, "default" means in loose sense, what it begins with. It seems that the first default is a floating line, which like you said creates noise, so we set it to a zero or 5 volts, while using the pull semantic and calling this as default. Right?
a different person.
Here's my version of it:
A pull-up or pull-down resistor is simply a way to preset how a "switch"
works. Switch meaning either an actual switch, or an I/O pin on the Stamp.
First: High and Low.
There are basicly two things in a binary system like the Stamp. 1 and 0.
1 meaning there is power applied to the line. 0 meaning no power.
(it's a little more complex than this cause there is a threshold that
has to be reached, but that's not an issue in this context).
High is another term for 1 (or power applied to the line) and Low is
another term for 0 (or no power).
The way we do this is by either sending +5 volts along the line for a High
or routing it to ground for a Low.
A basic stamp pin can route signals for you by using the Pbasic commands HIGH
and LOW.
Lets think of the Stamp's I/O pins as switches, cause that's kind of what
they are when your dealing with HIGH/LOW signals.
So lets assume we're just dealing with 1, normal, physical switch.
If we want this switch to normally send a LOW (routed to ground) signal whenever
its not being pressed, we'd use a pull-down resistor and set it up so that when
the switch is pressed, it sends HIGH.
If we want it the other way around, normally HIGH and LOW when pressed, we'd use
a pull-up resistor.
Its the same with the Basic Stamp I/O pins. If you want a pin to "see" HIGH normally
then use a pull-up, if you want it to see LOW, use a pull-down.
Hopefully that helps a bit. If you need more info on the actual wiring of the
resistors, let us know.
Most I/O lines don't need a default value -- they'll be used as one direction only signal conductors. It'll have a BS2 Output high or low on it at almost all times (except when the BS2 is off) and when the BS2 is off it's a "Don't Care" state, because nobody looks at it then.
This brings us to "having multiple drivers on an I/O line". If you have a BS2 output driving a wire HIGH, and another BS2 output trying to pull the wire LOW, and they're both on the same wire at the same time, and there's no resistance on that wire -- then one or the other (or both) of those I/O pins will burn out its driver. Permanent hardware damage, there. So we try VERY hard not to do this.· By the way, this is why the Homework Board comes with 220 ohm resistors on each I/O line -- so SHOULD the newbie experimenter do this, there IS some resistance in the line, which protects the drivers from being burned out.
But, it's sometimes handy to HAVE multiple drivers on a line, especially with the BS2, which can use an I/O pin as an output one moment, then 'turn-around' and use the same I/O pin as an Input one millisecond later. This is also handy when you want to make an "Open Baud Mode" "Party Line" out of wire.
Now, this will work well, IF we have a pull-up resistor of 10K ohms or so 'holding' the line high. Then any driver can come on and 'pull' the line low, and all other 'input' pins can read the state of that line. The designer knows in this instance NOT to tell any of the Outputs to drive the line HIGH, as that will defeat the 'party line'. And if two drivers 'pull' the line low, there's no damage. You may get some garbled data, but no hardware damage.
Change of subject -- what if you want to be able to disconnect some device which is supposed to be sending you input? If you have no "pull-up" resistor on that line, the input goes open, and you start recieving 'noise'. A nice 10 Kohm pull-up resistor will insure you recieve a '1' in that instance, a 'pull-down' will insure you recieve a '0' in that instance -- it's up to the designer to decide which is more appropriate for a "no signal" indication.
Usually, the default value means the value something takes on when
the program starts executing if the designer hasn't explicitly changed it.
Attached is a portion of the Pbasic Help file dealing with the default state
of I/O pins on the Stamp. They all default to inputs.
phil
Post Edited (phil kenny) : 2/27/2008 8:21:14 PM GMT
How we can be arguing the semantics of my memory aid is WAY beyond me!
I can only imagine how BBROYGBVGW would get sliced and diced if it weren't for one of the many memory aids to remember resister color coding.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Genius is one percent inspiration and ninety-nine percent perspiration."
Thomas Alva Edison
Here is another term that is special to me in my line of work, "driver".
Interesting, how you have used it. Yes, I read it some place that a resister saves you from blowing components. "By the way, this is why the Homework Board comes with 220 ohm resistors on each I/O line;" I have not purchased the Homework board. All I have is OEM BS2p. I am waiting for my bread board and then I will try not to send two "drivers" on the same line as you put it. GOOD Caution!
Bruce:
I knew what you meant. "Push" did make whole lot of sense to me. This concept was not a straight shot for me and it was troubling me because no one writes a complete story about any concept on the internet. (Looks like most of it is a cut and paste from the other site). It is forum like this and MOSTLY guys like you, who are showing extra care in explaining matters. I think not was personally directed to you. It was their feedback introducing me to new terms meaning the same.
Ugha:
I have ordered a breadboard from the site that you provided. They have good prices. Interesting that you have called it a switch in your example.
I sincerely thank all of you, including, Forrest, Mike Green and a few others (sorry, I am forgetting your names) that have given me pointers and direction in the past. Next time if some one posts a question on resisters, do direct that inquiry to me. By now I can write a page or two about it. Thanks to you guys.....smile
A healthy dialog among the members provide me ample opportunity to learn!!!!!!!!!!!!!!!!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
writes:
Hopefully that helps a bit. If you need more info on the actual wiring of the resistors, let us know.
1. I am getting the gist of what all of you have contributed. Now I am applying what you and others have said to the example in the Student guide, "What's a Microcontroller?". The example on page 77-79 explains pull down and up resisters. Figure 3-7 is an example of pull down. "When the push button is not pressed, the resister connected to Vss pulls the voltage at pin 3 down to Vss (0 volts)".
Question 1: The default value at Vss was zero before pressing the push button. Why do we need this resister to pull it down to zero? If you let go the push button, should the voltage not go to zero w/o the resister? I think the only purpose of resistors is to avoid a short.
The example in the student guide, has some diagrams, but they have not used the pull terminology in earlier examples. It is a very simple code on P 48:
Question 2:
Do
High 14
Pause 500
Low 14
Loop
Diagram:
Pin 14___/\/\/\___LED____Vss
We have internally connected I/O Pin 14 to Vdd by setting it to High.
Would this be an example of a Pull up resister?
Please let me know what you think?
Thanks