AHEAD guide for Arduino WS2812B LED

Introduction

This document is intended to walk the reader through setting up a WS2812B development station using an Arduino Nano controller. This development station can then be used to develop a software interface between the application and the Arduino Nano.

Development kit - Tools and Materials Required

The only tools required will be a small phillips screwdriver and a sharp cutting utensil (wire cutter, scissors, or a knife).

Part Description
Arduino Nano Board Mini Nano V3.0 ATmega328P Microcontroller Board w/USB
Female DC Power Adapter 2.1mm jack to screw terminal block
Switching Power Supply 5V 2A (2000mA)
Quick Connect Terminal Block (Optional – See note in step 3 of Hardware Setup)
Jumper Wire 1 pin 2.54mm Spacing Male to Female
LED Strip WS2812B 1M 60 LED per Meter

Note: Contact your representative at AHEAD to order these supplied parts.

Hardware Setup

The instructions below assume that you have the LED strip listed in the materials section. If you opted for a different type of WS2812B LED strip you may not get the same connections. This hardware guide is designed to eliminate any need for soldering.

  1. Prepare the LED strip
  2. [ ] Unwind approximately a foot of LEDs starting at the end with the 3-pin female connector.
  3. [ ] Count out 15 LEDs and cut the strip with a wire cutter, scissors, or knife across the center of the conductive pads. You will see a line down the center. 15 LEDs will be about 9.5” and is approximately what we expect to use in the cart.
  4. [ ] For development, it is recommended to leave the plastic coating over the LEDs

  5. Connect the 2 non harnessed power wires from the LED strip to the female DC power adapter.

  6. [ ] Strip the insulation on the red and white wires so there is about 0.25” of wire exposed.
  7. [ ] Loosen the + and – terminals on the power adapter until you can insert the red wire into the + block and the white wire into the – block.
  8. [ ] When the wires are fully inserted, tighten the both the + and - blocks again.

  9. Connect the signal wire to the LED strip.

  10. [ ] Plug the male 3-pin adapter that was included as an accessory with the LED strip into the female end attached to the LED strip.
  11. [ ] Connect the green wire from the male 3-pin adapter to the bare end of the single wire jumper cable using either the quick connect terminal block.

    Note: Using the quick connect terminal block is optional. You can use any safe form of joining these wires (solder or other types of terminal blocks).

  12. [ ] Insulate the ends of the red and white wires from the adapter that are not being used with electrical tape.
  13. [ ] Connect the female end of the jumper wire to pin D6 of the Arduino Nano.

  14. Final connections

  15. [ ] Connect the female DC power adapter to the 5V power supply.
  16. [ ] Connect the Arduino Nano to your PC via the USB connector.
  17. [ ] Plug in the 5V power supply into an outlet (ideally the same power strip as the computer that is hooked up to the Arduino).

Software Setup

The Arduino software and the WS2812_Glediator are the only two pieces of software that are required. The RemoteLight software is an open source software that can be used to control the lights which you may or may not choose to use for your application, but we will use it in this document to verify that the hardware and software are set up correctly.

Software Downloads

Software Download Link
Arduino Desktop IDE Download
WS2812_Glediator.ino Download
RemoteLight v0.2.4 Download

Installation

  1. Arduino Desktop IDE
  2. [ ] Install the software to the default directory.
  3. [ ] Upon completion of the installation, drivers will install for the Arduino.

  4. WS2812_Glediator.ino installation

  5. [ ] Open the Arduino IDE
  6. [ ] Choose File > Open and navigate to where WS2812_Glediator.ino was downloaded.

    Note: The software may prompt you to move WS2812_Glediator.ino to the Arduino folder. This is ok and you can have it move there.

  7. [ ] Scroll down to the Definitions section in the IDE. The program will show up in the IDE.
  8. [ ] If your data line is connected to Pin 6 on your Arduino Nano, then the following #define statements should be set:
Statement Setting
#define DATA_PORT PORTD
#define DATA_DDR DDRD
#define DATA_PIN 6
#define NUMBER_OF_PIXELS 15
> Note: You will have to change the last one to correspond with the number of LEDs that you are using.
- [ ] Save the file.
- [ ] Click on the checkmark to verify the program
- [ ] Click the right arrow icon to upload the program to your Arduino.
- [ ] If either step 7 or 8 fails, there may be a different firmware on the device. Navigate to Tools > Processor and choose ATmega328P (Old Bootloader). Also verify that you have selected Arduino Nano for Board and that your Port matches what COM port is being used in Windows Device Manager.
  1. Navigate to where you downloaded RemoteLight-Windows.zip and unzip it.
  2. [ ] Navigate to the unzipped folder and open the RemoteLight-Windows application.
  3. [ ] Click on Output on the left side menu.
  4. [ ] Click on Add and select Arduino.
  5. [ ] Input in a name for this connection.
  6. [ ] Verify that the ComPort is set to the correct port.
  7. [ ] Choose any number up to 15 for Pixels.
  8. [ ] RGB order should be set to GRB.
  9. [ ] Click on Save and a green box should state that it is saved.
  10. [ ] Right click on the new connection that you just entered and click on Activate.
  11. [ ] Navigate to the colors and use the sliders to verify that your LED strip is working properly with your Arduino.