Ver 2.5 Manual

High Power RGB LED Shield – Ver 2.5

HP RGB LED Shiled front perspective

Overview

The High Power RGB LED (HPRGB) Shield is a   3-Channel LED shield designed for High Power LEDs with constant current dynamically programmable from 100mA – 700mA per channel. While it is designed to function as an Arduino shield it can be driven from any micro controller platform that features an I2C bus interface such as Teensy3.1, Raspberry Pi, Beaglebone etc. The I2C bus interface allows multiple HPRGB shields to be controlled by one micro controller using only three pins (SDA, SCL, GND). Up to 8 HPRGB Shields can be controlled simultaneously when concurrent Analog and PWM dimming are required. Up to 64 HPRGB Shields can be controlled simultaneously when only PWM dimming is required.

Notes:

  • This board cannot be used with common-cathode or common-anode LEDs.
  • This board is not designed to drive LED strips.

Details

  • LED driver with 3 independent channels in buck configuration.
  • Dynamically adjustable constant current 100mA – 700mA per channel allowing for analog dimming.
  • 12-bit per-channel PWM dimming allowing for smooth Gamma or CIElab brightness corrected dimming.
  • Programmable PWM frequency from 40Hz – 1000Hz.
  • Programmable constant current switching frequency from 330KHz – 1MHz.
  • Max 42V input, max 36V output. Can drive up to 40W of LEDs.
  • On-board temperature sensor for remote sensing of LED temp.
  • On-board 5V switched power supply allows for stand-alone operation. An Arduino or other micro controller e.g. can be powered directly from the shield.
  • Shield requires only 3 pins (I2C) from Arduino or other micro controller for operation.
  • On-board I2C pull-up resistors can be disabled by means of solder jumpers
  • Shield can be stacked directly onto an Arduino Uno and Arduino Leonardo and others.
  • Solder jumpers allow to re-configure the shield for the different I2C pins on the Arduino Leonardo.
  • All functions of the shield are accessible through an Arduino library using the I2C bus.
  • All components on the shield are FM+ compatible allowing for I2C bus speeds of 1MHz (works great on a Teensy3.1)
  • Only lead free ROhS compliant solder is used to build these shields

Getting Started

While reading through the documentation please keep the Quick Reference handy:

HP-LED Shield 2.5

The yellow marked items on the Quick reference indicate the default configuration and minimum connections needed to operate the shield.

Like any other Arduino shield the High Power RGB LED Shield is designed to be stacked onto an Arduino and functions with a variety of Arduino Boards. The only connections needed to operate the shield are SCL, SDA and GND. If only a single shield will be stacked onto the Arduino then normal headers with 0.1″ spacing can be used. If several HPRGB Shields will be stacked, the use of the Stackable Headers is recommended. These are available from a variety of sources such as Sparkfun or Adafruit.  

Configuring the HPRGB Shield

I2C pins (Default – A4/A5 – for Arduino Uno)

As shipped, the HPRGB Shield is configured to be operated on an Arduino Uno with the Analog Pins A4 and A5 serving as the I2C connections. Should the  shield be used with an Arduino Leonardo, or Arduino Yún the shields configuration needs to be changed as explained on the quick reference by means of toggling the solder jumpers on the underside of the board.

Pull-Up resistor enable/disable (Default – enabled)

The shield has 1.8k Ohm pull-up resistors – one each on SCL and SDA – that are required for I2C bus operation and are by default enabled for use with a single HPRGB Shield. When multiple HPRGB Shields are stacked onto an Arduino  all pull-up resistors except on one HPRGB Shield will have to be disabled by removing the respective solder jumpers on the top side of the HPRGB Shield. If not removed the pull-up resistors on all shields would be connected in parallel and the resulting resistance would be too low to operate the I2C bus within the specified limits.

If multiple HPRGB Shields will be used, before starting to disable pull-up resistors, please read the section below on configuring the LDAC (MCP4782) I2C Address.

PCA9685 I2C address (Default – Jumpers A0-A5 floating/not connected)

If only one HPRGB Shield will be used the default configuration of the I2C address does not need to be changed. When more than one HPRGB shield will be stacked or otherwise connected to the same I2C bus, the I2C addresses for the PCA9685 on al shields are required  be configured with solder jumpers labeled A0 – A5 in the of the shield. The quick reference shows the configuration of the solder jumper for the first 8 shields.

LDAC (MCP4728) I2C Address, Constant Current and Switching Frequency.

The MCP4728 is a Digital Analog Converter with four independent channels. Three of these channels are used to set the  constant current for each of the three LED channels. The fourth channel is used to set the switching frequency of the for the LT3496 LED driver. There are three different use cases that determine whether the default configuration needs to be changed.

Only one HPRGB Shield with, or without Analog Dimming

No change to the default configuration will be required. The constant current and switching frequency for the LT3496 LED driver chip can be programmed dynamically through the Arduino Library allowing Analog Dimming.

Two or more HPRGB Shields will be used but no Analog Dimming

No change to the default configuration of each HPRGB Shield will be required. However, the constant current setting and switching frequency of the LT3496 LED driver need to be programmed and stored in the MCP4728 builtin EEPROM. In order to do so each single shield will need to be connected to an Arduino. Then the desired/required constant current and switching frequency can be programmed and stored for each single shield. This can easily accomplished  with the HPLEDShield.ino sketch.

Please refer to the documentation and spec sheet for the LED used for the application. Using incorrect values, e.g. too high current, can easily destroy an LED.  Up to 64 shields can be used in this case. This is a theoretical limit as electrical limitations exist e.g. I2C bus capacitance etc. Additional hardware in form of I2C bus extenders and other hardware might be required.

Two or more HPRGB Shields will be used with Analog Dimming or frequent reconfiguring of constant current settings.

For this use case, the I2C Address for each HPRGB Shield has to be changed. The MCP4728 only allows 8 different I2C addresses, which means that a maximum of 8 shields can be used for this use case. To change the I2C address for each HPRGB Shield the LDAC jumper has to be move according to the instructions on the Quick Reference. Once a single HPRGB Shield is connected to an Arduino, the provided changeDeviceID.ino sketch can be used to re-program the I2C address of the MCP4728. The sketch uses an also provided SoftI2CMaster library that has to be employed as the Arduino I2C (Wire) library is not able to accommodate the critical latch timing needed on pin 8 for the LDAC I2C address programming. It is recommended to use an Arduino Uno for this. While it may work with other micro controllers it has not been tested.

Setting the LED Constant Currents and switching frequency for the LT3496 LED driver chip

The circuitry of the  LT3496 is a DC/DC step down (Buck) switching power supply. That switching power supply is turned on/off by the PWM signals from the PCA9685. The switching frequency – not the PWM frequency – can be programmed through the MCP4728. For high dimming ratio applications and for best efficiency and best duty cycle range it is recommended to set this to 330 kHz using the setFreq library function. The constant current needed for the LEDs will depend on what LEDs are used in a given application. LED spec sheets commonly provide information on best values. The HPRGB Shield hardware in combination with the setCurrent function of the Arduino library will allow settings from 100mA to 700mA per chanel.

VIN jumper (Default open/NC)

The HPRGB Shield has a 5V, 300mA on-board power supply mainly to supply 5V to the two (or three if the board is populated with a TMP421 temperate sensor) main chips on the  HPRGB Shield. When the HPRGB Shield is stacked to an Arduino and the Arduino is not powered through it’s barrel jack, the on-board power supply of the HPRGB Shield will also supply 5V to the Arduino. The protection (Schottky) diode on the HPRGB Shield will protect the Arduino from (VIN)over voltage. The HPRGB Shields VIN voltage will not be available to the Arduino in this case.

If you have stacked one, or more HPRGB Shields to an Arduino and the voltage required to power the LEDs is ≤12V it is also possible that all the HPRGB Shields are powered through the Arduino. In this case a VIN jumper connection is required on all shields. This disables the protection Diode on the HPRGB Shield.

If two or more HPRGB Shields are stacked onto an Arduino and the voltage required to operate the LEDs exceeds 12V it is still possible to connect power only to one HPRGB Shield and provide power to all other HPRB Shields through the VIN pin. The VIN Jumpers on all shields have to be connected. However, the VIN pin on the HPRGB Shield staged first to the Arduino must either be cut, or bent to the side so no VIN connection is possible to the Arduino. In this case the HPRGB Shields and he Arduino must be powered separately by their own power supplies.

I2C Address of Temperature Sensor TMP421 – No! Sorry!

In the current design of the Shield the I2C address of the temperature Sensor is not configurable. This will change should the design of the Shield undergo another revision. As a consequence, when temperature measurements are required only one Shield with a TMP421 can be on the same I2C bus. When two or more HPRGB Shields on the I2C bus are populated  with a Temperature Sensor the other Shield functions will work normally. Only the temperature sensor functions will not work.

  1. Why the two dimming method are available ?
    It is possible to not put the chip for analog dimming if we choose the pwm dimming as solution ?

    • Hi Fabien,

      If you only want to use PWM that’s fine. You don’t have to use analog dimming, but the functionality is there if you need it. Some of my customers don’t use PWM but only Analog dimming.

      If you want to use PWM then you need to only set the constant current once. That is something you have to do with any other shield. As opposed to any other LED shield, this one allows you to set the constant current in software, which allows for great flexibility when experimenting with different LEDs on the same shield as some customers do.
      The responsible chip on the shield has an EEPROM on board that allows you to save the constant current setting, so even after power is removed from the shield, the next time it is powered it will use the same setting. The chip is integral part of the design and must be populated on the board for the shield to function. The cost savings in would be rather marginal anyway.

      Setting the constant current and PWM dimming can be done easily through the Arduino library. One of my customers has adapted the library for use with a Raspberry Pi.

  2. What i don’t unserstand, is that when we are looking to some driver for strip led, they are never a driver like the lt3496. Do you know why ?

    • Yes. The LEDs used in most LED strips I have seen use 20-50 mA. They have built in current control using either internal electronics or chips that are soldered onto the LED strip between each LED. Thus they are connected in parallel.
      That’s really the only way you can get 144 LEDs on 1m of strip.
      The chips/LED internal electronics also use a form of one-wire communications protocol , which allows individual control of each LED.

      The shield is aimed High Power LEDs where a single LED can draw up to 700mA ( not 20-50mA!). To operate more than one LED on each channel you’d have to connect several LEDs in series (not in parallel).

      If this does not explain it, please let me know and I make a longer blog article about this.

  3. Stephen Kramer

    Hello, I just downloaded the library from GitHub and surprisingly it has errors when compiling the example “HPLEDShield”. I didn’t modify anything. I am using Arduino IDE 1.6.7. I have tried restarting but no change. Can you help? Here is the error:

    Arduino: 1.6.7 (Windows 10), Board: “Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)”

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:22:1: error: ‘prog_uint16_t’ does not name a type

    prog_uint16_t CIEL_8_12[] PROGMEM = {

    ^

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:32:1: error: ‘prog_uint16_t’ does not name a type

    prog_uint16_t CIEL_10_12[] PROGMEM = {

    ^

    In file included from C:\Users\Perigalacticon\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.10\cores\arduino/Arduino.h:28:0,

    from C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.h:9,

    from C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:10:

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp: In member function ‘void HPRGB::goToRGB(uint8_t, uint8_t, uint8_t)’:

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:13:42: error: ‘CIEL_8_12’ was not declared in this scope

    #define CIEL_8_12(a) (pgm_read_word_near(CIEL_8_12 + a)) // CIE Lightness lookup table functions

    ^

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:194:14: note: in expansion of macro ‘CIEL_8_12’

    pca9685PWM(CIEL_8_12(blue),CIEL_8_12(green),CIEL_8_12(red));

    ^

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:13:42: error: ‘CIEL_8_12’ was not declared in this scope

    #define CIEL_8_12(a) (pgm_read_word_near(CIEL_8_12 + a)) // CIE Lightness lookup table functions

    ^

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:194:30: note: in expansion of macro ‘CIEL_8_12’

    pca9685PWM(CIEL_8_12(blue),CIEL_8_12(green),CIEL_8_12(red));

    ^

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:13:42: error: ‘CIEL_8_12’ was not declared in this scope

    #define CIEL_8_12(a) (pgm_read_word_near(CIEL_8_12 + a)) // CIE Lightness lookup table functions

    ^

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:194:47: note: in expansion of macro ‘CIEL_8_12’

    pca9685PWM(CIEL_8_12(blue),CIEL_8_12(green),CIEL_8_12(red));

    ^

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp: In member function ‘void HPRGB::goToRGBHI(uint16_t, uint16_t, uint16_t)’:

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:14:43: error: ‘CIEL_10_12’ was not declared in this scope

    #define CIEL_10_12(a) (pgm_read_word_near(CIEL_10_12 +a))

    ^

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:202:13: note: in expansion of macro ‘CIEL_10_12’

    pca9685PWM(CIEL_10_12(blue),CIEL_10_12(green),CIEL_10_12(red));

    ^

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:14:43: error: ‘CIEL_10_12’ was not declared in this scope

    #define CIEL_10_12(a) (pgm_read_word_near(CIEL_10_12 +a))

    ^

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:202:30: note: in expansion of macro ‘CIEL_10_12’

    pca9685PWM(CIEL_10_12(blue),CIEL_10_12(green),CIEL_10_12(red));

    ^

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:14:43: error: ‘CIEL_10_12’ was not declared in this scope

    #define CIEL_10_12(a) (pgm_read_word_near(CIEL_10_12 +a))

    ^

    C:\Program Files (x86)\Arduino\libraries\HPRGB2\HPRGB2.cpp:202:48: note: in expansion of macro ‘CIEL_10_12’

    pca9685PWM(CIEL_10_12(blue),CIEL_10_12(green),CIEL_10_12(red));

    ^

    exit status 1
    Error compiling.

    This report would have more information with
    “Show verbose output during compilation”
    enabled in File > Preferences.

    • Hi Stephen,
      I am investigating and googled around. It looks like the PROGMEM stuff that was necessary for earlier Arduino’s may not be necessary anymore. I’d have never noticed because I use only Teensy boards with arm Cortex architecture (pjrc.com). These use a different, linear memory architecture and the PROGMEM was never needed.

      In the meantime, you could try to replace the “prog_uint16_t” with “const uint16_t” in HPRGB2.cpp in line 22 and 32 and see if that helps ?

  4. Stephen Kramer

    That worked on the Uno, thanks. Sorry for the long post with the error print out. I can delete it if you want. I noticed it doesn’t work on the Mega2650 however, I assume this is due to I2C not being available at the A4 and A5 pins on the Mega. Can the Led driver shield use the pins at the upper right corner of the shield (above GND & AREF) for I2C? These are available for I2C on the Mega2650.

  5. Stephen Kramer

    Well I just read the answer in your documentation it looks like yes!

    • Glad it worked 🙂
      No, you don’t have to delete the post with the error messages. It might help someone else.
      I believe the alternate pins work for the mega but the Arduino folks in a bout of utter stupidity have moved the nice large board pictures that showed the pinout right on the board somewhere else.
      In order to do so you’ll have to change the solder jumpers on the bottom of the board.

  6. Stephen Kramer

    Hello,

    Do you have schematic drawings for the led shield? Specifically I need to know how all the power connections are wired. For instance, does the Vin terminal block connect to the Vin pin? Does the Vin pin connect to the Arduino? I thought this was the case but there is no power at the Arduino when supplying to the terminal block. How does the power supply system interact with USB power, I noticed the Uno disconnecting from the PC when using the led shield… lots of questions!

    Thanks.

    • Hi Stephen,

      The Eagle files including the schematics are on the GitHub page here:
      https://github.com/TrippyLighting/High-Power-RGB-LED-Shield-Rev.-2.5

      The Schematics are available also as a PDF file:
      https://github.com/TrippyLighting/High-Power-RGB-LED-Shield-Rev.-2.5/blob/master/HPLEDShield-v35%20-%20Schematics.pdf

      In general, if you are powering the Arduino Uno through the USB port only, then the LED Shield needs to be powered separately, through terminal block on the shield. USB does not supply enough current to drive high power LEDs.

      If you want to power the Shield from the Arduino the supply voltage must be between 7-12 V through the Barrel Jack on the Arduino. In order for the Shield to receive power from the Arduino you need to connect/bridge the VIN solder jumper on the shield. In that case you cannot connect power directly to the terminal block on the shield. The USB port on the Arduino is only used for programming, not for power.

      If you want to power the Arduino from the Shield you should not power the Arduino through the barrel jack and USB is only used for programming. The power will be supplied from the 5V power supply on the Shield through the 5V pin to the Arduino.

      Please let me know if that answers your questions.

      • Stephen Kramer

        Thank you for the info. I am a confused about the operation of my shield, I tested it in these configurations:

        1. When I power the HPRGB shield from the terminal block with 12V without the Vin jumper (and no power connections to the UNO including no USB) the HPRGB shield does not receive power, but I measure 0.4V @ Vin and 0.86V at the 5V header pin. Shouldn’t this configuration provide full power to the HPRGB shield and the Uno 5V?

        2. If I power directly from the Vin pin (no power connections to the UNO including no USB) I get 5V on the 5V header pin.

        3. If I power from the HPRGB shield terminal with 12V (and no power connections to the UNO including no USB) and use a temporary Vin jumper then I see 5V at the 5V header pin and full power to the HPRGB shield.

        4. If I power the HPRGB shield from the terminal block with 12V without the Vin jumper, and power the Uno with 9V at the barrel jack then there is full power to the Uno and the HPRGB.

        Are these results correct? They seem contrary to the description in the manual pages.

        Thanks

  7. Stephen Kramer

    Note:

    For config #1 there is also no power at the Uno.
    For config #2 there is also full power at the Uno and HPRGB shield.
    For config #3 the Uno also has full power.

    thanks

    • Please disconnect / unplug the shield from the Arduino Uno. Then connect power to the shield. There is a red power LED on the shield which should light up when power is connected to the shield.

      In that (non) configuration, voltage at the 5V pin should be 5V as it is directly connected to the 5V
      Output on the on-board power supply on the shield.

      • Stephen Kramer

        With nothing else connected except 12.14V @ PVIN terminal block the red LED glows at lower brightness than normal and I measure 1.7V at the 5V header pin and 2.15V at the Vin header pin.

  8. Stephen Kramer

    Sorry for the extra comment but I can’t seem to open the eagle files, the error is “This is not an Eagle File” when I open HPLEDShield-v2.5 .sch or .brd files. I have Eagle version 7.5.0 for Windows (64 bit) Light Edition. Thanks.

  9. That sounds to me like the shield is defective. If that’s the case I’d like for you to send it back to me so I can analyze what caused it.
    I will send you a new one in the meantime (free of charge of course).

    Let me know if that’s acceptable.

  10. Stephen Kramer

    That’s great, where should I address it? Thank you.

  11. Stephen Kramer

    Thanks. I was using it with red single leds rated at 700 mA, up to 4 in series at ~2.5V each, with a 12V power supply. It worked fine when I had power supplied to the PVin terminals w/o the jumper and attached to the Uno.

  12. Stephen Kramer

    I got the new shield and it works great as expected. Thanks for the fast response.

  13. Hello, Does the shield work with the (3.3V) Arduino Due board? Thanks.

    • Hi Stephen,

      The shield “works” on any microcontroller with I2C bus. I penally don’t use Arduino’s at all, but Teensy boards from PJRC.com. Looking at the pinout of the Due this should work.
      Be aware that the Due is a 3.3V board. You may not be able to diver the Due from the 5V onboard power supply of the Shield.

  14. Isn’t there incompatibility because the shield I2C would operate at 5V but the Due I2C operates at 3.3V and is not 5V tolerant? I am curious why you say the shield should work? Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: