Overview

NeoPixel Ring Light

This 3D printed lighting rig is a great DIY build for your photo and video projects. It uses an Adafruit Trinket and NeoPixel LEDs. It’s also portable and battery powered or you can plug it into the wall. Your phone snaps onto the 3D printed bumper, making a great lighting solution for your front facing camera.

Dedicated white LED

 

In a previous project, we made a ring light for DSLR camera using a 60 NeoPixel ring. This new version uses RGBW type NeoPixels which produces much better lighting. White light from RGB type NeoPixels produces a reddish hue on skin tones and gives an unnatural color temperature. RGBW type of NeoPixels provide dedicated white light which produces much better color temperature. Combining RGB colors together creates a white light but this just doesn’t look too good on camera.

Prerequisite Guides

We recommend walking through the following tutorial to get familiar with the components used in this project.

Adafruit Trinket - Mini Microcontroller - 5V Logic

PRODUCT ID: 1501
Deprecation Warning: The Trinket bit-bang USB technique it uses doesn't work as well as it did in 2014, many modern computers won't work well. So while we still carry...
$6.95
IN STOCK

Adafruit LiIon/LiPoly Backpack Add-On for Pro Trinket/ItsyBitsy

PRODUCT ID: 2124
If you have an ItsyBitsy or Pro Trinket you probably know it's the perfect little size for a portable project. This LiPoly backpack makes it really easy to do! Instead of wiring 2...
$4.95
IN STOCK

Breadboard-friendly SPDT Slide Switch

PRODUCT ID: 805
These nice switches are perfect for use with breadboard and perfboard projects. They have 0.1" spacing and snap in nicely into a solderless breadboard. They're easy to switch...
$0.95
IN STOCK

Camera and Tripod 3/8" to 1/4" Adapter Screw

PRODUCT ID: 2392
Whaddya got a screw loose or something?This 3/8" to 1/4" Adapter Screw is super handy if you're building projects that...
$1.50
IN STOCK

Lithium Ion Polymer Battery - 3.7v 2500mAh

PRODUCT ID: 328
Lithium ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery...
$14.95
IN STOCK

NeoPixel 1/4 60 Ring - 5050 RGBW LED w/ Integrated Drivers

PRODUCT ID: 2874
What is better than smart RGB LEDs? Smart RGB+White LEDs! These NeoPixels now have 4 LEDs in them (red, green, blue and white) for excellent lighting effects. Round and round...
$11.95
IN STOCK

NeoPixel Stick - 8 x 5050 RGBW LEDs - Natural White - ~4500K

PRODUCT ID: 2868
What is better than smart RGB LEDs? Smart RGB+White LEDs! These NeoPixel sticks now have 4 LEDs in them (red, green, blue and white) for excellent lighting effects. These...
$7.95
IN STOCK

Adafruit Flex Perma-Proto - Half-sized Breadboard Flex-PCB

PRODUCT ID: 1518
Make your next project super-flexy with a prototyping board that can twist and bend. We took our lovely classic perma-proto design and had it made from incredibly thin polyamide film....
$7.50
IN STOCK

Circuit Diagram

Wired Connections

The circuit diagram above shows how the components will be wired together. This won't be 100% exact in the actual circuit but it's a very close approximation.

  • Slide switch to Lipoly Backpack
  • BAT from Lipo backpack to BAT on Trinket
  • G from Lipo backpack to GND on Trinket
  • 5V from Lipo backpack to USB
  • 5V from the NeoPixel Ring to Bat on Trinket
  • DIN from the NeoPixel Ring to Pin #4 on Trinket
  • Ground on the NeoPixel to Ground on Trinket

Battery Power

The circuit will be powered by a 3.7V 100mAh Lithium ion battery via JST connection. The battery plugs directly into the Trinket Backpack, which allows the recharging over the microUSB port on the Trinket.

Pick Your Micro-Controller

Any small size micro-controller board can be secured to the mounting clip. Since you'll need to tap your own mounting holes, you can use which ever board you'd like. For example, you could use a Bluefruit Feather BLE for controlling the LEDs via mobile app.

Getting Code Onto Trinket

Before we start disassembling or building the circuit, it's a good idea to get code uploaded to the micro-controller first. If you don't write / understand code, don't to worry! You don't need to be a programmer to be able to upload prewritten code :-) 

We'll walk you through the whole process. 

First, visit the Trinket tutorial page by clicking the button below. Follow the instructions to download & setup the Arduino IDE and install drivers.

Make sure you are able to get sketches compiled and uploaded, especially the blink example in the tutorial. Once you are comfortable with using the Trinket, you can continue!

Install Adafruit NeoPixel Library

Next, we need to add support for NeoPixels.

Visit the Adafruit NeoPixel tutorial to install the NeoPixel library!

Download Code to Sketch Folder

Now that we have the Adafruit boards & NeoPixel library installed, we can get our code ready to upload onto the board. Click the button below to download a zip file of the Arduino sketch. Uncompress it and place the folder to the Sketches folder. Open the file named "GemmaHoopAnimator.ino".

Uploading Code to Board

Then, in Arduino IDE, paste it in the sketch window (making sure to overwrite anything currently there). Next, goto the Tools menu > Board and select Adafruit Trinket (if you're using the 3V Adafruit Trinket version use Trinket 8Mhz. If you're using the 5V Trinket, select Trinket 12Mhz). Now you can click on the "check mark" icon to verify the code. If it's all good, we can continue to upload the code to the board.

Connect USB Data Cable to Trinket

Be sure to use a micro USB cable that can transfer data - A USB cable that ONLY charges devices will simply not work. Plug it into the microUSB port on the Adafruit Trinket board and the USB port on your computer (try to avoid connecting to a USB hub). As soon as you plug it in, you'll see a red LED blink on the Adaruit Trinket - This let's you know the board is ready to except code. While the LED is blinking, click on the Upload button (It's a right arrow icon, next to the check mark). The Arduino IDE will notify you if the upload is successful and completed.

Download: file
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
  #include <avr/power.h>
#endif

#define PIN 4 // the neopixels are wired to pin #4
#define NUM_LEDS 76 // here's the number of neopixels
#define BRIGHTNESS 50 // change brightness here – 255 for full brightness

//neopixel object defined here
Adafruit_NeoPixel strip = Adafruit_NeoPixel(NUM_LEDS, PIN, NEO_GRBW + NEO_KHZ800); 

void setup() {
  //special sauce for trinket
  #if defined (__AVR_ATtiny85__)
    if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
  #endif
  //special sauce for trinket

  strip.setBrightness(BRIGHTNESS); //global brightness 
  strip.begin(); // start neopixel 
  strip.show(); // Initialize all pixels to 'off'
}

void loop() {
  colorWipe(strip.Color(0, 0, 0, 255), 50);
}


void colorWipe(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
    strip.show();
    delay(wait);
  }
}

  

3D Printing

Download and 3D Print

The 3D printed parts can be downloaded with the link below.  

Edit Design

You can easily update the size or add features by editing the Fusion360 designs. The sketches are all listed in the timeline, so it's easy to adjust the size to each component.

3D Printing Enclosures

I drew up an enclosure in Autodesk Fusion 360 and designed to print in PLA/PHA. I 3D printed the enclosure using the BCN3D Sigma. If you don’t have access to a 3D printer, you could use a service like 3D Hubs to make it for you.

Diffusing LEDs

I used Natural White PLA/PHA material to 3D print the parts to give the LEDs a soft diffusion. You can also use Translucent filament for a sharper light diffusion.

Slice Settings

Depending on your 3D printer, you may need to adjust the slice settings. We tested the enclosure  on a BCN3D Sigma. The RingMount.stl part will require support materials. The parts are oriented to print "as is".

  • Nozzle: 0.6mm
  • Extrusion Multiplier: 1.0
  • Extrusion Width: 0.6mm
  • Layer Height: 0.3mm
  • Nozzle Temperature: 240c
  • Print Speed: 60mm/s

Thin Wall Perimeters 

Optimize the tool path by adjusting the thin wall perimeter to 50%. This will yeild a stronger part and speed up printing by insuring the nozzle only travels along the shape of the parts (no zigzag between walls).

Supports

 The RingMount.stl will require supports under the groove for the battery holder to slot into.

We added 4 pillars with a resolution of 2mm to the   middle portions of the groove. Add the pillars so they are closer to the outter edage of the groove. This will make it easier to remove later.

 

Support Removal

 

Use a flush cutter to easily remove the supports. Clamp down close to each edge and then cut down the center of the pillar to remove.

 

You can use a hobby knife to help clean up the walls.

Assemble

Connecting NeoPixel Rings together 

Here’s how to attach the NeoPixel sticks to the quarter 60 NeoPixel rings. Use two sets of third helping hands to keep everything steady while you solder. Header pins will help bridge the connections between pads. First we’ll need to tin the pads with solder and then slide a piece of header onto the pads.

Orient the PCBs so power and ground flow in the correct direction. Data-In should always flow to Data-Out.

Reference the circuit diagram on where to start and stop soldering the ring and stick PCBs.

Header Pins

We'll use standard sized header pins that came with the Adafruit Trinket. We only need about half of the header pin, so use a pair of flush cutters to cut them in half. Be sure to remove the header pins from the black piece of plastic.

Connecting Pads

Tin the ground, power and DIN/DOUT pads with a bit of solder. Then, keep the pad heated with the tip of the soldering iron while placing the piece of header on top. Use tweezers to place the header pins onto the pads. You don’t  want to burn your fingers! Tweezers also help keep things sturdy.

Using header pins makes the connections much stronger than just solder. But always be careful handling the PCBs, too much flex and you’ll rip the cooper clean off the PCB.

Connected NeoPixels

The pads from the NeoPixel stick and quarter PCBs don't line up exactly, so you'll ned to position the piece of header diagonally. 

Use tweezers to hold the header pin close to the pads and heat up the pads while sliding the header pin from one pad to the other.  You can also position a pin in the middle of two pads and then press the iron on the pin to transfer heat to the pads.

Ring Complete

 

Double check the data is flowing in the correct direction, from DIN to DOUT. Also double check power and ground on the NeoPixel Stick is correctly soldered to the NeoPixel Rings. You can easily short out a whole stick or ring if they are incorrectly aligned.

 

Measure Wires for NeoPixel Ring

Now we need create a set of three wires for connecing the NeoPixel ring. Lay the ring over the RingBody housing. Then, grab a piece of wire and see how long it needs to be to reach the neopixrl ring to the middle of the part as shown in the picture. We'll need to measure and cut three wires, for power, ground and data.

Then, use wire strippers to remove a bit of insulation from the tips of each wire. Next, tin the tips of each wire with a bit of solder. This will make it easier to solder the wires to pads on the NeoPixels. This also prevents strands of wire from fraying. Then, solder the wire to the pads on the NeoPixel PCB. Make sure it's the NeoPixel with the first Data-In! Use third helping hands to hold the ring up while soldering the wires to the ring.

Thread NeoPixel Wires

With the wires now connected to the NeoPixel ring, we'll need to thread the wires through the opening in the NeoPixel housing. Pull the wires all the way through and fit the NeoPixel ring into the housing. The PCBs should have a loose fit. Next, we'll work out how to secure the NeoPixel PCBs to the housing. 

Tap mounts

NeoPixel sticks have two mounting holes on the PCBs. We can secure the NeoPixel sticks to the housing with machine screws. We'll need to create mounting holes on the housing.  Start by marking the mounting holes onto the housing using a marker.

 

Then, use a pro needle tool to poke holes through the markings. Heat up the tip of the pro needle tool to make it to make a poke. Don't make it too big! Small hole is fine for now.

Next, we'll use an M2 sized machine screw to tap threads onto the newly created holes. We'll need to do this for all four mounting holes.

 

With all four mounting holes created and tapped, we can then fasten the machine screws through the NeoPixel PCBs and secure them to the housing.

Mounting Clip 

The Adafrut Trinket, Lipo Backpack and slide switch will be mounted to this part. Just like we did for the NeoPixels, we'll need to mark the mounting holes and use a pro needle tool to poke holes. Then, tap the holes using M2 size machine screws.

Place the components onto the mounting clip as shown in the picture and mark the mounting holes using a marker. Then, heat up the pro needle tool and insert the tip through the marking to punch out a hole. Then, tap the holes using a M2 size machine screw to create threads. Repeat this process for each mounting hole.

Do not mount the components to the part yet. We need to make wired connections before securing the components to the clip.

Measure Wires for Components

We'll need to create a set of three wires to connect the Lipo Backpack to the Adafruit Trinket. With the components layed out, hold a piece of wire over the them to guage the lengths of wire necessary for connecting the components together. We'll need two additional wires for conneting the slide switch to the Lipo Backpack. Measure, cut and strip each wire. Then, tip the exposed tips with a bit of solder. Next, we'll work out the best way to connect the components together.

Flex PCB

The Trinket only has two available pins for power and ground. We'll need to connect several wires to these pins, so we'll "expand" them by adding new pins!

These Flexible PCBs are excellent for this. They're connected a lot like breadboards but they're thin and flexible. So we can use a pair of scissors to cut pieces.

We'll only need to cut two pieces of flex PCB. Each piece should have 1x3 pins. 

Tin Pins

Next, we'll need to attach the pieces of Flex PCB to the pins on the Adafruit Trinket. But first, we should tin the pins with a bit of solder. The best way to do this is to use a pair of tweezers to hold onto the flex PCB and then secure the tweezers to third helping hands. This way the flex PCB is secured without creating bite marks. Then, apply a bit of solder to each pin.

 

Attach to Trinket

With our pieces of Flex PCB now tinned, we can attach them to the power and ground pins on the Trinket. We recommend handling the flex PCBs with tweezers so you have better control over your placement (and so the heat from the solder doesn't burn your fingers).

Solder each Flex PCB piece to the BAT and GND pins on the Adfafruit Trinket.

Enable Switch on Lipo Backpack

 

To enable the power switch on the lipo backpack, we'll need to cut a trace. You can use a hobby knife to scratch off the trace as shown in the picture. It may take a minute or two of scoring to fully remove the copper trace.

 

Tin Pins and solder to Trinket

 

Next, tin all of the pins on the Lipo Backpack with a bit of solder. Now we can connect the three wires to the pins (5V, G and BAT) on the Lipo Backpack. Then, connect the three wires to the Adafruit Trinket. Connect the BAT wire from the Lipo Backpack to BAT on the Trinket. Then, connect GND to GND. The 5V wire from the Lipo Backpack connects to the USB pin on the Adafruit Trinket.

Wire Slide Switch

 

Next, we'll need to connect wires to the slide switch. We'll only need two of the three leads on the slide switch so go ahead and trim one of them off (either the far left or far right, but not the middle!). Secure the switch to third helping hands and apply a bit of solder to the remaining two leads. Now grab the two wires for the switch and connect them to the leads. Next, connect the two wires from the slide switch to the two available pins on the Lipo Backpack. 

 

 

Mount Components

 

With our connections made, we can now mount the components to the mounting clip. Place them onto the clip and orient them properly. Then, fasten M2 size machines into the mounting holes and secure them to the clip.

 

The switch doesn't have any mounting holes, so we'll snap it into the little cavity on the clip. Position the switch so the actuator is accessable. Insert and press the switch into the cavity to mount it in place. Our components are now mounted and secured to the clip!

Attaching mounting clip 

Now it's time to mount the clip to the NeoPixel ring housing. Lay the clip over the back of the NeoPixel housing. The clip has groves on the ends that allow it to grab onto the edges of the housing. Rest one of the groves onto the edge of the housing and squeeze the part until the second grove can latch onto the edge.

Connect NeoPixels to Trinket

 

With the mounting clip attached to the housing, we can now connect the NeoPixel ring to the Adafruit Trinket.

Solder 5V from the NeoPixel ring to BAT on the Adafruit Trinket. Then connect ground to ground. Last but not least, connect the Data-In from the NeoPixel to pin #4 on the Adafruit Trinket.

Again, we recommend using tweezers to help maneuver the wires into each pin.

Battery Holder

Now it's time to fit the Lipo battery into the battery holder. First, insert the JST connector and cable from the battery through the hole in the housing, then pull the cable all the way through. Slowly slide the lipo battery into the protective housing.

If the tolerecnces are too tight for the battery to fit, do not force the battery inside! You'll need to either adust the slice settings or design file in CAD. The battery should slide in and out of the holder part with a loose tolerance.

Attach Holder to Housing

Now we can attach the battery holder to the NeoPixel ring housing. Insert the T-slot from the battery holder into the grove on the back of the NeoPixel housing. Press it through until the t-slot and grove are flush. Then, connect the battery to the Lipo Backpack by plugging in the male JST connector from the battery to the female JST connector on the Lipo backpack.

Diffusion Cover

Now we can attach the diffusion cover to the NeoPixel housing. Flip it over so the NeoPixels are facing up, then position the cover over the housing and line up the walls together. Press the cover into the housing so the walls join together. They should have a friction fit.

Install Tripod Thread Insert

Lastly, we can install the 3/8" to 1/4-20 thread insert into the NeoPixel housing. Insert the tripod thread into the spot with the protruding hole. You'll need to use a flat-head screw driver to fasten the thread insert into the housing. Fasten thread insert until it's flush with the surface of the housing.

Add Tripod & Take Selfie!

Now we can install the swivel-head tripod adapter. Fasten the screw from the tripod adapter into the tripod insert. Then, position the screw in a right-angle and tighten the set screw to lock it in place. And that's it! Now we have a really nice lighting rig for our camera phone.

Trouble, Issues and Questions

If you experience any technical issues with this build, please post them in the Adafruit forums so our support team can help.

This guide was first published on Feb 08, 2017. It was last updated on Feb 08, 2017.