esp32Home automation
To develop a smart irrigation system to provide irrigation system which is automatic for the plants which help in saving water and money. The main objective is to apply the system for improvement of health of the soil and hence the plant via sensors. Appropriate soil water level is a necessary pre-requisite for optimum plant growth. Also, water being an essential element for life sustenance, there is the necessity to avoid its undue usage. Irrigation is a dominant consumer of water. This calls for the need to regulate water supply for irrigation purposes. Fields should neither be over-irrigated nor under-irrigated. In order to replace expensive controllers in current available systems, the Arduino Uno will be used in this project as it is an affordable microcontroller. The Arduino Uno can be programmed to analyze some signals from sensors such as moisture, temperature, and rain. A pump is used to pump the fertilizer and water into the irrigation system. The use of easily available components reduces the manufacturing and maintenance costs. This makes the proposed system to be an economical, appropriate and a low maintenance solution for applications, especially in rural areas and for small scale agriculturists. This research work enhanced to help the small-scale cultivators and will be increase the yield of the crops then will increase government economy.
Notice:To create your own Software Development Kit you can use create with this link:
https://iot.tuya.com/?_source=651c0f2a31e8e3e0568022f1b280684b%EF%BC%9B
Tuya IOT Cloud:Tuya Smart is a global IoT (Internet of Things) development platform that creates interconnectivity standards to connect brands, OEMs, developers, and retailers across a wide range of smart devices and industries.
Tuya is an internet-connected device (IOT) cloud platform that allows you to connect your gadgets to the internet. They offer a one-stop IOT PaaS-level solution for developers, which include hardware development tools, worldwide cloud services, and smart business platform development. Tuya's platform is used by a number of well-known smart home product makers.
Tuya offers a development environment for engineers and enthusiasts in addition to servers. They offer No-Code development, OTA updates, MCU code creation, and other services. As a result, it's an excellent tool for makers who wish to create something more substantial than a college project.
Tuya Link SDK:Smart home development kits and the UI Biz Bundle are available through the SDK App service, allowing you to swiftly create your own smart home app. Our Home SDK, Extension SDK, and UI Biz Bundle allow you to easily implement development. Network configuration, device control, firmware upgrades, timed tasks, and smart scenario design are all included in the Home SDK. IPC SDK, sweeper SDK, and door lock SDK are all included in the Extension SDK. Based on the Home SDK, the UI Biz Bundle provides a series of development-free UI kits. APIs make it simple to implement all functionalities.
Tuya IoT OS Link SDK provides core capabilities, such as device connection, uplink and downlink communication, and OTA across platforms and operating systems. The SDK is implemented in the C programming language and does not depend on the specific device platform and OS environment. It only needs to support the TCP/IP protocol stack and provide the necessary system-dependent interfaces of the SDK to complete the integration.
Features of Tuya Link SDKFollowing are the advantages of Tuya Link SDK of why choosing this:
- Integration with Any Devices
Tuya IoT platform can be integrated with any devices produced using protocols between devices and Tuya Cloud.
- Cross Platforms
Create a platform-agnostic operating system and chip abstraction layer based on TuyaOS characteristics.
- Flexible Development
Standard network layer interfaces and SAL abstractions are provided for semiconductor systems using a variety of integration methods and protocols.
- Fast Development
To integrate with TuyaOS Link SDK and connect the device to Tuya Cloud, locally alter the system, network, and data persistence interfaces.
- Safe and Reliable
Support safe data storage and connections, as well as data security on the local and network levels.
- Diversified Scenarios
Tuya IoT Platform products can be integrated into Tuya's global ecosystem and used in a variety of settings including homes, hotels, apartments, and more.
Hardware DevelopmentOne of the basic requirements of the project to run is to use the hardware with the right way of safety, connections and methods. In this project all the aspects are considered in the operations. For this project these are the hardware development tools:
- · Soil moisture sensor
- · Esp32
- · Relay Board
- · Micro USB Cable
- · Connecting wires
Following are the software to use in the operation of Irrigation system with easy learning and developing methods.
Tuya IOT CloudTuya is an internet-connected device (IOT) cloud platform that allows you to connect your gadgets to the internet. Create a Link SDK on Tuya platform using the following link.
https://developer.tuya.com/en/?_source=c878bcadc819750a4505b0830c039530%EF%BC%9BArduino IDEThe Arduino Integrated Development Environment (IDE) is a cross-platform programme written in C and C++ functions. It's used to write and upload programs to Arduino-compatible boards, as well as other vendor development boards with the support of third-party cores. In this Irrigation system, to use with Tuya IoT Cloud, first program esp32 in Arduino IDE to put the code (attached in Code section).
PythonPython is a high-level, general-purpose programming language that is interpreted. The use of considerable indentation in its design philosophy emphasizes code readability. Its language elements and object-oriented approach are aimed at assisting programmers in writing clear, logical code for both small and large-scale projects. In our project, to integrate Tuya Link SDK with Python use the following procedure
Python SDK1. Have Python 3.6 or later installed.
https://www.python.org/ftp/python/3.10.1/python-3.10.1-amd64.exe
2. Clone the SDK for Python.
git clone https://github.com/tuya/tuyaos-link-sdk-python.git
3. Install the SDK for Python.
python3 -m pip install ./tuyaos-link-sdk-python
VS Code EditorMicrosoft's Visual Studio Code is a source-code editor for Windows, Linux, and macOS. Debugging, syntax highlighting, intelligent code completion, snippets, code refactoring, and embedded Git are among the features. We use this to edit python code and to generate QR code for your link SDK in Tuya cloud. In this article for the attached code use your credentials (will be discussed in Product Development section) like product id, uu id and the authorization key.
Product Development:The following is the procedure for development of “Irrigation system with Tuya Link SDK using esp32”.
Sign upFor using the Tuya platform first step is to create an account on Tuya IoT Cloud with the following link.
https://developer.tuya.com/en/?_source=c878bcadc819750a4505b0830c039530%EF%BC%9B
SDK creationTuya IoT OS Link SDK provides essential features across platforms and operating systems, including device connection, uplink and downlink communication, and OTA. To complete the integration, it just has to provide the TCP/IP protocol stack and provide the SDK's system-dependent APIs.
Now to create your SDK for this project on Tuya IoT platform; after the account creation, open the menu, select the ‘Product’ >> ‘Development’ >> Create a new product. In this way you can create your software development kit (SDK).
After the creation if you won’t find your specific category, it is for you to create your own SDK so you have to select ‘Can’t find the category’ and manually create you SDK by entering required data.
To proceed with the SDK creation successfully, you have to create function for your kit (SDK).
Select your required datatype from the given datatypes.
For the UI interface you can choose to proceed with DIY Style Panel or you can design your own panel.
Select Link SDK and design CPU by adding details in the ‘Add Firmware’ section.
Tuya give you the facility to test SDK by giving you 2 free licenses. Order your license by selecting ‘Get 2 Free Licenses’.
Your free license is now ready. Download the generic license for your Link SDK.
To link the code (burned with Arduino IDE) in esp32 and python code in Tuya IoT platform use the serial commands, Check the attached code.
Integrate Tuya App with your SDKRun the Python file in VS Code editor for better visualization. A QR will generate by the Python file. Scan this QR code on Tuya App (in the menu ‘Me’ select the QR Scanner) with mobile OS.
You have to scan the code on your Tuya SDK to integrate your Tuya App with SDK.
Enjoy the Control
When there is need of water, it will be shown on the App and it is OFF so there is no water to irrigate the plant.
When there is need of water, it will be shown on the App and you ON it to water the plant.
When there is no need of water, it will be shown on the App and it is OFF so there is no need of water to irrigate the plant.
When there is no need of water, it will be shown on the App and you can ON it to water the plant.
tuyasmartgadgetsirrigationarduinoesp32automationiotsensor trendingrobotics electronicmechatronics
soil moisture sensor
Comments