Why is Attiny85 so popular?

I’m confused about why the Attiny85 is more popular (on hobby electronics sites) than the picoPower microcontrollers like Attiny43U. Why doesn’t everyone want the lowest current consumption, as well as an Attiny with a built in booster to 3V? I’m not sure if there’s something I’m missing. I have been using the Attiny85 in my project, and I found out that it was responsible for the majority of the 20 mA current draw. Now I regret not using Attiny43U because I could have had much better battery life.

The ATtiny85 is available in DIL.

That’s all? It seems easy enough to use a breakout board for a surface mount microcontroller…

Why don’t you use it?

The reason is most people buy what is offered. The majority won’t search Atmel’s site to see what controller would best suit their needs. They just buy what sites have…

Interesting…I was the same way and I saw it as convenient that there was a Tiny AVR programmer for the Attiny85 that I could use with Arduino. Now I’m going to figure out how to program the Attiny43U…

You can dramatically reduce the power consumption of the ATtiny85 by employing proper power reduction techniques and having the processor sleep whenever possible. Much of the material in the following link to power reduction for the ATmega series also applies to the ATtiny series. http://www.gammon.com.au/power

Thanks for the link…Unfortunately I don’t think there’s much I can do because my program cannot go into sleep mode as I’m constantly reading from the ADC.

Is it REALLY necessary to read from the ADC constantly? 100:1 says probably not…which also happens to be just about the ratio of current you could save by putting the thing to sleep in between the really necessary readings.

…but then again, as usual, we know nothing about the situation at hand…

I’m monitoring something with the ADC that can change at any moment, so I do have to read from the ADC constantly…I better read up on programming Attiny43U :slight_smile:

…something…

I’m monitoring something with the ADC that can change at any moment, so I do have to read from the ADC constantly

If it is so important to know exactly when the ADC input changes, what happens when the batteries fail? Seems like a poor overall approach.

I agree with jremington. Remember that human time and MCU time are different. An MCU can be asleep 90% of the time and still respond in less than a second. Or if timing is that critical then use a micropower circuit to detect the event and wake the MCU when it happens.

In case you didn’t get the other hint: If you would tell us more about what you are trying to do, we could be more helpful with our suggestions.

I’m using the ADC to read an analog distance sensor value, and I want an action to occur at the precise moment the analog reading is above a value (this value can be modified by the user, so I wouldn’t want to use a comparator).

It is impossible to know the “precise moment” that something occurs. An ADC reading can take a couple of hundred microseconds.

A comparator can compare an input to another voltage, set by a standard or digital potentiometer, and is thus adjustable by the end user. Furthermore, the comparator has higher resolution than the ADC and can wake the part up from sleep. So the ADC is neither necessary nor desired.

I didn’t mean “precise moment” literally, a couple hundred microseconds would suffice. I don’t think a comparator would be good because the analog comparison value is modified digitally (the code does a calculation), and if I wanted to output to a comparator I would need to use a DAC, so I don’t think it would save power.

Aren’t there a lot of monitoring applications where you wouldn’t want to the microcontroller to sleep because you could miss out on an event? For example, if you wanted to detect an infrared emitter/detector break beam, you wouldn’t want to have the microcontroller potentially be in sleep mode when an object quickly breaks the beam.

Aren’t there a lot of monitoring applications where you wouldn’t want to the microcontroller to sleep because you could miss out on an event? For example, if you wanted to detect an infrared emitter/detector break beam, you wouldn’t want to have the microcontroller potentially be in sleep mode when an object quickly breaks the beam.

Almost of those instances can be handled by an interrupt, waking the part from sleep.

I don’t think you understand how to use the comparator. Here is an short overview: http://www.gammon.com.au/forum/?id=11916

Ok, so the analog comparator would be good for using a fixed threshold voltage of comparison, but wouldn’t help in the case of a threshold that dynamically changes in code.

I give up. Good luck with the project!

Haha, thank you for the info…I had actually only ever heard of a rising/falling/pin change interrupt, and so it’s useful for future projects to know about a built-in analog comparator that can cause an interrupt. Unfortunately for this project, the thresholds change based on user input :frowning: