# Remote Controlled LED Tea Light Sconce

## Introduction

https://www.youtube.com/watch?v=EW4NpYn1fJg

This guide will show you how to&nbsp;transform a simple candelabra wall sconce into a high tech LED lamp. &nbsp;We've kept it simple with just 7 Dotstar LEDs, but this project can easily scale up to make larger lamps or even big LED art&nbsp;installations. &nbsp;

We've included lots of different lighting modes that can be controlled with an infrared remote, and the lamp will remember the last mode you selected even when it's unplugged. &nbsp;

Get creative and add your own&nbsp;design and patterns. Turn your living room, kid's room, or festival tent into a beautiful haven&nbsp;of light. &nbsp;

### Materials Needed

- [Teensy 3.2](https://www.adafruit.com/products/2756)
- [IR Receiver](https://www.adafruit.com/products/157)
- [Remote Control](https://www.adafruit.com/products/389)
- [Dotstar LED strip (I used 30/m)](https://www.adafruit.com/categories/886)
- [26awg silicone stranded wire - 4 colors](https://www.adafruit.com/products/1881)
- [5v Power Supply (I used 2A, but larger projects may want the 10A supply)](https://www.adafruit.com/products/276)
- [Female DC Barrel Jack](https://www.adafruit.com/products/373)

### Also Used in this Project

- [Tea Light&nbsp;wall sconce](http://www.amazon.com/s/ref=nb_sb_noss_2?url=node%3D3734691&field-keywords=tea+light+sconce&rh=n%3A3734691%2Ck%3Atea+light+sconce)
- [Glow in the Dark PLA 3d printer filament](https://www.adafruit.com/product/2338)
- Lots and lots of hot glue
- Fabric backing

# Remote Controlled LED Tea Light Sconce

## Planning & Testing

# Choosing your Lamp

Here are a few things to consider when choosing the base lamp to build on:

1. A&nbsp;candelabra with just one or two tea lights&nbsp;won't show off the color modes as well as something with 5 or more lights.
2. Conversely, adding more than 7-10 individual tea lights may become problematic. &nbsp;Longer wire runs add a lot of resistance to your project, which means lights further down the line may flicker and misbehave.
3. Consider whether your choice of sconce will easily hide your wiring. &nbsp;You'll have 8 wires going to / coming from each light, so think about how you plan to hide those.

# Testing Your LEDs

If this is your first time using Dotstars, [visit the DotStart tutorial for details on how to install the library, wire the LEDs, power them and test them!](../../../../adafruit-dotstar-leds/overview)

Before you dive into cutting and soldering and gluing, hook your Dotstar strand up to a microcontroller running the Dotstar Strandtest code, found in the **Adafruit\_Dotstar** library under Examples, and make sure all the lights come on and show every color.&nbsp; See the tutorial for details.

I keep a [Gemma](https://www.adafruit.com/product/1222)&nbsp;loaded up with Strandtest code and alligator clips on in a convenient drawer under my work bench. &nbsp;This is a great way to quickly make sure my&nbsp;strand is working without a bunch of soldering and un-soldering. &nbsp;

Don't skip this! &nbsp;You'll save yourself a lot of heartache down the line if you discover any problems now.

# Power and Measurements

For this guide, where&nbsp;we've used just&nbsp;7 LEDs with&nbsp;a few feet of wire between, our [5V/2A power supply](https://www.adafruit.com/products/276)&nbsp;works great. &nbsp;If you have a lot more LEDs, or if your wire runs are any longer than a couple feet, you may need a [beefier power supply](https://www.adafruit.com/products/658). &nbsp;

Consider this carfeully -- your sconce may be small but after you weave the wire back and forth in order to hide it, that resistance really starts to add up when the current is over an Ampere

Also, consider where you intend to place the sconce when it's finished. &nbsp;Is there a power outlet nearby? &nbsp;Now is a great time to figure out if you'll need to add extra wire to the project so you can reach the outlet without a bunch of pesky extension cords. &nbsp;

# Remote Controlled LED Tea Light Sconce

## 3d Printing

![](https://cdn-learn.adafruit.com/assets/assets/000/031/829/medium800/sensors_wall_sconce_closeup.jpg?1461000783)

My wall sconce originally came with clear glass tea light cups.&nbsp;I&nbsp;wanted something a little more unique, and something that would diffuse the light better, so I replaced them with 3d printed cups. &nbsp;

I printed them in [glow in the dark PLA](https://www.adafruit.com/product/2338). &nbsp;This PLA has a beautiful rainbowy sheen when you shine light through it, and of course it glows softly for a while after I turn the lights off. &nbsp;Lovely. &nbsp;I love the scallop pattern that's thrown onto the wall by the ruffled edge.

This is a remix from [Marco Alici's Koch tealight design](http://www.thingiverse.com/thing:189405)&nbsp;on Thingiverse. &nbsp;I made it a little smaller -- the 4cm height fit better into my sconce.&nbsp;

[Download  tealight.stl](http://www.thingiverse.com/thing:1500154)
[Order on Shapeways](https://www.shapeways.com/product/2Q9T5CJ9W/4cm-tall-tealight-holder)
![](https://cdn-learn.adafruit.com/assets/assets/000/031/830/medium800/sensors_cups_3d_printed.jpg?1461000797)

Or, [find a design on Thingiverse](http://www.thingiverse.com/search/page:4?q=tea+light&sa=)&nbsp;for your own creative delight.

# Remote Controlled LED Tea Light Sconce

## Wiring & Teensy Setup

![](https://cdn-learn.adafruit.com/assets/assets/000/031/674/medium800/sensors_wallsconce_wiring.jpg?1460580507)

# Wiring

- Barrel Jack + to Teensy Vin and Dotstar 5v
- Barrel Jack - to Teensy G and Dotstar G
- Teensy 0 to Dotstar Data In
- Teensy 1 to Dotstar Clock In

With the bump on the IR sensor facing you:

- IR Pin 1 to Teensy 3v
- IR Pin 2 to Teensy G
- IR Pin 3 to Teensy 12

# Teensy Setup

To get the code running on the Teensy you'll need:

1. Arduino IDE (1.6.5 or newer preferred)
2. Teensyduino Installer
3. FastLED Library

### 1. Arduino IDE

If you’re not using a recent version of the Arduino IDE (1.6.5 or newer), this would be a [good time to upgrade](https://www.arduino.cc/en/Main/Software).

### 2. Teensyduino Installer

Once you have that software installed and working, download and run the [Teensyduino installer](https://www.pjrc.com/teensy/teensyduino.html), which adds support for the full line of Teensy microcontroller boards in the Arduino IDE.

In the Arduino IDE, from the **Tools** menu, select **Board→Teensy 3.2** and **CPU Speed→72 MHz (Optimized)**. Confirm that you can compile and upload the classic “blink” sketch to the Teensy board.&nbsp; Be sure you can blink the light before continuing.

### 3. FastLED Library

Use the Library Manager in the Arduino IDE to install this (Sketch→Include Library→Manage Libraries…).

![](https://cdn-learn.adafruit.com/assets/assets/000/084/489/medium800/sensors_1library_manager_menu.png?1574050169)

Search for the&nbsp; **FastLED&nbsp;** library and install it

![](https://cdn-learn.adafruit.com/assets/assets/000/084/490/medium800/sensors_fastled.png?1574050198)

We also have a great tutorial on Arduino library installation at:  
[http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use "Link: http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use")

# Remote Controlled LED Tea Light Sconce

## Code

We are using a&nbsp;fabulous code base called React, by Jason Coon. &nbsp;This code requires installing a few custom Teensy Arduino libraries, and comes ready to go with over a dozen different amazing LED modes, many based on contributions from Mark Kriegsman and the FastLED community.

[More about Jason's creations and EvilGeniusLabs](http://evilgeniuslabs.org/)

So let's get these libraries installed!

Arduino versions 1.6.5 and above make it easy to install libraries from within the IDE, but since these are custom libraries, we need to do it the old-fashioned way -- **the library installer in Arduino will not work**. &nbsp;

1. Download all the .zip files
2. Unzip the files and rename the resulting folders, getting rid of the "-master" -- i.e. "react-master" becomes "react"
3. Quit Arduino
4. Move the React code base into your Sketchbook
5. Move the renamed library folders into your Arduino \> Libraries folder.
6. Restart Arduino

Note: These library versions have been modified to work with the Teensy 3.2. &nbsp;If you have a different, or more "official" version of these libraries you will need to replace those libraries with the downloads found here.

[React Code Base](https://github.com/evilgeniuslabs/react)
[Audio.h for Teensy](https://github.com/PaulStoffregen/Audio/blob/master/Audio.h)
We can install the last 2 libraries via the Arduino library manager.

Open up the Arduino library manager:

![](https://cdn-learn.adafruit.com/assets/assets/000/084/326/medium800/sensors_library_manager_menu.png?1573838800)

Search for the **IRremote** library and install it

![](https://cdn-learn.adafruit.com/assets/assets/000/084/327/medium800/sensors_irremote.png?1573838843)

Search for the **SerialFlash&nbsp;** library and install it

![](https://cdn-learn.adafruit.com/assets/assets/000/084/328/medium800/sensors_serialflash.png?1573838893)

Open the react.ino file in Arduino and make sure it compiles. &nbsp;If it doesn't, go back and be sure all the libraries above are installed correctly.

We also have a great tutorial on Arduino library installation at:  
[http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use](http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use "Link: http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use")

&nbsp;

Take a look at the code. &nbsp;Near the top, change LED\_PIN to 0 and CLOCK\_PIN to 1. &nbsp; Change NUM\_LEDS to reflect the number of dotstars you're using in your project. &nbsp;

(I have just 7 LEDs but have changed this number to 8, since it seems to make the patterns run a little more smoothly for me)

```
#define LED_PIN     0
#define CLOCK_PIN   1
#define IR_RECV_PIN 12
#define COLOR_ORDER GBR
#define CHIPSET     APA102
#define NUM_LEDS    8
```

# Remote Controlled LED Tea Light Sconce

## Assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/031/802/medium800/sensors_ir_sensor_wired.jpg?1460916224)

### IR Sensor Wiring

As you look at the IR sensor with the bump facing you:

- Pin 1 (left) is Power
- Pin 2 (middle) is Ground
- Pin 3 (right) is the Signal pin, and goes to Teensy 12

Trim the leads a bit and splay out the pins gently so you have some room to work. Strip a bit of stranded wire and spiral around each leg, then solder in place and cover with heat shrink. &nbsp;Slip a bigger piece of heat shrink over all 3 legs together and secure.

Solder the other ends of the wire to the Teensy. &nbsp;(Note: I used a piece of leftover ribbon cable wire here so in the photo, my black wire is actually the Signal wire, not Ground as you may expect)

![](https://cdn-learn.adafruit.com/assets/assets/000/031/803/medium800/sensors_ir_sensor_wired-2.jpg?1460916495)

If you've uploaded the React code to the Teensy already, you can test the sensor by plugging in a USB cable and pressing some buttons on your remote. &nbsp;If the Teensy's onboard LED lights up when you press a button, your sensor is working correctly.

![](https://cdn-learn.adafruit.com/assets/assets/000/031/804/medium800/sensors_barrel_jack_solder.jpg?1460916676)

### Barrel Jack & Power Wires

Solder some beefy wires (at least 26awg) onto your barrel jack as shown -- the power wire goes to the pin at the rear, and the pin on the middle of the bottom goes to ground. &nbsp;We are not using the pin on the side.

Secure with heat shrink, then cover the whole assembly with more large heat shrink. &nbsp;I filled this larger heat shrink with hot glue to be sure these wires stay tight, since this jack is pretty tricky to solder a solid connection to.

![](https://cdn-learn.adafruit.com/assets/assets/000/031/805/medium800/sensors_barrel_complete.jpg?1460916838)

Take the two wires coming from the barrel jack split them by&nbsp;splicing two wires onto each. &nbsp;One power wire will go to the LEDs and the other will go to the Teensy.&nbsp;

### Dotstar Wiring

Pull your Dotstar strip out of its silicone sheath and carefully cut each light apart on the cut lines. &nbsp;

Solder a wire from pin 0 on the Teensy to Dotstar's Data pin, and a wire from pin 1 to Dotstar's Clock pin.

Then, connect two of the&nbsp;power wires from your barrel jack to Dotstar's + and - pads. &nbsp;

Connect the other two wires from the barrel jack to Teensy's G and Vin pins. &nbsp;Plug in your power supply and be sure the light comes on. &nbsp;You can also test out the remote control at this point and be sure things happen when you push the buttons.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/031/806/medium800/sensors_wiring_reallife.jpg?1460917247)

Next, prepare the first of your tea light 3d printed cups. &nbsp;You'll need to make a hole that's the right size to slide the Dotstar and the wires in. A Dremel tool is ideal, but if you keep an old spare “dirty jobs” soldering iron around, that can work too. Don’t do this with your nice iron.

![](https://cdn-learn.adafruit.com/assets/assets/000/031/807/medium800/sensors_cup_hole_melt.jpg?1460917597)

Solder 4 wires to the "out" pads of your Dotstar LED, then fold the wires over and slip the light into the cup through the hole you just made. &nbsp;Secure it down with some hot glue.

![](https://cdn-learn.adafruit.com/assets/assets/000/031/851/medium800/sensors_dotstar_wired2.jpg?1461269191)

![](https://cdn-learn.adafruit.com/assets/assets/000/031/815/medium800/sensors_cup_lighting_up.jpg?1460917821)

From here on out, the artistry is up to you. &nbsp;Solder as many more Dotstars in line as your finished piece demands.

Keep in mind that longer wire runs will add a lot of resistance to your circuit, so you'll need to find a balance between hiding the wires and being sure you're getting enough power to the lights. &nbsp;Test each new connection as you go to minimize troubleshooting later on.

Another option is to “home-run” the power wires, but this can be more complex to visualize and build. + and – all lead back to the barrel jack (perhaps using something like Perma-Proto board to distribute power), while data and clock are chained from light to light as normal.

![](https://cdn-learn.adafruit.com/assets/assets/000/031/816/medium800/sensors_hidden_wiring.jpg?1460918013)

### Finishing

I added a fabric backing to my wall sconce to help hide some of the wiring and to provide a place to mount the Teensy -- I just glued it to the back of the fabric.

Mount the IR sensor someplace inconspicuous on the front of your lamp with the bump facing outwards. &nbsp;Make sure it picks up signals from your remote at a comfortable distance.

![](https://cdn-learn.adafruit.com/assets/assets/000/031/817/medium800/sensors_fabric_layout.jpg?1460918137)

# Remote Controlled LED Tea Light Sconce

## Use It

![](https://cdn-learn.adafruit.com/assets/assets/000/031/675/medium800/sensors_remotecontrol-wallsconce.jpg?1460582987)

As written, the React code allows you to change patterns and brightness with the Adafruit remote control. &nbsp;There is more functionality available with other [commercially available remotes](http://www.amazon.com/eTopxizu-44Key-Remote-Controller-Light/dp/B004IJFAMW?ie=UTF8&psc=1&redirect=true&ref_=oh_aui_detailpage_o01_s00), or it's not too hard to add your own functions for the unused buttons.

Take some time and look through the React code. &nbsp;You'll find a "playlist" section near the top, where you can choose the modes you like and reorder them as you see fit. &nbsp;

Since we haven't included audio or interactivity in this lamp design, some of the modes won't appear to do anything at all. &nbsp;Some may look better on your finished lamp than others. &nbsp;You can customize your modes simply by editing this playlist.

```
const PatternList patterns = {
    waves,
    colorWaves,
    pride,
    softTwinkles,
    colorTwinkles,
    //fire2012WithPalette,
    sinelon,
    lightning2014,
    //bouncingBalls2014,
    spectrumBar,
    //spectrumDots,
    //juggle,
    bpm,
    //confetti,
    rainbow,
    //rainbowWithGlitter,
    hueCycle,
    //discostrobe,
    //simon,
    //colorInvaders,
    showSolidColor,
};
```


## Featured Products

### Teensy 3.2 + header

[Teensy 3.2 + header](https://www.adafruit.com/product/2756)
[Teensy](http://www.pjrc.com/teensy/index.html) 3.2&nbsp;is a small, breadboard-friendly development board designed by Paul Stoffregen and PJRC. Teensy 3.2&nbsp;brings a low-cost 32 bit ARM Cortex-M4 platform to hobbyists, students and engineers, using an adapted version of the...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2756)
[Related Guides to the Product](https://learn.adafruit.com/products/2756/guides)
### IR (Infrared) Receiver Sensor

[IR (Infrared) Receiver Sensor](https://www.adafruit.com/product/157)
IR sensor tuned to 38KHz, perfect for receiving commands from a TV remote control. Runs at 3V to 5V so it's great for any microcontroller.  
  
To use, connect pin 3 (all the way to the right) to 5V power, pin 2 (middle) to ground and listen on pin 1. It doesn't do any decoding...

In Stock
[Buy Now](https://www.adafruit.com/product/157)
[Related Guides to the Product](https://learn.adafruit.com/products/157/guides)
### Mini Remote Control

[Mini Remote Control](https://www.adafruit.com/product/389)
This little remote control would be handy for controlling a robot or other project from across the room. It has 21 buttons and a layout we thought was handy: directional buttons and number entry buttons. The remote uses the NEC encoding type and sends data codes 0 thru 26 (it skips #3, #7,...

In Stock
[Buy Now](https://www.adafruit.com/product/389)
[Related Guides to the Product](https://learn.adafruit.com/products/389/guides)
### Adafruit DotStar Digital LED Strip - White 30 LED - Per Meter 5m

[Adafruit DotStar Digital LED Strip - White 30 LED - Per Meter 5m](https://www.adafruit.com/product/2238)
Move over NeoPixels, there's a new LED strip in town! These fancy new DotStar LED strips are a great upgrade for people who have loved and used NeoPixel strips for a few years but want something even better. DotStar LEDs use generic 2-wire SPI, so you can push data much faster than with...

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

[Silicone Cover Stranded-Core Wire - 2m 26AWG Red](https://www.adafruit.com/product/1877)
Silicone-sheathing wire is super-flexible and soft, and its 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 has to...

In Stock
[Buy Now](https://www.adafruit.com/product/1877)
[Related Guides to the Product](https://learn.adafruit.com/products/1877/guides)
### PLA/PHA Filament for 3D Printers - 1.75mm Diameter - 1KG

[PLA/PHA Filament for 3D Printers - 1.75mm Diameter - 1KG](https://www.adafruit.com/product/2338)
Having a 3D printer without filament is sort of like having a regular printer without paper or ink. And while a lot of printers come with some filament there's a good chance you've been printing up a storm and need something new. That's why we've started carrying a complete...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2338)
[Related Guides to the Product](https://learn.adafruit.com/products/2338/guides)
### 5V 2A (2000mA) switching power supply - UL Listed

[5V 2A (2000mA) switching power supply - UL Listed](https://www.adafruit.com/product/276)
This is an FCC/CE certified and UL listed power supply. Need a lot of 5V power? This switching supply gives a clean regulated 5V output at up to 2000mA. 110 or 240 input, so it works in any country. The plugs are "US 2-prong" style so you may need a plug adapter, but you can pick one...

In Stock
[Buy Now](https://www.adafruit.com/product/276)
[Related Guides to the Product](https://learn.adafruit.com/products/276/guides)
### Breadboard-friendly 2.1mm DC barrel jack

[Breadboard-friendly 2.1mm DC barrel jack](https://www.adafruit.com/product/373)
This power jack is designed to fit 2.1mm power plugs snugly and securely. Perfect for adding a power connector to your project. We went for the more expensive "thin pin" type which snap into breadboards or perfboards. They will work where "thick pin" types go also, just...

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

## Related Guides

- [Adafruit Class Library for Windows IoT Core](https://learn.adafruit.com/adafruit-class-library-for-windows-iot-core.md)
- [Adafruit DotStar LEDs](https://learn.adafruit.com/adafruit-dotstar-leds.md)
- [Monster Matrix with WLED](https://learn.adafruit.com/monster-matrix-with-wled.md)
- [LED Campfire](https://learn.adafruit.com/led-campfire.md)
- [LIGHTSHIP: LED Animation over WiFi](https://learn.adafruit.com/lightship-led-animation-over-wifi.md)
- [Dotstar LED and Glass Pebble Floor](https://learn.adafruit.com/neopixel-and-glass-pebble-floor.md)
- [Pixie CyberWig - A Wearable WiFi LED Visualization ](https://learn.adafruit.com/wifi-pixie-cyberwig-wearable-visualization.md)
- [Desk Calculator with CircuitPython](https://learn.adafruit.com/desk-calculator-with-circuitpython.md)
- [Circuit Cookie Roller](https://learn.adafruit.com/circuit-cookie-roller.md)
- [Sound Reactive Sunflower Baby Crib Mobile with Bluetooth Control](https://learn.adafruit.com/sound-reactive-sunflower-baby-crib-mobile-with-bluetooth-control.md)
- ["Mother of all Demos" USB Keyset](https://learn.adafruit.com/usb-keyset.md)
- [GoPro Hero 5 NinjaFlex Case with Tripod](https://learn.adafruit.com/gopro-hero-5-ninjaflex-case-with-tripod.md)
- [Halo Energy Sword RP2040](https://learn.adafruit.com/halo-energy-sword-rp2040.md)
- [Glowing Beehive Hairdo Wig](https://learn.adafruit.com/glowing-beehive-hairdo-wig.md)
- [HalloWing Macintosh](https://learn.adafruit.com/hallowing-mac.md)
