DIY Lightbox on the Cheap – Part 2

This is part 2 of a 2-part post on using and making a 15-zone full-colour lightbox for photography.  For an intro to lightboxes and some samples, please see Part 1.

About This Project

I built a lightbox that features 15 separate zones of continuous full-colour light.  It’s controllable from your browser with the ease of pointing at a colour wheel – or 15 colour wheels, as it were.  It uses an ESP32 microcontroller to control the light strip and an easy-to-use GUI interface to change your zones’ colour.

Both pieces of software are free, and I’ll supply you with the instructions/links below.

Each zone can be any colour you wish and wraps around your model, giving you all sorts of creative control over your photo.

Do you want drama?  Add a black-card-stock to one side and light it from the other with dark blues.

Here’s a small sampling of the things you can do with my lightbox, plus a screenshot of the GUI interface.

How to Build You Own Light Box

Lightbox Prototype
Lightbox Prototype

I chose to make my lightbox with a wooden front and rear frame, connected by 4 metal poles at each corner.

I used left-over bits of yarn from my wife’s crochet habit to tie the led strip to the frame.

I’ve detailed my LED layout in the Secret Plans below. If you choose to follow my plan, ensure you line up the LEDs to ensure each zone doesn’t have stray LEDs from another zone.

Secret Plans

Lightbox Blueprints

Click the Secret Plans to see how I built my version of the lightbox.  You can choose any dimensions you want.  You could even choose to use a frosted or clear plastic container since the LED lights run fairly cool.  However, your LED strip may not line up with my pre-defined zones if you change the dimensions.  In that case, you can change the configuration in WLED and redefine your presets in Node-Red.  But that’s getting out of scope for now.  If you would like more details on this process, let me know, and I’ll write it up.

esp32 node mcu

ESP32

An ESP32 (or esp8266)
quick disconnects

Connector

These connectors allow you to easily connect and disconnect power to your breadboard.

Connector

Check Prices
ws2812B LED Light Strip

WS2812B Lightstrip

5 meters, 60 LEDs / meter, 300 LEDs in total.

Breadboard

Standard 2.5mm pitch breadboard.

Breadboard

Check Prices

Hooking up the ESP32

ESP32 Controller SchematicYou only need two connections on the ESP32. GPIO 2 goes to the LED strip’s GREEN wire for Data, and the ESP32’s ground pin needs to be connected to the power supply’s ground.

You can use any 5V power supply with sufficient amperage.  A strip of lights can take 15 amps at full brightness, but you can get away with a lot less. You’ll know when you’ve exceeded the ability of your power supplies to supply current when your LED strip blinks.  Not to worry, you can turn down the brightness or add another power supply.

Did you say Free Software?

To control the LEDs, we need WLED and Node-Red.

1 – The first piece of software we need is WLED.  It runs on our microcontroller and provides an HTTP interface through which we control the lights.

WLED is a fully-featured piece of software that can control 1 or more strips of LED lights.  You can easily change colours and run animations and other colourful effects.  The Christmas Lights community often uses WLED for its ease of use and amazing effects, but anyone can control one or more LED strips.  WLED doesn’t need any other software to operate since it has its own built-in Web Interface and has available APPs on the Google and Apple App stores.

Since WLED is so flexible, it lets us set up a dedicated control panel for our lightbox.

This brings us to our number 2 piece of software…

2 – Node-Red.   It’s an amazing piece of software that allows you to “listen” to devices around your home, such as a Video Camera or Door Security Sensors, make decisions and talk to other devices.  For example, imagine a door sensor is triggered.  Someone opened a door without turning off your alarm.  Node-Red is alerted about the open door, which can decide how to handle the event.  One such option is to turn on a siren.  Another is to send an instant message to alert you the door is open.  With its ability to integrate with outside websites like IFTTT, Telegram, and others, Node-Red can react to nearly any event – optionally keeping you updated via email, SMS, or instant messenger.

Node-Red comes with a configurable dashboard which we will use for our application.  A “dashboard” lets you choose which widgets are visible and what data they display.  For example, we use the Colour Wheel Widget to choose a colour for each zone.  Node-Red comes with many additional Widgets such as Graphs, Push Buttons, Gauges and more.

How Does it Work Together?

For our purpose, Node-Red will communicate with our Microcontroller using a well-known protocol – HTTP.  This is the same protocol you use every day when surfing the web and allows Node-Red to have a conversation with WLED to query its status (i.e., record a preset) and control its LEDs.

Both pieces of software work seamlessly to provide a lightbox that is controllable through your browser.  Internet is not needed, but you DO need a Wifi network.

Here’s how it all works together:

YOU -> Chrome -> NodeRed -> HTTP/JSON -> WiFi -> Microcontroller/WLED -> Lights

Lightbox Controlled by Node redYou will make nearly ALL of your adjustments in your browser and Node-Red.  Individual lighting zones are controlled with a colour wheel and brightness/saturation slider.    Each zone is controlled independently of the others.

Any adjustment you make to a zone’s colour wheel results in a message sent to the microcontroller, which powers the correct LEDs.

Installing the Software

Installing Node-Red

Node-Red can be run on Windows or Linux with full instructions found on their webpage.   Each installation of Node-Red can run multiple projects. I run Node-Red as a service on my home server, where it controls several projects I have on the go.

If you want to run it on your PC, then choose the Local option from their webpage.

Installing WLED

WLED's Homepage can be found here

If you’re a quick starter or you’re familiar with ESP32, then skip straight to the installation of WLED, found below.

I prefer Flashing Method 1: ESPTool; although there are other methods, you can choose to fit your circumstances. For example, you can compile your own version with new features.

WLED Configuration App

Optionally, after you've installed WLED, you can use a free APP to control your lights.  You don't even need the Node-Red portion of this project.  But, for ultimate control of your lightbox, Node-Red is the way to go.  You can use the APP alongside Node-Red too.

Google PlayApple Play Store

Configuring Node-Red

Now that you have a working installation of Node-Red and WLED, we’ll need to configure Node-Red to control WLED.

First of all, here is a “Flow” that you can download and paste directly into Node-Red:

LightBox_Flow.json

To use this flow in Node-Red, go to the Hamburger menu, click Import.

From the Import screen, you can press the button labelled “Select a File To Import.”  Pick the file you downloaded from above, make sure you select “Import to New Flow,” and press the “Import” button.

Alternatively, you can copy and paste the JSON file’s contents into the import dialogue box, click new flow and finally, Import.

Your next step is to configure the IP address of your WLED.  Double-Click on the “HTTP Request” node and fill in your WLED details.  Just replace my IP address with your own.

In my case, I entered:

192.168.2.201/json/state

Next, double-click the “Send Colour Change” node and change its IP address to match your own WLED installation.

Now hit the DEPLOY button, and your control panel should be live.  To use it, we need to visit the Node-Red dashboard, which you can find here:

http://Node-Red-IPAddress:1880/ui

I typed in:

http://192.168.2.208:1880/ui/

(Replace MY IP address with your own)

Alternatively, Node-Red has a button to open the Dashboard under the Dashboard Configuration Tab.

How to Adjust Your Lightbox

The Dashboard

The Node-Red dashboard is a flexible user interface with various graphical widgets that you can interact with.  In this configuration, I’ve used the Color Picker widget, which lets you choose any colour, saturation and brightness.  When you click the colour wheel, that colour is sent to WLED.

If you haven’t already opened your Node-Red dashboard, you can do so by typing the following into your browser’s address bar (replacing ‘Node-Red-IP address with your own.

http://Node-Red-IPAddress:1880/ui

There are 15 colour pickers in total. Five for the left side of the box, five for the top and five for the right side.

To the dashboard’s right is an On/Off button for the LED strip and a global brightness slider.  Using this will affect every LED’s brightness.

And of course, there’s a preset section where I save some of my favourites, such as ALL OFF and PLEASANT.  

Note: For WLED to configure itself to our lightbox’s LED zone setup, we need to tell WLED which LEDs belong to which zone. WLED refers to our zones as “segments.”  To turn on the zone “Left Side, Row 1”, WLED needs to know which physical LEDs belong to that zone/segment.  That setup is contained in every preset, which means clicking any preset gets your WLED ready and configured for your lightbox.  After you’ve pressed a preset button, you can go ahead and play with the colour pickers.

  Always choose a preset to begin or when your WLED has been reset.

And Now - Have Fun!

Now that your lightbox is built, it’s time to have some fun.  Why not include the LEDs in your shot?  Or try a narrow DOF for bright saturated bokeh.  Maybe it’s time to try extension tubes for extreme magnification or take product shots for your Etsy store.

There are many great creative uses for a lightbox, and it’s easy to change the atmosphere inside.  But also consider using different reflectors for the floor, wall and ceiling.  For example, try a matt-black cardstock on one side to see how much it absorbs the light rather than reflecting.  Or, try a transparent floor with LEDs underneath, as I did in the Heineken shot.

Now that you have a new tool, I’m hoping you can take your creativity in new directions or supplement something you’re already doing.

Please leave me your comments if you would like me to cover something in more detail or corrections.  But especially if you’ve built one and would like to show it off.

About Lightboxes

Click part One for information about Lightboxes in general and some additional photos I took for this article.

Leave a Comment