Name: Enescu Maria
Group: 331CA
A farmer is facing the problem of birds destroying crops. To solve this issue, I decided to build an automatic alarm system designed to scare birds away without harming them.
The system uses:
The purpose of the system is to protect agricultural crops from birds that damage them, thereby reducing the farmer's losses and avoiding methods such as spraying the plants with chemical solutions that may be harmful to consumers or to the environment.
The basic idea started from observing a common problem in agriculture: crop losses caused by birds. I wanted to create an automated solution that helps farmers protect their crops without constant human intervention and without a negative impact on nature.
We believe that this system is useful for other farmers because it provides a real solution for crop protection and profit improvement, without suffering losses. For me, the project is an opportunity to learn and apply knowledge in electronics, programming, and strategic thinking to solve a problem in the field of agriculture.
The analog light sensor measures the intensity of ambient light in the environment. When it detects low light levels—typically at night—it activates the RGB LED to enhance visibility. Additionally, it sends the calculated light percentage to the LCD display, providing real-time feedback on lighting conditions.
The system includes four HC-SR04 ultrasonic distance sensors strategically placed to monitor multiple angles around the protected area. These sensors detect the approach of birds or other objects. If an object comes within a predefined distance, the system triggers both the RGB LED and the buzzer as a warning response. The exact distance to the object is also displayed in meters on the LCD screen.
The Arduino Uno serves as the brain of the system. It receives data from the light sensor and all four distance sensors, processes this input using the uploaded program, and determines whether the conditions for activating the alarm are met. Based on this logic, it controls all actuators and outputs accordingly.
Because the Arduino Uno has a limited number of digital I/O pins, the PCF8574 I/O expander module is used to extend pin availability. It communicates with the Arduino and allows additional components—such as sensors and displays that use digital pins—to be connected without exceeding the board’s capacity.
The system includes an RGB LED and a buzzer as output components. The RGB LED visually indicates system states through different colors, such as idle, alert, or alarm. The buzzer provides an audio warning signal intended to scare away birds without causing them harm, contributing to a non-invasive deterrent solution.
The 16×2 LCD display is used to present real-time system data. It shows the ambient light level as a percentage, the distance to the nearest detected object, and context-specific alert messages such as ALARM or WARNING. This allows the user to monitor system status easily at a glance.
Component Name | Model | Protocol | Purchase | Datasheet |
---|---|---|---|---|
Microcontroller | Arduino Uno R3 | - | Here | Datasheet |
Distance Sensor | HC-SR04 | Digital | Here | Datasheet |
Light Sensor | Sensor Lumina Brick | ADC | Here | Datasheet |
LCD Display | LCD 16×2 (lcd016n002bcfhet) | I2C (with PCF8574) | Here | Datasheet |
LED | RGB | PWM | Here | Datasheet |
Buzzer | Mini Diffuser Brick | PWM | Here | Datasheet |
Pin Extender | PCF8574 | I2C | Here | Datasheet |
Breadboard | BreadBoard Mini | - | Here | - |
* HC-SR04 Ultrasonic Sensors
* RGB LED
* LCD 16×2 Display
* Buzzer
* Light Sensor
The verification was performed both via the Serial Monitor (DEBUG mode) and directly on the physical components:
* Using the Serial Monitor, the following were observed:
* On the 16×2 LCD display, the following physical outputs were visible:
You can explore the full source code here: Bird Deterrent Alarm System Code
float distance(int echo)
→ Returns distance in cm using an ultrasonic echo pinvoid playMelody()
→ Plays a simple sound sequence on the buzzervoid alarm()
→ Triggers a full alarm: melody and RGB light patternvoid clear()
→ Stops the buzzer and turns off all RGB LED outputsvoid loop()
→ Main control loop: reads sensors, processes values, activates components based on thresholdsanalogRead(lum)
→ Reads ambient light leveldigitalWrite(ex, X, HIGH/LOW)
→ Controls RGB LED colors via I/O expanderlcd.setCursor(x, y) / lcd.print()
→ Displays light level, distance, and status messages on the LCDSerial.print()/println()
→ Used for debugging (enabled via #define DEBUG)You can explore the full source code and project details here: