# Retroreflective Greenscreen Light Ring QT Py Controller 

## Overview

https://youtu.be/I7kWraqKYCk

From Zoom calls to SciFi effects films -- you can do it all with a DIY **chromakey** background made from **retroreflective** fabric, lit with a lens-mounted **NeoPixel** light ring. A **QT Py** microcontroller running **CircuitPython** allows you to control the light ring color and brightness with a push and twist of a rotary encoder knob.

Create chromakey mattes to place your subject in front of any background image or video you like using a retroreflective **greenscreen** / **bluescreen** -- you decide the color you need with the press of a knob.

Traditional greenscreen/bluescreen backgrounds are tricky to light evenly, and require a lot of space to prevent your subject from casting shadows and receiving green/blue spill. This retroreflective screen solves all of these problems -- and costs less, too!

This rig works equally well with realtime keyers (built into **Zoom** , **OBS** , and others) as well as offline compositing software, such as **DaVinci Resolve** or **iMovie**.&nbsp;

This technique is used in existing commercial systems, such as the [Reflecmedia Chromatte/LiteRing](http://www.reflecmedia.com/broadcast/products/Dual%20Litering/index.htm) and the [LEDChromaKey](https://ledchromakey.com/) system.

A friend of mine told me about this technique and said he'd built a DIY version that worked great. I figured NeoPixels would work well for this and my buddy gave me some spare retroreflective screen material to test it out. I did a quick test and found out that it works better than I'd hoped!

![projects_chring-0498.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/672/medium640/projects_chring-0498.jpg?1615360634)

![projects_chring-0496b.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/674/medium640/projects_chring-0496b.jpg?1615360876)

## Parts
### NeoPixel Ring - 24 x 5050 RGB LED with Integrated Drivers

[NeoPixel Ring - 24 x 5050 RGB LED with Integrated Drivers](https://www.adafruit.com/product/1586)
Round and round and round they go! 24 ultra bright smart LED NeoPixels are arranged in a circle with 2.6" (66mm) outer diameter. The rings are 'chainable' - connect the output pin of one to the input pin of another. Use only one microcontroller pin to control as many as you can...

In Stock
[Buy Now](https://www.adafruit.com/product/1586)
[Related Guides to the Product](https://learn.adafruit.com/products/1586/guides)
![Hand holding NeoPixel Ring with 24 x 5050 RGB LED, lit up rainbow](https://cdn-shop.adafruit.com/640x480/1586-00.jpg)

### Adafruit QT Py - SAMD21 Dev Board with STEMMA QT

[Adafruit QT Py - SAMD21 Dev Board with STEMMA QT](https://www.adafruit.com/product/4600)
What a cutie pie! Or is it... a QT Py? This diminutive dev board comes with our favorite lil chip, the SAMD21 (as made famous in our GEMMA M0 and Trinket M0 boards).

This time it comes with [our favorite connector - the STEMMA QT](http://adafruit.com/stemma), a chainable I2C...

In Stock
[Buy Now](https://www.adafruit.com/product/4600)
[Related Guides to the Product](https://learn.adafruit.com/products/4600/guides)
![Animation of Adafruit QT Py with onboard NeoPixel in a rainbow swirl.](https://cdn-shop.adafruit.com/product-videos/640x480/4600-07.jpg)

### Rotary Encoder + Extras

[Rotary Encoder + Extras](https://www.adafruit.com/product/377)
This rotary encoder is the best of the best, it's a high-quality 24-pulse encoder, with detents and a nice feel. It is panel mountable for placement in a box, or you can plug it into a breadboard (just cut/bend the two mechanical side tabs.) We also include a nice soft-touch knob with an...

In Stock
[Buy Now](https://www.adafruit.com/product/377)
[Related Guides to the Product](https://learn.adafruit.com/products/377/guides)
![Rotary Encoder with rubbery knob](https://cdn-shop.adafruit.com/640x480/377-02.jpg)

### Black Nylon Machine Screw and Stand-off Set – M3 Thread

[Black Nylon Machine Screw and Stand-off Set – M3 Thread](https://www.adafruit.com/product/4685)
Totaling **420 pieces** , this **M3 Screw Set** &nbsp;is a must-have for your workstation.&nbsp;You'll have enough screws, nuts, and hex standoffs to fuel your maker tendencies&nbsp;for days on end! M3 size screws fit a number of&nbsp;Adafruit breakout/dev board...

In Stock
[Buy Now](https://www.adafruit.com/product/4685)
[Related Guides to the Product](https://learn.adafruit.com/products/4685/guides)
![Opened box showing many nylon screws](https://cdn-shop.adafruit.com/640x480/4685-01.jpg)

### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)
![Angled shot of a coiled black, USB-C to USB-A cable.](https://cdn-shop.adafruit.com/640x480/4474-02.jpg)

### Silicone Cover Stranded-Core Wire - 26AWG in Various Colors

[Silicone Cover Stranded-Core Wire - 26AWG in Various Colors](https://www.adafruit.com/product/1970)
Silicone-sheathing wire is super-flexible and soft, and it's also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1970)
[Related Guides to the Product](https://learn.adafruit.com/products/1970/guides)
![Stranded-core wires in white, gray, black, blue, green, red, orange, and yellow.](https://cdn-shop.adafruit.com/640x480/1970-00.jpg)

### Elastic Band

You'll also need a single #33 size (approx. 3-1/2" x 1/8") rubber or silicone band. I like the silicone hair bands like [these](https://www.amazon.com/gp/product/B01LW6V1SV/).

![projects_61choZbObrL._SL1080_.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/621/medium640/projects_61choZbObrL._SL1080_.jpg?1615358794)

### Retroreflective Fabric

Get a yard or two of retroreflective fabric in either 39" or 49" width. Available most readily on eBay, [such as this item](https://www.ebay.com/itm/SILVER-REFLECTIVE-FABRIC-sew-on-material-width-39-inch-by-length-1-yard/122729782729) or [this one](https://www.ebay.com/itm/Silver-Reflective-Fabric-sew-on-material-width-49-inch-by-length-1-yard/193831501978)

![projects_s-l500.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/686/medium640/projects_s-l500.jpg?1615398536)

# Retroreflective Greenscreen Light Ring QT Py Controller 

## Chromakey Essentials

## Chromakey Essentials

The goal of a chromakey is to create an opacity matte (or alpha channel) that isolates a subject being filmed from their background so that they may be composited in front of a different background.

This happens both in realtime applications and in offline composites for rendering.

Realtime chromakeys are used for weather people to appear in front of their maps on the local news. They're used in Zoom conferences to make a participant appear in front of a Tahitian beach, or in OBS streams to composite a gamer's head over their Mario speed run.

Offline chromakeying is done in compositing and video editing software such as Nuke, After Effects, Premiere, DaVinci Resolve, and iMovie for compositing over film plates, video background, and stills in everything from VFX feature films to indie music videos to home movies.

## Traditional Greenscreen Example

By filming in front of a saturated bright green or blue background, software can identify areas of the image that contain the subject (the non-green or non-blue pixels) such as actors, props, and puppets, and create a "hold out matte" for them.

In the image seen here, the matte has is an opacity map in which black pixels are transparent and white pixels are opaque, with gray shades in between for partial opacity.

This matte is then used to composite only the foreground image over a different background layer.

![projects_repGreen1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/571/medium640/projects_repGreen1.jpg?1615336930)

![projects_repGreen2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/572/medium640/projects_repGreen2.jpg?1615336970)

![projects_repGreen5.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/573/medium640/projects_repGreen5.jpg?1615336998)

![projects_repGreen6.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/574/medium640/projects_repGreen6.jpg?1615337034)

Info: 

## Traditional Greenscreen Challenges

The entire premise of shooting on a greenscreen relies on having a very evenly lit greenscreen. The more variation in the lighting from shadows cast on it by the subject, the more difficult it is to use.

Additionally, it's important to avoid having green spill light bounce from the greenscreen onto the actors.

These issues are typically solved by creating a lot of space between the actors and the greenscreen, by lighting the greenscreen with dedicated lights, and by avoiding frontal lighting for the actors to prevent shadow casting.

These techniques work well in a dedicated filming environment such as a soundstage, but can be a huge challenge when shooting at home or in other constrained locations.

![](https://cdn-learn.adafruit.com/assets/assets/000/100/575/medium800/projects_IMG_1375.jpeg?1615339956)

In this image, our living room has been turned into a greenscreen stage. Note the pair of side lighting rigs dedicated to the greenscreen.

## Retroreflector

Since the requirement of a greenscreen is to have an evenly lit, saturated color backdrop, there must be a way to achieve this that doesn't require a lot of space and dedicated lighting, right? There is! Enter the retroreflector!

A retroreflector is a specialized material (or arrangement of mirrors) that reflects light directly back at its source, regardless of incoming angle. This is why you see a runners shoes, or a safety vest, or a stop sign at night so brightly reflect the light from your car's headlights the entire time they're in view -- there isn't just one flash of light if you get lucky and the angles align for a brief moment. The retroreflective material ensures that.

Here's a [terrific video on retroreflectors](https://www.youtube.com/watch?v=Bi_Tp1H9CDs) that my friend Josh shared with me.

Retroreflective fabric is covered in tiny spherical lenses which direct incoming most light back at its source, regardless of entrance angle. They do this by refracting incoming light beams toward a mirrored surface below the lens, which reflects the light, and then the glass beads refract the light a second time, aiming them back toward the same direction from which they came.

This image adapted from one on the [3M Scotchlite website](https://www.3m.com/3M/en_US/scotchlite-reflective-material-us/industries-active-lifestyle/active-lifestyle/how-retroreflection-works/) may help explain:

![](https://cdn-learn.adafruit.com/assets/assets/000/100/577/medium800/projects_retrodiagram2.jpg?1615342459)

## Flashlight Demo

Here's a demonstration of the retroreflector in action. With a flashlight positioned directly inline with the camera lens, we can see how the light returns back toward the lens no matter what angle the light is relative to the retroreflective backdrop.

![projects_flash6.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/580/medium640/projects_flash6.jpg?1615345205)

![projects_flash4.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/581/medium640/projects_flash4.jpg?1615345222)

![projects_flash3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/582/medium640/projects_flash3.jpg?1615345241)

![projects_flash5.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/583/medium640/projects_flash5.jpg?1615345252)

## Retroreflective Chromakey

If we shine an even, saturated green (or blue) light at the retroreflector from the point of view of a camera, all of that lovely green light gets reflected right back at the camera lens. The light does not need to be very bright at all, which means a ring of LEDs will do the trick of turning the backdrop into an even chroma screen but will not cast any colored light onto the actors. It's science, but the results seem magical!

Also, note how the subject in the following examples is just inches from the screen without any problems from shadows that we'd see with a traditional greenscreen.

![](https://cdn-learn.adafruit.com/assets/assets/000/100/584/medium800/projects_chring-637046303.jpg?1615354135 Skull in front of retroreflective backdrop)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/585/medium800/projects_chring-637046291.jpg?1615354141 NeoPixel ring for chromakey lighting)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/587/medium800/projects_chring-637046283b.jpg?1615354667 Retroreflective backdrop is evenly lit by NeoPixel ring)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/588/medium800/projects_skullblack.jpg?1615355820 Chromakey matte pulled and basic color correction)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/589/medium800/projects_skullada.jpg?1615355828 Composited over a new background)

# Retroreflective Greenscreen Light Ring QT Py Controller 

## CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the **CIRCUITPY** drive to iterate.

## Set up CircuitPython Quick Start!

Follow this quick step-by-step for super-fast Python power :)

If you want to get started with your QT Py, and you have NOT soldered a chip to the back of it, download CircuitPython from the following link:

[Download the latest version of CircuitPython for your QT Py from CircuitPython.org](https://circuitpython.org/board/qtpy_m0/)
Warning: 

[Download the latest version of CircuitPython for your QT Py Haxpress from CircuitPython.org](https://circuitpython.org/board/qtpy_m0_haxpress/)
 **Click the link above and download the latest UF2 file.**

Download and save it to your desktop (or wherever is handy).

![adafruit_products_QT_Py_CP_download.png](https://cdn-learn.adafruit.com/assets/assets/000/095/209/medium640/adafruit_products_QT_Py_CP_download.png?1601397466)

Plug your QT Py into your computer using a known-good USB cable.

**A lot of people end up using charge-only USB cables and it is very frustrating! So make sure you have a USB cable you know is good for data sync.**

Double-click the small **RST (reset)** button, and you will see the NeoPixel RGB LED turn green. If it turns red, check the USB cable, try another USB port, etc.

If double-clicking doesn't work the first time, try again. Sometimes it can take a few tries to get the rhythm right!

![adafruit_products_QT_Py_neopixel_green.png](https://cdn-learn.adafruit.com/assets/assets/000/095/210/medium640/adafruit_products_QT_Py_neopixel_green.png?1601397596)

You will see a new disk drive appear called **QTPY\_BOOT**.

&nbsp;

&nbsp;

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to&nbsp; **QTPY\_BOOT**

![adafruit_products_QT_Py_BOOT_drive.png](https://cdn-learn.adafruit.com/assets/assets/000/095/211/medium640/adafruit_products_QT_Py_BOOT_drive.png?1601400747)

![adafruit_products_QT_Py_drag_UF2.png](https://cdn-learn.adafruit.com/assets/assets/000/095/212/medium640/adafruit_products_QT_Py_drag_UF2.png?1601400759)

The red LED will flash. Then, the **QTPY\_BOOT** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it, you're done! :)

![adafruit_products_QT_Py_CIRCUITPY.png](https://cdn-learn.adafruit.com/assets/assets/000/095/213/medium640/adafruit_products_QT_Py_CIRCUITPY.png?1601400772)

# Retroreflective Greenscreen Light Ring QT Py Controller 

## CircuitPython Libraries

The chromakey light ring code requires some CircuitPython libraries to work. Complete the following steps to get your board ready.

## CircuitPython Library Bundle

You'll need to install some libraries on your QT Py.

Carefully follow the steps to find and install these libraries from [Adafruit's CircuitPython Library Bundle](https://circuitpython.org/libraries).&nbsp; Our CircuitPython starter guide has [a great page on how to install libraries from the bundle](https://learn.adafruit.com/welcome-to-circuitpython/circuitpython-libraries).

You'll need to manually install the following libraries by copying the files to the **lib** folder on your **CIRCUITPY** drive:

- **adafruit\_pypixelbuf.mpy**
- **neopixel.mpy**

![projects_chromalibs.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/676/medium640/projects_chromalibs.jpg?1615386968)

## Library Install Troubleshooting

If you get an error indicating you have run out of space while copying files over, please refer to the [Prevent & Remove MacOS Hidden Files section of the Troubleshooting page](https://learn.adafruit.com/welcome-to-circuitpython/troubleshooting#prevent-and-remove-macos-hidden-files-2978468-47) for information on resolving the issue.

# Retroreflective Greenscreen Light Ring QT Py Controller 

## Code the Chromakey Light Ring

## Text Editor

Adafruit recommends using the Mu editor for editing your CircuitPython code. You can get more info in [this guide](https://learn.adafruit.com/welcome-to-circuitpython/installing-mu-editor).

Alternatively, you can use any text editor that saves simple text files.

## Code

Copy the code shown below and paste it into Mu, then save it to your **CIRCUITPY** drive with the name **code.py**

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Chromakey_Light_Ring/code.py

## How It Works

### Libraries

First, the libraries are imported -- `time` for debouncing pauses, `board` for pin definitions, `digitalio` to set pins to inputs or outputs and to use the encoder knob button, `neopixel` for RGB LEDs, and `rotaryio` for reading the encoder.

### NeoPixel Setup

Next, the `dim_val` variable is created and set for the starting brightness value of 20%.

Then `NUM_PIX` variable is set to the number of NeoPixels in the ring you're using, in this case 24.

Depending on the type of NeoPixel ring you use, you'll set it to either "RGB" or "RGBW".

```python
PIX_TYPE = "RGB"  # RGB or RGBW

if PIX_TYPE == "RGB":
    ORDER = (1, 0, 2)
    GREEN = (0, 255, 0)
    BLUE = (0, 0, 255)
    WHITE = (255, 255, 255)
    BLACK = (0, 0, 0)
else:
    ORDER = (1, 0, 2, 3)
    GREEN = (0, 255, 0, 0)
    BLUE = (0, 0, 255, 0)
    WHITE = (0, 0, 0, 255)
    BLACK = (0, 0, 0, 0)
```

Danger: 

A list for `colors` is created so you can cycle between them using the push encoder button, then the ring is set up and turned on to the first color in the list.

```python
colors = [GREEN, BLUE, WHITE, BLACK]
current_color = 0


ring = neopixel.NeoPixel(
    board.MISO, NUM_PIX, brightness=0.2, auto_write=False, pixel_order=ORDER
)
ring.fill(colors[current_color])
ring.show()
```

### Pin Setup

You'll set up the encoder pins next. Based on the physical layout of the encoder legs, you'll need to set pin **A2** as a "fake" ground by setting it to be an output pin. Thanks again to Tod Kurt for this setup.

The encoder pins are on **A3** and **A2**.

```python
# button of rotary encoder
button = DigitalInOut(board.MOSI)
button.pull = Pull.UP

# Use pin A2 as a fake ground for the rotary encoder
fakegnd = DigitalInOut(board.A2)
fakegnd.direction = Direction.OUTPUT
fakegnd.value = False

encoder = rotaryio.IncrementalEncoder(board.A3, board.A1)
```

The state of the encoder position is stored in the `last_encoder_val` variable to compare it to the currently read value, thus detecting if the knob is being turned and if so in which direction.

### Main Loop

The main loop of the program does the following things:

Compares the encoder value to the last encoder value.

If the encoder value is increasing (knob is turned clockwise), the brightness is increased. Conversely, if the encoder value is decreasing, the brightness is decreased.

When the push encoder button is pressed, the color is switched to the next one in the `colors` list.

```python
while True:
    encoder_diff = last_encoder_val - encoder.position  # encoder clicks since last read
    last_encoder_val = encoder.position

    if button.value is False:  # button pressed
        current_color = (current_color + 1) % len(colors)
        ring.fill(colors[current_color])
        ring.show()
        time.sleep(0.5)  # debounce

    else:
        if encoder_diff > 0:
            if dim_val >= 0.01:
                dim_val = (dim_val - 0.01) % 1.0
                ring.brightness = dim_val
                ring.show()
        elif encoder_diff < 0:
            if dim_val <= 0.99:
                dim_val = (dim_val + 0.01) % 1.0
                ring.brightness = dim_val
                ring.show()

        time.sleep(0.01)
```

# Retroreflective Greenscreen Light Ring QT Py Controller 

## Build the Chromakey Light Ring

There are various ways to attach the light ring to the camera, dependent on the camera used. The lens of the camera must be within the LED circle, and you want to avoid blocking any moving parts or sensors.

Below is a 3D printed solution for attaching to a number of different cameras including a lens barrel and a webcam.

![](https://cdn-learn.adafruit.com/assets/assets/000/100/570/medium800/projects_chring-0425.jpg?1615333271)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/569/medium800/projects_chring-0447.jpg?1615333255)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/590/medium800/projects_chring-0355.jpg?1615356644)

First, we'll mount the rotary encoder to the QT Py. This is based on a method created by Tod "@todbot" Kurt [as documented here](https://github.com/todbot/qtpy-knob).

## Encoder QT Py

Place a bit of insulation such as Kapton tape on the back of the QT Py to prevent any shorts from metal on the underside of the encoder.

You may also need to bend or clip the retention pegs on the encoder.

Insert the encoder legs into the QT Py _from the underside_ so that these connections are made:

- Encoder two leg side are in QT Py **GND** and **MO**
- Encoder three leg side are in QT Py **A1** , **A2** , **A3**

Don't solder them yet, first we'll insert the end of the black wire into the same GND pin hole as the encoder leg.

![projects_chring-0358.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/591/medium640/projects_chring-0358.jpg?1615356668)

![projects_chring-0361.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/592/medium640/projects_chring-0361.jpg?1615356748)

![projects_chring-0359.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/593/medium640/projects_chring-0359.jpg?1615356757)

![projects_chring-0360.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/594/medium640/projects_chring-0360.jpg?1615356945)

## Wiring

Insert the black wire's end into the same GND hole as the encoder pin.

Solder this pin/wire combo in place, then solder the other encoder pins.

Solder the red wire to the QT Py's **3V** pin hole.

Solder the gray wire into the QT Py's **MI** pin hole.

![projects_chring-0362.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/595/medium640/projects_chring-0362.jpg?1615356981)

![projects_chring-0363.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/596/medium640/projects_chring-0363.jpg?1615357165)

![projects_chring-0364.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/597/medium640/projects_chring-0364.jpg?1615357173)

![projects_chring-0365.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/598/medium640/projects_chring-0365.jpg?1615357246)

## Wiring Sleeve

For extra style points you can use a length of wiring sheathing or paracord sheath and heat shrink tubing to tidy up the wires before soldering them to the NeoPixel ring.

Remove the core strands from the paracord sheathing.

Insert the wires through the sheath, then cut to pieces of heat shrink tubing length to head and hold the sheath in place.

![projects_chring-0367.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/599/medium640/projects_chring-0367.jpg?1615357353)

![projects_chring-0368.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/600/medium640/projects_chring-0368.jpg?1615357425)

![projects_chring-0370.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/601/medium640/projects_chring-0370.jpg?1615357436)

![projects_chring-0371.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/602/medium640/projects_chring-0371.jpg?1615357444)

## NeoPixel Ring Wiring

Solder the wires to the NeoPixel ring as shown.

The connections are:

- **Red** wire to **PWR**
- **Black** wire to **GND**
- **Gray** wire to **Data Input**

![projects_chring-0372.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/603/medium640/projects_chring-0372.jpg?1615357547)

![projects_chring-0373.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/604/medium640/projects_chring-0373.jpg?1615357582)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/605/medium800/projects_chring-0375.jpg?1615357594)

## Light Ring Mount

This light ring mount is designed to fit a variety of lenses on mirrorless cameras and DSLR cameras.

First, download the 3D model files linked below. Print the ring and four of the adjustment blocks. Settings may vary from printer to printer. Below are my key settings, but these are pretty forgiving models, so you should be able to print without too much noodling.

- PLA filament
- 0.15mm layer height
- 30% infill
- 210º C extruder temperature
- 60º C heated glass build plate

![](https://cdn-learn.adafruit.com/assets/assets/000/100/568/medium800/projects_chroma_ring_3d.jpg?1615332961)

[chroma_light_ring.stl](https://cdn-learn.adafruit.com/assets/assets/000/100/566/original/chroma_light_ring.stl?1615332846)
[chroma_light_blocks.stl](https://cdn-learn.adafruit.com/assets/assets/000/100/567/original/chroma_light_blocks.stl?1615332848)
![](https://cdn-learn.adafruit.com/assets/assets/000/100/612/medium800/projects_chring-0383.jpg?1615357783)

## Add Encoder

Once the ring holder has printed, push the encoder through a mounting hole as shown, then secure it with a nut.

![projects_chring-0384.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/622/medium640/projects_chring-0384.jpg?1615358840)

![projects_chring-0385.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/623/medium640/projects_chring-0385.jpg?1615358849)

## Add Ring

Minding the wiring, insert the ring into the ring holder. It will be a tight press fit.

Only push the ring in until the LEDs are flush to the top of the ring holder -- you can press it onto you workbench to get it seated evenly.

![projects_chring-0386.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/624/medium640/projects_chring-0386.jpg?1615358965)

![projects_chring-0387.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/625/medium640/projects_chring-0387.jpg?1615359053)

![projects_chring-0388.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/626/medium640/projects_chring-0388.jpg?1615359060)

![projects_chring-0389.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/627/medium640/projects_chring-0389.jpg?1615359083)

## Fasteners

The blocks are held in place with nylon M3 fasteners which will keep them secure but still allow them to slide and grip the lens barrel.

Place the eight short screws through the mounting holes from the front side of the ring.

Thread the eight standoffs onto the protruding short screws.

Use the eight long screws to screw the four 3D printed blocks into their standoffs.

The screw and standoff lengths are such at they should not prevent the blocks from sliding even when the screws are tight.

![projects_chring-0400.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/628/medium640/projects_chring-0400.jpg?1615359291)

![projects_chring-0401.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/629/medium640/projects_chring-0401.jpg?1615359299)

![projects_chring-0402.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/630/medium640/projects_chring-0402.jpg?1615359306)

![projects_chring-0403.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/631/medium640/projects_chring-0403.jpg?1615359314)

![projects_chring-0404.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/632/medium640/projects_chring-0404.jpg?1615359321)

![projects_chring-0405.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/633/medium640/projects_chring-0405.jpg?1615359328)

![projects_chring-0407.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/634/medium640/projects_chring-0407.jpg?1615359336)

![projects_chring-0408.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/635/medium640/projects_chring-0408.jpg?1615359361)

The gripping blocks freely slide to whatever size lens you need.

![projects_chring-0411.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/636/medium640/projects_chring-0411.jpg?1615359706)

![projects_chring-0413.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/637/medium640/projects_chring-0413.jpg?1615359713)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/648/medium800/projects_chring-0420.jpg?1615359883)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/649/medium800/projects_chring-0421.jpg?1615359890)

## Add Elastic Return Actuator (Rubber Band)

Wrap the elastic band around the grooves of each of the gripping blocks.

![projects_chring-0423.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/650/medium640/projects_chring-0423.jpg?1615359927)

![projects_chring-0424.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/651/medium640/projects_chring-0424.jpg?1615359982)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/655/medium800/projects_chring-0425.jpg?1615360037)

## Attach to Lens

To attach the chromakey light ring to your lens, simply pull the four gripping blocks away from center, press the ring to the end of the lens barrel, and release the gripping blocks.

![](https://cdn-learn.adafruit.com/assets/assets/000/100/658/medium800/projects_chring-0430.jpg?1615360148)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/660/medium800/projects_chring-0431.jpg?1615360154)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/664/medium800/projects_chring-0432.jpg?1615360187)

## Prep for Use

Plug a USB-C power source into the QT Py and then select your color mode (green/blue/white/off) by clicking the encoder.

Turn the encoder wheel to increase or decrease the brightness.

![projects_chring-0440.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/665/medium640/projects_chring-0440.jpg?1615360233)

![projects_chring-0441.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/666/medium640/projects_chring-0441.jpg?1615360322)

![projects_chring-0445.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/667/medium640/projects_chring-0445.jpg?1615360342)

![projects_chring-0444.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/668/medium640/projects_chring-0444.jpg?1615360349)

## Webcam Mount

With a couple of elastic bands you can affix the chromakey light ring to a webcam, such as the popular Logitech C920.

![projects_chring-0451.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/669/medium640/projects_chring-0451.jpg?1615360377)

![projects_chring-0449.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/670/medium640/projects_chring-0449.jpg?1615360385)

Next we'll set up the retroreflective screen and light it up!

# Retroreflective Greenscreen Light Ring QT Py Controller 

## Set Up the Retroreflective Background and Use the Keyer

https://youtu.be/I7kWraqKYCk

Hang the retroreflective fabric using spring clamps, magnets, or even gaffer's tape. You will want it to be very close to the subject for best performance. This helps to avoid a halo effect.

Danger: 

![](https://cdn-learn.adafruit.com/assets/assets/000/100/677/medium800/projects_IMG_0505.jpg?1615396724)

## Light Ring Mount

Mount the ring light on your camera, then power it via the USB-C port on the QT Py.

![projects_IMG_0507.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/678/medium640/projects_IMG_0507.jpg?1615396774)

![projects_IMG_0508.jpg](https://cdn-learn.adafruit.com/assets/assets/000/100/679/medium640/projects_IMG_0508.jpg?1615396782)

In this shot I've got an LCD monitor showing me what the camera sees -- this is a great way to see how the greenscreen looks, since you can't see the effect with your naked eye unless you're positioned right behind the camera.

![](https://cdn-learn.adafruit.com/assets/assets/000/100/680/medium800/projects_IMG_0516.jpg?1615396909)

![](https://cdn-learn.adafruit.com/assets/assets/000/100/684/medium800/projects_IMG_0515.jpg?1615396925)

Here's a behind the scenes video of the system in action:

https://youtu.be/Wkch_cvYUao


## Featured Products

### Adafruit QT Py - SAMD21 Dev Board with STEMMA QT

[Adafruit QT Py - SAMD21 Dev Board with STEMMA QT](https://www.adafruit.com/product/4600)
What a cutie pie! Or is it... a QT Py? This diminutive dev board comes with our favorite lil chip, the SAMD21 (as made famous in our GEMMA M0 and Trinket M0 boards).

This time it comes with [our favorite connector - the STEMMA QT](http://adafruit.com/stemma), a chainable I2C...

In Stock
[Buy Now](https://www.adafruit.com/product/4600)
[Related Guides to the Product](https://learn.adafruit.com/products/4600/guides)
### Rotary Encoder + Extras

[Rotary Encoder + Extras](https://www.adafruit.com/product/377)
This rotary encoder is the best of the best, it's a high-quality 24-pulse encoder, with detents and a nice feel. It is panel mountable for placement in a box, or you can plug it into a breadboard (just cut/bend the two mechanical side tabs.) We also include a nice soft-touch knob with an...

In Stock
[Buy Now](https://www.adafruit.com/product/377)
[Related Guides to the Product](https://learn.adafruit.com/products/377/guides)
### Black Nylon Machine Screw and Stand-off Set – M3 Thread

[Black Nylon Machine Screw and Stand-off Set – M3 Thread](https://www.adafruit.com/product/4685)
Totaling **420 pieces** , this **M3 Screw Set** &nbsp;is a must-have for your workstation.&nbsp;You'll have enough screws, nuts, and hex standoffs to fuel your maker tendencies&nbsp;for days on end! M3 size screws fit a number of&nbsp;Adafruit breakout/dev board...

In Stock
[Buy Now](https://www.adafruit.com/product/4685)
[Related Guides to the Product](https://learn.adafruit.com/products/4685/guides)
### USB Type A to Type C Cable - approx 1 meter / 3 ft long

[USB Type A to Type C Cable - approx 1 meter / 3 ft long](https://www.adafruit.com/product/4474)
As technology changes and adapts, so does Adafruit. This&nbsp;&nbsp; **USB Type A to Type C** cable will help you with the transition to USB C, even if you're still totin' around a USB Type A hub, computer or laptop.

USB C is the latest industry-standard connector for...

In Stock
[Buy Now](https://www.adafruit.com/product/4474)
[Related Guides to the Product](https://learn.adafruit.com/products/4474/guides)
### Silicone Cover Stranded-Core Wire - 26AWG in Various Colors

[Silicone Cover Stranded-Core Wire - 26AWG in Various Colors](https://www.adafruit.com/product/1970)
Silicone-sheathing wire is super-flexible and soft, and it's also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1970)
[Related Guides to the Product](https://learn.adafruit.com/products/1970/guides)

## Related Guides

- [Adafruit QT Py SAMD21](https://learn.adafruit.com/adafruit-qt-py.md)
- [3D Printed Glowing Mace Prop](https://learn.adafruit.com/3d-printed-glowing-mace-prop.md)
- [CAN Bus with CircuitPython: Using the canio module](https://learn.adafruit.com/using-canio-circuitpython.md)
- [CircuitPython Trombone Champ Controller](https://learn.adafruit.com/circuitpython-trombone-champ-controller.md)
- [PYOA for PyGamer/PyBadge - Adding Cursor Support to CircuitPython](https://learn.adafruit.com/cursor-for-circuitpython.md)
- [How to Make Animated Graphics for Hologram Displays](https://learn.adafruit.com/how-to-make-animated-graphics-for-hologram-displays.md)
- [Adafruit INA23x DC Current Voltage Power Monitor](https://learn.adafruit.com/adafruit-ina237-dc-current-voltage-power-monitor.md)
- [AdaBox 019](https://learn.adafruit.com/adabox019.md)
- [NeoPixel LED Necklace Insert with USB Charging](https://learn.adafruit.com/neopixel-led-necklace-insert-with-usb-charging.md)
- [MEMENTO Wireless Remote with TouchOSC](https://learn.adafruit.com/memento-wireless-remote.md)
- [Adafruit STEMMA Piezo Driver Amp](https://learn.adafruit.com/adafruit-stemma-piezo-driver-amp.md)
- [CLUE Light Paint Stick with CircuitPython](https://learn.adafruit.com/clue-light-paintstick.md)
- [Adafruit AS5600 Magnetic Angle Sensor](https://learn.adafruit.com/adafruit-as5600-magnetic-angle-sensor.md)
- [Adafruit ADXL375](https://learn.adafruit.com/adafruit-adxl375.md)
- [Adafruit IO Basics: AirLift](https://learn.adafruit.com/adafruit-io-basics-airlift.md)
- [NAU7802 Pet Food Scale](https://learn.adafruit.com/nau7802-pet-food-scale.md)
