Wiring Trinket

Perma-Proto PCB and Trinket

Next up, we'll work on wiring the components to the Adafruit Trinket. To make wiring a little bit more manageable, we'll use a piece of Perma-Proto PCB to expand the voltage battery and ground pins on the Trinket.

Slice of Perma-Proto PCB 

We only need a small piece of the Perma-Proto PCB – The ground and power rails are ideal. To cut the F4 PCB material, you will need to use a rotatory tool with a thin cutoff wheel. When cutting F4 substrate, it's very important to be in a well ventilated area and wear a proper breathing respirator. Alternatively, you can use a strip of flexible perma-proto, which you can cut using a pair of scissors.

Ground and Voltage Wires

In order to connect our PCB to the Adafruit Trinket, we'll need to fashion ourselves two short pieces of wire. Measure, cut, strip and tin two pieces of 30AWG wire. Then, tin a voltage and ground pin on the PCB. Solder in the two wires into each pin, respectively. 

Perma-Proto to Trinket

Connect the voltage wire from the PCB to the BAT pin on the Adafruit Trinket, Connect the ground wire from the PCB to the GND pin on the Adafruit Trinket. I recommend tinning the pins before soldering in the wires.

Secure PCB to Trinket

For better wire management, I found tacking the piece of perma-proto PCB to the back of the Adafruit Trinket. It's a flexible way of securing the two substrates together. It's easy to remove and doesn't leave behind much mess. I used elemer's mounting tack.

Connect the LED Eye

Next up we'll work on connecting the wires from the LED eye to the trinket and perma-proto PCB. The voltage wire goes to pin #0 on the Trinket while the ground wire goes to one of the ground pins on the perma-proto PCB.

 

Eye Ground to Perma-Proto

Connect the ground wire from the LED eye to one of the ground pins on the piece of perma-proto PCB. I suggest adjusting or removing the mounting tack from the PCB before soldering – If the tack gets inside the pins while soldering, it can melt and mix with the solder, so be careful! 

Eye Data to Trinket

Connect the anode wire from the LED eye to pin #0 on the Adafruit Trinket. For better wire management, solder the wire from the back of the Trinket. This keeps the orientation of the wires consistent, making the wires more manageable. 

Eye Blink Test

With our LED eye now wired and connected to the circuit, we can now test it out! The code should be uploaded to the Adafruit Trinket. If you haven't yet, make it so! You can connect a microUSB cable to the Trinket and to a USB port on your computer (or USB battery bank) to power it up.

Trim Servo Cable

The length of the cable on the micro servo is longer than we need, so we can cut it short. It should be able the length of the wire on the LED eye. 

Tin Servo Wires

Peel apart the three wires from the micro servo and strip them using wire strippers. Apply solder to the strands of wire to tin them. Careful not to get the tip of the soldering iron too close to the wire insulation, it can easily melt!

Connect Servo Data Wire

The yellow/orange colored wire from the micro servo needs to be connected to pin #4 on the Adafruit Trinket. I wired it from the back of the Trinket to make wiring more manageable. 

Servo Voltage & Ground

The red colored wire from the micro servo connects to one of the voltage pins on the piece of perma-proto PCB. The brown wire will connect to one the ground pins on the perma-proto PCB.

JST Connector for Adafruit Trinket

In order to easily connect/disconnect a lipo battery to the Trinket, we'll need to attach a female JST connector. On the back of the Adafruit Trinket are solder pads for connecting a JST connector. First, I tinned the positive and ground pads on the  Trinket. Then, I stuck a very small piece of tack to the Trinket (Adafruit logo is a perfect spot!) and mounted the JST connector. With it tacked it place, I just heated up the pads and applied a small amount of solder to each terminal. There's two pads on the sides, these are used for adding mechanical strength to the two parts.

Test JST Connector

Double check your work to ensure the JST connector has solid solder joints. You can plug in a lipo battery to test out the circuit. It should power up and start running the code.

Circuit Test

Once the Trinket is powered on, the LEDs should start randomly blinking. You should also see the servo horn start rotating. The head will rotate back and forth randomly. Set it on the desk and watch it struggle to move around. Next up, we'll work on some final details and assemble this all together!

This guide was first published on Jul 18, 2017. It was last updated on Jul 18, 2017. This page (Wiring Trinket) was last updated on Jul 25, 2017.