Skip to content

tigoe/LightProjects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Light Projects

A collection of lighting projects controlled by microcontrollers.

Low-voltage DC Lamps

Low-voltage LED Lamps are easy to control from a microcontroller when you know what properties you need to be aware of. In fact, there are so many low-voltage sources on the market now that you can manage most indoor lighting needs without needing to control high-voltage AC sources.

Recommended Parts

This list of parts is not comprehensive, it's just a list of some of the parts I've used in building this repository.

You may find it useful to combine the examples in this repository with some of my Arduino general examples or Sensor examples to add interactive conntrol over your light projects.

LED Strip Control

Single-channel and multi-channel LED strips are very popular these days, and pretty easy to control with a microcontroller and a few transistors. You can find LED strips in a variety of combinations:

  • Red/Green/Blue (RGB)
  • Red/Green/Blue/White (RGBW). These come in cool white, warm white, and natural white variations.
  • Tunable White. These come in a variety of styles: Warm/cool white, Warm/cool/natural white, and White/white/amber.

Addressable LED Control

There are a number of addressable LED components on the market now, and they come in a variety of form factors. Covered here are a couple of the most popular, the WS28xx/SK68xx LEDs, and the APA102C LEDs. Adafruit calls their products that use these LEDs NeoPixels and DotStars, respectively. SparkFun calls their APA102C line Lumenati. Whatever you call them, they're relatively easy to use, and there are many good tools for controlling them. Addressable strips can be found in the many of the same variations as non-addressable strips, including RGB, RGBW, RGBAW, and WWA.

The examples below are written mostly using Adafruit's NeoPixel and DotStar libraries. Since they have mostly the same API, you can convert any of the sketches from one protocol to the other with minimal changes.

Examples:

Fading

The relationship between perceived brightness and the power controlling a light source is non-linear. In otherwise, if you fade an LED source in a straight line, it won't appear to you to be fading evenly in time. Depending on the effect you're looking for, you might want a light source to start fading slowly and then speed up, or slow down at the end of its fade. It helps to have methods for a few different fade curves available.

Examples

Color and Color Temperature Fading

Whether you're working with tunable white lighting sources or color sources, it's useful to understand a few things about Color Spaces and Color Temperature in order to get the most our of your sources.

Color Space Examples

Examples:

  • RGB fade. Treats the whole RGB space as a single value and fades all LEDs one point at a time. APA102xRGBFade
  • RGB Fade 002. Fades red, green, and blue of all LEDs one point at a time. APA102xRGBFade002
  • HSV Tester. Fades hue through the whole hue color wheel on all LEDs, while keeping saturation and intensity constant. APA102x_HSV_Tester and WS281x_HSV_Tester
  • A digital candle effect made by varying the hue of LEDs from red to orange. APA102xCandle

Tunable White (Color Temperature) Examples

  • Color temperature fade. Fades a strip of tunable white LEDs (non-addressable) from warm to cool. ColorTempFade

The examples below use the ColorConverter library to control a WWA strip by calculating relative mix of warm, cool, and amber as hue. Intensity can then be controlled independently of color temperature. Examples:

Lighting Control Systems

Light Sensing

Pattern Making in Code

Sometimes you need to make patterns for lighting fixtures. Here are some examples.

Projects

Rotary telephone dimmer for Philips Hue systems

Color temperature control of Philips Hue systems with light sensors

About

A collection of lighting projects

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published