3D print this Frankenstein's Monster head, nicknamed Frank, to build a light-up Halloween decoration. NeoPixels illuminate the inside of the model for a clean and even lighting effect. Frank's brains are powered by a QT Py board, making this build nice and compact.

Capacitive Touch

Frank's bolts have copper tape for capacitive touch. Tapping either bolt will change the colors of the NeoPixels.

Parts

Animation of Adafruit QT Py with onboard NeoPixel in a rainbow swirl.
What a cutie pie! Or is it... a QT Py? This diminutive dev board comes with our favorite lil chip, the SAMD21 (as made famous in our GEMMA M0 and Trinket M0 boards).This time it...
$7.50
In Stock
Angled shot of a 2MB SPI Flash in 8-Pin SOIC package.
These little chips are like miniature SSD drives for your electronics. When you don't need something with as much storage as a micro SD card, but an EEPROM is too small, SPI (or...
$1.25
In Stock
Top down view anAdafruit NeoPixel Digital RGB 90 LED-per-meter strip.
Fancy new side light LED strips are a great alternative for folks who have loved and used Adafruit LED strips for a few years but want gorgeous, glowy light emitting at...
$26.95
In Stock
Roll of Copper Foil Tape with Conductive Adhesive - 6mm wide
Copper tape can be an interesting addition to your toolbox. The tape itself is made of thin pure copper so it's extremely flexible and can take on nearly any shape. You can solder...
$4.95
In Stock
USB Type A to Type C Cable - 1ft - 0.3 meter
As technology changes and adapts, so does Adafruit. This  USB Type A to Type C cable will help you with the transition to USB C, even if you're still...
$3.95
In Stock
Angled shot of a blue long rectangular USB battery pack.
A smaller-sized rechargeable battery pack for your Raspberry Pi or Raspberry...
$14.95
In Stock
Top view of Adafruit Perma-Proto Quarter-sized Breadboard PCB.
Customers have asked us to carry basic perf-board, but we never liked the look of most basic perf: it's always crummy quality, with pads that flake off and no labeling. Then we...
$2.95
In Stock
20-pin 0.1 inch Female Headers - Rainbow Color Mix Plastic - 5 pack
Female header is like the duct tape of electronics. It's great for connecting things together, soldering to perf-boards, sockets for wires or break-away header, etc. We go through...
$2.50
In Stock
4 x Acrylic paint
Acrylic paint for the hair, scar, teeth and bolts

Wired Connections

NeoPixel Strip

  • DIN to A3 on the QT Py
  • 5V to 5V on the QT Py
  • GND to GND on the QT Py

Capacitive Touch

  • Copper tape to A1 on the QT Py
  • Copper tape to A2 on the QT Py

Power

The QT Py has a USB C port, making it perfect for powering it with a USB battery. Connect a USB C to USB A cable to your preferred USB battery bank for instant power.

The .STL file is available for you to print Frank on your FDM-style printer. Frank prints with no supports, making for an easy print. A full-sized Frank takes approximately 21 hours, but you can scale him down for a faster print time.

Painting

To make Frank really pop, you can paint his scar, hair, teeth and bolts. Acrylic paint works really well for 3D printed parts and can be found in many different stores.

CircuitPython is a derivative of MicroPython designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the CIRCUITPY drive to iterate.

Set up CircuitPython Quick Start!

Follow this quick step-by-step for super-fast Python power :)

If you want to get started with your QT Py, and you have NOT soldered a chip to the back of it, download CircuitPython from the following link:

If you have soldered a GD25Q16 SPI flash chip to the bottom of your board, you must use the Haxpress version of CircuitPython for the Adafruit QT Py for the flash to work! If you have NOT soldered a SPI flash chip to your QT Py, do NOT use this download! It will not give you 2MB of flash space without a chip!

Click the link above and download the latest UF2 file.

Download and save it to your desktop (or wherever is handy).

Plug your QT Py into your computer using a known-good USB cable.

A lot of people end up using charge-only USB cables and it is very frustrating! So make sure you have a USB cable you know is good for data sync.

Double-click the small RST (reset) button, and you will see the NeoPixel RGB LED turn green. If it turns red, check the USB cable, try another USB port, etc.

If double-clicking doesn't work the first time, try again. Sometimes it can take a few tries to get the rhythm right!

You will see a new disk drive appear called QTPY_BOOT.

 

 

 

Drag the adafruit_circuitpython_etc.uf2 file to QTPY_BOOT

The red LED will flash. Then, the QTPY_BOOT drive will disappear and a new disk drive called CIRCUITPY will appear.

That's it, you're done! :)

To use with CircuitPython, you need to first install a few libraries, into the lib folder on your CIRCUITPY drive. Then you need to update code.py with the example script.

Thankfully, we can do this in one go. In the example below, click the Download Project Bundle button below to download the .STL file, the necessary libraries, and the code.py file in a zip file. Extract the contents of the zip file, open the directory NeoPixel_Frankenstein/ and then click on the directory that matches the version of CircuitPython you're using and copy code.py and the lib/ directory to your CIRCUITPY drive.

Your CIRCUITPY drive should now look similar to the following image:

CIRCUITPY
# SPDX-FileCopyrightText: 2020 Liz Clark for Adafruit Industries
#
# SPDX-License-Identifier: MIT

import time
import board
import touchio
import neopixel
from adafruit_led_animation.animation.pulse import Pulse
from adafruit_led_animation.color import (
    RED,
    YELLOW,
    ORANGE,
    GREEN,
    TEAL,
    CYAN,
    BLUE,
    PURPLE,
    MAGENTA,
    GOLD,
    PINK,
    AQUA,
    JADE,
    AMBER
)

#  NeoPixel pin
pixel_pin = board.A3
#  number of NeoPixels
pixel_num = 68

#  NeoPixels setup
pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.5, auto_write=False)

#  animation setup
pulse = Pulse(pixels, speed=0.1, color=RED, period=5)

#  two cap touch pins
touch_left = board.A1
touch_right = board.A2

#  cap touch setup
bolt_left = touchio.TouchIn(touch_left)
bolt_right = touchio.TouchIn(touch_right)

#  NeoPixel colors for animation
colors = [RED, YELLOW, ORANGE, GREEN, TEAL, CYAN, BLUE,
          PURPLE, MAGENTA, GOLD, PINK, AQUA, JADE, AMBER]

#  variable for color array index
c = 0

#  debounce states for cap touch
bolt_left_state = False
bolt_right_state = False

while True:
    #  run animation
    pulse.animate()

    #  debounce for cap touch
    if not bolt_left.value and not bolt_left_state:
        bolt_left_state = True
    if not bolt_right.value and not bolt_right_state:
        bolt_right_state = True

    #  if the left bolt is touched...
    if bolt_left.value and bolt_left_state:
        print("Touched left bolt!")
        #  increase color array index by 1
        c += 1
        #  reset debounce state
        bolt_left_state = False
    #  if the right bolt is touched...
    if bolt_right.value and bolt_right_state:
        print("Touched right bolt!")
        #  decrease color array index by 1
        c -= 1
        #  reset debounce state
        bolt_right_state = False
    #  if the color array index is bigger than 13...
    if c > 13:
        #  reset it to 0
        c = 0
    #  if the color array index is smaller than 0...
    if c < 0:
        #  reset it to 13
        c = 13
    #  update animation color to current array index
    pulse.color = colors[c]
    time.sleep(0.01)
You'll need to solder the 2MB SPI flash to the QT Py to run the code as written.

Import the Libraries

The code begins by importing the libraries and the colors that Frank's NeoPixels will be able to switch between.

import time
import board
import touchio
import neopixel
from adafruit_led_animation.animation.pulse import Pulse
from adafruit_led_animation.color import (
    RED,
    YELLOW,
    ORANGE,
    GREEN,
    TEAL,
    CYAN,
    BLUE,
    PURPLE,
    MAGENTA,
    GOLD,
    PINK,
    AQUA,
    JADE,
    AMBER
)

Setup the NeoPixels

The NeoPixels are setup, along with the Pulse LED animation.

#  NeoPixel pin
pixel_pin = board.A3
#  number of NeoPixels
pixel_num = 68

#  NeoPixels setup
pixels = neopixel.NeoPixel(pixel_pin, pixel_num, brightness=0.5, auto_write=False)

#  animation setup
pulse = Pulse(pixels, speed=0.1, color=RED, period=5)

Setup Capacitive Touch

Capacitive touch is setup for pins A1 and A2.

#  two cap touch pins
touch_left = board.A1
touch_right = board.A2

#  cap touch setup
bolt_left = touchio.TouchIn(touch_left)
bolt_right = touchio.TouchIn(touch_right)

Array of Colors

The colors array is created to hold all of the NeoPixel color options. This array will be accessed in the loop to change the NeoPixel color.

#  NeoPixel colors for animation
colors = [RED, YELLOW, ORANGE, GREEN, TEAL, CYAN, BLUE,
          PURPLE, MAGENTA, GOLD, PINK, AQUA, JADE, AMBER]

Variables and States

c is setup to be the index variable for the colors array. Its value will be updated in the loop to change the NeoPixel color.

bolt_left_state and bolt_right_state are setup to debounce the capacitive touch inputs.

#  variable for color array index
c = 0

#  debounce states for cap touch
bolt_left_state = False
bolt_right_state = False

The Loop

The loop begins by running the Pulse animation and setting up debouncing for the capacitive touch inputs. The adafruit_led_animation library allows for the animation to run uninterrupted in the background in the loop while other processes can take place.

while True:
    #  run animation
    pulse.animate()

    #  debounce for cap touch
    if not bolt_left.value and not bolt_left_state:
        bolt_left_state = True
    if not bolt_right.value and not bolt_right_state:
        bolt_right_state = True

Capacitive Touch Inputs

The capacitive touch inputs affect the value of c. If Frank's left bolt is touched, then c increases by 1. If Frank's right bolt is touched, then c decreases by 1.

#  if the left bolt is touched...
    if bolt_left.value and bolt_left_state:
        print("Touched left bolt!")
        #  increase color array index by 1
        c += 1
        #  reset debounce state
        bolt_left_state = False
    #  if the right bolt is touched...
    if bolt_right.value and bolt_right_state:
        print("Touched right bolt!")
        #  decrease color array index by 1
        c -= 1
        #  reset debounce state
        bolt_right_state = False

Tracking the Color

c is tracking the index of the colors array. There are 14 colors total. If c goes above that range, it is reset to 0. If c goes below 0, it is reset to 13. This allows you to loop through the colors continuously.

#  if the color array index is bigger than 13...
    if c > 13:
        #  reset it to 0
        c = 0
    #  if the color array index is smaller than 0...
    if c < 0:
        #  reset it to 13
        c = 13

Update the Color

Finally, the color of the NeoPixels is updated with pulse.color. You can access the animation's other parameters in the loop by using pulse.[parameter], for example: pulse.speed, pulse.period, etc.

#  update animation color to current array index
    pulse.color = colors[c]
    time.sleep(0.01)

Soldering the Flash Chip

See the QT Py guide for information on soldering the flash chip onto the back of the QT Py and ensuring you are running the "haxpress" version of CircuitPython downloaded from circuitpython.org.

You'll need to solder the 2MB SPI Flash to the back of the QT Py to run the code as written.

Headers and the Perma-Proto

A 1/4 Perma-Proto board is used to keep the wiring neat. The QT Py will plug-in with headers.

Solder two sets of socket headers, seven sockets long, onto the Perma-Proto. Space them for the QT Py.

Solder plug headers onto the QT Py, using the socket headers as a guide. 

Solder a piece of wire from the QT Py's 5V pin to the Perma-Proto's 5V rail. Then, solder a piece of wire from the QT Py's GND pin to the Perma-Proto's ground rail.

Prep the NeoPixels

Beginning with the second pixel on your strip, count off 34 pixels and mark the position with a marker. 

Cut off the first pixel with your snips and then cut at your marker position. Make sure to snip in the middle of the solder pads.

Using tweezers, pull your newly separated strip out of the silicone packaging.

Repeat this process for a second strand of 34 pixels. 

You'll have two strands of 34 pixels for a total of 68 for Frank.

Solder the NeoPixels

Using sticky tack, secure the first NeoPixel strip flat on your workspace.

Take three wires, tin them and then solder them to the NeoPixel strip's pads. A piece of sticky tack can be helpful to secure the wires as well.

Your wire lengths should be around 5 inches.

Solder the 5V wire to the Perma-Proto's 5V rail, the GND wire to the Perma-Proto's GND rail and the DIN wire to the Perma-Proto's A3 rail.

Connect the two NeoPixel strips together by soldering 5V to 5V, GND to GND and DIN to DOUT.

Your wire lengths should be around 4 inches.

Add the Capacitive Touch Pads

Cut two pieces of copper tape. The pieces should be approximately 4 inches long.

Tin the end of each piece of copper tape with wire. Then, solder a piece of wire to each piece of tape.

The wires should be approximately 5 inches long.

Solder the copper tape's wires to the A1 and A2 rails on the Perma-Proto, respectively.

Hot Glue the Perma-Proto

The Perma-Proto board is mounted between Frank's eyes and mouth with the QT Py's USB C port pointing down.

Using a hot glue gun, lay glue down across the solder points for the QT Py's sock headers and then attach to the inside of Frank.

Hot Glue the First NeoPixel Strip

Position the first NeoPixel strip so that the pixels are shining downward. Using sticky tack, position them just above Frank's brow so that they'll shine down above the eyes.

Once you're happy with the position, tack the strip in place with your glue gun. Put small dabs on top of the solder pads so that the strip is secure. 

Also put hot glue on the wire connections for the strip to prevent any shorts.

Attach the Capacitive Touch Strips

Remove the copper tape's backing and place the pieces so that they run down the middle of the bolts. The solder point should be mounted vertically inside of Frank.

Hot glue both pieces of tape's solder points and any contact points inside of Frank to avoid any shorting.

Hot Glue the Second NeoPixel Strip

Repeat the mounting and hot gluing process with the second strip, this time with the pixels facing up. They should be mounted just below Frank's bottom lip so that his mouth is illuminated.

Plug Frank's QT Py brain into a USB battery bank via the QT Py's USB C port. The Pulse animation will begin.

You can change the colors of the Frank's NeoPixels by touching either piece of copper tape that is located on Frank's bolts. You can adjust the color to fit yours and Frank's moods throughout the day or to best match your Halloween decor.

This guide was first published on Oct 27, 2020. It was last updated on Mar 28, 2024.