Introduction: Arduino Pixel Stick WS2812

This is my first instructable I got asked to put one togther for a friend but only after I had assembled it all so some pics i wasnt able to get Im sure there will be bits I have missed out I'm no code genius so I will do my best to answer any questions you have in this build there was a bit of guess work but that is the fun of it.

I will update this as much as I can if anyone spots anything missing please let me know :)

This is my variation on NeoPixel WS2812 DLW by Michael Ross Credit to Him and IS0-Mick for the code and others who contributed to code along the way.

Link to :

Test run of completed strip :

I have some early videos of it in the concept stage here:

Another one of testing :

Step 1: Step 1 : Parts Tools

I got most of my parts from Aliexpress and Ebay to keep costs down


Arduino Mega

AD Keypad

WS2812 144px/m

SD Reader

LCD 16x2

Momentary Push Button

Switch On/Off

1m Alloy Channel With Diffuser

Du Pont Wires

12v-5v converter

Project Box

Double Sided tape

1m piece of wood as wide as alloy channel for mounting

9v battery connector with DC jack end

Wire - Try to keep size same


Heat shrink Tube

Nuts & Bolts

Resistors ( a good Selection for contrasting LCD and one 470 for LED data line )

1 12v battery


Soldering Iron





Step 2: LCD and SD Card Hook Up

I breadboard everything before starting you can skip this step if your confident with lcd hook up etc


Pin Guide

1 - GroundPin

2 - +5VPin

3 - Contrast AdjustmentPin

4 - H/L Register SelectPin

5 - H/L Read/WritePin

6 - H/L EnablePin

11 - DB4Pin

12 - DB5Pin

13 - DB6Pin

14 - DB7

15 - Backlight Control +

16 - Backlight Control GND

LCD Connection

Pin 1 to GND Pin

2 to 5VPin

3 to Resistor ( bit of trial and error to find right one )

4 to Arduino pin 12

Pin 5 to GND Pin

6 to Arduino pin 11

Pin 11 to Arduino pin 5

Pin 12 to pin 4

Pin 13 to pin 3

Pin 14 to pin 2

Pin 15 to Arduino Pin 10 ( This is for backlight control )

Pin 16 to Arduino GND

I ended up joining the 3 GND's into one pin solder them togther and heathrink tube over top

SD Card :


5v to 5v

CS to Arduino pin 53

MOSI to Arduino pin 51

SCK to Arduino pin 52

MISO to Arduino pin 50

Momentary Push button :

GND - Pin 44

Positive - Pin 45


LED Strip Data in needs a 470 resistor inline this is talked about in step 5

LED Data In - Arduino Pin 31

Step 3: AD Keypad

Wiring :

5v to Arduino pin 5v

GND to Arduino pin GND

Signal to Arduino pin A0

I ran the Resistor Button Sketch to get the button press values

1. Sketch load

2. Open Serial Monitor

3. Press each button to get the value write these down for later to add into the code.

Video Of it in action

Step 4: Boxing Time

1. Mount the the AD keypad in the middle of the top of the project box I held it down with nuts and bolts and adjusted them so the buttons just sit under flush, cut slot for the sd card ( this doesnt have to be here) . See Pic 1 & 2

2. Cut hole for LCD using a dremmel or sharp knife drill holes for nut and bolt to secure it. See Pic 3

3. Drill hole for momentary push button ( doesnt have to be on the box wherever is good for yourself ) Attach wires before mounting add another hole for the On off Switch and 1 more on the bottom for the DC panel mount jack . See Pic 4

4. Mount : SD Card, Arduino Mega, 12v to 5v converter I used double sided tape and mounted the Mega on the side of the box next to the SD card. See Pic 4

5. Wire everything up I ran the DC jack Positive to the switch then to the converter and the Ground strait to the Ground on the converter the arduino gets its power from the 12v input.


I used a 9v battery lead with DC connector for Arduino just chopped of the battery terminal

You can use a buck converter but the led strip can draw a lot of amp when under full load

Step 5: Putting It All Togther

I started by drilling holes in the project box to attach to the wood using short grabber screws 2 should be fine

I then drilled a bigger hole in the box for the wires for the LED to come through ( See Pic 1 )

I channled out the wood enough so the hole in the project box matched the channel for the wires to sit in ( see Pic 2 I dont have a pic of the actual channel )

I drilled 3 holes to mount the channel to the wood I countersunk them so the led strip will sit level ( no pics sorry)

at one end of the channel i drilled out a big hole were the wire feeds into the channel in the wood to go to the box ( see pic 3 ) you will have to solder some more wire to make it long enough this is a good time to solder in a 470 resistor on the data line the green wire from the strip.

The Green Data line from the strip will go to pin 31 ( You can Change this in the code )

Attach your LED power wires to the 5v output of the converte

Note : I had to shorten the led strip by 2 pixels to fit in the channel

Step 6: Code

The code is included here in the Light wand.ino

You will need to edit line 84 int adc_key_val[5] ={ 30, 170, 390, 600, }; these are the numbers from the resistor sketch you will need to put them in to replace the ones in bold above. but there is a trick to this the buttons dont seem to read in order so I had to swap them round this is the combination that worked for me ( 142, 329, 0, 506, ) I only use 4 of the 5 buttons as the Momentary pushbutton works as the 5th button.

You will need to change this line as well: #73 LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

to this: LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

Upload the sketch and see if everything is all go

If not check you wiring make sure all plugs are in the right socket

Note: make sure you have the AD keypad plugged in or you menu will go on a loop through

Step 7: Misc Photos and Acknowledgments

Once again a big thank you to Michael Ross for his guide on this and the code he did all the hard work

Thanks to Joinerman James for the help figuring it all out

And to My Wonderful Girlfriend for putting up with the late nites and swearing

Step 8: Notes : Just a Couple of Notes

1. On LED strip I had to cut 2 pixels off the strip to fit in the alloy channel so make sure in the code you change the number of pixels to suit.

2. Setting up the pictures you can use photo shop or if you want to batch convert there is also irfanview. You will need to set the longest edge to 142 pixel ( Or how many LEDS you have ) and rotate the image I have included a couple of samples above.

3. I plan on doing a 2m one down the track this project can be used for 2m but the power draw will get up there so maybe look at a higher amp converter and adjust the strip- length in the code.

Photography Tips and Tricks Contest

Participated in the
Photography Tips and Tricks Contest