Page 2 of 2

Re: Why is Attiny85 so popular?

Posted: Tue May 19, 2015 12:44 pm
by thankyou
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.

Re: Why is Attiny85 so popular?

Posted: Tue May 19, 2015 1:14 pm
by jremington
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

Re: Why is Attiny85 so popular?

Posted: Tue May 19, 2015 2:14 pm
by thankyou
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.

Re: Why is Attiny85 so popular?

Posted: Tue May 19, 2015 3:01 pm
by jremington
I give up. Good luck with the project!

Re: Why is Attiny85 so popular?

Posted: Tue May 19, 2015 3:43 pm
by thankyou
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 :(

Re: Why is Attiny85 so popular?

Posted: Fri Jul 03, 2015 12:05 pm
by SecretSquirrel
thankyou wrote: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.
If the tiny85 is responsible for most of your 20mA draw, then changing to a tiny43U won't fix your problems. The actual AVR core has a max rated consumption of 8mA@8MHz/5V. You don't cross 10mA until about 16MHz@5V. Since you are talking about the tiny43U and its 3V booster, I'm going to assume you are using a 3V supply, in which case the tiny85 core maxes out around 4mA. This assumes that you have followed the "minimizing power consumption" suggestions in section 7.4 of the tiny85 datasheet. As a comparison, the tiny43U core is spec'd at 7mA@8MHz/5V and about 3mA@12MHz/3V.

So lets assume that you are running the chips at their max: 20MHz@5V. Switching chips is going to save you approx 3.75mA or 18.75%. While that is certainly a reasonable savings, it is not going to significantly increase battery life (I interpret significant as 50% increase or more). As I said, you've got other problems.

As a note, the AVR ADC has a conversion complete interrupt than can wake the chip from all but power down mode. In fact, there is a low noise/low power state specifically designed for ADC conversions that stops all the clocks on the chip except the ADC. And, entering this state automatically triggers an ADC conversion so if you are starting a conversion and then spinning of the completion status bit, you are definitely wasting power.

Good luck.

Re: Why is Attiny85 so popular?

Posted: Thu Jul 09, 2015 8:22 pm
by stevech
jremington wrote: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.
Geeze, of course "precise moment" is all relative.
Measuring range with optical LIDAR for topographic mapping needs fractional-nanosecond precision.
Measuring speed bumps in a road traveled, somewhat less.
Measuring radio signal round trip to Pluto takes many hours.

ADCs can be about as fast as you have money for! One microsecond ADC time for 10-12 bits is built into ARM MCUs that cost $6.

Re: Why is Attiny85 so popular?

Posted: Fri Sep 02, 2016 11:25 am
by stellajohn
ATtiny85 is very useful micro-controller for real projects and if compact design then it has more importance. Try once and and feel the simplicity for complex project :)