element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino Projects
  • Products
  • Arduino
  • Arduino Projects
  • More
  • Cancel
Arduino Projects
Blog Building a Full Color Lamp with the RGB LED Shield from Infineon
  • Blog
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 14 Sep 2015 2:57 AM Date Created
  • Views 4080 views
  • Likes 14 likes
  • Comments 16 comments
  • infineon
  • rotary_encoder
  • feature_infineon
  • lighting
  • arduino_projects
  • color
  • rgb_led_shield
  • rgb_color
  • rgb_led
  • infineon_rgb
Related
Recommended

Building a Full Color Lamp with the RGB LED Shield from Infineon

shabaz
shabaz
14 Sep 2015

Note: This is the final part in a three-part series about the Infineon RGB LED Shield. Part 1 covered how to get started with the RGB LED Shield and Part 2 covered a white LED lighting project.

 

Introduction

Part 2 in this series of posts covered white lighting using the Infineon RGB LED Shield. The light was controlled with a variable resistor connected to an on-board analog-to-digital converter. This Part 3 covers color lighting with this Shield.

 

The Infineon RGB LED shieldInfineon RGB LED shield is a very low cost Arduino-shaped board designed for lighting applications and can operate three different sets of lights per board for a massive 100W of LED lighting – ideal for home, commercial and industrial lighting applications.

 

This project covers the design of a full color lamp for home use; I used it to drive LEDs with 40W of power which was ideal for splashes of color. The photo here shows it on a tripod stand. The lamp head is about 6 inches in diameter with 36 LEDs.

image

 

Here are some example photos taken with this lamp with normal incandescent room lighting on at the same time, and no white balance corrections:

A white rose in green light:

image

 

Same flower in yellow light:

image

 

Same flower in a very purple light:

image

 

These images are not subtle, especially the last one which is very extreme (I was just interested in testing the lamp); the output was set to maximum saturation although unsaturated pastel-type colors are possible with this project too.

 

Although the RGB LED Shield as supplied is intended for connecting to an Arduino, I used it solo. It does not need an Arduino, and can be programmed to operate standalone.

 

Here is a brief graphic outline of the project:

image

 

What is “Deep Color”?

Deep Color means the capability to produce billions of colors. This is important for lighting because humans can detect 10 million or more colors and studies suggest women may detect closer to 100 million (although some studies include brightness) and therefore 8-bit pulse width modulation (PWM) dimmed LED lighting (for a combined total of 24 bits for RGB) which is extremely common cannot produce seamless transitions when lights are dimmed – individual levels are discernible. One example is the neopixel-style LEDs – they are easy to drive, but have 8-bit levels per color. There are microcontrollers with 10-bit or higher PWM capability and they would be more suitable for LED lighting effects. The Infineon RGB LED Shield offers 12-bit PWM capability (total 36 bits for RGB), for 68 billion colors.

 

Assembling the Lamp

The LED array is an old, discontinued model manufactured by Dialight and it uses Lumiled LEDs.  There are 12 each of red, green and blue LEDs (total 36) each covered with a lens. The assembly has a metal clad PCB that needs to be connected to a heat sink.

image

 

There are more modern LEDs and arrays with higher efficiency. The efficiency is very important not just to save energy, but also to ease heatsinking requirements. The heat sink is extremely important for power LEDs; an increase in temperature affects the light output (the color will change!) and also reduces the lifetime of the LED. The LED array did not come with a heat sink; a very primitive one was machined from aluminium.  It is a simple shape and will not be as effective as commercial heat sinks. A grommet was used to protect the cable from being damaged by heat or sharp edges.

image

 

The photo below shows the side that was mated to the LED array board. A thin layer of heat sink compound was used.

image

 

Building the Test Bed

Bare wires and boards can be a dangerous thing when high voltages and currents are present. It is worth spending some time building a robust test bed with reduced risk of wires getting entangled or boards shorting against metal objects.

 

I used a plastic base board available from Problemchild designed for holding popular microcontroller boards. I drilled a hole in it for a rotary encoderrotary encoder, and connected it to the RGB LED Shield. The plastic base board was held at an angle using a custom plastic stand. The LED array connected to the heat sink can be seen in the foreground.

image

 

The rotary encoder (visible on the left in the photo above) is a device that has a spindle that can freely rotate with no restriction or limit. Outputs from the encoder are in the form of two logic level signals that are summarised in the diagram below as the spindle is rotated clockwise or anti-clockwise.

image

 

One way to process the signals is to connect them to interrupt-capable input pins on the microcontroller. For more detail check out Jan Cumps series on rotary encoders.

 

The photo below shows the wiring in detail. The yellow and orange wires are the two signals from the rotary encoder. The blue and green wires are connected to a push button (the rotary encoder has one built-in; the spindle can be pressed). The rotary encoder is connected to the regulated 5V supply available on the Shield board using the red and black wires.

image

 

The entire project was powered using a 48V supply (wires are visible at the top of the photo above). The white wire visible on the right side is not used; it is a temporary connection to an oscilloscope and is used to adjust the RGB LED Shield parameters which control how much current is driven through the LED array. See Part 1 and Part 2 for details on this. With the hardware complete, I was ready to start developing the software that would run on the RGB LED Shield (code will be published in a few days after some tidying up). See Part 1 for details on the compiler and development environment.

 

Control Method

The white LED project in Part 2 used a variable resistor to control the brightness. This worked great. However with 68 billion colors on offer, a variable resistor doesn’t cut it. Push buttons are an option but too many buttons would be awkward for wall use. A far more usable option is an optical rotary encoder. I used an encoder from Bourns that has a built-in push button too for added flexibility in designing the human-to-machine interface.

 

One method of adjustment could be to independently set the red, green and blue levels either using three rotary encoders or pressing a button to select the function for a single rotary encoder.

 

Setting RGB values is unnatural however; a better method is to set the color in terms of hue, saturation and value quantities (known as HSV); the easiest way to visualize this is to examine the diagram below (image source: Wikipedia) which shows a cut-away cylinder.

 

If you were to walk around the edge of the cylinder on its top face, the colors (or hues) green, yellow, orange, pink, purple and so on would be traversed. These represent one dimension of configurability that can be achieved with a rotary encoder.

 

A second dimension would be the color saturation; the center of the cylinder has no color and is white at the top of the cylinder, and black at the bottom. Adjusting the saturation with another rotary encoder would allow traversal from a pure hue (on that top edge of the cylinder) to pure white, which would be represented by walking to the center of the top surface of the cylinder.

 

A final rotary encoder could be used to set the overall brightness level and this is represented in depth of the cylinder. The lower face of the cylinder is black, i.e. all LEDs fully turned off.

image

 

It was decided to use the push button capability of the Bourns rotary encoder to select between hue, saturation and value attributes. The rotary encoder could then be turned to adjust the chosen attribute.

 

The hue, saturation and value (HSV) control method is ideally suited to the Infineon RGB LED Shield because it contains an on-board ARM Cortex-M0 processor with sufficient power to be able to implement the algorithm. Floating point numbers are used for the algorithm (no attempt was made to optimise it) and are finally converted into 12-bit range integers used to drive the LEDs.

 

68 billion is a massive number, and a method is needed to be able to rapidly home in to a desired setting. One solution is to accelerate the attribute (hue, saturation or value) adjustment based on the speed that the user rotates the shaft. A non-linear relationship is required between spindle rotation speed and the rate of change of the parameter. The diagram below indicates the feature which was implemented, along with a straight line to indicate the normal linear relationship which the rotary encoder exhibits. The diagram below has no values marked; the specific settings were adjusted based on trial-and-error until it felt natural.

image

 

The short (50-second) video below (of the Dark Side appropriately) shows the result when the rotary encoder is turned by hand.  The hue is shown being adjusted in the video (the saturation is set to maximum throughout the video). The color transition is smooth with zero perceived artefacts; any unevenness in the video is due to uneven speed in rotation of the spindle by me, or the video encoding (the video does not have 36-bits per pixel capability) or due to streaming.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Summary

The Infineon RGB LED Shield makes it extremely easy to build high power lighting projects. No additional components were needed for this project apart from the power supply, the rotary encoder and the LEDs. The user interface is important and one example method is to employ hue, saturation and value (HSV) adjustment using an optical rotary encoder. The ARM Cortex-M0 processor was ideal for implementing the HSV algorithm. (Note: The project source code will be published in a few days after tidying up).

 

This is the last post in the mini-series, but as next steps, the ability to be able to wirelessly control the LEDs would be worth investigating, as would enclosing the electronics in a case.

  • Sign in to reply

Top Comments

  • ipv1
    ipv1 over 10 years ago +2
    Brilliant. The final design will be very interesting indeed.
  • DAB
    DAB over 10 years ago +2
    You beat me to the punch. I am doing a similar illuminator for a microscope using the new PSOC44 board. DAB
  • mcb1
    mcb1 over 10 years ago +2
    Brilliant project. I've just discovered that they use 3w LEDs to do the halo lighting on the front of some modern cars. Obviously someone has worked out changing to a 3w RGB gives another dimension, and…
  • dimitarbg
    dimitarbg over 6 years ago

    Hi,

     

    I have hard time starting it up.  After wiring everything i didnt got any power on the LED lights?Any suggestions?

     

    Kind regars!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 8 years ago in reply to three-phase

    Hi Donald,

    Thanks!!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • three-phase
    three-phase over 8 years ago

    Excellent series of high quality blogs, thanks for taking the time to post.

     

    kind regards

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mcb1
    mcb1 over 10 years ago in reply to shabaz

    I think your Bemmer is a bit old to have halos ...

     

    Mark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 10 years ago in reply to mcb1

    Cool idea : ) The RGB Shield looks ideal for that, especially for shows..

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube