Capacitor Placement 241024

Thread Starter

allenpitts

Joined Feb 26, 2011
182
Hello AAC forum,

For a couple of years the ATtiny 85 microcontroller (MC)
was used in home automation and other projects mainly
because its small form factor and cost, $1.50.

Did a project using motion detector and the AdaFruit
Neopixel:
https://learn.adafruit.com/adafruit-neopixel-uberguide/the-magic-of-neopixels
including using a made from scratch Neopixel:
https://www.instructables.com/DIY-Custom-NeoPixel-Rings-From-Scratch/

In doing the Neopixel projects it was found that the ATtiny85
is a bit slow and underpowered. Other MCs were evaluated.

DFRobot Beetle DFR0282 $8.90
SEEED XIAO SAMD21 $5.40
Arduino Pro Mini $8.50
Arduino Nano $6.50

The conclusion of the evalation was the XIAO SAMD21.

As the XIAO has been adopted and used in more projects
a test circuit has been developed and built.

Closet_SEED_XIAO_Tester_schematic_241024.jpg

It is noticed that the switch does not operate
as expected and that whether the switch is opened or
closed the circuit stays on. That is, no matter
what the position of the switch the circuit stays
on.

The switch was removed and tested normal and replaced.

It is now surmised that the defect is not in the switch
but in the circuit deisgn, specifically the placement
of the capacitor.

It is conjectured that if the C1 were moved from
being between the barrel jack and the switch to
between the switch and MC 5v input that the
switch would then operate as expected.

Will this change provide the desired operation?

Thanks.

Allen Pitts
 

MrChips

Joined Oct 2, 2009
34,626
If the circuit still operates while the switch is open, it means that the circuit is receiving power from somewhere else such as from an input pin from an external circuit. Power applied to an input pin will find its way to Vcc via the protection diodes of the input pin.

The placement of C1 should not matter. C1 is listed as 100 μF/50 V.

What is missing is a 100 nF ceramic disc capacitor between Vcc and GND at the pins of the MCU. This has nothing to do with the circuit still operating while the switch is open.
 
Top