Connect with us

Are pull up / pull down mandatory ?

Discussion in 'General Electronics Discussion' started by johnny_cash, Aug 16, 2013.

  1. johnny_cash

    johnny_cash

    39
    0
    Aug 13, 2013
    Hello,

    Let's state about my schema:

    3 Poles switch (SP3T) that could select:
    logical 1 VCC
    logical 0 GND
    external input

    as my input.

    My input then go to a buffer. The buffer ouput is wired on resistor + led to GND.

    I'm wondering if i need pullup (for logical entry 0), pulldown (for logical entry 1). The switch commutation is manual, so user will need to either choose a level or external input, then work with. What is the design rule in such a case ?

    Is 10k suitable ?
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    9,296
    1,886
    Nov 17, 2011
    It would help if you showed a circuit diagram.

    It is always a good idea not to connect a buffer's input directly to VCC or GND but to use a Pull-Up or Pull-down resistor. This will protect the input of the buffer in case of spurious events on the power supply.

    Another point is the third position of your switch: You should ensure that an open input will still lead to a defined signal at the buffer. Therefore you should place either a Pull-Up or Pull-Down on that line, too.

    10k is o.k. for the VCC and GND connections.
    What value is suitable for the third position depends on th eimpedance of your external source. As a rule of thumb use at least 10*Rsource or 10k, whichever is higher.
     
  3. johnny_cash

    johnny_cash

    39
    0
    Aug 13, 2013
    You are right. Here is my diagram, what do you think about it ?
    INPUT LINE A is something that i must not change, and the signal is normally pull'ed before it comes on my connector.

    /!\ EN and D are inversed on my drawing, sorry for the mistake - it is not on final circuit
    /!\ this is a 74HC125, not HCT - which as far as i see is only 5v VCC sorry
     

    Attached Files:

    Last edited: Aug 16, 2013
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    9,296
    1,886
    Nov 17, 2011
    That's fine, but what happens if the switch is in the senter position and nothing is connected? If you use a 100k Pull-Up (for example), any decent driver connected to input_A will easily be able to pull that line low - or vice versa.
     
  5. johnny_cash

    johnny_cash

    39
    0
    Aug 13, 2013
    Ok i'll follow your advice and put a 100k, thank you.
     
  6. BobK

    BobK

    7,631
    1,657
    Jan 5, 2010
    As far as I can see, the two 10K resistors that you call pullup and pulldown are doing absolutely nothing (except wasting 330uA of current.) They are simply 10 K resistors from power to ground. If you wanted a pullup or pulldown it should be on the other side of the switch, i.e. connected directly to the input.

    Bob
     
  7. Harald Kapp

    Harald Kapp Moderator Moderator

    9,296
    1,886
    Nov 17, 2011
    Yup, an oversight on my side. Remove the connections from the switch to Vcc and GND, use only the pull-up and pull-down resistors.
     
  8. johnny_cash

    johnny_cash

    39
    0
    Aug 13, 2013
    Thank you. I totally see the point. Using now a 100k pull down to the right side on the switch and it avoids to have an entry not connected.

    For my knowledge, if i connect an input without pullup/down to a tri-state buffer output in high Z, is it really considered as an open input ?
     
  9. BobK

    BobK

    7,631
    1,657
    Jan 5, 2010
    Yes, when using tri-state you must have a pullup or pulldown. When using open collector you must have a pullup, or you will never see a high state.

    Bob
     
  10. johnny_cash

    johnny_cash

    39
    0
    Aug 13, 2013
    BobK, if i have, let's say eight IO pins from microcontroller, and i want each of them to light a 20mA LEDs if logic level 1.

    I was first thinking driving an NPN transistor with R+LED on C/E , but could i replace this by octo-buffer in opendrain, thus avoiding the transistor stuff ?

    I think it could be better.

    Thank you, JC
     
    Last edited: Aug 18, 2013
  11. BobK

    BobK

    7,631
    1,657
    Jan 5, 2010
    Some microcontrollers can put out 20ma on a pin without a buffer. Which one are you using?

    Bob
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-