Don't leave your next physical computing project stranded in a world of black and white! This color sensor module can detect the color of an object and report it back to your processor for applications like color sorting. The great thing about the HDJD-S822 is its simplicity to get it up and running. The gain of the sensor is controlled by digital input pins and it gives you separate analog outputs for red, green, and blue channels.
This breakout board makes it easy to embed the HDJD color sensor in your next project by breakout out all of the necessary pins to standard 0.1" headers.
This skill defines how difficult the soldering is on a particular product. It might be a couple simple solder joints, or require special reflow tools.
Skill Level: Noob - Some basic soldering is required, but it is limited to a just a few pins, basic through-hole soldering, and couple (if any) polarized components. A basic soldering iron is all you should need.
See all skill levels
If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.
Skill Level: Rookie - You will need a better fundamental understand of what code is, and how it works. You will be using beginner-level software and development tools like Arduino. You will be dealing directly with code, but numerous examples and libraries are available. Sensors or shields will communicate with serial or TTL.
See all skill levels
If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.
Skill Level: Noob - You don't need to reference a datasheet, but you will need to know basic power requirements.
See all skill levels
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
No reviews yet.
cool product indeed [ab]([ab](https://www.example.com` qwe qw ewe **as df>e " ))
The example code did not work for me. The color ratio calculation did not incorporate the fact that each color needs a different irradiance value to reach 3V. And even using the charts from the datasheet, Blue was not recognized very good. The following values worked for me:
First value is the spectral responsivity of the chip (I had to raise the ratio for blue from 170% to 200%). The second value is to equalize the V vs irradiance (in which a again raised the value for blue). Using these values, I could detect six colors using the following code:
Check out the video
One thing you could do instead is measure the Red, Green, and Blue of a white card and a black card and write down the RGB values spat out by each. Then use the map() function to map each of the readings to their respective RGB values (black: 0,0,0; white: 255,255,255). Then use these values for color sorting using each colors' RGB value. This automatically scales everything to 100% and gives you good color distinction without having to worry about gain, etc. I can easily pick out seven different colors ranging from white to black (light blue, medium blue, blue-green, dark brown, tan, white, black). I probably could do more TBH.
How could an analog sensor —this HDJD-S822— be twice as expensive as a digital sensor —the SEN-10701 based on ADJD-S311-CR999?
This sensor works acceptably with bright sources, for example reading the average color of a TV, or a bank of LEDs, but it is not very sensitive when trying to use the onboard LED's reflection to detect the color of objects.
Something like the retired SEN-08924 (TCS230 based) or a newer TCS3472 seems to work much better for that application....
Any reason this shouldn't work with the LilyPad arduino? This is my second one I am trying and the color readings are coming out the same. There is no change no matter what color conditions are, as if the sensor is not working. Please help!
hi everybody kindly tell me is this sensor works for just detecting RGB colour ? or anybody have any library please share it with me .. thanks
This breakout doesn't have any current protection. I just fried 4 of them by accidentally driving the outputs with my Arduino Uno. Beware...
What is the distance it can mesure? Say I want to measure a dot in an accuracy of 1x1mm blocks from 10 meters away, is this ok to use or should I use a camera?
it doesn't need calibrate!
I have read through the datasheet, and I am still not sure of what I need to do with the gain setting pins, should I attach them to DI/O/'s and then what, any explanation would be helpful.
Isn't the recommended decoupling capacitor of 100nF already on the board? Seems like someone forgot to remove it from the copy-paste :)
Can this be used to determine the color temperature in kelvin of a light source? such as an LED, to determine if the rating of 6500K is accurate or not?
It would be nice to see a comparison between this and the ADJD-S311 sensor. What does $10 more get you?