Pull Up/Pull Down Resisters

Hello Experts,

I just started my journey with Arduino.

I got hold of starter kit and did couple of exercises like Get to know your tools, Spaceship interface, Love-o-Meter etc. The circuits used in these exercises connect some resister to ground and some to 5v.

I am trying to understrand, how do we decide if we have to connect resister to ground or 5v. Also known as Pull Up/Pull Down resister.

I am not able to get the concept of using one in our circuits!!

-Thanks

Why is switch connected to resister in some of the circuits? How do we decide, if we need such pull up or pull down resistors?

Shashank

It's your choice: it depends if you want the line to go high when button is pressed (pulled down most of the time) or go low when pressed (pulled up most of the time). It's mostly a matter of how you want your logic to work.

That said:

  • It's easier to implement the Arduino built-in resistors, and those are only pullUP
  • It seems the prevailing wisdom is to have pullups rather, and then only a ground wire to the sensor rather than a 5V line in case of shorts.

stilwalli:
Hello Experts,

I just started my journey with Arduino.

I got hold of starter kit and did couple of exercises like Get to know your tools, Spaceship interface, Love-o-Meter etc. The circuits used in these exercises connect some resister to ground and some to 5v.

I am trying to understrand, how do we decide if we have to connect resister to ground or 5v. Also known as Pull Up/Pull Down resister.

I am not able to get the concept of using one in our circuits!!

Both will work, but pullup resistors are much safer (electrically speaking). Less chance of short-circuits. They're the best choice.

Arduinos have built-in pullup resistors. No need for external ones.

Just use "pinMode(pin, INPUT_PULLUP);", job done.

Hi Shashank

This may help ...

Regards

Ray

Also try reading this:-
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html