Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO-Based Automated Waste Sorting System with Capacitive Proximity Sensor and Servo Motor

View and Edit Project In Cirkit DesignerImage of Arduino UNO-Based Automated Waste Sorting System with Capacitive Proximity Sensor and Servo Motor

Circuit Documentation

Summary

This circuit is a Waste Management System designed to sort objects based on their material (paper or plastic). It uses a capacitive proximity sensor to detect the type of material and a servo motor to sort the object accordingly. The system is controlled by an Arduino UNO microcontroller.

Component List

  1. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  2. Micro servo 9G

    • Description: A small servo motor used for precise control of angular position.
    • Pins: GND, +5V, PWM
  3. 2.1mm Barrel Jack with Terminal Block

    • Description: A power connector for supplying external power to the circuit.
    • Pins: POS, NEG
  4. LJC18A3-B-Z/BY Capacitive Proximity Sensor

    • Description: A sensor used to detect the presence of objects without physical contact.
    • Pins: VO (BLU), VI (BRN), SIG (BLK)

Wiring Details

Arduino UNO

Micro servo 9G

2.1mm Barrel Jack with Terminal Block

LJC18A3-B-Z/BY Capacitive Proximity Sensor

Code Documentation

/*
 * Waste Management System
 * This code reads input from a capacitive proximity sensor to detect if an object
 * is paper or plastic. Based on the detection, it controls a servo motor to
 * sort the object. If paper is detected, the servo turns to 25 degrees. If
 * plastic is detected, the servo turns to 35 degrees.
 */

#include <Servo.h>

// Pin definitions
const int sensorPin = A0; // Capacitive Proximity Sensor signal pin
const int servoPin = 9;   // Servo motor control pin

Servo myServo;

void setup() {
  // Initialize serial communication
  Serial.begin(9600);
  // Attach the servo to the control pin
  myServo.attach(servoPin);
  // Set initial position of the servo
  myServo.write(0);
}

void loop() {
  // Read the sensor value
  int sensorValue = analogRead(sensorPin);
  // Print the sensor value to the serial monitor
  Serial.println(sensorValue);

  // Determine if the object is paper or plastic
  if (sensorValue < 500) { // Assuming paper gives a lower value
    myServo.write(25); // Turn servo to 25 degrees for paper
  } else { // Assuming plastic gives a higher value
    myServo.write(35); // Turn servo to 35 degrees for plastic
  }

  // Small delay to allow the servo to move
  delay(1000);
}

This code initializes the servo motor and reads the sensor value from the capacitive proximity sensor. Based on the sensor value, it determines whether the object is paper or plastic and moves the servo motor to the corresponding position.