LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RGB color sensor

Hello,

I'm building a marble sorting machine for a school project that will sort by color. We are given an NI DAQ BNC-2120 to communicate between the sensors and the PC/labview. I would like to know if anyone has a suggestion for what color sensors will work with this DAQ and labview.

 

I see sensors like the adafruit sensor that seems to work with arduino, but I'm looking for something that is intended for use with labview. Any suggestions? thoughts?

 

Thanks

0 Kudos
Message 1 of 12
(5,118 Views)

What is your budget? I like Basler USB 3 cameras. They are pretty easy to use with Vision Acquisition Software (maybe free for a student?). The cameras cost ~$500 and then you'll want some kind of lens for it.

 

https://www.edmundoptics.com/p/Basler-ace-acA720-520uc-USB-30-Color-Camera/40358/

0 Kudos
Message 2 of 12
(5,085 Views)

Camera seems overkill. All you need is a point sensor.

I assume you are trying to sort marbles with strong primary colors. Sorting "marble" (the mineral!) would be significantly more difficult because the shades are more subtle (our institute is partially red marble from Italy :)).

0 Kudos
Message 3 of 12
(5,074 Views)

@altenbach wrote:

Camera seems overkill. All you need is a point sensor.

I assume you are trying to sort marbles with strong primary colors. Sorting "marble" (the mineral!) would be significantly more difficult because the shades are more subtle (our institute is partially red marble from Italy :)).


A point sensor with a filter wheel, or multiple point sensors with different filters, could work if you are sorting your marbles one by one, but if you need to pick out marbles from a group of many marbles, I think you would need an imaging device. The device does not have to be RGB, but it can be B&W when used with a filter wheel.

 

mcduff

0 Kudos
Message 4 of 12
(5,067 Views)

Oh interesting, I was picturing a program that looks at an image of a bunch of marbles, maybe puts rectangles around them, and says 3 Blue, 4 Green, 1 Red. 

 

If it's like a coin sorting machine where the marbles drop down one-by-one, I agree that could be a simple photodetector, which is probably what the instructor intends with the BNC inputs.

 

Edit: by the way, the BNC-2120 is not a DAQ card, it is just a connector block which exposes the connections of a DAQ card to make it easier to work with.

0 Kudos
Message 5 of 12
(5,063 Views)

@mcduff wrote:
... device does not have to be RGB, but it can be B&W when used with a filter wheel....

Instead of a filter wheel, you could also cycle a color LED for illumination (or multiple LEDs with different colors). Less mechanical. Assumes absence of significant background illumination, of course. 🙂

0 Kudos
Message 6 of 12
(5,055 Views)

@altenbach wrote:

@mcduff wrote:
... device does not have to be RGB, but it can be B&W when used with a filter wheel....

Instead of a filter wheel, you could also cycle a color LED for illumination (or multiple LEDs with different colors). Less mechanical. Assumes absence of significant background illumination, of course. 🙂


I was thinking of doing a simple type of analysis; each marble has a R amplitude, G amplitude, B amplitude. (You can make this better by using more filters) The advantage of the filter is you can buy them according to their bandwidth, that is, I can have 50 nm in the red region, etc. I don't know enough about LEDs, but I assume their bandwidth may be narrow or dependent on the phosphors used to give the output. If you have a too narrow output it may be difficult to tell the difference between colors in between RGB, ie, yellow, orange, etc. as the differences in marbles may be outside the bandwidth of the LEDs. Obviously in this case source illumination matters, and an incandescent or halogen source would be best as its output resembles a blackbody and is continuous in its spectrum. CFLs would kill this analysis as they have bright bands depending on the phosphors.

 

mcduff

Message 7 of 12
(5,053 Views)

I was trying to avoid a camera and go with a simple sensor. I plan to use Chinese checker marbles as these are a solid color and then I can use red, green, and blue that I assume the sensor would have the easiest time picking out. The problem I have is, I see cheap sensors on Sparkfun etc... but these seem to work only with certain microcontrollers, they even come with code but one of the requirements is to do it in LabVIEW.

0 Kudos
Message 8 of 12
(5,029 Views)

@Gregory wrote:

Oh interesting, I was picturing a program that looks at an image of a bunch of marbles, maybe puts rectangles around them, and says 3 Blue, 4 Green, 1 Red. 

 

If it's like a coin sorting machine where the marbles drop down one-by-one, I agree that could be a simple photodetector, which is probably what the instructor intends with the BNC inputs.

 

Edit: by the way, the BNC-2120 is not a DAQ card, it is just a connector block which exposes the connections of a DAQ card to make it easier to work with.


The idea is to have a hopper of marbles and feed them one by one down a track so I think one simple color sensor will work, but I don't know how this would interface with LabVIEW. When I started, I figured any sensor would just put out different voltage levels based on the color but that doesn't seem to be case. Looks like the Adafruit sensor spits out code and needs a certain microcontroller. Does anyone know of a sensor that will send out maybe a different voltage or a different binary number based on the color. Or maybe a sensor specifically designed to work with the DAQ and LabVIEW?

 

I thought the box was called a DAQ so I guess the actual DAQ is a card in the PC...thanks.

0 Kudos
Message 9 of 12
(5,025 Views)

Hey TestEng12,

 

What data acquisition card are you using in your PC? The type of card could help the community better recommend a sensor.

 

Also, what kind of signal does the Adafruit sensor send out based on the colors it sees?

 

Best regards,

Ryan B.
Technical Support Engineer
National Instruments
0 Kudos
Message 10 of 12
(4,971 Views)