Making a colorsorter but what arduino is the best for me?


for a school project i decided to make a color sorter that sorts skittles by color.
I tried it with a raspberry pi 3 model B+ but i got values from the colorsensor ranging from 7000 to 37000 for each color seperate. i couldnt figure out how to translate these values to normal rgb values so i bassically couldnt do it.
So maybe it is possible to do with a raspberry but its just to hard to figure it out. Therefor im looking to do it with an arduino which i see has been used alot to make a machine like this.

i also see that the use lots of nano's or uno's but i would like to know if i could use1 arduino to connect all these components i listed below.
I have to 2 continues servos and 1 tcs230 colorsensor that i would like to controll with a arduino.

i was thinking of a leonardo or mega since it looks like it can do way more then a nano or uno (correct me if im wrong)

So since im not english i often get people confussed on what i want to reach with a topic so ill summorize it.
I want an arduino capable of driving 2 servo's and running a tcs230 colorsensor at the same time.
maybe some advise on whats diffrent between a couple of arduinos since i know there are a lot of versions but not know the diffrence.

i hope this is clear enough if not let me know and ill try to fix it

kind regards,
Gert-Jan Broekhuizen

Explain what You mean by writing "the colorsensor"? Post a link to the sensor.

Almost all of the Arduinos will do what you want, a lot depends on your software and the response time you need. Start with one you have or get an UNO, it is very inexpensive. Check this link, your project is just about all there. Arduino Color Sensor TCS230 TCS3200 | Random Nerd Tutorials I googled "tcs230 tcs3200 color module", and got this as the third hit out of over 49,000 hits.

If all you are doing is sorting Skittles, why do you need the RGB colors? Just run a bunch of green and record the min-max value for greens. Do the same for all Skittle colors. It's called calibration.

So called "color sensors" often only sense brightness of a single color, as a single value, with little relationship to a RGB color. For RGB color detection 3 sensors with color filters are required. So it's not a matter of a sophisticated controller but of the right sensor. Try some different sensors, just as your budget allows for.

In many cases you still have to figure out in software which values count as "green" or "orange" for the human eye or for the objects to be classified. Have you been given skittles of the colors to be distinguished? Have a look at different color schemes and how to convert between e.g. RGB, CMYK, HUE...

okay so i can do all that with a uno then i buy a uno and about the price its nearly all 20 bucks here so that isnt such a big deal.

the color sensor gives me raw rgb valuals so for each color he shows me the valual but i cant translate it back to a normal rgb valuel. i followed this tutorial

but yeah i get weird valuals. in the tutorial he sas connect the s0 and s1 to the vcc/5v then the output frequency gets scalled to a 100% so i thought if i divide the numbers i got by 100 i get a rgb value but as we all know rgb only goes to 255 each and 37000/100 is way above that so i cant get further.

also my school project is soort of finished i still need to get my mark but i want to show them if i get a low mark that it all works as intended. so ill have another look on my code then and maybe post it on the raspb forum and then im looking into a uno or nano. (i just see that the uno is more expensive then the leonardo and the uno so?)

tcs230→ TCS3200D-TCS230 Kleurherkenning Sensor - TCS3200DMOD

RGB only means separate values for Red, Green and Blue, no restriction to 8 bit. If you want 8 bit values then shift each color value right by e.g. 8, or take the high byte of the int values, or use the map() function.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.