Hello AAC forum,
Working on using PIR & switch to operate
an Adafruit Neopixel Ring 24.
https://www.adafruit.com/product/1586
To get started it was decided to keep things simple.
1. If the switch is open the Neopixel is solid blue.
2. If the switch is closed the Neopixel is off, unless the
PIR is triggered. If the switch is closed
and the PIR is triggered the Neopixel is solid green
for an interval of time.
A sketch was written and loaded onto the
Arduino Uno and the system works well as designed.
Eos_Neopixel_2_color_240425_KB.ino, attached.
The Arduino setup is shown at
Arduino_setup_240426.jpg, attached

To make the system smaller an ATtiny85 was
substituted for the Uno using the breadboard
as shown in the attached line drawing
EOS__LED3_PIR_SW_NeoPix_240423_Brdbrd.jpg.

But as shown in Test 240426.1 and
Test 240426.2, copied herewith below,
the sketch works perfectly on the Uno
but does not work on the breadboard.
So either the assumption that a sketch
that works on an Arduino Uno
will also work on an ATtiny is false
or
there is a defect in the breadboard
setup.
Please accept a request to review
and help me figure if one or
both of these premises is true.
Thanks
Allen Pitts
***** Test Results *****
Test 240426.1 ATtiny85, PIR & switch
Preconditions
1. Set up EOS__LED3_PIR_SW_NeoPix_240423_Brdbrd.jpg.
2. Load Eos_Neopixel_2_color_240425_KB.ino with Internal Clock to 8MHZ
3. SW1 open.
Action 1: +5v Power to board
Expected Result:
1. All Neopixel lights green constantly.
2. LED3 oscillates at 500 ms intervals.
Actual Result:
1. Neopixel does not light
2. LED3 lights constantly
Note: With the conjecture that the PIR is failing, a measurement
was done at PIR out/pin 7.
Result: 3.2 volts for eight seconds when PIR triggered.
Then 1.5 volts until PIR retriggered. Retrigger: 3.2 volts for eight seconds.
This is as expected.
Action 2: Move SW1 from open to closed
Result: 2.1. Neopixel, no change
2.2 LED3 off
Action 3: Move SW1 from closed to open
Result: 3.1. Neopixel, no change
2.2 LED3 on
Action 4: Move SW1 from closed t open
Result: 4.1. Neopixel, no change
4.2 LED3 off
Test 240426.2 Arduino Uno, PIR & switch
Preconditions
1. Set up EOS_Arduino_Setup_240426.jpg.
2. Load Eos_Neopixel_2_color_240425_KB.ino with Internal Clock to 8MHZ
3. SW1 open.
4. PIR isolated.
Action 1: +5v Power to board
Expected Result:
1. All Neopixel lights blue
2. LED3 oscillates at 500 ms intervals.
Actual Result:
1. All Neopixel lights blue
2. LED3 oscillates at 500 ms intervals.
Action 2: Wait 30 seconds for PIR LOW
Expected Result:
1. All Neopixel off
2. LED3 oscillates at 500 ms intervals.
Actual Result:
1. All Neopixel off
2. LED3 oscillates at 500 ms intervals.
Action 3: Retrigger PIR
Expected Result:
1. All Neopixel lights blue
2. LED3 oscillates at 500 ms intervals.
Actual Result:
1. All Neopixel lights blue
2. LED3 oscillates at 500 ms intervals.
Working on using PIR & switch to operate
an Adafruit Neopixel Ring 24.
https://www.adafruit.com/product/1586
To get started it was decided to keep things simple.
1. If the switch is open the Neopixel is solid blue.
2. If the switch is closed the Neopixel is off, unless the
PIR is triggered. If the switch is closed
and the PIR is triggered the Neopixel is solid green
for an interval of time.
A sketch was written and loaded onto the
Arduino Uno and the system works well as designed.
Eos_Neopixel_2_color_240425_KB.ino, attached.
The Arduino setup is shown at
Arduino_setup_240426.jpg, attached

To make the system smaller an ATtiny85 was
substituted for the Uno using the breadboard
as shown in the attached line drawing
EOS__LED3_PIR_SW_NeoPix_240423_Brdbrd.jpg.

But as shown in Test 240426.1 and
Test 240426.2, copied herewith below,
the sketch works perfectly on the Uno
but does not work on the breadboard.
So either the assumption that a sketch
that works on an Arduino Uno
will also work on an ATtiny is false
or
there is a defect in the breadboard
setup.
Please accept a request to review
and help me figure if one or
both of these premises is true.
Thanks
Allen Pitts
***** Test Results *****
Test 240426.1 ATtiny85, PIR & switch
Preconditions
1. Set up EOS__LED3_PIR_SW_NeoPix_240423_Brdbrd.jpg.
2. Load Eos_Neopixel_2_color_240425_KB.ino with Internal Clock to 8MHZ
3. SW1 open.
Action 1: +5v Power to board
Expected Result:
1. All Neopixel lights green constantly.
2. LED3 oscillates at 500 ms intervals.
Actual Result:
1. Neopixel does not light
2. LED3 lights constantly
Note: With the conjecture that the PIR is failing, a measurement
was done at PIR out/pin 7.
Result: 3.2 volts for eight seconds when PIR triggered.
Then 1.5 volts until PIR retriggered. Retrigger: 3.2 volts for eight seconds.
This is as expected.
Action 2: Move SW1 from open to closed
Result: 2.1. Neopixel, no change
2.2 LED3 off
Action 3: Move SW1 from closed to open
Result: 3.1. Neopixel, no change
2.2 LED3 on
Action 4: Move SW1 from closed t open
Result: 4.1. Neopixel, no change
4.2 LED3 off
Test 240426.2 Arduino Uno, PIR & switch
Preconditions
1. Set up EOS_Arduino_Setup_240426.jpg.
2. Load Eos_Neopixel_2_color_240425_KB.ino with Internal Clock to 8MHZ
3. SW1 open.
4. PIR isolated.
Action 1: +5v Power to board
Expected Result:
1. All Neopixel lights blue
2. LED3 oscillates at 500 ms intervals.
Actual Result:
1. All Neopixel lights blue
2. LED3 oscillates at 500 ms intervals.
Action 2: Wait 30 seconds for PIR LOW
Expected Result:
1. All Neopixel off
2. LED3 oscillates at 500 ms intervals.
Actual Result:
1. All Neopixel off
2. LED3 oscillates at 500 ms intervals.
Action 3: Retrigger PIR
Expected Result:
1. All Neopixel lights blue
2. LED3 oscillates at 500 ms intervals.
Actual Result:
1. All Neopixel lights blue
2. LED3 oscillates at 500 ms intervals.
Attachments
-
7.6 KB Views: 7
-
100.2 KB Views: 6



