Electronic – Placement/location of pull-up/pull-down resistor

microcontrollerpulldownpullupresistors

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.

Best Answer

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.