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.

  • 7
    \$\begingroup\$ It doesn't really matter, but it may be clearer to place it close to the input it is pulling up or down. \$\endgroup\$ – pjc50 Nov 5 '14 at 9:20
  • \$\begingroup\$ 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. \$\endgroup\$ – LoveEnigma Nov 5 '14 at 9:43
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – Jerry Coffin Nov 5 '14 at 22:26
  • \$\begingroup\$ Thanks for your inputs, Jerry. I understand you mean having two PU/PD on the signal, is it? \$\endgroup\$ – 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.

| improve this answer | |
  • \$\begingroup\$ Thanks for the reply, diverger. But how can a pin that is input source current? Do you mean leakage current or noise? \$\endgroup\$ – LoveEnigma Nov 5 '14 at 9:59
  • 2
    \$\begingroup\$ 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. \$\endgroup\$ – diverger Nov 5 '14 at 10:11
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – diverger Nov 5 '14 at 13:09
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – diverger Nov 12 '14 at 5:25
  • 1
    \$\begingroup\$ 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. \$\endgroup\$ – diverger Nov 12 '14 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.