### Author Topic: pull up resistors?  (Read 6659 times)

0 Members and 1 Guest are viewing this topic.

#### JesseWelling

• Expert Roboticist
• Supreme Robot
• Posts: 707
• Only You Can Build A Robot!
##### pull up resistors?
« on: November 11, 2006, 01:16:35 PM »
Just a question but have you ever done a tutorial on pullup or pulldown resistors and their function.
I'm a bit fuzzy on when they are needed and when they arn't

• Supreme Robot
• Posts: 11,702
##### Re: pull up resistors?
« Reply #1 on: November 11, 2006, 01:21:11 PM »
to be honest im not really sure either when to use them. ive never needed them. the microcontroller manual always tells me not to when I check for my application . . .

anyone know?
« Last Edit: November 11, 2006, 01:54:00 PM by Admin »

#### dunk

• Expert Roboticist
• Supreme Robot
• Posts: 1,086
##### Re: pull up resistors?
« Reply #2 on: November 11, 2006, 03:00:35 PM »
so a lot digital electronics don't actually give you a nice output logic level of "1" or "0".
when such a device is outputting a "0" it forces the pin to 0Volts.
when it is outputting a logical "1" it allows the pin to sit at whatever voltage it feels like. if you want to make sure this is +5Volts (or whatever a logical "1" is on the device in question) then you need to connect that pin to +5V via a pull-up resistor.
the value of this resistor should be quite high as the device has to still be able to pull the pin back down to 0Volts. too low a value of resistor and you will draw too much power from the devices output pin.

it's exactly the same when you connect a simple push switch to a devices input. the switch will connect the pin to 0V when the switch is pressed but you need the pin to go to +5V when you let go. the simplest way to do this is use a pull up resistor between the input pin and +5V.

many microcontrollers have pull up resisters built in to their inputs.
i know on most microchip PICs one of the input registers has weak pull up resisters you can enable in software so when you connect such an output device to it you don't need additional physical resistors.

i've never found a device where i have had to use pull down resistors but i'm guessing the theory is the same.
do you have an example?

dunk.

#### Kohanbash

• Supreme Robot
• Posts: 430
##### Re: pull up resistors?
« Reply #3 on: November 11, 2006, 07:22:21 PM »
Pulldown is sometimes used on IC's for example on a possitve triggered Enable pin when you want to insure that it has logic 0 so that it remains enabled.
this is critical on RAM chips since if not held corerectly it can erase the saved content
Also depending on the RAM you might need to tie ports high so that data dosent get erased when writing to it.

Robots for Roboticists Blog - http://robotsforroboticists.com/

#### Militoy

• Expert Roboticist
• Full Member
• Posts: 111
##### Re: pull up resistors?
« Reply #4 on: November 14, 2006, 03:05:43 PM »
Pull-up resistors (or pull-down resistors for active high gates) are almost always used in high speed logic circuits. Their purpose is to force a definite logic state of “1” (high) or “0” (low), after the active logic signal is removed, rather than allowing parasitic leakage currents and PCB capacitances to affect the logic state in a random manner. In bipolar (TTL) logic, where 5VDC is a nominal “1” state, a typical value for a pull-up resistor would be between 1K and 10KΩ. In CMOS logic, much higher resistor values are typically used, because of the higher impedance of the logic gates, and the lower currents involved. Some micros do have weak pull-up resistors on several gates, but most prudent designers will augment these with additional parallel resistance (though not so much as to slow down the gates by demanding too much pull-down current).

#### JesseWelling

• Expert Roboticist
• Supreme Robot
• Posts: 707
• Only You Can Build A Robot!
##### Re: pull up resistors?
« Reply #5 on: November 14, 2006, 03:36:44 PM »
Here is my issue. I've got a Maxbotix Sonar Sensor. It outputs serial inverted which is to say 0v is logic 1, and 5v is logic 0.
My atmell AVR128 only has a regular UART (5v logic 1, 0v logic 0). I do have some 74LS05 logic inverters but I think I need a pullup resistor so that the line stays high (or low I havn't figured it out yet) when not in use (eg not being driven by the MaxBotix Sonar Sensor). I don't need to send any thing to the the Sonar Sensor...just recieve the acurate ranging data on the serial line. I Can't use the PWM of the Sonar because no more timers are available for me to use on the AVR and I don't want to deal with use the noisy analog because of the time lag in the readings.

Any one deal with this kind of thing before?

• Supreme Robot
• Posts: 11,702
##### Re: pull up resistors?
« Reply #6 on: November 14, 2006, 05:43:03 PM »
ive used sonar without knowing what pull-up resisters were . . . so you probably dont need them.

the sonar pulse line will never be random - the circuitry goes high only when receiving a pulse, otherwise it is low.

any possibility you could use a single interrupt for multiple components? ive used 3 sonar on a single interrupt . . . an interrupt could ignore its normal function if it is called when your main() is in the read sonar loop . . .

#### JesseWelling

• Expert Roboticist
• Supreme Robot
• Posts: 707
• Only You Can Build A Robot!
##### Re: pull up resistors?
« Reply #7 on: November 14, 2006, 07:42:55 PM »
I think you misunderstood me. But I have it figured out so no worries

#### Militoy

• Expert Roboticist
• Full Member
• Posts: 111