Atlas Scientific is on a mission to make high-quality sensors for environmental monitoring available to everyday hackers and makers. All of their kits are easy to calibrate and connect to your microcontroller-based project.
Color light sensors are awesome devices for everything from environmental sensors to general robotics. They can be used to monitor slowly changing events like algae blooms or leaf death, or to determine light absorption through a medium. But for all their utility, they have some flaws. First off, they can be complicated to interface to since RGB data often has to be derived using complex signal processing. Secondly, they're less than rugged, and when you want to deploy one in the field you need a device that can stand up to the weather. Even moisture in the air can make an unprotected sensor unreliable.
Atlas solved these problems by embedding the light sensor in a rugged housing below a layer of transparent epoxy which protects the sensor from moisture while still allowing light to get in. The resulting light probe is water- and dust-proof, sleet and ice tolerant, non reactive in salt water and will readily sink when submerged. On top of all that, it provides both RGB level (in 8-bit RGB format) and light intensity (in lux) as simple comma separated strings over RS-232!
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: Competent - You will be required to reference a datasheet or schematic to know how to use a component. Your knowledge of a datasheet will only require basic features like power requirements, pinouts, or communications type. Also, you may need a power supply that?s greater than 12V or more than 1A worth of current.
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.
Based on 2 ratings:
1 of 1 found this helpful:
Once I was able to get the sample code working, I was fascinated by how well this sensor was able to determine the color of things. It was able to pick up even minor hues of change in the color and it even was able to register some darker grey-ish black parts. A great find!
The sensor more or less works as advertised, but the color values aren't directly translatable to monitor RBG values, which was somewhat disappointing to my son who was trying to use it to identify Lego bricks. Needs calibration and/or correct lighting to deal with the values coming out.
A big plus however is the sensor outputs a simple string of R,G,B values that are easy to understand and process.
Atlas has already replaced this unit with a new version. The new version has integrated LEDs and is fully calibrated against them. I imagine it would give better color interpretation and the values it gives out are more directly translatable to monitor RGB values.
I was skeptical about purchasing one of these sensors since I saw that so many people are having issues with it. That said, I thought I would clear up some of the things that I confronted when working with this sensor today.
I connected the sensor in the following manner: - White to TX of Serial3 on an Arduino Mega - Green to RX of Serial3 - Red to +5VDC - Black to GND
The sample Arduino Mega code from the manufacturer has a bug where the baud rate for Serial3, the serial port that the sensor is to be communicating on, is set to 9600 instead of 38400--the default baud rate for the sensor
The sample Processing code has the baud rate set to 38400 when the Arduino Mega baud rate for Serial0, the serial port for the Arduino Mega to communicate with the computer, is set to 9600, so I changed the baud rate to 9600 in the Processing code.
The sample Processing sketch has a bug where it apparently attempts to automatically select which COM port the sensor is connected to, but as my install of the Processing IDE was fresh, I apparently didn't have whatever library that may be needed in order to make that function automatic. To fix this, I changed this:
myPort = new Serial(this, Serial.list()[1], 38400);
to this:
Where "x" is the number of the COM port that my Arduino Mega is connected to. Yes, you need the double quotes.
There was some question about angle of view and distance from subject, which I explored for a bit. I found that the sensor has a fairly narrow angle of view, approximately 10-degrees. The working distance is from about 25mm down to about 1mm if illumination is good. I found that as the sensor gets farther from the subject, the color seems to be more influenced by the surrounding colors, but the color in the center of the target is most pronounced.
Finally, a question that I had was whether or not this device viewed color from the perspective of a spectrometer, or from the perspective of the human eye. The difference is that when one is looking at different colors of light that mix, the eye will see the resulting color from the mixture of the light where a spectrometer will be able to discriminate the light into the separate wavelengths unless some sort of nonlinear crystal is used to mix the two. I was glad to find that this sensor views the color of light from the perspective of the eye, which opens up a great number of potential applications for this.
This would have made the RGB Fiber Communication experiment much easier!
Hello - I believe that the link to the datasheet on this page is broken. Since it seems that the datasheet can't be accessed directly, I've included a link below to a page where the datasheet can be found:
https://www.atlas-scientific.com/product_pages/sensors/env-rgb.html
All fixed! Thanks for looking out!
can this act as a realtime light level and colour sensor passing that data directly to a LED panel thru an Arduino (no PC involved)? the idea is that it reflects the light level and colour outside directly to the LED panel. thanks.
oh also, can the cable be extended without and signal degradation? thanks again.
I am getting RGB readings substantially above 255 whenever it is pointed toward a semi-lighted source. Anyone else having this problem?
How far or close do you need to be from the source to work?
I don't know if this will help anyone but... One of the things I noticed about this sensor is when I connect it to a PIC32 UART port, if I try to program the pic or pause it when it is running in debug mode the sensor quits sending data. Often it will not start back up until it is power cycled. To solve this I put a 100K resistor from the white wire to Vcc. When the PIC is reset the pins go from being driven to being in a high impedance state, making the color sensor see a start bit.
Hope this is helpful.
Can I connect it to a pc !?, can someone give a code example using C++ !?
hi, i 'm not much aware of electronics. i want to build a color mixer which 'll mix 3 primary colors (RGB) to give the exact color sample placed before the sensor. i.e., give red, blue and green proportions of the sample color. can this sensor be used to do so.. pls.. help
Yes, yes it can...
Hello,
I just received this sensor, and it feels and looks great. But I cannot seem to get any sensible readings from it using the Arduino along with the sample code. A simple Google search got me to the conclusion that nobody got it to work.
Can you please post a working sample code that can atleast tell us the RGB and lx values it sees?
Thank you in advance, Ali
None of the sample code works (completely or reliably) on an Arduino Uno (R3, latest IDE is v1.5.4). The problems with getting the serial communication to work with this device are discussed here: http://forum.arduino.cc/index.php?PHPSESSID=bg08293jtk53uprjmclqluav73&topic=146380.0
It appears that this may be because of a timing conflict between SoftwareSerial and Serial, but as of Jan 17, 2014, no one has posted sample code that works completely. If anyone here has simple code that works, I'd love to see it... :/
Awesome sensor, however the read time is 1200 ms; 620 ms is a mistake in the datasheet.
Any idea when these might be available again? Thanks.
i want to ask about the connection of this sensor..this sensor need another board to connect to arduino mega 2560 or not?if this sensor need other board to connect the arduino,what kind of board?i really need to know because i want to buy this product and i from malaysia.if this product do not work as i expected and i cannot get the output that i want,it will really cost me a lot of money..
620ms seems like quite a long time for an instruction to complete. For higher speed color detection, this should probably be avoided.
Guys, 0 – VCC is not a valid RS-232 serial level. If you connected this to a proper RS-232 port, it would not work. Please correct this in the spec as it is misleading and some people would take it to mean you can connect it to a PC or something similar directly.
RS-232 specifies that the voltage must swing between a negative voltage and a positive voltage to represent logical 0’s and 1’s. The minimum swing normally accepted for this is from -5V to +5v with anything in between being ignored (i.e. 0V).
0-Vcc levels will be recognized by most modern RS-232 hardware. As long as the polarity is correct and this isn't inverted like TTL, it will work. I can personally attest to these levels working.
My biggest complaint about the device is that the surrounding area of the sensor is not matted out. The chip breakout board is not even color neutral and the solder joints are shiny, allowing potential contamination of data if the device is positioned close to the source of light being analyzed. Even the housing is shiny!
I work with optics and matte black is standard for every device related to light processing, minimizing the bounce and diffusion.
Perhaps something to consider for the next revision of this thing.
Should that matte-r though (pun intended)? I get the impression that the probe is only designed to detect the color of what is directly in front of it, i.e. liquid. How could the reflections off of the housing/solder/etc. even be perceived by the sensor, assuming of course that the container of liquid you are measuring isn't itself reflective.
Is any information available on the field of view or detection range?
Can anyone tell where to find more information about the 5 commands this supports. I seem to have it working in a basic way but would like to see what else it supports
Doh, found it --- linky above