ATtiny85 not working on battery power

Hi,

I'm trying to get my Attiny85 to run on battery power but I cannot seem to do it.

It runs just fine when plugged into the USB programmer and functions as expected. However, placing the attiny85 onto the breadboard and giving it some power does nothing. I've tried using 2 AAA batteries to supply it and I've tried a coin cell CR2032 all to no avail.

The code is a simple blink sketch:

void setup() {
  pinMode(1, OUTPUT);
}

void loop() {
  digitalWrite(1, HIGH);
  delay(500);
  digitalWrite(1, LOW);
  delay(500);
}

Here is a picture of the set up:

Now here we have the Attiny85 in the programmer board (HW-260), hooked up to the laptop and the program executes as expected:

I'm quite new to all this so I don't have much clue about what is going on. Also, I currently do not have access to a multimeter.

I've even tried flipping the LED.

Any advise would be greatly appreciated.

Where is the current limiting resistor for the LED?

Failing to use one can destroy the processor chip. Try 1K Ohms.

I have inserted the 1k Ohm resistor. The LED made a very dim flash but still doesn't blink.

Still blinks plugged into laptop though.

You also need to solder header pins to the processor board. The holes in the board do not otherwise provide reliable connections.

There are plenty of good soldering tutorials on line (e.g. Adafruit and Sparkfun).

Edit: I was looking at the wrong photo, but I can't tell from either photo how the processor chip is mounted in the breadboard.

Is there anything else I could do?

I also do not currently have access to a soldering iron.

Double check whether the processor chip is correctly inserted in the breadboard and is making good connections. A multimeter with continuity check is an essential tool for this hobby. So is a soldering pencil.

The processor chip requires a 100 nF bypass capacitor across power and ground, as close to the chip as possible.

1 Like

You could use the led to check if the attiny get's power at all, by connecting the led (via a resistor) to the plus and minus pins of the attiny.

There should be a 0.1uF ceramic decoupling cap between Vcc and ground. And a 10K resistor from reset (physical pin 1) to Vcc may help.

Plugging the 10k resistor between reset and Vcc doesn't appear to do anything. I do not have a ceramic decoupling cap on hand currently.

The LED does turn on, so the attiny is getting power.

It is odd, but I have been bitten by bad connectors in the past. e.g. jumperwires that were not crimped properly. I also see you have an extra adapter plate for your attiny. I would swap all the wires one by one, lose the adapter plate and insert the attiny directly in the breadboard and even move everything to a different position on the breadboard.

veel succes ermee!

That battery pack is 3 volts. You need to set the Attiny85 fuses to disable the brownout feature.

@hmeijdam

I changed locations on the board, tested all the wires using the battery pack and LED. I removed the adapter plate too, but I don't think its the easy since it works fine even plugged into the programmer. Thanks for the suggestions.

How exactly can I do this? I looked around online and I'm quite unclear.

If you use Dr Azzy's core for the ATtiny85, you should be able to set it there, Look under the "Tools" menu in the IDE

Ok, nice thanks I will try.

UPDATE:

So I have another Attiny85 digispark board and I plugged the 5v output up to the attiny and it still doesn't work even with 5 volts. Yet it still works perfectly when plugged into the programmer.

Any idea why the attiny85 might totally refuse to work on power even from another attiny board?

When it all works correctly, is the Attiny85 removed from the breadboard and plugged directly into the programmer ?
If so, the review all the responses in this thread related to quality of connections, decoupling capacitors etc.
It is, anyway, unusual to socket an integrated circuit on a breadboard. Remove the socket and plug the chip directly into the breadboard.

Yes, when working correctly the Attiny85 is plugged into the programmer.

The connections all seem fine so it is probably the decoupling capacitor that is required.

I see, however with and without the socket there is no difference.

The only other thing I can do is echo the suggestion to get a multimeter so you can really verify the connections. Usable ones can be very cheap (although delivery times may be long). Only one of many examples:
image