Pull up resistor value for low power application

Discussion in 'General Electronics Chat' started by Mayuri1234, Feb 17, 2017.

  1. Mayuri1234

    Thread Starter New Member

    Apr 7, 2014
    4
    0
    I am developing a battery powered device. In my circuit, there is a dip switch which is used as an input to micro controller pin. The supply to the switch is 3.3 v. Can I use a high value pull up resistor to minimize current in the circuit? Right now, the resistor value is 200k. Can I increase it to 1 Mega ohm.

    Regards,
    Mayuri
     
  2. AlbertHall

    Distinguished Member

    Jun 4, 2014
    2,662
    540
    What is the leakage specification for the pin on the uC that you are using?
     
  3. hp1729

    Well-Known Member

    Nov 23, 2015
    2,232
    249
    How long will it take you to try it and see if it works?
     
  4. MrChips

    Moderator

    Oct 2, 2009
    12,882
    3,543
    How often is the DIP switch closed vs how often it is open? Is it 50:50?
    What is the function of the DIP switch?
    Can you eliminate the switch?
     
  5. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,523
    1,649
    Got a spare pin? Connect the pull up to that instead of Vdd and only enable it when you are actually reading switches.
     
    AlbertHall likes this.
  6. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,835
    1,337
    You don't say explicitly, but is sounds like the switch is pulling an input line down to GND, and the line is pulled up to 3.3 V. If so, power is lost in the pullup only when the switch is closed (other than the uC logic high input current). As above, what is the on/off duty cycle of the switch, on time per hour, on time per week, etc.

    One consequence of a higher pullup value is that the circuit input impedance when the switch is open is higher. This makes it more susceptible to conducted and radiated interference that can cause false inputs, and ESD events that can lower the long-term reliability.

    ak
     
  7. AlbertHall

    Distinguished Member

    Jun 4, 2014
    2,662
    540
    As this input is from a DIP switch, those problems could be eased by having a capacitor in parallel with the switch.
     
  8. MaxHeadRoom

    Expert

    Jul 18, 2013
    11,152
    2,656
    What micro controller?
    Many Picmicro for e.g. have weak pull-ups enable register for switch type inputs.
    Max.
     
  9. AlbertHall

    Distinguished Member

    Jun 4, 2014
    2,662
    540
    The weak pullups might typically be around 250uA so equivalent to about 13kΩ. Not much help for the TS there.
     
  10. Picbuster

    Member

    Dec 2, 2013
    396
    53
    Depending on switching time you can use one high 1 M Ohm resistor to 3v3 and put a cap 100nF at input to gnd.
    the switch is has a serial resistor and is connected at input pin ( 100Ohm to dissipate power stored in 100nF.
    This takes time to load the 100nF not to be used in fast switching applications.
    the input current 3v3 / (10 ^ 6 + input impedance mpu) < 3.3 micro amp.
    if you do the opposite and load the cap via 1M the cap might load itself with noise resulting in a high level ( activate the circuit).
    Resulting in a resistor needed and you will create a current again. ( bitter or kicked current 'thou' shall use).
    Picbuster
     
  11. Sensacell

    Well-Known Member

    Jun 19, 2012
    1,240
    292
    Heavily in favor of the switched pull up idea using the extra IO pin here.

    - basically zero standby current
    - fast, you can poll the switch at high speed
    - good noise immunity
    - no extra parts
     
  12. LesJones

    Member

    Jan 8, 2017
    230
    50
    If the dip switch is close to the microcontroller then this variation on post #11 may work and avoid the use of an extra I/O pin. The internal pullups could just be enabled at the time when the I/O pin was read. The disadvantage would be that for the rest of the time the pin could be floating. I don't know if adding high value pull down resistors would draw any significant current.

    Les.
     
  13. Sensacell

    Well-Known Member

    Jun 19, 2012
    1,240
    292
    Microchip app notes always say not to leave inputs floating for low power applications - they draw more current that way.
     
  14. AlbertHall

    Distinguished Member

    Jun 4, 2014
    2,662
    540
    So set the switch pin to output '0' when not reading the switch, set it to an input and that will auto magically also turn on the weak pullup :)
     
    ErnieM likes this.
  15. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,835
    1,337
    That only works if the switch can be polled, or the application knows when to expect a switch change. If the switch is completely random, or driving an interrupt, I think the pin-driven pullup has issues. Need more info from the TS.

    ak
     
  16. MrChips

    Moderator

    Oct 2, 2009
    12,882
    3,543
    TS did say it is a DIP switch which I would assume is for some kind of mode selection. I like the spare output pin solution.
    The other thing to mention is that in a battery operated low-power application one ought to be looking at all methods of reducing power draw:

    1) Use ultra low-power components
    2) Go to slower clock speed
    3) Power down all unused modules
    4) Sleep or Stop mode where applicable

    We're talking sub-micro-amp drain currents here.
     
  17. Tonyr1084

    Active Member

    Sep 24, 2015
    752
    145
    It's been 35 hours since he posted his question. I wonder if he's been abducted by aliens seeking to learn more about humans and their electronics.

    He said he has a DIP switch connected to 3.3 volts. A DIP is either open or closed, so if it's connected to 3.3 volts then what's the need for a pull-up resistor? If the switch is closed (on) then there should be 3.3 volts applied to whatever pin he's connected to. If it's open (off) then that pin should be floating in the ether somewhere between on and off. If anything he'd want a pull-down resistor - that is if I read his intentions correctly. In that case a 1 meg ohm pull-down would hold that pin to zero volts. 100K or even 10KΩ shouldn't present a problem. 3.3 volts on 10KΩ - that's 0.00033 amps. (330 µA) When it's on it will be drawing 11 mW.

    I don't get what he's attempting to do. If his switch is truly a DIP switch then it's either open or closed. Off or on. If it's connected to 3.3 volts then it's either 3.3 volts or no volts. (respectively)

    A single pole double throw switch would eliminate the need for any resistors. One throw to 3.3 volts, the other to ground. The common to the pin in question. Which he hasn't told us about yet.
     
  18. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,523
    1,649
    Quite true.

    Unfortunately DIP switches do not come in DPDT versions.
     
  19. AlbertHall

    Distinguished Member

    Jun 4, 2014
    2,662
    540
    Only single pole, double throw needed. Here's one.
     
  20. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,523
    1,649
    Oops, meant SPDT.

    Nice find.
     
Loading...