27 Jan
0 Comment(s)
1348 View(s)
-
This blog shows you how to detect colors with the Arduino using the TCS230/TCS3200 color sensor.
- As you can see above I have predefined 4 colors: red, green, yellow, and blue.
What Is Required
Hardware:
- Arduino UNO link: Buy Now
- Jumper wires link: Buy Now
- Arduino nano link: Buy Now
- Servo motor link: Buy Now
- Battery 9V link: Buy Now
Software:
Arduino IDE
Step: 1
- Make a box by using a corrugated sheet.
- Cut the box as it is told in the photo.
Step: 2
- Then put the servo motor in the box.
- The servo motor has three pins connected.
- First Pin red and second pin brown and the third pin is of orange color.
Step: 3
Step: 4
- shows the circuit diagram of the RGB color detector using TCS3200.
- The module can be used to sense a particular color only.
- This sensor is especially useful for color recognition projects such as color matching, color sorting, test strip reading and much more.
- When the R is the maximum value (in RGB parameters) we know we have a red object
- When G is the maximum value, we know we have a green object
- When B is the maximum value, we know we have a blue object
- Now, place something in front of the sensor. It should print in your serial monitor the color detected: red, green or blue.
- your sensor can also detect other colors
Step: 5
- Connect the TSC3200 Sensor as bellow:
- S0 ==> Nano pin D2
- S1 ==> Nano pin D3
- S2 ==> Nano pin D4
- S3 ==> Nano pin D5
- OUT ==> Nano Pin D6
- OE ==> NonUsed
- VCC ==> +5V
- GND ==> GND
- Connect servo GND pin to Arduino nano GND pin.
- Connect servo +Vcc pin to Arduino nano +5V pin.
- Connect servo motor 1 Green pin(signal pin) to Arduino nano digital pin no.D7
- Connect servo motor 2 Orange pin(signal pin) to Arduino nano digital pin no.D8
Step: 6
-
Here's the final source code copy to link
- In this blog, you’ve learned how to detect colors with the TCSP3200 color sensor.
Leave a Comment