In the heart of Bangladesh, a groundbreaking fusion of artificial intelligence and the Internet of Things (IoT) is set to revolutionize precision agriculture. MD Shaifullah Sharafat, a researcher from the Department of Electrical and Computer Engineering at North South University in Dhaka, has spearheaded a project that promises to transform how farmers make critical crop decisions. The study, published in the journal *Smart Agricultural Technology* (translated from Bengali as “Intelligent Agricultural Technology”), introduces an IoT-enabled AI system capable of providing real-time crop recommendations based on soil and weather data.
The system, developed in collaboration with the Soil Resource Development Institute and supported by Habiganj Agricultural University, Sylhet, leverages real-time data on soil nutrients, pH, and weather conditions to recommend suitable crops. “This system is designed to bridge the gap between advanced technology and practical farming,” says Sharafat. “By integrating AI models with IoT devices, we aim to provide farmers with instant, data-driven insights that can significantly improve crop productivity and sustainability.”
The core of the system lies in its ability to process and analyze data from various sources. A proprietary dataset comprising 3,300 samples covering 22 crops and eight soil and environmental features was used to train and evaluate several machine learning and deep learning models. Among the models tested, the Random Forest and Gradient Boosting algorithms achieved the highest accuracy, with the Stacking ensemble technique reaching an impressive 95.9% accuracy. For deep learning, TabNet stood out with a commendable 92% accuracy.
One of the most innovative aspects of this project is the deployment of the best-performing model on a Raspberry Pi 5 edge device. This allows for real-time inference, making the system both efficient and accessible to farmers. “The edge device deployment ensures that farmers can receive immediate recommendations without the need for complex infrastructure,” explains Sharafat. “This is crucial for regions with limited access to high-speed internet or advanced computing resources.”
The system also integrates a weather API for local humidity and rainfall data, along with an RS485 7-in-1 agricultural soil sensor that measures nitrogen, phosphorus, potassium, pH, temperature, and soil moisture. The predictions are displayed on the ThingsBoard IoT platform, providing a user-friendly interface for farmers and agricultural stakeholders.
To ensure the system’s practical effectiveness, a user survey involving farmers, agricultural researchers, and students was conducted. The feedback provided valuable insights into the system’s usability, accuracy, and reliability. “The survey results were overwhelmingly positive,” says Sharafat. “Farmers appreciated the simplicity and effectiveness of the system, while researchers were impressed by its accuracy and potential for further development.”
The implications of this research extend beyond Bangladesh, offering a blueprint for precision agriculture in other regions. By leveraging AI-driven crop recommendation models with IoT devices, farmers can optimize resource usage, improve crop selection, and support sustainable agricultural practices. “This technology has the potential to revolutionize the agricultural sector,” says Sharafat. “It can help farmers make more informed decisions, leading to higher yields and better resource management.”
As the world grapples with the challenges of climate change and food security, innovations like this IoT-enabled AI system are more critical than ever. By providing real-time, data-driven insights, this technology can empower farmers to adapt to changing environmental conditions and make the most of their resources. The implementation code and private dataset used in this study are available on GitHub, inviting further collaboration and development in the field.
In the words of Sharafat, “This is just the beginning. The integration of AI and IoT in agriculture has immense potential, and we are excited to see how this technology will shape the future of farming.” As the agricultural sector continues to evolve, this innovative system stands as a testament to the power of technology in driving sustainable and efficient farming practices.