AllenPitts
Member
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
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