Pull up or down ? I'm confused

Discussion in 'The Projects Forum' started by André Ferrato, Apr 13, 2015.

  1. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    Hi guys, just tell me if i'm wrong. I have the following circuit, the 10k resistor are used to pull down ou pull up the encoder ? The way i see it, is that when the switch is NOT pressed, current goes through the IC from the Vcc passing into the internal resistance and them into ground. When the switch IS pressed, the current will go through the internal resistance and them the 10k resistors ? Because the way i see it, is that for this to make sense we would need a Vcc connection near the switches. Am i wrong ? I'm new to this.

    [​IMG]
     
  2. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,969
    744
  3. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    Why it doesnt need it ? Won't it short if there is no resistor to limit the current ?
     
  4. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    The current limiting is taken care of inside the encoder chip.
     
  5. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    So i take off the 10k resistors and what is happening is that when the switch is NOT PRESSED, there is no path through that pin, so the pin is low ? When i press current goes through the pin and make it high ?
     
  6. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Download and read the data sheet.

    Both the data inputs and address inputs are active-low with internal pull-ups. The switch should pull to ground when asserted.

    With the switch open, the pin should be high. Switch closed pulls the pin to gnd.
     
  7. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    If Vcc is, "up" then those are, "pull down" resistors...which you don't need for this chip.
     
  8. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    Understood. Maintaining the switches opened keeps the input pins HIGH, doesnt that consume more from the battery ?
     
  9. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    Look at the pin description for this device on it's data sheet. It says:
    "Input pins for address/data AD8~AD11 setting
    These pins can be externally set to VSS or left open"

    So you either set them low or they set themselves high if left to float.

    You may be just fine by leaving the 10K resistor in, check if they truly go low when you press a button. If they don't go very close to ground (say .25V max) then replace the 10K resistors with a short.

    "Simon sez" the current will be just fine.

    (Simon is the data sheet.)
     
  10. #12

    Expert

    Nov 30, 2010
    16,257
    6,757
    Voltage is not current. The battery is always, "high" on its positive end, and it doesn't use any power to do that.
     
  11. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    They will draw less power when the pin is floating (and pulled high internally) than when you ground it with the switch (with or without the resistor). But it is designed to operate that way.
     
  12. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    I understood now, i get really lost reading datasheets, and still dont know why they go low when the switch is pressed. Can someone show me some numbers ? Like when i'm using a 12v battery, what happens to be high, what happens to be low. It would be nice just to see. To clarify, i understood the concept.
     
  13. MrChips

    Moderator

    Oct 2, 2009
    12,421
    3,357
    I explained pull-up and pull-down here for digital inputs.

    Morse Code Display Project

    The same principle applies here.

    The HT12 datasheet indicates that the inputs are pulled up internally with 150kΩ resistor (nomimal). Hence you don't need pull-down or pull-up resistors. A simple switch to GND will input a logic LOW.
     
    Last edited: Apr 13, 2015
  14. WBahn

    Moderator

    Mar 31, 2012
    17,716
    4,788
    When you press the switch, you are shorting the pin to the 0V (the "common" or the "ground") which is also the negative side of your voltage supply. Thus the voltage on the pin under those conditions is oV, which is "low". When you release the button, there is a pullup device (could be a resistor but is probably actually a MOSFET) inside the device that pulls the pin toward the Vcc supply voltage, thus taking it "high".
     
  15. André Ferrato

    Thread Starter Member

    Apr 5, 2015
    206
    1
    I see it now, thanks a lot guys :)
     
  16. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,646
    759
    I am afraid the the OP is forcibly trying to label those resistors as "pull-down" (or pull-up) what they actually are not. If he moves them to the pin, then they would be genuine pull down ones.

    Here, what actually pulls down the pin is the switch.

    Edit: coming late, as usual. :(
     
Loading...