Это видео недоступно.
Сожалеем об этом.
How to use the Color Sensor with Arduino board (TCS3200 & TCS3210)
HTML-код
- Опубликовано: 8 сен 2016
- $2 for 2-Layer PCBs & $5 for 4-Layer PCBs: jlcpcb.com/PCH
Start Altium designer FREE TRIAL : www.altium.com...
In this tutorial I'm gonna show you how the TCS3210 color sensor operates and how to configure its pins in order to use it with an arduino board and make it able to identify colors.
Please follow the steps mentioned in the video to make a correct wirring of your color sensor, and make sure that you got the necessery information about the TCS3210 sensor before starting your project.
Feel free to contact us through a comment or private email if you need to know some additional information about the project.
★☆★ Order the Color sensor ★☆★
www.amazon.com...
★☆★ download the source code ★☆★
first code: www.mediafire.c...
second code: www.mediafire.c...
★☆★ SUPPORT US WITH A SIMPLE TIP ★☆★
TiP here : en.tipeee.com/...
★☆★ FOLLOW ME BELOW: ★☆★
Instructables: www.instructabl...
Hackaday : hackaday.io/Me...
Facebook : www.facebook.c...
Twitter : / megadas1
Hackster : www.hackster.i...
Keyword:
TCS3200
TCS3210
Color sensor
Arduino project
how to use color sensor
source code
Thank you very very much that helped me with lots of things
hello, I know this video is from six years ago and you'll probably not answer, but I have some questions:
1. I only have an Arduino uno R3, and not the bigger version, is there a simplified version that could have the same results?
2. I am working on a project that needs to write the change of colors of a plant on a certain file, and could run by itself while the computer is closed, does Arduino have that type of system?
I am sorry if I caused any trouble for you, I am still trying to learn more about Arduino and other circuit boards and how they work, and you don't need to answer if it bothers you too much.
Can we use this color sensor as a counter, where it counts the times a red LED blinks? Every blink is equivalent to 1 pulse
Hello
Yes sure you can use it for this. Note that the LED should be near the sensor.
Sir the link is not working y
I wonder if this sensor could be used to calibrate color of computer monitor like the commercial versions such as ColorMunki.
Hello. I do not understand how you get the data values in your excel sheet. Can you please kindly explain?
Hello calai,
I wrote the values in Excel file myself, but I got them from the serial monitor.
Try to download the first code and upload it to your Arduino, connect the sensor following the same wiring that I did then open the serial monitor and you will get the data values proportional representation of the sensed colors.
Follow the steps that I performed in the video
Let us know if we can further assist you.
can this project be made with the use of any pic microcontroller
Hello, i dont understand why the values of excel sheet are not the same that you read in serial monitor. I mean, in the first code when you read the red color, in serial monitor prints " red data=254 green data=199 blue data=274", but this numbers are not the same that you write for red color in the excel sheet. PLEASE, CAN YOU EXPLAIN ME THAT?
Hello Lucas,
Sure the values are the same but I think I wasn't synchronise the part of the video where I showed the color and the serial monitor display
Let us know if we can further assist you.
Hi, thanks very much for making this video, I have a noob question! :-D
I want to use the colour sensor to detect what colour is going past it, say red or blue or green for example. How do I set up the sensor if I don't know what colour will go through next? I am thinking of using the sensor to pick up which Lego train is passing over it so I can identify and stop/start the right train..so my second question is, if the train is passing over it too quickly, will it still pick the colour up? What is the polling rate or whatever? If this doesn't work I might have to use RCID or something...thanks
Hello Angelo,
About the first question, I provided in the description of this video two links for Arduino code, the first one allows you to get the appropriate data of ech color you want to detect then you place these data in the second code which allows you to detect (only) the colors that you set.
For the second question, the sensor detect the color after three combinations (for red,green,blue) and between each combination there is a delay of 20 ms and for each color detection there is a delay of 40 ms so you can detect one color each 100 ms (0.1 second). for more info you need to watch the video!!
Let us know if we can further assist you
sir where we can find Arduino mega 2560 port D 4,5,6 pin no. Actually, I have to connect colour sensor by Atmel studio .thanks in advance
can this color sensor be used in rgc color line follower robot?? please help,, i'm doing my final year project
Hello Sir I got Some error in Second Code :::::
F:\IITK\Colour_Sensor\Colour_Sensor.ino: In function 'void loop()':
Colour_Sensor:76: error: 'isRed' was not declared in this scope
if (isRed())
^
Colour_Sensor:84: error: 'isGreen' was not declared in this scope
if (isGreen())
^
Colour_Sensor:95: error: a function-definition is not allowed here before '{' token
{
^
Colour_Sensor:119: error: expected '}' at end of input
}
^
exit status 1
'isRed' was not declared in this scope
Please Guide me What I Can Do?
Hello it is possible to the arduino to make a multiple line color sensor? For example, If you choice a color red the prototype will follow the red line.. can you help me for that? Thank you..
Hello ronald brabante
Sure you can do such project
So, first you need to select the color and then the robot will keep searching for the color till it find it and then follow it.
MEGA DAS yes that why I need. Do you give me a sample how its works? Thank you..
second code isnt working my serial screen is blank
Hello
Make sure that you are using the right serial port with the right baudrate (9600) in both the code and the serial monitor.
Let us know if we can further help you.
good video , but can i know that can i interface this sensor with 8051
microcontroller or without arduino can i use with any other
microcontroller . plzz give me a deatail replay if u know about it.
Hi, the links for the code that you have given dont lead to the code. I am able to download files with rar extension, but the dont open with any application. Can you give a working link for the code?
Hello
I've just checked the links and they are very well operating, all what you need to do is skip the advertisement by proving that "this is not a robot" then you get your download
Let us know if we can further assist you.
Hi mega das,
Can you make a whitining tester circuit for us.
How did you go from the values above 300 on the first code´s readings to the more significant small values you use from de Excel table to set the conditions for each color? I need to set my own readings and tried with the ones I got from the first code, didn´t work
Hi
The first code will give the data parameters for ech color and you will write yourself these parameters in the Excel sheet to use them in the second code
For exemple you use the first code and you measure for the yellow color these parameters :
R= 200 G= 150 B= 20
So in the second code you use these values to sense the yellow color it will be like
if(R_in>=R+/-10.....)
I want red led colour sensor
Hi sir is the coding for colour sensor with counter hard?
Hello Edward Martin
What do you mean by"with counter" could you provide more details so we can guide you better.
Let us know if we can further assist you.
Do not forget to subscribe to our RUclips channel for more awesome videos.
A BIG Thanks !
It worked
I am also trying to make it. but there is a problem it prints in Serial monitor side to side.
What to do in order to print it under by under as I were able to fix the results.
Tell me please where is the mistake in the code or it is possible send me please the codes. Thank you
Hello Վահագն,
Just change every "Serial.print" instruction by "Serial.println" and it will display results in new line
Let us know if we can further assist you.
Thank you.
You are welcome :)
A very informative video this. I just want to know how do i make an audio output of the displayed color using a speaker? Help me please
Hello Pranav,
We've already made a similar project with one of our subscribers so tell me more details about your project and then I can help you.
Let us know if we can further assist you.
i want a color sensor which reads the color and through the phone's speaker it says the color being detected.
In this case you need a component to connect Arduino to your phone like Bluetooth and an Android app installed in your phone that reads Arduino instructions and tells the color.
Post your email contact and I'll guide you making this.
Hi. Can this sensor compare 2 colours and give the result as % of their similarity?
Hello Pham Ngoc Quang
Yes sure, but it is for you to play some codding instruction in your Arduino programm.
Hallo thanks for your video
What will happen if someone want to use a different colour for example black. Will this work with the same RGB sensor ?? Or what can we do in this case ???
thaks, can youy give me the code please
The link for the second code is broken , can I have the full code sent to my email please?
Hello Wafa,
The link is running well, I've just checked it myself so try it again.
Let us know if we can further assist
How fast does the sensor react? Can it take measurement of passing by object?
I am having this problem. When reading yellow color of an object and the following object have the blue color, the sensor give me green color. Same thing when red is passing and the following color is yellow : sensor gives me orange.
Do we need to buy wires separately for the sensor?
When I got the sensor three four years ago, it has no wires with it so I had to buy them separately.
Hi ! :)
First great video sir ;)
Second could you give me the reference or the link where you got your rgb led please ?
Thanks have a nice day
Hello Mr Revonetik ;
You can order some RGB LED through this amazon link : amzn.to/2CpD9FX
Let us know if we can further assist you.
Hey thanks for the answer buddy ;)
The link to the code doesn't show the code, instead some weird website
Hello
We updated the links (mediafire download links) check them please.
@@DIYGUYChris i actually did all with determine the values each number except the last one where the serial monitor tells you what colour it is, cause i exclude the led pin and delete all variable relate with the led. But the serial monitor didn't show anything. I already put
if (isRed ());
Serial.print("this is the RED colour")
But nothing occured...still figuring out. Even the code got verified but nothing.
can this reconize white and black color?
Hello Daniel
Well!! first thing first, black is not a color ok and for the white color it's the combination of the three elementary colors which are the Red color the Green and Blue, so if the sensor is showing all the cells data at maximum value that means there is only white color which is detected, the most of this kind of sensors is the software part, so you should verify the data recieved from the sensor to identify the color
best...
Hello. is it possible to add more than one colour sensor onto the arduino uno?
Hello Max,
Yes sure, it is possible since we are using digital pins only.
Thank youuuu
SIR PLEASE HELP WHY IT ALWAYS SHOW DIFFERENT DATA FOR COLOR FOR EXAMPLE FOR RED COLOR IT SHOWS 70 AND TOMORROW IF SENSOR WILL SENSE SAME COLOR IT WILL SHOW 30 AND DIFFERENT DATA ANOTHER DATEAND I AM USING SAME COLOR TAPE.
PLEASE REPLY ASAP SIR
DIFFERENT RANGE OF MOTION EVERY TIME FOR SAME COLOR
Hello Satnam,
I'm not sure about this but I'm using a margin of uncertainty which is +/- 10 for each color combination so you should do the same.
thanks sir for reply. yes i am using + - 20. but still red color read sometimes 10 and sometimes it rad 70 which is so far. i have to change values in condition everytime. can i see ur program please thanks
@@karanpreetsingh2476 You have to control the outside light. Try to put the sensor in a little box or in a dark place where the light conditions are always the same.
What happens if the white led is not presented?
Hello Hackeando,
The white light color will be reflected on the sensor array to identify the color so if there is no white LEDs the sensor will not be able to identify the exact color but it gives you data
sir......
How to making colour detector sensor without arduino
hello sir, i have gone through your programs but i see your logic level for dataB and green dataG seems confused. for green filter doesnt it supposed to be S2 HIGH and S3 HIGH and for blue filter S2 LOW S3 HIGH. Please correct me if im wrong sir.
Hello Nur,
Yes! you are right, now I updated the donwload links with the new configuration ;)
Thank you so much..
Hello sir ...you have interchnaged color filter code of s2 and s3 for blue and green....
It is there in "getting the blue color data" and "getting the green color data" CODES
Can i use an arduino one for this project??
Hello juan ramon cabrera veloz
Sure you can use any Arduino to interface this sensor since it is using only digital I/O to get data from it.
Let us know if we can further assist you.
Hi, do you know if it could be programmed in C?
Arduino is almost C
good video
hello can you teach me because I have fyp project. I want to make color sensor for blind people. Did you know how to make the output in form of audio using speaker?
Hello Ahmad,,
Sure you can use this project to make a device that sense the color through the TCS3210 sensor and you need to add a loudspeaker connected to your arduino plus an SD card or microSD carte shield where you should store the voices of colors that you want to display, don't forget that an Arduino board can't display an mp3 file because it is based on a 8-bit microcontroler and it can't store mp3 files because of it's limited number and size of registers.
MEGA DAS I am beginner in arduino programming. so i dont even know how to make coding. i am just know copy paste other coding and upload it. so can you make one video about it + coding? i am very appreciate if you help me. I want to submit this project this 31 Mac. can you please help me please
Hello Ahmed,
I can help you by providing the guidance for your project through links, examples etc... but I can't make it for you! I'm so sorry for this.
Helo MEGA DAS, thanks for your reply. I am really appriciate it. Anyway your video help me get an idea. Thanks
You are always welcome dear Ahmad.
Feel free to ask about anything you want to know. ;)
gow can i download the code.
Hello
Yes you can get the code through the link in the description of the video.
Let us know if we can further assist you.
Do not forget to subscribe to our RUclips channel for more awesome videos.
can the sensor read multiple colors?
Hello Californian Eagle,
Yes it can, from your question I see that you didn't watch the video, because I explained how to use this sensor!
can I get both the programs for color sensing
Hello Chavan,
Sure you can, just go to the description of the video and you will find the link to download the source code for this project.
Let us know if we can further assist you.
The description is updated now you can find both programs :)
can the out work with analog?
Hello Californian Eagle,
Yes, sure it can
hey! I couldn't reach the code. Can u help me please?
Hello,
I provided two download links for source code.
I used two codes in this project so which one you need to download !?
I need second one and sorry I couldn't download it.
Here is the link: www.mediafire.com/file/m2xl8ah5tsv1xmv/test_color_sensor.rar
thankss
thanks, jesuss blass you
Hello BUSHIDO Sinuraya
Good luck with your project.
Let us know if we can further assist you.
Do not forget to subscribe to our RUclips channel for more awesome videos.
Does this code work with tcs3200?
Sure Daniel it's the same thing, just the TCS3200 will be more accurate
okey thanks
Can this hardware work if I wanted to make a device that speaks the colors as well?
Hello Andrew,
Sure you can use this project to make a device that sense the color through the TCS3210 sensor and you need to add a loudspeaker connected to your arduino plus an SD card or microSD carte shield where you should store the voices of colors that you want to display, don't forget that an Arduino board can't display an mp3 file because it is based on a 8-bit microcontroler and it can't store mp3 files because of it's limited number and size of registers.
Do not panic, the task is so easy and we can help you with it :)
I'm a university student looking to design a wearable device for the Blind, so I'm trying to see what I'll need to firstly make the process work of this device find a colour and speak the name, also secondly to look to be able to eventually fit something into a wearable device.
I currently own an arduino board. Any help is much appreciated! Many thanks! :)
Hello Andrew!
It's good to hear from you again :)
So what I understand from your comment is that you want to make a "wearable device" that can sense the colors and tell the sensed color through a speaker!
I told you that you can do this using the TCS sensor, but! It's imporatant to know that this sensor can't sense colors from distance, so you need to place the colored object directly in front the white LEDs of the sensor.
So first thing first you need to tell me if your project is about sensing colors from distances or not, this way I can recommend the right components for your project and tell you what you need to buy to make it.
Let us know if we can further assist you.
Thank you so much for your help, I'm looking to see which option is best. Currently I think the near sensor is best for the blind user as for example, they want to know the colour of their clothes - they'd pick the item up, and put the device against it - similar way to the action of the apple pay via smartwatch gesture. So in essence i'm looking to make a wrist/arm based device that the user can wave in-front of the object they want to know the colour of. Thank you in advance for your assistance :)
Ok Andrew
In this case you need to buy:
- An arduino Board (Tell me which one you already have)
- An SD card shield for Arduino (where you will store the .WAV files that tell the colors)
- An SD card
- A speaker with the amplifier circuit
- A color sensor TCS 32xx (xx could be 10 or 00 depends on how much precision you want)
Tell me when you become ready :)
Why are we trying so hard to do something that's simpler to do. real color sensing is the mixture of RGB not just the intensity of individual RGB. we are suppose use color gels to filter out each RGB color coming from a scene. a photo-sensor only sees in black and white. Thats why we filter and can reproduce millions of colors with color wheel etc. cameras and displays work this way...
thumps down, I built this program worked well for me. Trying to watch and listen to your presentation with the constant drone music in the background was enough for a thumbs down. Next time shut off the background noise and speak into the microphone more clearly.
A complete information on video . This is nice work !!
I am not able to get the first code, I got second code from below link
www.mediafire.com/file/m2xl8ah5tsv1xmv/test_color_sensor.rar
But only with this program my serial monitor is not working , may be my RGB values are not matching
Can you suggest me solution.
and can i get a working link for first code?
Hello Ayush,
Thank you for the compliment.
About the color detection you can not use the second code before setting up the data for each color and you can get these data only from the first code that you can dowload from here:
www.mediafire.com/file/pyp188ykj29qcq6/test_sensor_color_setData.rar
Let us know if we can further assist you.
Thank you soooo much! :)