ATtiny85 Reliability 240816

Hello ETO forum,

For about a year, beginning in 2021,
a 555 timer was used to receive
a signal from a PIR and saturate
a transistor that turned on four
twelve-volt LEDs to light a closet,
staircase or other small space.

After a few months it was noticed
that about a quarter of the installations
were failing. Either the LED would not come
or, in the greatest number of cases,
the LEDs would come on but not go off.

Research pointed to the failing
component being the capacitor in
the capacitor-resistor pair that
governed the high output of the 555
in monostable, one-shot mode.
The failure was greater in units that had an
infrequent usage. Counter intuitively,
units that were used several times a day
failed less often than units that
were used once or twice a month.

To overcome the 555 capacitor failure
it was suggested that a microprocessor
be substituted for the 555. Several
Arduino-IDE-compatible microprocessors
were evaluated: DFRobot DFR0282 $8.90,
Seeed Studio XIAO SAMD21 $5.40, and the
ATtiny85 $1.66.

Besides being more precise in timing,
microprocessors allowed for the time
allowed for the time that the LEDs
stayed on to be changed by reprogramming
instead desoldering and changing
components.

Despite the need for an ATtiny programmer
to get the ATtiny 85 connected via
USB to the Arduino IDE, the size
and price of the Tiny were the
deciding factors.

Now two of the ATtiny85 units are failing.
Because the ATtiny85 is the heart of
the closet light the MC was tested first.

When the ATtiny85 became an integral part
of the closet units an ATtiny Tester
was developed schematic and layout
on prototype PCB attached herewith.

When the ATtiny was pulled and
reprogrammed with the ATtiny Tester Sketch,
attached below.



When the Tiny called Mark3 was tested
it returned results that were unexpected.
Tests results copyed herewith below.
Three MCs were tested: Mark3, MarkB
and MarkC. Mark3 resulted in high
output much shorter than expected.

Tests of the MarkB MC were more in line
with expected results. To confirm that
the 8 MHZ was the correct Internal Clock
setting tests were performed on the
MCs using 1 MHZ and 16 MHZ clock settings.

To confirm that the MarkB results
were correct a new, out-of-the-box
MC, MarkC was tested. The results
of the MarkB and MarkC tests point
to the Mark3 unit being a failed
component.

The question is: How reliable are
the ATtiny85 MCs? Would going to
one of the other Arduino compatible
MCs improve the reliability?

Thanks.

Allen Pitts

***** sketch ******
/*
240816
Processor ATtiny85
Programmer USBTinyISP
Compiled this sketch at Internal Clock 8 MhZ: LEDs blink at 5 second on and .5 second off
Compiled this sketch at Internal Clock 16 MhZ: LEDs blink at 8 second on and 2 second off
Compiled this sketch at Internal Clock 1 MhZ: LEDs blink at 1 second on and imperceptible off
ATtiny Tester 230811
Turns on an five LEDs on for one second, then off for one second, repeatedly
as a test of the microcontroller. If the internal clock is set to 8 MHZ
the D1 LED blinks at 9 seconds on and 4 seconds off.
*/
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin 4 as an output.
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(0, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(0, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for a second
digitalWrite(1, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(1, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for a second
digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(2, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for a second
digitalWrite(3, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(3, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for a second
digitalWrite(4, HIGH); // turn the LED on (HIGH is the voltage level)
delay(500); // wait for a second
digitalWrite(4, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for a second
}

********* end of sketch **********

Test Results: Three MCs, nine tests each

Processor: ATtiny85
Programmer: USBTinyISP
Mark3
Internal Clock Time ON; Time OFF

16 Mhz 1.1 sec on; imperceptible off
8 Mhz .6 sec ; imperceptible off
1 Mhz .1 sec ; imperceptible off
16 Mhz 1 sec ; imperceptible off
8 Mhz .7 sec ; imperceptible off
1 Mhz .06 sec; imperceptible off
16 Mhz 1.1 sec; imperceptible off
8 Mhz .8 sec; imperceptible off
1 Mhz .12 sec 8.; imperceptible off

MarkB
Internal Clock Time ON; Time OFF

16 Mhz 8.1 sec ON, 1.6 sec OFF
8 Mhz 4.1 sec ON, .8 sec OFF
1 Mhz .7 sec ON, imperceptible OFF
16 Mhz 8.1 sec ON, 1.2 sec OFF
8 Mhz 4.1 sec ON, .7 sec OFF
1 Mhz .7 sec ON, imperceptible OFF
16 Mhz 8.0 sec ON, 1.4 sec OFF
8 Mhz 4.0 sec ON, .7 sec OFF
1 Mhz .7 sec ON, imperceptible OFF

MarkC
Internal Clock Time ON; Time OFF

16 Mhz 7.9 sec ON, 1.5 sec OFF
8 Mhz 4.0 sec ON, .7 sec OFF
1 Mhz 8.1 sec ON, imperceptible OFF
16 Mhz 8.0 sec ON, 1.4 sec OFF
8 Mhz 3.9 sec ON, .8 sec OFF
1 Mhz 8.1 sec ON, imperceptible OFF
16 Mhz 7.9 sec ON, 1.2 sec OFF
8 Mhz 3.8 sec ON, .7 sec OFF
1 Mhz 8.1 sec ON, imperceptible OFF
 
Firstly, what were you doing to kill the capacitors in the 555 version?, either the capacitors were cheap crappy short lived ones, they were damaged doing installation, or there were serious design flaws in the simple circuit.

Secondly, micro-controllers are EXTREMELY reliable, and certainly PIC's are - but I see no reason to imagine that AVR's are less appreciably so.

Post the full and complete circuit, and post a picture of a built-up board.

I notice your test board shows no decoupling capacitors, any electronic circuit requires capacitors across the supply rails.
 
Can you not set it high internally?, and use the pin as an input (as on a PIC).
Nope you can't reprogram it with nomal programmer if you use it as input pin
you have to have a high voltage programmer most people don't have one they use the arduino as isp
But I've not had an problems with it floating but the attiny 85 can take a beating i hooked the power up backward
the chip would burn you and it still works . Something else going on here.

That's long story danadak you can use it but then you can't change it with low voltage programmer which is what most use.

 
Last edited:
Hello danak, Nigel Goodwin, and the ETO forum,

It has taken a while to get back to this post because an out-of-state
wedding was attended last weekend.

240819.1 danak

Schematic of the Closet system using 555 timer marked 220923 attached herewith.


240819.2 Nigel Goodwin

either the capacitors were cheap crappy short lived ones
The cap used in the 555 based closet fixtures were
Aluminum Electrolytic Capacitors - Radial Leaded 100uF 16V 5x11mm 85 C 2500h
by Vishay from Mouser Electronics part no. MAL203855101E3

The Closet ATtiny85 circuit operate at 12 volts DC. Perhaps a better result would be achieved
by using a 25 or 30 v component.
The cost of the capacitor, if it is less than, say, $5 is not consequential after the time
and effort to design the schematic, breadboard the schematic, design the PCB,
and build & test the PCB.

So what is the best 100 uF capacitor available?





Attached herewith are schematic, PCB diagram and photo of the closet
system with ATtiny 85.
Note: In the photo close up of the PCB, the orange, red and yellow leads from
the green terminal block out to the PIR are removed to provide
a better view of the PCB marked: 'Closet ATtiny85 230828'.

...no decoupling capacitors,...
Test circuit diagram revised and attached. Should a larger capacitor
be a better value for C1 on diagram titled 'Attiny Tester on Datak
21_114, revised 240819?

Thanks

Allen Pitts
 
Last edited:
Do you have a DSO so you can look at transients ?

A polymer 100 uF would be the best in terms of esr :




The reset pin with no pullup or cap can be noise susceptible due to noise pickup,
which switching on the power LEDs creates. There is an internal pullup on the pin,
but it is very "weak", possible high value R, so susceptible. If you add them there
is a min pulse width spec.


Regards, Dana.
 
Last edited:
You have no Gate R for the mosfet, its Cinput is quite high, and Miller C,
so its turn on/off quite slow. Could cause oscillation with unpredictable
consequences. Something on the order of 50 - 100 ohms.

The R has a conflicting effect. Limits current spike but slows down
Turn on/off. It helps kill stray L effects (which can aggravate oscillation).
So one normally looks at Gate drive waveform and finds the best comp-
romise value.

Simulation is prudent although many manufacturers do not offer spice models
for CPU output drivers.

You dont have a ground plane flood, that might be a consideration for the
high value currents being switched. Google "single layer PCB ground plane pdf"
for layout recommendations.

Regards, Dana.
 

Attachments

  • application_note_en_20180726_AKX00068 (2).pdf
    1.4 MB · Views: 78
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…