Introduction: LED Turning Indicators and Strobe

About: maker, programmer, teacher, activist

This tutorial is part of a 5-part "pimpMyBike" video series that includes:

  1. turning indicators & strobe night light
  2. speedometer / odometer
  3. brake lights + battery pack
  4. LED visualizer

This section covers the turning indicators and blinky night light. Pushing one button turns on an LED arrow that scrolls in the back of the bike. Pushing both buttons turns on a strobe light.

Step 1: Materials

Materials

Tools

  • soldering iron + solder
  • wire stripper + cutter
  • pliers

Step 2: Pushbutton

Solder the JST cables to the pulls (listed below) on the pushbuttons. Mount the buttons on the handlebars using zip ties, and use multiple JST cables to get the wires from the handlebars to the Arduino (mounted on top). Here is how the buttons will be connected to the Arduino (to match the code):

Right pushbutton:

  • NO (normally open) - 5V
  • Common - connected to A3 and a 10K resistor to ground
  • Positive - A5
  • Negative - Ground

Left pushbutton:

  • NO (normally open) - 5V
  • Common - connected to A2 and a 10K resistor to ground
  • Positive - A4
  • Negative - Ground

Step 3: Matrix Panel

The 16x24 Matrix panel will be attached at the back of the bike. Connect 5 wires to the matrix; refer to the image of the jumpers in the female headers for the specific pins and orientation. Each of these wires/jumpers must be connected to different rows on the protoboard (5V and GND should be attached to the protoboard's rail pins). Connect a JST cable to each of these different pins. Run JST cables (or other wire) down the length of the bike to the Arduino mounted on the handle bars. Here is where the wires from the matrix need to be connected to the Arduino to match the code:

  • VCC (red) to +5V
  • GROUND (black) to Ground
  • DATA(orange) to digital 11
  • WRITE (yellow) to digital 12
  • CS0(white) to digital 10.

Refer to the Adafruit tutorial page for additional information about the 16x24 panel.

Step 4: Power

Solder 2 extra wires to the Minty Boost so that we can get 5V and GND to the protoboard on the back of the bike. The lithium ion battery plugs into the Minty Boost. Run a USB cable from the Minty Boost down the length of the bike to power the Arduino on the front. The Minty Boost should now be powering both the circuit at the back (the Matrix panel) as well as the Arduino and the pushbuttons.

Step 5: Code + Visualizer

The Arduino code is available in the Github repo.

You'll need to install the HT1632 LED Matrix library.

You may want to comment out various functions in the Arduino program's loop (e.g. the "checkBraking()" function if you aren't building the brake light).

LED Visualizer

The code for the Visualizer is in the same Github repo. The visualizer is a Processing sketch that makes it easy to design patterns for turning indicators, brake lights, or strobe lights. The visualizer has changed a little bit from the video, but the process remains the same: copy paste the printed output of the visualizer sketch into the corresponding array of values in the Arduino code (see the attached images).

Instructables Design Competition

Participated in the
Instructables Design Competition