Light is emitted in various colors based on the wavelength of the light. Each wavelength has a corresponding frequency, where c(speed of light) = (Frequency) * (Wavelength). Using a TAOS230 Programmable Color Light-to-Frequency Convertor (and later the TAOS3200), the colors of light were converted into their corresponding frequencies. A frequency value of red, green, blue, and clear light is read by an ATMEGA328 microcontroller that uses an Arduino code to convert the values of red, green, blue, and clear to a number between 0 and 255 and display it to an attached LCD (Liquid Crystal Display). The value can then easily be reproduced with an RGB (red, green, blue) LED (light emitting diode). Any light can be analyzed with the device, but a Neopixel (an RGB LED) is built on the board. The Neopixel is controlled by three slide potentiometers that change the red, green, and blue values of the Neopixel. Students can use the device, dubbed the Donatello during a lab to understand the perception of light


  • Arduino Uno (or any similar)
  • TCS3200D-TR (1)
  • Standard LCD 16x2 with contrast potentiometer (1)
  • ATMega328 (1)
  • SparkFun AVR Pocket Programmer
  • NeoPixel (at least 1)
  • Slide potentiometers (3)
  • 330 ohm resistor (2)
  • 220 ohm resistor (1)
  • Mini Pushbutton Switch (1)
  • Breadboard (2)
  • 5v power supply (either computer or external)
  • USB to mini and micro
  • Wires, assorted


  • Basic green LED (1)
  • 0.1 uF Ceramic Capacitor (2)
  • 1000uF Electrolytic Capacitor (1)

Step 1: Lighting the Neopixel

The Adafruit Neopixel with a Trinket5v. The Neopixel needed a wire soldered to each of the 5v, ground, and Din (data in) surfaces. The color of the Neopixel changes based on the Arduino code uploaded to the Neopixel via the Trinket. Using a breadboard to easily move wires around, the 5v of the Trinket was attached to the 5v of the Neopixel, the GND to GND, and used a 300-ohm resistor to attach the #0 digital pin of the Trinket to the Din (digital input) of the Neopixel. A 1000-microfarad electrolytic capacitor was attached between the positive and negative terminals to prevent a burnout of the Neopixel. The “Adafruit_Neopixel” Arduino library is necessary to light up the Neopixel. The “strandtest” program was able to successfully light up an array of colors on the Neopixel.

To send an analog signal of the color to the Neopixel, three 5000-ohm slide potentiometers were added, attaching the 3 pin to 5v, the 2 pin to analog inputs 2, 3, and 4 respectively on the Trinket, and the 1 pin to GND.

The code (download below) enables the potentiometers to change the color of the Neopixel. The code varies the resistance, changing the intensity of the colors red, green, and blue. However, the library code as written did not allow more than one potentiometer to be used at once. Adjusting a second one caused the Neopixel to flicker through both colors briefly before turning off.

The slide potentiometers are not breadboard friendly. The potentiometers could not fit into the breadboard because there was metal that would prop up the potentiometers, not allowing the pins to go into the board. Soldering headers to the pins attempted to solve the problem. However, when slid, the Neopixel would flicker, signaling that there was not a secure connection to the potentiometers. The pins also broke off no matter how well soldered. Instead, using pliers, the metal that was in the way of properly securing the potentiometer in the breadboard was bent out of the way. With a little brute force, the potentiometers were almost always secure once pushed into the breadboard. There still is occasional flickering, but the Donatello could be tested and used.

<p>freaking hot</p>
<p>During the final test in step 6, the expected color values were these the potentiometers values and the experimental were these read from the display, am I correct ? </p><p>The system is not asked to give a global intensity value (in lux for example), and as the color percentages are not dependant of the light intensity, provided it is in the sensor window, there is no need for a white balance. But I'm wrong, why ?</p>
<p>You are correct. The expected color values were the potentiometer values and the experimental were read from the display.<br>The &quot;white balance&quot; function initially sets the RGB value of the Neopixel to 255,255,255 respectively. The sensor takes the intensity from this initial value and scales down the values on a 0-255 range. Anything more intense than the initial brightness creates error. Have you checked out the code? If you are familiar with Arduino, the code will show you the exact method.</p>
<p>Great Instructable. Very well written. Good luck in the contests.</p>

About This Instructable




Bio: Student interested in electrical engineering and robotics
More by karten:Sensing Light - Determining Exact RGBW Values 
Add instructable to: