Maker.io main logo

LED Cylon Scooter

2022-04-15 | By bekathwia

License: Attribution Non-commercial

prototyping

 

It was easy to add a chasing LED animation to the grille of my 80s Honda Elite scooter. Now it looks like something out of Knight Rider or Battlestar Galactica.

Supplies for this project:

 

To keep up with what I’m working on, follow me on YouTubeInstagramTwitterPinterest, and subscribe to my newsletter.

circuit diagram

The strip is adhered to the inside of the grille using silicone adhesive, and the Trinket's power and ground connections are routed to the scooters power. There's a toggle switch on the power wire, mounted under the dashboard to easily turn the system on and off.

inside the finished grille

 I used Phil B.'s rock-solid larson scanner code for Arduino, adjusting the number of pixels to match my strip:

 

Copy Code
// Larson Scanner by Phil Burgess: 
// https://learn.adafruit.com/larson-scanner-shades?view=all

#include <Adafruit_NeoPixel.h>

#define N_LEDS 31
#define PIN 4

Adafruit_NeoPixel strip = Adafruit_NeoPixel(N_LEDS, PIN, NEO_GRBW + NEO_KHZ800);

void setup() {
strip.begin();
}

int pos = 0, dir = 1; // Position, direction of "eye"

void loop() {
int j;

// Draw 5 pixels centered on pos. setPixelColor() will clip any
// pixels off the ends of the strip, we don't need to watch for that.
strip.setPixelColor(pos - 2, 0x100000); // Dark red
strip.setPixelColor(pos - 1, 0x800000); // Medium red
strip.setPixelColor(pos , 0xFF3000); // Center pixel is brightest
strip.setPixelColor(pos + 1, 0x800000); // Medium red
strip.setPixelColor(pos + 2, 0x100000); // Dark red

strip.show();
delay(30);

// Rather than being sneaky and erasing just the tail pixel,
// it's easier to erase it all and draw a new one next time.
for(j=-2; j<= 2; j++) strip.setPixelColor(pos+j, 0);

// Bounce off ends of strip
pos += dir;
if(pos < 0) {
pos = 1;
dir = -dir;
} else if(pos >= strip.numPixels()) {
pos = strip.numPixels() - 2;
dir = -dir;
}
}

 

To read more about this project, head over to my website. To build your own, check out the following Digi-Key supplies:

Mfr Part # 3500
TRINKET M0 ATSAMD21E18 EVAL BRD
Adafruit Industries LLC
Mfr Part # 1097
RF RCVR 315MHZ 7SIP
Adafruit Industries LLC
Mfr Part # PN08019
MARINE GRADE SILICONE SEALANT CL
3M
$246.80
View More Details
Mfr Part # MN35
DIGITAL MINI MULTIMETER
FLIR Extech
$197.49
View More Details
Mfr Part # 11228-00000-100
3M VIRTUA PROTECTIVE EYE 1=1PC
3M
Mfr Part # WBNCC633731-2OZ
NO-CLEAN FLUX CORE SOLDER, 63/37
SRA Soldering Products
Mfr Part # 3019
THIRD HAND PANA HAND WORKSTATION
Adafruit Industries LLC
$411.11
View More Details
Mfr Part # 3132-22-1-0500-004-1-TS
HOOK-UP STRND 22AWG 300V RED 25'
CNC Tech
Mfr Part # 3132-22-1-0500-001-1-TS
HOOK-UP STRND 22AWG 300V BLK 25'
CNC Tech
Mfr Part # M2011S3A1W03
SWITCH TOGGLE SPST 6A 125V
NKK Switches
Mfr Part # 3132-22-1-0500-003-1-TS
HOOK-UP STRND 22AWG 300V YEL 25'
CNC Tech
Add all DigiKey Parts to Cart
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.