Overview

We present to you another persistence of vision (POV) project for your blinky enjoyment! As the LEDs move in space, they flash different parts of an image, building up an image in your brain. We have visited this topic many times with kits and tutorials, including the parent to this iteration, the Genesis Poi. Now build it on a bike wheel!

Two strips of DotStar LEDs are affixed to the spokes of a bike wheel, one facing each direction, driven by a 5V Pro Trinket and powered by a waterproof 3xAA battery pack affixed near the hub.

Prerequisite guides:

While this project is not very difficult, it does require strong construction skills in order to be waterproof and safe. A flying battery pack can very easily cause an accident, so keep safety in mind.

Parts and Tools

Parts from Adafruit:

Parts NOT from Adafruit:

Tools & Miscellaneous:

  • Soldering station and accessories
  • Computer running the Arduino IDE software, ideally version 1.6.4 or later. Support for the Pro Trinket microcontroller can be enabled through the Boards Manager (Tools→Board→Boards Manager…).
  • Computer running Python for graphics conversion; use our sample images to get started.

Night photos and video for gifs by Andrew Baker.

Circuit Diagram

Connections are as follows:

  • Pro Trinket - (on back) to battery ground
  • Pro Trinket + (on back) to battery positive
  • DotStar LED strip G to Pro Trinket G
  • DotStar LED strip 5V to Pro Trinket BAT+
  • DotStar LED strip data to Pro Trinket 11
  • DotStar LED strip clock to Pro Trinket 13
  • Optional tactile mode selector button between Pro Trinket 3 (TX) and G
  • Optional vibration sensor between Pro Trinket 2 and G

Prep LEDs & Breadboard

Cut your half meter strip of LED strip in half using flush diagonal cutters. Count the LEDs to verify there are 36 pixels on each side of the cut, and try to preserve the solder pads on the input side of one half.

Tin the solder pads and solder silicone coated wires to the input end of the piece you just cut, alternating sides for each wire to help prevent a short circuit.

Cut the input connector fro the other strip and solder four sets of wires in parallel and joined to a single piece of silicone coated wire. At the ends of these extension wires, solder four header pin prototyping wires, even though we’ll end up removing them later. Don’t forget the heat shrink tubing!

If you have a spare 5V Pro Trinket to spare, we strongly encourage you to build a prototype of your circuit on a solderless breadboard. Not only will you get a chance to test out your solder joints connecting the LED strips, but you can have a duplicate system for programming where you can easily make changes.

If this is your first time using Pro Trinket, follow the Adafruit Arduino IDE Setup for guidance; a couple extra steps are required compared to typical Arduino Uno programming — the Introducing Pro Trinket guide may help. Try out the “blink” sketch and confirm you can upload code to the board. If you’re not already running the Arduino IDE version 1.6.4 or later, this is a really good time to upgrade. It greatly simplifies installing libraries and support for alternate boards such as Pro Trinket.

Grab the sample sketch for the bike wheel from GitHub:

The “bikewheel” folder contains the Arduino sketch for this project.

This project also requires the Adafruit DotStar library for Arduino. Use the Library Manager to install this (Sketch→Include Library→Manage Libraries…), or if you’re using an older version of the Arduino IDE, it can be downloaded and installed manually:

There are two files in the “bikewheel” folder, which will open as two tabs in the Arduino sketch. The second file/tab — graphics.h — contains the bitmaps and color palettes for the different modes. Learn how to add different ones on the Genesis Poi "preparing images" page. The bike wheel sameple sketch uses image 32 pixels high. 

I can compile the code but it won’t upload to the Pro Trinket board!

You might have a “charge only” USB cable. Definitely need the normal “charge+data” type for this. Switch it out for a different cable and try again.

Before proceeding, ensure your circuit runs the sample code and switches images when you press the button:

Solder Circuit

Trim off the header pins and strip and tin the wires attached to your LED strips.

Solder these four wires to a new Pro Trinket (without header pins installed) according to the circuit diagram and trim off the excess wire with flush snips. Likewise attach the optional switch and/or vibration sensor.

Tin the (-) and (+) pads on the back of your Pro Trinket, then solder the wires from the battery holder to them.

Use a dab of E6000 to protect these solder joints and also provide some strain relief to the wires.

Turn on the circuit to check it works, and if it does, it’s time to waterproof the circuit. Encase the Trinket in heat shrink tubing or glue, or spray conformal coating. Use Permatex 66B silicone adhesive to plug the open ends of LED strip, and watch this video for more tips on ruggedizing your  projects:

Install on Bike

Set your bike up in a stable position where you can work on it comfortably.

Use metal zip ties to affix the heavy battery holder as close to the wheel’s hub as possible. If your hub is wide enough, you could even attach the battery pack directly to it.

Use plastic zip ties to attach the LED strip and Pro Trinket (as well as any switch or sensor you may have optionally added) to the spokes of the wheel.

In this particular wheel, the mode selector switch is attached with sticky foam tape to a neighboring spoke.

Night photos and video for gifs by Andrew Baker.

This guide was first published on Jul 29, 2015. It was last updated on Jul 29, 2015.