🌱 Inspiration
Up to 40% of global crop production is lost annually to pests and wildlife. Farmers often rely on reinforced fencing, natural repellents, and integrated pest-management strategies to protect their yields, but these solutions can be expensive, labour-intensive, or difficult for small farms to maintain.
This problem is personal to our team. One of our team members’ parents runs a small farm, so we have seen firsthand how repeated wildlife intrusions can damage crops and strain limited resources. We created Hayward as an affordable, intelligent alternative that can detect wildlife, respond with targeted and humane deterrents, verify whether the intervention worked, and help farmers protect their crops more effectively.
🦝 What It Does
Hayward is an autonomous, edge AI wildlife protection system that helps small farms detect wildlife intrusions, respond with humane deterrents, and protect crops in real time.
Key Features
🧠 Edge AI Detection: Detects and classifies people and wildlife directly on the device. 🛡️ Intelligent Decision Making: Only activates when an animal enters a protected crop zone, while always prioritizing human safety. 📊 Farmer Dashboard: Records detections, actions, and outcomes to help farmers monitor wildlife activity and deterrent effectiveness.
How It Works
- Motion Detection: A PIR sensor detects movement and wakes the system.
- Detection: The camera captures an image, and on-device AI determines whether the subject is a person or an animal.
- Decision: If an animal enters the protected crop zone, Hayward decides whether to activate a deterrent. If a person is detected, no action is taken.
- Deterrence: A servo, LED, and buzzer provide a brief, humane deterrent.
- Verification: Hayward captures another image to verify whether the animal has left the area.
- Adaptation: If a deterrent repeatedly fails, Hayward rotates to a different strategy to reduce animal habituation.
- Monitoring: Images, actions taken, and outcomes are recorded in the farmer dashboard.
🛠️ How We Built It
We built Hayward using: QNX 8 as the real-time operating system. A Raspberry Pi 5 for embedded processing. C and C++ for camera access, inference, decision-making, and hardware control. The QNX Sensor Framework for image capture. TensorFlow Lite for on-device animal and person detection. Native QNX message passing for communication between processes. QNX High Availability Manager for process monitoring and recovery. A PIR sensor, Camera Module 3, servo, LED, and GPIO buzzer for sensing and actuation. FastAPI and MongoDB Atlas for event storage and analytics. Next.js, TypeScript, Tailwind CSS, and shadcn/ui for the dashboard.
🧩 Challenges We Ran Into
- On-device inference: Running computer vision on the Raspberry Pi under QNX required working within limited computing resources.
- Camera integration: Common Python camera libraries are unavailable on QNX, so image capture had to be implemented in C or C++ using the Sensor Framework.
- Hardware safety: We needed to ensure that an AI prediction could never control the actuators directly or activate them near a person.
- Process communication: Coordinating vision, actuation, and event reporting required carefully designed QNX message contracts.
- Wildlife classification: General-purpose models do not recognize every species relevant to farms, so the system needed to safely handle unknown detections.
🏆 What We’re Proud Of
Created a complete embedded loop that senses, understands, decides, reacts, verifies, and records. Ran the critical AI and control logic directly on QNX rather than relying on a cloud service. Added a person-detection safety override and an independently validated hardware controller. Used native QNX interprocess communication to separate vision from physical actuation. Designed deterrent rotation to address animal habituation. Built a dashboard that turns embedded events into useful insights for farmers. Added process recovery and network-failure handling to make the prototype more resilient.
💡 What We Learned
We learned how to connect sensors, a camera, and physical actuators to create an embedded system using QNX. We also learned how to process, store, and transmit real-time detection data between the device and our application. Finally, we learned how to design a simple dashboard that turns complex wildlife data into clear and useful information for farmers.
🚜 What’s Next for Hayward
After the hackathon, our next step is to improve the reliability of our prototype through outdoor testing with different lighting conditions, weather, and animal images. We would refine the detection model using wildlife commonly found on local farms and gather feedback from small farmers, including our teammate’s family. We also plan to build a weather-resistant enclosure, improve the dashboard and mobile alerts, and test solar or battery power. These steps would help us determine whether Hayward can become a practical and affordable tool for small farms.
Built With
- c
- c++
- fastapi
- mongodb-atlas
- next.js
- python
- qnx
- raspberry-pi
- react
- tailwind-css
- tensorflow-lite
- typescript
Log in or sign up for Devpost to join the conversation.