How to Make an Automated Sharps-Bin Fill-Level and Safety Lid-Lock Indicator for Clinics and School Laboratories

1. Introduction

The Automated Sharps-Bin Fill-Level and Safety Lid-Lock Indicator is an innovative biomedical safety project designed to monitor the filling level of medical sharps disposal containers and provide an automatic warning when the container approaches its maximum safe capacity.

Sharps waste includes used needles, syringes, lancets, scalpel blades and other sharp medical instruments that can cause injuries and transmit infections if improperly handled.

In many healthcare facilities and school laboratories, sharps containers are inspected manually. This can expose workers to unnecessary risks, especially when containers become overfilled.

The proposed system uses an ultrasonic sensor to monitor the fill level without touching the contents. An electronic controller processes the measurements and activates visual and audible alerts when the container approaches its designated filling limit.

An additional electronic locking mechanism can prevent further access through the disposal opening when the container reaches its predetermined limit.

The project aims to improve sharps-waste monitoring, reduce overfilling risks and support safer waste management practices.

Medical Supplies & Equipment - Shop Medical Products – Australian Medical Solutions Group
Lesson 13 Ultrasonic — SunFounder uno-and-mega-kit  documentation
Circuit design garbage bin level indicaton and seggregation - Tinkercad

2. Problem Statement

Sharps containers are essential in healthcare facilities and laboratories. However, inadequate monitoring can result in:

  • Overfilled sharps disposal containers.
  • Accidental needle-stick injuries.
  • Unsafe handling during waste collection.
  • Delayed replacement of full containers.
  • Poor documentation of sharps-waste disposal.

This project seeks to develop an automated monitoring system that provides early warnings and helps prevent sharps containers from exceeding their recommended filling limits.

3. Objectives

  • To design an automated sharps-bin fill-level monitoring system.
  • To measure the available capacity using a non-contact sensor.
  • To develop an automatic warning system using LEDs and a buzzer.
  • To integrate an electronic lid-lock indicator.
  • To display the estimated filling level on an LCD.
  • To evaluate the accuracy and reliability of the prototype.
  • To develop a low-cost monitoring solution for clinics and school laboratories.

4. Materials and Components

![ARDUINO® Uno Rev3

    – Robot Pi Shop](https://images.openai.com/static-rsc-4/-VZiTTzES99mwibSZu3wDQe-H0lb8Rw3rrhCg-BxKaGsrqwfMa4W5QMP_N-a1Z1EuqOy6a1u5TKuj03hFxkMPljcZZ9Ryc4Y25fceDWv6n22olP4QrPaNIiMPVlWudEAFHgvBldW08zps0YNGH6wD0JSWA2rrluNl3mZlWivGVwLsfIjQ0haHySUDbaOF3Sr?purpose=fullsize)
HC-SR04 Ultrasonic Module Distance Sensor | Ultrasonic Distance Sensor | Rapid Robotics Australia
LCD Displays - The Pi Hut
Micro Servo Motor SG90 180 Degree سيرفو موتور - Electronic Service Center
8mm Coloured LEDs 30pk | Electricity | TTS
ComponentPurpose
Arduino UnoMain control unit
HC-SR04 ultrasonic sensorMeasures distance to the contents
16×2 LCD with I2CDisplays filling level and status
Red LEDIndicates full or critical status
Yellow LEDIndicates approaching capacity
Green LEDIndicates normal operating condition
Active buzzerProvides audible warning
Servo motorDemonstrates a model locking mechanism
Push buttonReset or authorized service simulation
Jumper wiresElectrical connections
BreadboardCircuit prototyping
EnclosureHouses the electronic components
Power supplyPowers the system

5. System Design

Smart Dustbin Using Arduino, Ultrasonic Sensor & Servo Motor : 3 Steps - Instructables

The system consists of five major sections.

A. Fill-level detection unit

The HC-SR04 ultrasonic sensor is mounted above a simulated waste container.

It measures the distance between the sensor and the uppermost visible surface of the contents.

B. Processing unit

The Arduino Uno receives the distance measurements and calculates the estimated filling percentage.

C. Display unit

The LCD displays:

  • Fill percentage.
  • Remaining capacity.
  • Current bin status.
  • Lock status.

D. Warning unit

The LEDs and buzzer communicate the condition of the container.

E. Safety lid-lock indicator

A servo motor can demonstrate an electronic locking mechanism on a non-clinical prototype.

For a real sharps container, the electronic system must not modify, obstruct or compromise the manufacturer’s approved disposal opening or safety closure.

6. How the System Works

Sensoneo Single Sensor (WMS)

The operating sequence is:

  • The ultrasonic sensor sends an ultrasonic pulse.
  • The pulse reflects from the upper surface of the contents.
  • The sensor receives the reflected signal.
  • The Arduino calculates the distance.
  • The measured distance is compared with the calibrated empty-container distance.
  • The system calculates the estimated filling percentage.
  • The LCD displays the results.
  • LEDs indicate the current filling condition.
  • The buzzer activates when the container reaches its warning threshold.
  • At the critical threshold, the system activates the lock-status warning and service-required indicator.

The prototype should be tested using clean, inert demonstration materials rather than actual needles or clinical sharps.

7. Mathematical Principle

The fill-level percentage can be calculated using:

F=\frac{H_e-H_m}{H_e-H_f}\times100

Where:

  • = Estimated filling percentage.
  • = Distance from sensor to the bottom when empty.
  • = Current measured distance.
  • = Calibrated distance at the maximum permitted fill level.

For example:

Assume:

  • Empty-container distance = 30 cm.
  • Maximum fill distance = 5 cm.
  • Current measured distance = 12.5 cm.

F=\frac{30-12.5}{30-5}\times100F=70\%

The system therefore indicates that the container is approximately 70% full.

Actual thresholds should be determined from the specific container’s manufacturer-approved maximum fill line, not from an arbitrary percentage.

8. Proposed Alert System

Fill levelLED indicationBuzzerSystem status
NormalGreenOFFNormal operation
Approaching limitYellowIntermittentPrepare replacement
CriticalRedContinuous or repeated warningService required
Sensor faultFlashing warningAlarmInspection required

The electronic lock demonstration should be activated only when the container reaches its approved replacement threshold.

The physical sharps container must retain its original safe disposal design.

9. Circuit Connections

The following is a proposed Arduino Uno connection arrangement.

ComponentArduino pin
Ultrasonic TrigD9
Ultrasonic EchoD10
Green LEDD3
Yellow LEDD4
Red LEDD5
BuzzerD6
Servo signalD11
LCD SDAA4
LCD SCLA5

Additional connections:

  • Connect all circuit grounds together.
  • Use suitable resistors for LEDs.
  • Supply the servo using an appropriate regulated power source.
  • Ensure the servo and Arduino share a common ground.
  • Check the current requirements of all components.

10. Arduino Programming

The following starter code demonstrates the fill-level calculation, LCD display and warning indicators.


#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);

const int trigPin = 9;
const int echoPin = 10;

const int greenLED = 3;
const int yellowLED = 4;
const int redLED = 5;
const int buzzer = 6;

const float emptyDistance = 30.0;
const float fullDistance = 5.0;

float readDistance() {
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);

  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);
  digitalWrite(trigPin, LOW);

  long duration = pulseIn(echoPin, HIGH, 30000);

  if (duration == 0) return -1;

  return duration * 0.0343 / 2.0;
}

void setup() {
  pinMode(trigPin, OUTPUT);
  pinMode(echoPin, INPUT);

  pinMode(greenLED, OUTPUT);
  pinMode(yellowLED, OUTPUT);
  pinMode(redLED, OUTPUT);
  pinMode(buzzer, OUTPUT);

  lcd.init();
  lcd.backlight();

  lcd.print("Smart Sharps Bin");
  delay(2000);
}

void loop() {

  float distance = readDistance();

  lcd.clear();

  if (distance < 0) {
    lcd.print("Sensor Error");
    digitalWrite(greenLED, LOW);
    digitalWrite(yellowLED, LOW);
    digitalWrite(redLED, HIGH);
    tone(buzzer, 1000);
    delay(1000);
    noTone(buzzer);
    return;
  }

  float fill =
    (emptyDistance - distance) /
    (emptyDistance - fullDistance) * 100.0;

  fill = constrain(fill, 0, 100);

  lcd.setCursor(0, 0);
  lcd.print("Fill: ");
  lcd.print(fill, 0);
  lcd.print("%");

  digitalWrite(greenLED, LOW);
  digitalWrite(yellowLED, LOW);
  digitalWrite(redLED, LOW);
  noTone(buzzer);

  if (fill < 70) {

    digitalWrite(greenLED, HIGH);

    lcd.setCursor(0, 1);
    lcd.print("Normal");

  } else if (fill < 85) {

    digitalWrite(yellowLED, HIGH);

    lcd.setCursor(0, 1);
    lcd.print("Near Capacity");

    tone(buzzer, 1000, 200);

  } else {

    digitalWrite(redLED, HIGH);

    lcd.setCursor(0, 1);
    lcd.print("Service Required");

    tone(buzzer, 1500);

  }

  delay(1000);
}

Note: This is educational prototype code. It does not include the final locking mechanism, sensor validation, anti-false-trigger logic or certified safety controls. The thresholds are illustrative and must be calibrated for the demonstration container.

11. Physical Prototype Construction

Arduino based Automatic Dustbin System Project

The prototype can be constructed using the following stages:

  • Obtain a clean, unused demonstration container.
  • Mount the ultrasonic sensor above the container.
  • Build the Arduino circuit on a breadboard.
  • Connect the LCD and warning LEDs.
  • Install the buzzer.
  • Program the Arduino.
  • Calibrate the sensor using clean, inert test materials.
  • Test different filling levels.
  • Install a separate model lid-lock indicator.
  • Record the accuracy of the system.

For the KSEF demonstration, use a transparent or removable model container so judges can observe how the sensor responds to different fill levels.

12. Further Innovation

Smart Dust Bin with RiotOS and ESP-32 v3 - Hackster.io
Arduino based Automatic Dustbin System Project
Motorized Door Lock by IamTeknik 3d model
GB Tech
Circuit design garbage bin level indicaton and seggregation - Tinkercad
Remote Control Door Lock (Wireless Door Lock) System | Best Project Ki – Harish Projects
How to Use sensor garis: Pinouts, Specs, and Examples | Cirkit Designer
Final Project
SMART BIN - IoT : 10 Steps - Instructables
Project Work : Servo-lock Mechanism Complete!
Advancing Sustainability Through an IoT-Driven Smart Waste Management System with Software Engineering Integration

To make the project more competitive, consider these additions:

A. ESP32 Wireless Monitoring

Use an ESP32 to send fill-level information to a monitoring dashboard.

B. SMS Notifications

Integrate a GSM module to notify authorized waste-management personnel when replacement is required.

C. Multiple Bin Monitoring

Monitor several containers and display their status on a central dashboard.

D. Digital Waste Records

Store the date, location, fill percentage and replacement status.

E. Sensor Fault Detection

Identify disconnected sensors, abnormal readings and measurement failures.

F. Maintenance Indicator

Display when the container requires inspection or replacement.

13. Experimental Evaluation

The prototype should be evaluated using the following criteria:

Evaluation parameterTesting method
Measurement accuracyCompare sensor readings with manual measurements
Fill-level reliabilityTest multiple known fill levels
Response timeMeasure time taken to update display
Warning reliabilityTest each programmed threshold
Sensor consistencyRepeat measurements
Power consumptionMeasure current consumption
Cost effectivenessCompare with manual monitoring

The percentage error can be calculated using:

\text{Percentage Error}=
\frac{|E_m-E_r|}{E_r}\times100

Where:

  • = Measured fill level.
  • = Reference fill level.

14. Estimated Project Budget

Indicative prices in Kenya shillings.

ItemEstimated cost
Arduino Uno800
HC-SR04 ultrasonic sensor250
16×2 LCD I2C350
LEDs and resistors150
Active buzzer100
Servo motor250
Breadboard200
Jumper wires150
Demonstration container400
Power supply300
Enclosure and miscellaneous500
Estimated total3,450

The smartphone or computer used for programming is assumed to be available.

15. Safety and Practical Considerations

  • Never use real needles or clinical sharps to test the prototype.
  • Do not open or modify a container holding sharps.
  • Use a clean demonstration bin and inert materials.
  • The electronic system must not interfere with the original safety closure.
  • An electronic lock must not prevent the safe disposal of sharps during normal operation.
  • The system must not replace routine inspection or approved waste-management procedures.
  • Any clinical deployment requires professional engineering validation, infection-control review and regulatory approval.
  • mbeva

    Dominic Mbeva is a science teacher, experienced researcher, innovator, and creative technologist with expertise in STEM education, digital media, and scientific research. As a Kenya Science and Engineering Fair (KSEF) advisor and projects manager, he mentors young scientists, guiding them in developing award-winning innovations. He is also an IC Technorat, leading advancements in science and technology. Beyond education, Dominic is a skilled photographer and video editor, using visual storytelling to make science more engaging. His philosophy, “If you take care of minutes, hours will take care of themselves,” reflects his belief in consistent effort, strategic thinking, and innovation to drive success in both research and creativity.

    Related Posts

    How to make Natural pH-Responsive Spoilage Indicator Strips for Early Detection of Milk Contamination

    1. Introduction The Natural pH-Responsive Spoilage Indicator Strips for Early Detection of Milk Contamination is an innovative food-safety project that explores the use of naturally extracted plant pigments to detect…

    Read more

    Blogging as a Lucrative Business in 2027: How Artificial Intelligence Is Transforming Online Publishing

    Blogging is evolving from a simple online writing activity into a potentially lucrative digital business. What once required hours of manual research, writing, editing, graphic design, and website management can…

    Read more

    Leave a Reply

    Your email address will not be published. Required fields are marked *