Pixel Stick – WiFi controlled multicolor light painting tool

Light painting is a specific technique in Photography where a moving source of light is exposed to the camera for a certain duration and the light will be captured and put together in a single picture. The result will be so colorful with beautiful patterns of light resembling a painting. This project “WiFi operated light painting stick” was built to add extra awesomeness in this technique.

1. CHALLENGES WITH PRIMITIVE LIGHT SOURCE FOR LIGHT PAINTING:

Photographer will have no control over the color of light

You can have only limited number of colors

2. FEATURES OF THIS LIGHT PAINTING STICK:

In order to overcome the above two challenges I have added the below features:

Custom Colors – Apart from the standard colors this stick is quite capable of generating any color as per the wish of Photographer. It was added with a feature to input RGB code of any color as you wish like cyan,magenta, turquoise, olive, maroon etc. Look up for the “RGB color codes here” and use it to get your custom color.

3. MATERIALS REQUIRED:

Arduino Uno

LED strip (25 LED’s)

Power bank (5v, 10000mAh)

ESP8266 module

Bidirectional logic converter module

Connecting Wires

4. BLOCK DIAGRAM:

This Light painting project is based on the concept of IOT where two networking devices connect with each other to form a network in turn establishing communication and control. Here Arduino will host a webpage and act as a server. This webpage was designed in a way to take LED control inputs ( Colors : Red, Blue, Green and ON/OFF) from the user . This hosted webpage can be accessed via WiFi enabled device that is connected with Arduino and control the RGB LED strip connected to it. Here in this project Arduino with ESP8266 will perform the following activities

Command ESP8266 to join our device WiFi hotspot.

Create a server using the using the ESP board

Host the webpage in the Arduino itself and wait for external clients ( Device browser) to make the request

Once the client request is in, Arduino will send the webpage to client ( device browser) via ESP8266 module.

Then it will infinitely scan for LED commands ( will be explained in web interface section ) from the client.

Once the LED commands are received, Arduino will process that and activate the RGB LED strip connected to it.

Don’t worry if you can’t understand these. I have written a brief article explaining “How to create a webserver using Arduino and ESP8266”. Check this article, it will guide you in basics of Arduino webserver and controlling things connected to it using a webpage.

This project can be split in to three parts for the convenience of explaining. They are

Hardware

Web Interface

Arduino Algorithm & Code

5. HARDWARE:

5.1 CIRCUIT DIAGRAM:

5.2 WS2812 LED STRIP:

This is an RGB LED which consists of a control chip WS2812. This LED has three pins Vcc, GND and Din to control the color of this LED. Colors in this LED can be controlled via precisely timed signal. In this LED strip these individual WS2812 LED’s are chained together and can be controlled via one common timed signal from Microcontroller. In our case it is going to be our Arduino. Also do remember that this LED strip comes in 60 and 120 chained blocks. For the purpose of our project we are going to cut out 25 LED’s from the strip and use.

Remember RGB LED is a combination of Red, Green and Blue LED’s integrated in one package with each consume about 20mA of current. So a single RGB LED will consume about 60mA. So a 60 LED’s will consume about 1500mA, so you must use a power source that is capable of delivering current more than this. Check out this link to know more about these “WS2812 RGB LED strip”.

5.3 ARDUINO & ESP8266 MODULE:

Arduino will be the brain of this entire Light painting project. And I believe everyone knows that ESP8266 module is a simple WiFi developmental platform comes at the price of just $5. This ESP module will provide WiFi connectivity to Arduino and let it to connect with mobile Phone or other WiFi enabled devices.

5.5 POWERING THE WHOLE CIRCUIT:

Power this entire project by using a portable power supply. I have a used a regular power bank rated ( 5.1v / 10000mah) for this purpose. This powerbank is capable of delivering current up to 2A which makes this an optimum choice for this project. In order to connect them use a cut out USB cable to power this entire circuit. The + and – from the USB cable needs to go into the + and – pins of +5Vcc as shown in the above circuit diagram. Note that you need to power up the Arduino from power bank by directly connecting it to the 5v pin of Arduino.

5.6 INDICATOR LEDS:

There are two LED’s in the circuit which acts as an indicator to the user.

Red – Indicates whether the stick is in ON/OFF state.

Green – Indicates that this system is ready to receive client request from any device connected to Arduino.

5.7 SETTING LIGHT PAINTING STICK:

I have made a video setting this whole light painting stick, watch it for more clarity.

Wiring the LED Strip , Arduino and Power bank together ( A big mess of wires )

I have explained the total project setup in the above video , take a look for step by step instructions on this project setup.

6. WEB INTERFACE:

Web interface is of great importance since it will serve as the user interface through which commands go to Arduino via ESP8266. Our web interface is pretty simple and coded in plain HTML. The buttons in this interface passes a GET command with a URL parameter with every button press. This interface consists of

WEB INPUTS

URL PARAMETERS ( LED commands )

6 buttons for standard colors

“/Red” , “/Gre”, “Blu”, “/Whi”, “/Gol”, “Rai”

Custom color input using RGB Values

“?R=255&G=255&B=255”

Turn Off the Strip

“/Off”

The value from these buttons then goes to the Arduino by means of a GET request. For example when pressed Red button a GET request with URL “/Red” will be sent to Arduino. From there Arduino will process this text and activate LED strip accordingly.

NOTE:

This project is based on the capability of ESP8266 to auto connect with the WiFi hotspot once turned on. So the ESP8266 and your hotspot device must be paired at least once before using in this project.

The Arduino was programmed in such a way to handle only one client communication which means only one browser can request Arduino to control the LED’s

There is a wait time for creating server by the Arduino with ESP8266. The end of this wait time can be known by green LED. Once the green LED lights up you are good to initiate the client request from your browser.

You should supply the entire project with source of at least 2A in order to keep it run hassle free.

Hope you like this project, Do leave a comment if you have any feedback or queries regarding this 🙂