Wiring Part II

Components

Let's gather our components. Here, we'll need our metal on/off button, the JST switch breakout, and the Adafruit Trinket.

Prep On/Off Button

The on/off button comes with a hex washer, go ahead and remove it by unscrewing it from the button. We won't be using it in this project, but I wouldnt disguard it.

Wire for LED

Next, we'll need to get a piece of wire to connect the LED of our push button to power it. So, cut of piece of wire about the length of the push button. Here, I'm using 30AWG silicone cover stranded wire - it's my favorite! Then, use wire strippers to remove a bit of insulation from both ends of the wire, then apply some solder to "tin" them. These helps prevent the strands from fraying and makes it easier to connect to components.

Connect Wire to LED on Button

Now we can tin the leads of the on/off button. Use the tip of the soldering iron to heat up the lead and apply a bit of solder - it should just flow / stick nicely. Then, while heating up the tinned lead labled "+", place the wire onto the heated solder and let it cool. It will fuse to the postive lead of the LED on the on/off button.

Wires for Trinket & JST Breakout

We'll need two sets of two wires, a total of four wires, for connecting our next set of components. They can be the same legnth, approximately the legnth of the Adafruit Trinket. Again, we'll strip and tin both ends of each wire.

Solder Wires to Trinket

OK, now that we have some wires prepaired, we'll use two of them to connecto the positive and negative pads on the Adafruit Trinket. I suggest using a panavise jr. or pair of helping third hands to keep the Trinket steady while soldering. On the bottom of the Adafruit Trinket, you'll see two pads labeld "+" and "–". We can apply some solder to these by tinning them. Then, heat up the solder using the tip of the soldering iron and lay a wire onto the pad. Here, I used blue for negative, red for positive. 

Solder Wires to JST Breakout

Next, secure our JST switched breakout to a panavise jr or helping thirld hands and tin up the pins (GND, GND, + and SW). Then, we can solder on remaining two wires to the + and GND labeled pins. Once that's done, we can connect the wire connected to the negative pad on the Adaruit Trinket, to one of the GND pins on the JST switched breakout.

Heat Shrink Positive Connections

Now we need to connect the positive wire from the LED on the button AND the positive wire from the Adafruit Trinket to the same lead on the button. This can be a little tricky, but I found it easy if both wires were jointed together - you can use a piece of heat shrink tubing (like I have) or a piece of electrical tape will work too. 

Solder Positive Connections to Common

Once both wires are close to each other, you should be able to solder them to the lead on the on/off button labeled C1 (common). I found using a pair of tweezers to hold the wires to be helpful. It's a bit tricky because we need to solder two wires to one lead at the same time. 

Solder Negative to LED

Next, we'll need to connect the negative wire from the JST switched breakout to the negative labeled lead on the LED of the on/off button. This lead will have a "–" symbol on it.

Solder Positive to NO

Now we can connect the positive (+) wire coming from the JST switched breakout to the NO1 (normally open) labeled lead on the on/off button.

Test Circuit

Our circuit is nearly completed! Now is a good time to test it out and see if our connections are working correctly. Plug in the JST connector from the battery to the JST connector on the JST switched breakout. Then, push the on/off button all the way in. It should lock / toggle on and the red LED should light up!

The Trinket should also turn on, a green and red LED light will light up aswell.

This guide was first published on Sep 25, 2016. It was last updated on Sep 25, 2016. This page (Wiring Part II) was last updated on Aug 15, 2019.