An Arduino-based intelligent trash can system with automatic lid control, ultrasonic sensors for proximity detection, and support for multiple motor types.
- Features
- Hardware Requirements
- Software Requirements
- Installation
- Motor Types
- Configuration
- Contributing
- License
- Contact
- Automatic Lid Control: Supports DC, Servo, Stepper, and BLDC motors
- Proximity Detection: Five ultrasonic sensors (front, back, left, right, top)
- Motor Auto-Detection: Automatically detects connected motor type
- FreeRTOS Support: Optional RTOS integration for ESP32 platforms
- Cross-Platform: Compatible with AVR (Arduino Uno/Mega) and ESP32
- Interrupt-Driven Sensors: Non-blocking ultrasonic sensor readings
- Modular Design: Easy to extend and customize
- Arduino Uno/Mega (AVR)
- ESP32 (recommended for FreeRTOS support)
- Or any compatible Arduino board
- 5Γ HC-SR04 Ultrasonic Sensors (or compatible)
- DC Motor: H-bridge driver (L298N/L293D)
- Servo Motor: Standard hobby servo (180Β°)
- Stepper Motor: Stepper driver (A4988/DRV8825)
- BLDC Motor: ESC (Electronic Speed Controller)
- Status LED (pin 13)
- Power supply (5V for logic, motor voltage as required)
- Jumper wires and breadboard
- PlatformIO or Arduino IDE
- C++ compiler with C++17 support
- Git (for version control)
- AccelStepper (included)
- Servo (included)
- Arduino Core Libraries
-
Clone the repository:
git clone https://github.com/aarush0101/Ascle.git cd Ascle -
Open in PlatformIO:
pio run
-
Upload to board:
pio run --target upload
-
Clone the repository:
git clone https://github.com/aarush0101/Ascle.git
-
Copy libraries:
- Copy
include/AccelStepperto Arduinolibrariesfolder - Copy
include/Servoto Arduinolibrariesfolder
- Copy
-
Open
src/main.cppin Arduino IDE -
Select your board and upload
- Pins:
MOTOR_IN1,MOTOR_IN2,MOTOR_ENA - Driver: H-bridge (L298N recommended)
- Speed Control: PWM on ENA pin
- Pin:
SERVO_PIN - Type: Standard hobby servo (0-180Β°)
- Control: Angle-based (90Β° = neutral)
- Pins:
STEPPER_STEP,STEPPER_DIR - Driver: A4988, DRV8825, or compatible
- Control: Steps and direction
- Pin:
SERVO_PIN(PWM for ESC) - Controller: Standard ESC
- Control: Pulse width (1000-2000ΞΌs)
- Configure sensor pins in
src/core/sensors.hpp - Configure lid motor pins in
src/in/LidController.hpp - Configure base motor pins in
src/base/BaseMotorPins.hpp
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/YourFeature
- Follow coding standards (see
.github/copilot-instructions.mdand.rules) - Add file header comments to all new files
- Test thoroughly on target hardware
- Submit a pull request
See CONTRIBUTING.md for detailed guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
- AccelStepper: GPL V3 - see
include/AccelStepper/LICENSE - Servo: LGPL v2.1 - see
include/Servo/LICENSE.txt
Author: AARUSH MASTER
- Email: Refer to
.mailmap - GitHub: Aarush0101
- Issues: GitHub Issues
- AccelStepper Library
- Arduino Servo Library
- FreeRTOS for real-time task management
- Arduino and ESP32 communities
- Added BLDC motor support
- Implemented FreeRTOS compatibility layer
- Enhanced sensor reading with interrupts
- Improved motor auto-detection
- Initial release
- DC, Servo, and Stepper motor support
- Five ultrasonic sensors
- Basic lid control functionality
β Star this repository if you find it useful!