Skip to content

Arduino Wiring

Lars edited this page Aug 23, 2020 · 5 revisions

Table of contents

Introduction

This guide covers the wiring of PWM (3-pin like WS2812) and SPI (4-pin like WS2801) LED strips to an Arduino based board.
The guide is demonstrated using an Arduino UNO, WS2812B strip and Apa102 strip. But any other Arduino board (Arduino Mega, Micro etc.) and any other addressable RGB LED strip can be used.

PWM strips - single data pin

LED strips that are controlled by PWM usually have only one data pin. But there are also viriants with a backup data line, like the WS2813 and WS2815 (comparison).
It is also important to note the supply voltage of the LEDs. There are quite a few LED strips that work with 5V, but also some that work with 12V (WS2815). So be sure to check the voltage the strip needs.

Wiring

The data pin connects to pin 6 on the Arduino. Optionally a resistor between 300 and 500 Ohm can be connected to the data pin of the Arduino to reduce noise on the control signal. The +5V (or +12V) pin connects to the (+) of your power supply and the Grnd connects to the (-) of your power supply. Additionally, the Grnd should also be connected to a ground pin on the Arduino.

Arduino strip power supply
Ground Grnd (-)
Pin 6 Data
+5V/12V (+)

SPI strips - 2 data pins

LED strips which are controlled by SPI have a data and clock pin. The separate clock pin allows a higher data frequency and therefore smoother animations - even with over 300 LEDs. As mentioned above you also have to pay attention to the correct operating voltage (5V or 12V).

Wiring

The data pin (Si / DI) connects to pin 11 on the Arduino, and the clock pin (CK / CLK) to pin 13. The +5V (or +12V) pin connects to the (+) of your power supply and the Grnd connects to the (-) of your power supply. Additionally, the Grnd should also be connected to a ground pin on the Arduino.

Arduino strip power supply
Ground Grnd (-)
Pin 11 Data (SI/DI)
Pin 13 Clock (CK/CLK)
+5V/12V (+)

➥ Next guide: Power Supply