Flex Perma-Proto PCB
I used a flexible breadboard PCB to make extra voltage, data and ground pins. This provides us with more available connections. The Adafruit Trinket micro-controller only provides a few connections, so adding extra pinouts will make connecting components much easier. We only need a small piece, 3x5 pins should be plenty. You can use a pair of scissors to cut a piece. Save the rest for other projects. This stuff is super handy!
Connect Flex PCB to Trinket
Now that we have our piece of flex PCB, we need to connect it to the ground pin on the Adafruit Trinket. We'll need a short wire (about 2in in length). Just like the other wires, strip and tin the tips of both ends. Then, tin the pins on the flex breadboard PCB. Connect our newly cut wire into one of the pins on the flex PCB.
Connect GND to Flex PCB
Next, we'll need to connect the wire from the flex PCB to the ground pin on the Adafruit Trinket. There's only one available ground pin on the Trinket and we need to connect several components to that, hence why we're using the flex PCB to essentially break out more ground connections.
Trace Button Connections
We'll use the trigger button on the handle to cycle between different colors and animations on the NeoPixel LEDs. Todo this, we'll connect wires to the PCB that has the button component (and mode switch). To find out which pins we'll need to connect to, we'll use the multimeter. Look at the orientation shown in the photo, the middle pin is signal, and the one on the far right is ground.
Button Wires
Now that we know which pins we'll be connecting to, we need to measure and cut two new wires. These wires will connect the Trinket to the pins of the trigger button. We measure, cut, strip and tin the wires.
Connect Wires to PCB
With our two new wires, we'll connect them to the corresponding pins on the button/switch PCB. Again, reference the photo to see which pins to connect to.
Connect Button to Trinket
Then, connect the signal wire to pin #2 on the Adafruit Trinket. In our code, we have pin #2 setup as an input GPIO – Anything connected to that pin will trigger a new color or animation whenever it's tied to ground (essentially when the trigger is pressed).
Mount Switch PCB
With four wires now connected to the switch/button PCB, we can go ahead and mount the PCB back to the handle.
Connect Ground to Button
Now we can connect the ground wire from the button/switch PCB to the ground connections on the Flex PCB. Use an available pin on the Flex PCB. Just make sures it's a column/row that is connected to the ground connection wired to the ground pin on the Trinket.
Connect Wire to 5V on Trinket
Now we need to connect the 5V pin from Adafruit Trinket to an avilable column/row on the Flex PCB. This will allow us to connect power to the LED strips. Measure the distance between the Trinket and the Flex PCB to determine the required length of wire. Then cut, strip and tin the wire. Connect the wire to the 5V pin on the Adafruit Trinket.
Connect 5V to Flex PCB
Now we can connect the 5V wire from the Trinket to an available row/column on the Flex PCB.
Connect Data Wire to Flex PCB
Since we'll have two NeoPixel strips, we'll need two data connections. The Trinket has only one pin per GPIO/data connections, so we'll need to connect one wire to pin #0 on the Trinket to an available column/row on the Flex PCB. So far we've done this process for power and ground. Now we need to do this for our data connection for the NeoPixel strips.
Connect Data to Trinket
Now we can connect our data wire from the Flex PCB to pin #0 on the Adafruit Trinket. So far we should have following connections wired
- 5V from Trinket to Flex PCB
- GND from Trinket to Flex PCB
- Pin#0 from Trinket to Flex PCB
- Pin#2 from Trinket to Button/Switch PCB
- GND from button/switch PCB to GND on Flex PCB
Page last edited January 14, 2017
Text editor powered by tinymce.