Welcome! Log In Create A New Profile

Advanced

pullup / pulldown resistors and how to use them??

Posted by AgeingHippy 
pullup / pulldown resistors and how to use them??
November 28, 2010 11:31AM
Hello All

I am currently designing a stripboard breakout for my pololu stepper driver to replace my burnt out G3 stepper.

I am adding a pulldown resistor on MS1 to ensure I am able to do full stepping if needed. (The docs state there are pulldown resistors on MS2 and MS3 which imply MS1 does not have said pulldown resistor. Brian has had problems full stepping his board and I suspect it is due to the MS1 pin floating when not being pulled in a particular direction.

I am connecting a 3 way DIP switch to MS1, 2 and 3 so I can manually set the micro-stepping level as I like.

My question is should I place a resistor on the 5v side of the DIP switch to protect over current, and if so, how will the pulldown resistor on MS1 and the resistor on the 5v side interact? ie: what will the signal be?

cheers
Re: pullup / pulldown resistors and how to use them??
November 28, 2010 08:12PM
you'll create a voltage divider doing that. As long as the resistances are orders of magnitude apart it shouldn't matter too much, but if your resultant voltage is within the 'grey zone' of input voltages (check datasheet), you'll get similar behaviour to a floating pin.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: pullup / pulldown resistors and how to use them??
November 29, 2010 05:03AM
Hi Triffid

I found an electronics site, allAboutCircuits, where I asked this question. The reply I got was that I should ensure the resistor to the 5v should be 10 times lower than the pulldown resistor. So since the docs talk about internal pull down resistors of 100k on MS2 and MS3 I will put a pull down resistor of 100k on MS1 and then 10k resistor on the 5v side.

I also was recommended to put the 'pullup' resistor on each of the lines coming out of the dip switch rather than for all 3.

I wanted to do something like this (not showing the 100k pulldown resistor on MS1 for now)
          |---DIP---MS1
5v--10k---|---DIP---MS2
          |---DIP---MS3

but was recomended to do this
    |--10k------DIP---MS1
5v--|--10k------DIP---MS2
    |--10k------DIP---MS3

Is it really necessary for a separate resistor on each pin?

As I am trying to build this board with the same footprint as the G3 stepper drivers I am a little pushed for space.
Re: pullup / pulldown resistors and how to use them??
November 29, 2010 09:03AM
If its of any help, on the RAMPS it appears they have connected MS1, MS2 and MS3 to 5V and use a 100k pull down resistor (earthed) on MS1 only. This setup seems to be working fine for people using 16th microstep resolution.
Re: pullup / pulldown resistors and how to use them??
November 29, 2010 10:16AM
Hi Capo

Yes, I have seen some circuits that simply run to raw 5v, but the pololu docs do recommend using a resistor to prevent too much current running through them in a fault situation..
Re: pullup / pulldown resistors and how to use them??
November 29, 2010 04:45PM
AgingHippy,
We are talking about levels of protection here. A normal input pin for any microchip should only take fractions of a milliamp whether being driven high or low. It is common practice to tie unused inputs on a quad gate to ground with no resistor. On chip selects, it is often tied directly to +5V or ground ass appropriate. However, if the stepper shorts out internally and becomes damaged, then it might draw more than nano-amps. For the unusual case, you add a 1K, or 10K, or 100K resistor in series to guarantee that no large current will ever flow. Adding a 100K pull down, and a DIP switch with a 10K pull-up resistor provides further security. Adding a pull-up resistor per pin provides the ultimate in safety and isolation incase very strange, or very bad things happen. For one of the computers that I work on that is flown into orbit and built into the Space Station, I would expect that EVERY pull-up or pull-down resistor would be isolated per-pin so that any ESD damage, shorting, over current, voltage spike, meteorite impact, etc would limit its damage as much as possible. But for non-life critical applications in non-highvoltage environments a single pull-up feeding the DIP switch is more than enough safety.

I hope this helps.

Mike
Re: pullup / pulldown resistors and how to use them??
November 29, 2010 05:41PM
Hey Mike

It most certainly does!

perspective cool smiley

I guess I am just too nervous about all this.

Thanks
Sorry, only registered users may post in this forum.

Click here to login