I am trying to use the ATTiny Quadrature Decoder from here. The schematic that I have attached here has two external 10K Pull-up resistors. I have looked into the ATTiny45 datasheet and it seems that the I/O pins already have pull-up resistors that you can enable. My question is why would you need external pull-up resistors if you could just enable internal ones?

ATTiny45 Quadrature Decoder


1 Answer 1


The internal pullup resistors might be considerably higher in value than 10k - perhaps 50k. (I don't have the Attiny45 datasheet handy, but another AVR datasheet lists 20k to 50k for the Atmega328). That might be too high for this application; without the datasheet for the encoder I can't say.

The external 10k resistor will allow faster rise times on those input signals, or cope with the capacitance of longer cables, or allow better logic levels if the encoder has significant "off state" leakage current.

It makes sense to design the schematic and PCB to allow fitting the external resistors (unless size or weight are REALLY critical for your application - you can always leave them off where (perhaps the cables are short) you don't need them.

EDIT : the encoder datasheet tells you precisely nothing useful in this respect. However, IF this sensor is representative, (links to this datasheet) the "output leakage current" is maximum 10 microamps : with a 50 kilohm pullup, that means an output voltage 0.5V less than you expect. I'd probably play it safe and add the resistors : 10k would be fine.

  • \$\begingroup\$ Thanks. This is the datasheet for the encoder that I have. I don't have any problems in adding external pull-up but how should I choose them? Would 10k ones be good in my case? \$\endgroup\$
    – JuliusG
    May 12, 2013 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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