Farming is a high-stakes game of timing and resources. Many farmers still rely on intuition or delayed observations to make decisions about irrigation, weather, or security. We wanted to change that—with a fully autonomous, AI-powered smart farm monitoring system.
Using the PSoC™ 6 AI Evaluation Kit as the central brain, we built a system that senses, analyzes, and acts in real time. It gives farmers instant insights and automated control—with or without internet—making smart farming accessible, even in remote areas.
Here’s the full prototype of our Smart Farm Monitoring System powered by PSoC™ 6 AI.
Farmers face daily challenges:
Water waste due to inefficient irrigation
- Water waste due to inefficient irrigation
Poor environmental awareness (sound/weather)
- Poor environmental awareness (sound/weather)
Difficulty tracking temperature and humidity trends
- Difficulty tracking temperature and humidity trends
Security issues (livestock intrusion or movement)
- Security issues (livestock intrusion or movement)
Our solution solves this by providing:
Real-time monitoring of sound, temperature, humidity, water level
- Real-time monitoring of sound, temperature, humidity, water level
Smart irrigation activation and mobile alerts
- Smart irrigation activation and mobile alerts
Predictive analytics through on-device AI
- Predictive analytics through on-device AI
Visual feedback via a dedicated external display
- Visual feedback via a dedicated external display
Manual irrigation is still common in rural areas, leading to water waste.What We’re Building
We're developing a Smart Farm Monitoring System using the PSoC™ 6 AI Kit, combining internal and external sensors, AI-based processing, and energy-efficient design.
Key Features:Edge AI Sound MonitoringUsing the built-in microphone on PSoC™ 6, we collected ambient sound data to monitor animal movement, human activity, and unusual events. Trained an ML model for sound classification and deployed it on-device.
- Edge AI Sound MonitoringUsing the built-in microphone on PSoC™ 6, we collected ambient sound data to monitor animal movement, human activity, and unusual events. Trained an ML model for sound classification and deployed it on-device.
External Environmental Sensors
DHT11 Sensor: Monitors temperature and humidity.
- DHT11 Sensor: Monitors temperature and humidity.
Water Level Sensor: Detects irrigation tank or soil moisture levels.
- Water Level Sensor: Detects irrigation tank or soil moisture levels.
- External Environmental SensorsDHT11 Sensor: Monitors temperature and humidity.Water Level Sensor: Detects irrigation tank or soil moisture levels.
UNIHIKER External DisplayDisplays real-time sensor data (temperature, humidity, water levels, alerts) for quick, local farm-side visibility.
- UNIHIKER External DisplayDisplays real-time sensor data (temperature, humidity, water levels, alerts) for quick, local farm-side visibility.
Solar-Powered Battery SystemA solar panel charges the battery, ensuring sustainable 24/7 off-grid operation—critical for remote field use.
- Solar-Powered Battery SystemA solar panel charges the battery, ensuring sustainable 24/7 off-grid operation—critical for remote field use.
Built-in Mic (PSoC™ 6): Captures ambient sound data for audio-based AI inference.
- Built-in Mic (PSoC™ 6): Captures ambient sound data for audio-based AI inference.
DHT11 Sensor: Reads real-time temperature and humidity.
- DHT11 Sensor: Reads real-time temperature and humidity.
Water Sensor: Monitors irrigation tank or soil water levels.
- Water Sensor: Monitors irrigation tank or soil water levels.
GPS, Ultrasonic Sensors: Optional tracking and intrusion detection.
- GPS, Ultrasonic Sensors: Optional tracking and intrusion detection.
We train and deploy machine learning models for sound classification to enable real-time anomaly detection. Here’s how to train the microphone-based ML model using DEEPCRAFT Studio:
Step-by-step training instructions:
Project SetupOpen DEEPCRAFT Studio and create a new audio classification project tailored for your PSoC™ 6 microphone data.
- Project SetupOpen DEEPCRAFT Studio and create a new audio classification project tailored for your PSoC™ 6 microphone data.
Data Collection
Connect your PSoC™ 6 AI Evaluation Kit and record ambient sounds through the built-in microphone.
- Connect your PSoC™ 6 AI Evaluation Kit and record ambient sounds through the built-in microphone.
Capture diverse sound samples representing normal conditions, animal movements, human activities, and any unusual events.
- Capture diverse sound samples representing normal conditions, animal movements, human activities, and any unusual events.
Label each recording accurately to represent the sound class.
- Label each recording accurately to represent the sound class.
- Data CollectionConnect your PSoC™ 6 AI Evaluation Kit and record ambient sounds through the built-in microphone.Capture diverse sound samples representing normal conditions, animal movements, human activities, and any unusual events.Label each recording accurately to represent the sound class.
- Deepcraft studio Data Collection
Data Preprocessing
Segment your audio files into uniform short clips (e.g., 1–2 seconds).
- Segment your audio files into uniform short clips (e.g., 1–2 seconds).
DEEPCRAFT Studio will automatically extract audio features like Mel-frequency cepstral coefficients (MFCCs) essential for sound classification.
- DEEPCRAFT Studio will automatically extract audio features like Mel-frequency cepstral coefficients (MFCCs) essential for sound classification.
- Data PreprocessingSegment your audio files into uniform short clips (e.g., 1–2 seconds).DEEPCRAFT Studio will automatically extract audio features like Mel-frequency cepstral coefficients (MFCCs) essential for sound classification.
- Deepcraft Studio Data Preprocessing
Model Training
Configure training parameters such as epochs, batch size, and learning rate.
- Configure training parameters such as epochs, batch size, and learning rate.
Train the model within DEEPCRAFT Studio, monitoring loss and accuracy metrics.
- Train the model within DEEPCRAFT Studio, monitoring loss and accuracy metrics.
Utilize early stopping and validation data to prevent overfitting.
- Utilize early stopping and validation data to prevent overfitting.
- Model TrainingConfigure training parameters such as epochs, batch size, and learning rate.Train the model within DEEPCRAFT Studio, monitoring loss and accuracy metrics.Utilize early stopping and validation data to prevent overfitting.
- Deepcraft Studio Model Training
Model Evaluation
Review accuracy, confusion matrix, and classification reports.
- Review accuracy, confusion matrix, and classification reports.
Refine your dataset or training parameters if necessary to improve performance.
- Refine your dataset or training parameters if necessary to improve performance.
- Model EvaluationReview accuracy, confusion matrix, and classification reports.Refine your dataset or training parameters if necessary to improve performance.
- Deepcraft Studio Model Evaluation
Model Export
Once satisfied, export the trained model in a format compatible with ModusToolbox™ for deployment.
- Once satisfied, export the trained model in a format compatible with ModusToolbox™ for deployment.
- Model ExportOnce satisfied, export the trained model in a format compatible with ModusToolbox™ for deployment.
Firmware Integration & Deployment
Integrate the model with your PSoC™ 6 firmware using ModusToolbox™.
- Integrate the model with your PSoC™ 6 firmware using ModusToolbox™.
Implement real-time audio classification logic to trigger irrigation or alerts based on sound patterns.
- Implement real-time audio classification logic to trigger irrigation or alerts based on sound patterns.
Flash the firmware to your device and validate performance in real-world farm conditions.
- Flash the firmware to your device and validate performance in real-world farm conditions.
- Firmware Integration & DeploymentIntegrate the model with your PSoC™ 6 firmware using ModusToolbox™.Implement real-time audio classification logic to trigger irrigation or alerts based on sound patterns.Flash the firmware to your device and validate performance in real-world farm conditions.
Activates water pump if soil is dry.
- Activates water pump if soil is dry.
Sends Bluetooth/WiFi alerts to farmer's phone.
- Sends Bluetooth/WiFi alerts to farmer's phone.
Displays readings and system state on the UNIHIKER display.
- Displays readings and system state on the UNIHIKER display.
Sensor data logged and visualized on a mobile app (built in Flutter).
- Sensor data logged and visualized on a mobile app (built in Flutter).
Farmers get real-time status updates and system recommendations.
- Farmers get real-time status updates and system recommendations.
PSoC™ 6 AI Evaluation Kit – Central processor + built-in mic for AI
- PSoC™ 6 AI Evaluation Kit – Central processor + built-in mic for AI
DHT11 Sensor – Temperature & humidity
- DHT11 Sensor – Temperature & humidity
Water Sensor – Moisture/water level detection
- Water Sensor – Moisture/water level detection
UNIHIKER – External LCD display for live data
- UNIHIKER – External LCD display for live data
Solar Panel + Battery Pack – Energy self-sufficiency
- Solar Panel + Battery Pack – Energy self-sufficiency
Bluetooth/WiFi Module – Wireless data & alerts
- Bluetooth/WiFi Module – Wireless data & alerts
DEEPCRAFT Studio – AI model training for sound classification
- DEEPCRAFT Studio – AI model training for sound classification
ModusToolbox – Sensor programming + embedded development
- ModusToolbox – Sensor programming + embedded development
FreeRTOS – Efficient task management on PSoC™ 6
- FreeRTOS – Efficient task management on PSoC™ 6
Flutter – Mobile app interface for farmers
- Flutter – Mobile app interface for farmers
Python (on UNIHIKER) – Display integration and UI
- Python (on UNIHIKER) – Display integration and UI
Sound-based Environmental Monitoring:Collected and labeled sound data from the PSoC™ 6 mic to detect patterns like rain, livestock movement, or intrusions.
- Sound-based Environmental Monitoring:Collected and labeled sound data from the PSoC™ 6 mic to detect patterns like rain, livestock movement, or intrusions.
Model Training & Inference:Models trained in DEEPCRAFT Studio were optimized and deployed for edge AI, enabling real-time audio event recognition.
- Model Training & Inference:Models trained in DEEPCRAFT Studio were optimized and deployed for edge AI, enabling real-time audio event recognition.
Automation Triggers:ML output directly controls irrigation and alert mechanisms for smart decision-making.
- Automation Triggers:ML output directly controls irrigation and alert mechanisms for smart decision-making.
Solar panel + efficient power management
- Solar panel + efficient power management
- Low-power PSoC™ 6 operation
- Low-power PSoC™ 6 operation
- Battery backup for night-time/low-sunlight conditions
- Battery backup for night-time/low-sunlight conditions
- Accurate sound classification for farm monitoring
- Accurate sound classification for farm monitoring
- Real-time temperature and humidity logging
- Real-time temperature and humidity logging
- Water-level detection for irrigation optimization
- Water-level detection for irrigation optimization
- Immediate alerts and local display feedback
- Immediate alerts and local display feedback
- All processing done locally (no cloud, no delay)
- All processing done locally (no cloud, no delay)
- Fully off-grid and sustainable
- Fully off-grid and sustainable
Expand AI to include weather pattern prediction
- Expand AI to include weather pattern prediction
- Add LoRa or GSM module for long-range communication
- Add LoRa or GSM module for long-range communication
- Integrate soil nutrient sensors for deeper crop insights
- Integrate soil nutrient sensors for deeper crop insights
- Add cloud sync option for advanced dashboards
- Add cloud sync option for advanced dashboards
This project brings AI to agriculture, right where it's needed most. By combining low-power edge processing, machine learning, and solar-powered autonomy, we’ve built a system that gives farmers the eyes and ears of a digital assistant—helping them grow smarter, waste less, and protect their livelihoods.
Comments