I'm trying to figure out why my attiny85 (on a digistump developer board) draws around 3mA at 3V when setting up a pin as INPUT and connecting it straight to ground. The current is measured with a multimeter between said pin and ground (thus only the current sunk by that pin is measured). I would assume that without a pullup resistor it would consume a lot less but it seems, regardless if I configure the button as INPUT or INPUT_PULLUP the current is the same.


void setup() {
  pinMode(3, INPUT);
  //According to datasheet pin needs to be low to disable internal pullup
  digitalWrite(3, LOW);     

void loop() {

I would like to design a circuit that can detect a normally closed switch being opened, but the idle power consumption is way to high at the moment. I was planing on using a very high external pullup but it seems I can't disable the internal one...

  • That seems odd, and not expected. The inputs on a CMOS device like an Arduino should be capacitive, and draw almost no current once they settle on their state. (It takes a small amount of current to drive the capacitor on the input to the high state, but then once it's charged, current flow should drop to the leakage current of the capacitor.)
    – Duncan C
    Commented Dec 10, 2019 at 18:22
  • Could you put the pin through a 10K resistor to ground when your switch is closed? That should be enough to pull the pin low, but greatly reduce the current flow.
    – Duncan C
    Commented Dec 10, 2019 at 18:22
  • You write that the "attiny85 draws around 3mA", so did you measure the current that is sunk by the pin or is it the current consumption of the entire chip? Does it change when you don't configure anything? Also, measuring current to detect the state of a switch seems way too complicate, you could probably read the voltage level at the switch directly.
    – Sim Son
    Commented Dec 10, 2019 at 18:57
  • 3 mA is a normal current draw for an ATtiny85 @ 3 V and 8 MHz. This has nothing to do with the input pin, it's just the current the AVR core needs to execute whatever instructions you ask it to execute. Commented Dec 10, 2019 at 19:29
  • 1
    On your devboard PB3 is connected to +5V over two resistors (1.5 k + 66.5) Ohms. That's the reason for the high current. Not the PU Resistor. ;-) See the scematics s3.amazonaws.com/digistump-resources/files/… (5/1560 = 0.0032051) Commented Dec 11, 2019 at 16:30

3 Answers 3


The schematics of the digistump developer board shows that PB3 is connected to +5V over two resistors (1.5 k + 66.5) Ohms. That's the reason for the high current (5V / 1560 Ohm = 0.0032051 A). See the schematics https://s3.amazonaws.com/digistump-resources/files/97a1bb28_DigisparkSchematic.pdf

As you mentioned in a reply on my comment above, using PB2 shows the expected behavior of an AT85 IO pin.


Input pin only needs 1uA to pull it high or low.

What else is hooked up?

The internal pullup, 30K to 50K, would only draw 0.1mA.

Turn it on and try it, measure the Vcc current with the pin open and then Gnd'ed.

  • I came to the same conclusion that it should only draw 0.1mA with those 30-50k internal pullups. Also I probably wasn't precise saying the attiny draws 3mA - rather that pin sinks 3mA when measuring with a multimeter between the pin and ground. Now that I write this - I will have to check my multimeter, maybe it's measurement is simply off I haven't checked switching it to the µA setting!
    – schneida
    Commented Dec 11, 2019 at 13:09

I removed the soic IC from board and used it on my own board. I mounted two identical SMT boards, one with a generic chinese pdip and the other with the soic removed, both chips soldered, and I used the same battery supply. The soic from digispark consumed 6 times more current than pdip, in sleep mode: 812uA vs 137uA. I suspect of fake chips. In this base, it is hard to speculate.

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.