# Placement/location of pull-up/pull-down resistor?

I have connected a microcontroller GPIO pin, which is intended to be an output, to a DC-DC converter's active high Enable input pin. Since this pin is active high, and because I do not want this converter to be ON at power up or before it is required, I have used a pull-down resistor on this line to keep it disabled.

I am slightly confused as to where should this pull down resistor be ideally placed. Should it be placed near the GPIO pin or the Enable pin?

Same question for pull-up resistor, in the case when Enable is active low and I have to use a pull up on the line.

• It doesn't really matter, but it may be clearer to place it close to the input it is pulling up or down. – pjc50 Nov 5 '14 at 9:20
• Thanks for the reply. Its current location is near DC-DC converter's Enable pin, as you have mentioned. So I will leave it there. By the way, I think it is more of an "intuition" case rather than logical. I could be wrong though. – LoveEnigma Nov 5 '14 at 9:43
• I find it difficult to imagine that it's going to make any real difference. A pullup resistor is typically on the order of 5-10K ohms. If we assume a 10% resistor, that means the tolerance is +/- 500-1K ohms. It would take a ridiculously long trace before you've change the resistance by even close to that amount. IOW, you could easily build the same circuit twice, and put one resistor next to the input pin, and the other as far away from it as possible, and one that's farther way could still (easily) have a "stronger" pull-up/down than the one that's closer. – Jerry Coffin Nov 5 '14 at 22:26
• Thanks for your inputs, Jerry. I understand you mean having two PU/PD on the signal, is it? – LoveEnigma Nov 12 '14 at 5:36

Ideally, there should no apparent difference, but I always put this "guard" resistor close to the pin which it will guard. There are two reasons:

1. If you put the pull-down resistor close to your MCU, and have a long long trace from your MCU to the converter. If your converter's enable pin will source some current, the current will flow through the long trace and your pull-down resistor to ground. If the trace impedance is high, your converter may see a high level at the enable pin! Whatever, it will reduce your noise margin.

2. If your MCU is far from your converter, put the resistor close to the converter will make the circuit more clear. And once you have problem with your board, this will make the debugging work easier.

• Thanks for the reply, diverger. But how can a pin that is input source current? Do you mean leakage current or noise? – LoveEnigma Nov 5 '14 at 9:59
• Yes, maybe leakage, it depend on the internal circuit. In some cases, when you apply a low level at the pin, it may have current flow out of the pin, please read the docs carefully. – diverger Nov 5 '14 at 10:11
• You can just think all the traces have some impedance, if you have a long trace to your pull-up, then the total pull-up will be $R_{p} + R_{trace}$, and if your pin has internal impedance $R_{in}$, the trace impedance will make the pull-up more weaker, that is, the voltage on your pin will be lower. Although the difference may be small. So, i always put PU/PD closer to the pins which need them. – diverger Nov 5 '14 at 13:09
• Yes, in this case, i will place it on board B too. In this manner, i can make the transistor on board B has fixed and known state on it's base, even when A and B lost their connections. – diverger Nov 12 '14 at 5:25
• Ok, in this case i'll put the pull down still at the B board. But another question, if you have not any pull down at diode's cathode, that is, the base of the BJT, if your MCU outputs a low level, than your diode will off, then where the BJT's base charge go (assume it's a NPN) ? It will make the shutoff longer. – diverger Nov 12 '14 at 6:27