Arduino Colour Sorting Machine
The Color Sorting Machine is an innovative project designed to automate the sorting of objects based on their colors. Using a combination of servos and sensors, this project demonstrates a practical application of automation technology.
The machine employs three servos to control the gates for sorting red, green, and blue-colored objects. An array of sensors detects the color of passing objects and triggers the corresponding servo to direct them to the appropriate collection bins.
Component List:
Name | Quantity | Component |
---|---|---|
U1 | 1 | Arduino Uno R3 |
SERVO1 SERVO2 | 2 | Positional Micro Servo |
D1 | 1 | LED RGB |
R1 | 1 | 200 Ω Resistor |
The circuit consists of three key components: an Arduino microcontroller, three servos, and color sensors. The servos are connected to control gates, while the color sensors feed data to the Arduino.
The Arduino processes the color information and activates the corresponding servo to divert objects into the correct bin. Power is supplied to the system through a reliable source, ensuring consistent and efficient operation.
Arduino code:
#include <Servo.h>
Servo servo_5;
Servo servo_3;
void setup() {
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
pinMode(6, OUTPUT);
servo_5.attach(5, 500, 2500);
servo_3.attach(3, 500, 2500);
}
void loop() {
analogWrite(10, 255);
analogWrite(9, 0);
analogWrite(6, 0);
servo_5.write(0);
servo_3.write(0);
delay(2000);
servo_3.write(90);
servo_5.write(40);
delay(1000);
servo_3.write(0);
delay(1000);
analogWrite(10, 102);
analogWrite(9, 51);
analogWrite(6, 102);
servo_5.write(0);
servo_3.write(0);
delay(2000);
servo_3.write(45);
delay(2000);
servo_3.write(90);
servo_5.write(80);
delay(1000);
servo_3.write(0);
delay(1000);
analogWrite(10, 153);
analogWrite(9, 153);
analogWrite(6, 0);
servo_5.write(0);
servo_3.write(0);
delay(2000);
servo_3.write(45);
delay(2000);
servo_3.write(90);
servo_5.write(20);
delay(1000);
servo_3.write(0);
delay(1000);
servo_3.write(45);
delay(2000);
servo_3.write(90);
servo_5.write(10);
delay(1000);
servo_3.write(0);
delay(1000);
analogWrite(10, 0);
analogWrite(9, 0);
analogWrite(6, 153);
servo_5.write(0);
servo_3.write(0);
delay(2000);
servo_3.write(45);
delay(2000);
}
The Color Sorting Machine showcases the integration of electronics and programming to create a functional automation system. This project has diverse applications, from sorting colored candies to aiding in recycling processes.
The simplicity of the circuit design, coupled with the effectiveness of color sensing and servo control, makes it an excellent educational project for enthusiasts exploring the realms of robotics and automation.
As technology advances, such projects provide valuable insights into the possibilities of smart and efficient systems for various industries.