This is a submission for the Built with Google Gemini: Writing Challenge
What I Built with Google Gemini
Farmers working in agricultural fields often need to switch water pumps multiple times a day, and sometimes even late at night. In many cases, they manage multiple fields located far away from each other, which makes manual operation inconvenient and time-consuming.
To address this challenge, we built a GSM-sensor based water pump control system that enables remote switching of pumps using a 2G GSM network. The core idea was to eliminate the need for physical presence while ensuring reliable and secure operation.
We used Gemini to brainstorm more possible applications, features, use case scenarios and last but not least safety and caution.
The system consists of a GSM module for receiving SMS or call-based commands, a microcontroller that processes these commands, and a relay unit that controls the pump’s power supply. When a user sends a predefined text message of call from their mobile phone, the GSM module receives it, the microcontroller verifies and interprets it, and the relay safely switches the pump ON or OFF. The relay, in practical applications, requires proper electrical isolation, typically achieved using optocouplers and MOSFETs. However, in our project, we primarily focused on the switching mechanism of the relay, as the isolation aspect can be implemented separately without significant difficulty. Our solution focuses on simplicity, accessibility, and reliability — ensuring that critical irrigation control is just a message away.
To build the GSM-based water pump control system, we integrated both hardware and communication technology. For microcontroller we used NodeMcu(ESP8266) to process incoming Tx/Rx commands and control switching logic. For GSM we used SIM800L module inside which Sim card is inserted. For actuation we used a relay for now as prototype and powered the whole setup with a Buck Converter. We used Arduino IDE first and later improved the logic and quality using Antigravity IDE's AI features.
Demo
Here's the link to the video of working prototype:
https://youtube.com/shorts/cMyGNHQm5_g
Github :
Shishir067
/
Smart-Farm
Complete smart farm setup from monitoring to control
Smart-Farm
Complete smart farm setup from monitoring to control
What I Learned
While creating this project, we initially thought that establishing a network connection with the GSM module would be easy. However, due to its built-in antenna, achieving a strong and stable network connection was challenging. We struggled at first, which motivated me to study the 2G GSM spectrum in greater detail.
Working with the SIM module also helped me understand AT commands, their importance, and their practical use cases in device communication. We encountered UART communication issues between the microcontroller and the SIM module, which we resolved by configuring and using alternate communication channels.
Since the SIM module supported quad-band operation, we tested each band for signal strength and response stability. After identifying the strongest and most reliable band, we locked it and saved the configuration in the module’s built-in memory.
This project also enhanced our understanding of relay switching, load control, and basic power electronics—especially the importance of electrical isolation and the safe handling of high-voltage devices. We learned how components like MOSFETs and optocouplers contribute to reliable and robust circuit design.
Google Gemini Feedback
Initially, after brainstorming ideas and features, we over-complicated the project and got stuck. Gemini suggested a step-by-step approach: first determining the correct baud rate, then identifying the strongest band, and finally confirming the AT commands. By focusing on one task at a time, we simplified what had once seemed overwhelming. Gemini also helped resolve issues with deprecated libraries by providing alternative approaches; for example, since the NodeMCU can become unstable with the default UART, we utilized alternative pins instead. These small tips were crucial for navigating the technical hurdles that are often difficult to solve without guidance.
Credit
This project was a truly collaborative effort and would not have been possible without the innovative ideas and equal contributions of my friend Domendra Kumar Sahu



Top comments (0)