Getting started with the Chanzon RGB 10W LED breakout and constant current driver

Getting started with the Chanzon RGB 10W LED breakout and constant current driver

We have a fun, new lighting product, just in time for the holidays. 

The Chanzon features Red, Blue and Green channels, and can consume up to 10 watts of power. This produces quite a bit of light -- perfect for indoor and outdoor lighting projects. However, up until now, it was a bit of a challenge to use. It runs off 12V, requires a constant current driver (otherwise, it will burn up), and needs a beefy heatsink.

Introducing the Chanzon RGB 10W LED Breakout! 

Our breakout comes available with a constant current driver, which accepts low power PWM input from 3.3V and 5V microcontrollers -- such as Arduino and Raspberry Pi. There is also a cutout inside the PCB, allowing the LED to be surface mounted directly to the PCB and exposing the back for a heat sink. We used a low cost heat sink (with sticky back) for passive cooling.

We are going to show you how to setup a spooky halloween lighting setup, using an Arduino uno, our breakout, and a 12V power supply.

Basic Hookup Guide

The breakout features two headers: PWR + and - as well as G, 1, 2, and 3.

PWR + and - requires a 12V power supply of at least 1 amp. You can use lower voltages for testing, but this will result in substantial dimming, with some colors not lighting up at all. We found that the lowest acceptable testing voltage was around 8 volts. This was useful, as we could look directly at it during debugging without going blind! 

If you intend on operating at full power, MAKE SURE YOU CONNECT A HEATSINK! The RGB LED will otherwise get extremely hot, which can burn up your LED.

You will need to connect G, which is ground, to your microcontroller. If you do not connect ground, there will be no return path for your PWM signals, and the LEDs will float.

1, 2 and 3 are the PWM channels that you will need to connect to your microprocessor. 1 is red, 2 is green, and 3 is blue. You will also need to make sure that these lines are connected to pins that are PWM capable. For the Arduino Uno, pins 3, 5, 6, 9, 10 and 11 are the only ones capable of supporting analogWrite. In our example, we used 3, 5 and 6. 

Using AnalogWrite for the Perfect Spooky Lighting

We currently have a lot of static halloween lighting that the house, involving purples, oranges, and greens. While they look nice, they are not animated, and somewhat boring. 

What I want is a static purple light that suddenly turns into a lightning flash! We will write a sketch that randomly triggers lightning, with a semi-random flashing pattern, so each lightning flash is unique -- much like real life.

 


/* Spooky lighting with random lightning flash */

/* Map our PWM pins to colors for ease of use */

#define RED 3 
#define GREEN 5
#define BLUE 6

/* Configuration for our lightning sketch */

int frequency = 5;           // Higher the number, the more infrequent
int minFlashes = 5;          // Minimum number of flashes
int maxFlashes = 10;         // Maximum number of flashes

void setup() 
{
   pinMode(RED,OUTPUT);      // Configure PWM channel as output
   pinMode(GREEN,OUTPUT);    // Configure PWM channel as output
   pinMode(BLUE,OUTPUT);     // Configure PWM channel as output
   digitalWrite(RED,LOW);    // Turn off LED
   digitalWrite(GREEN,LOW);  // Turn off LED
   digitalWrite(BLUE,LOW);   // Turn off LED
}

void loop() 
{
  purple();
  int a = random(0,frequency);      // pick a number, statistically less likely with the higher frequency number
  if(a == frequency) {              // did we pick the right number? 
     for(int count = 0; count < random(minFlashes,maxFlashes); count++) { 
        flash();
        delay(random(25,250));     // Random flash duration
        purple();
        delay(random(25,250));     // Random non-flash duration
     }
  }
}

// Dim purple light

void purple() { 
 analogWrite(RED,100);
 analogWrite(BLUE,255);
 analogWrite(GREEN,0);
}

// Bright, high color temperature flash

void flash() { 
 analogWrite(RED,50);
 analogWrite(BLUE,255);
 analogWrite(GREEN,255);
}

 

Here is an example video of our lightning demo:


Leave a comment

Please note, comments must be approved before they are published