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.
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

| Component | Purpose |
|---|---|
| Arduino Uno | Main control unit |
| HC-SR04 ultrasonic sensor | Measures distance to the contents |
| 16×2 LCD with I2C | Displays filling level and status |
| Red LED | Indicates full or critical status |
| Yellow LED | Indicates approaching capacity |
| Green LED | Indicates normal operating condition |
| Active buzzer | Provides audible warning |
| Servo motor | Demonstrates a model locking mechanism |
| Push button | Reset or authorized service simulation |
| Jumper wires | Electrical connections |
| Breadboard | Circuit prototyping |
| Enclosure | Houses the electronic components |
| Power supply | Powers the system |
5. System Design
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
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 level | LED indication | Buzzer | System status |
|---|---|---|---|
| Normal | Green | OFF | Normal operation |
| Approaching limit | Yellow | Intermittent | Prepare replacement |
| Critical | Red | Continuous or repeated warning | Service required |
| Sensor fault | Flashing warning | Alarm | Inspection 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.
| Component | Arduino pin |
|---|---|
| Ultrasonic Trig | D9 |
| Ultrasonic Echo | D10 |
| Green LED | D3 |
| Yellow LED | D4 |
| Red LED | D5 |
| Buzzer | D6 |
| Servo signal | D11 |
| LCD SDA | A4 |
| LCD SCL | A5 |
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
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
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 parameter | Testing method |
|---|---|
| Measurement accuracy | Compare sensor readings with manual measurements |
| Fill-level reliability | Test multiple known fill levels |
| Response time | Measure time taken to update display |
| Warning reliability | Test each programmed threshold |
| Sensor consistency | Repeat measurements |
| Power consumption | Measure current consumption |
| Cost effectiveness | Compare 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.
| Item | Estimated cost |
|---|---|
| Arduino Uno | 800 |
| HC-SR04 ultrasonic sensor | 250 |
| 16×2 LCD I2C | 350 |
| LEDs and resistors | 150 |
| Active buzzer | 100 |
| Servo motor | 250 |
| Breadboard | 200 |
| Jumper wires | 150 |
| Demonstration container | 400 |
| Power supply | 300 |
| Enclosure and miscellaneous | 500 |
| Estimated total | 3,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.







