There may some shipping delays at this time, orders placed on Fri Jan 22, may not ship for 1-2 business days.

Installing a Switch
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Installing a Switch

by BijanA on Mon Apr 27, 2020 6:30 pm

I have a Trinket M0 attached to a 16 LED NeoPixel. GND, 3V, D0 (Trinket M0) are connected to Ground, Power, Data-In (NeoPixel).

I have a SPST that goes between the 3V output on Trinket and Power Input on NeoPixel. The circuit is fine when the switch is in the on position, but when I turn it off, I get an error message in serial console that "You are in safe mode: something unanticipated happened. The microcontroller's power dipped."

The Trinket is plugged in via Micro-USB to the wall so I don't mind if the switch just turns off the LEDs or the entire Trinket but what is the best way to wire the switch to this?

Posts: 4
Joined: Wed Mar 18, 2015 2:26 am

Re: Installing a Switch

by dastels on Mon Apr 27, 2020 8:04 pm

The Propmaker Wing does something similar. See the power/enable circuit in the top left.

The bounce in a mechanical switch may be causing the problem as the current demands from the strip will jitter. Using that circuit with a debounced switch should work.

Hmm... you might try adding a moderately sized capacitor (maybe 1 microFarad... you could start there and experiment) to the Trinket side of the switch.


Posts: 4837
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.