MBX guide for Arduino WS2812B LED
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).
|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 MBX to order these supplied parts.
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.
- Prepare the LED strip
- [ ] Unwind approximately a foot of LEDs starting at the end with the 3-pin female connector.
- [ ] 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.
[ ] For development, it is recommended to leave the plastic coating over the LEDs
Connect the 2 non harnessed power wires from the LED strip to the female DC power adapter.
- [ ] Strip the insulation on the red and white wires so there is about 0.25” of wire exposed.
- [ ] 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.
[ ] When the wires are fully inserted, tighten the both the + and - blocks again.
Connect the signal wire to the LED strip.
- [ ] 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.
- [ ] 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).
- [ ] Insulate the ends of the red and white wires from the adapter that are not being used with electrical tape.
[ ] Connect the female end of the jumper wire to pin D6 of the Arduino Nano.
- [ ] Connect the female DC power adapter to the 5V power supply.
- [ ] Connect the Arduino Nano to your PC via the USB connector.
- [ ] Plug in the 5V power supply into an outlet (ideally the same power strip as the computer that is hooked up to the Arduino).
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.
|Arduino Desktop IDE||Download|
- Arduino Desktop IDE
- [ ] Install the software to the default directory.
[ ] Upon completion of the installation, drivers will install for the Arduino.
- [ ] Open the Arduino IDE
- [ ] 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.
- [ ] Scroll down to the Definitions section in the IDE. The program will show up in the IDE.
- [ ] If your data line is connected to Pin 6 on your Arduino Nano, then the following #define statements should be set:
|> 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.|
- Navigate to where you downloaded RemoteLight-Windows.zip and unzip it.
- [ ] Navigate to the unzipped folder and open the RemoteLight-Windows application.
- [ ] Click on Output on the left side menu.
- [ ] Click on Add and select Arduino.
- [ ] Input in a name for this connection.
- [ ] Verify that the ComPort is set to the correct port.
- [ ] Choose any number up to 15 for Pixels.
- [ ] RGB order should be set to GRB.
- [ ] Click on Save and a green box should state that it is saved.
- [ ] Right click on the new connection that you just entered and click on Activate.
- [ ] Navigate to the colors and use the sliders to verify that your LED strip is working properly with your Arduino.