Chromiris is a hand-held colorimeter built using off-the-shelf parts to tell the color of any object in hex or RGB values. Using color sensors and LCDs, the group constructed a compact solution to the issue of detecting true color.
Have you ever wanted to match paint to the color of a certain object? Or find the color value of a certain object? Chromiris allows you to identify it. Easy to use, Chromiris is a relatively simple device that allows the user to get the hex and RGB color value for any object placed just one to two inches away from its sensor.
What does it do?
Chromiris uses its sensor to collect data for each color, the gathered information is formatted and mapped to corresponding numbers in the code. The code is then displayed in understandable RGB or hex values on the LCD.
Our initial idea was to place the colorimeter on any object and the hex and RGB values of the object would be displayed. We wanted to have data transmission through an Xbee to a computer to make the colorimeter work at a distance. Unfortunately, the Adafruit Flora was not as versatile as we had hoped and made implementation difficult. In addition, the Adafruit color sensor was only capable of accepting 3V causing the color readings to be murky and registering as a darker shade than the actual color. The Flora and color sensor were not up to par for our application, so we decided to make a change.
We thought that having something powered by the Arduino would be easier to code and wire, especially with the use of a breadboard. We upgraded to the breakout version of the Adafruit color sensor that had a pinout, as it was easier to attach to a breadboard, but more importantly, allowed for 5V, which subsequently made the colors more accurate.
With the new enhancements in place, we began the majority of our coding. The bulk of the code was from a link to a German blog for Arduino projects and 3D printing (Dax, A.) found in a YouTube video. The sample code gave us a solid base but we still needed to find a way to display the RGB and hex values. We needed to include the Adafruit_TCS34725 library so the color sensor would be recognized. We wrote code to allow the display on the LCD and to label and display each RGB value on the LCD.
At first, the values given were way too high, so we mapped the values to 255, and once they were brought down, it showed the correct values. We faced a problem of the LCD holding on to the third digit if the object caused the corresponding RGB go below 100. To overcome this challenge, we modified our code to set the hundreds-place-digit to a space if the RGB value went below 100. We then tackled the issue of displaying the hex value for each object, and fortunately the Arduino print library has a convenient hex second parameter. Using that, we were able to print out each RGB hex value under each label.
The two worked separately, but we wanted to add a button to switch between modes. Usually, button presses are registered for as long as the button is being held down, and once the button is released it goes back to its original state. We had a hard time coding a button to hold the state it was in. We used the sample debounce code in the Arduino library to get us started. We decided to make each of the RGB and hex print outs separate functions. Doing that, we were able to code if the button is in the ‘0’ state to run hex function, and when in the state of ‘1’ to run the RGB function. That worked quite well, but then we faced the same problem on the LCD. If one of the RGB values was over 100 and we switched to hex mode, the hundred-place-digit would remain on the screen. Simply printing a ‘space’ in the hundred-place for each value cleared that up.
Physically, Chromiris is not very complex. It is a colorimeter powered by an Arduino Uno, using an Adafruit color sensor. The LCD is wired normally with six analog pins giving it data to process, three ground wires, and two power wires with one having a 220k ohm resistor to power the backlight of the LCD display. The button was simple to wire up — power runs into one side and then a wire runs to a digital input and a 1k ohm resistor out to the ground. Finally, the Adafruit color sensor only required four pins, power, ground, and the last two SCL and SDA for data transmission. While testing our project, we found glossy items are not represented as well as matte objects or clothing.
The Chromiris is a colorimeter that can display the hex and RGB values of any object you place in front of it. It is not a perfect design, but we were able to learn a lot by making it. By comparing our design to an existing similar product, we were able to see some areas where our design can grow. We also came up with many ideas on how to improve our design and ways to innovate it. Working as a team greatly helped our communication and collaboration skills. We faced some problems while designing our product, and even had to scrap some of our initial ideas, before coming up with a design that was possible to make within our given time and resource constraints. Chromiris is a cost-effective design with endless applications for use, and in the future, we hope to increase its functionality.