در این پروژه قصد ساخت حسگر رطوبت خاک با میکروکنترلر آردوینو را داریم.
سنسور رطوبت خاک که رطوبت سنج نیز نامیده می شود، میزان رطوبت یا آب را در خاک اندازه گیری می کند.
بنابراین می توان تشخیص داد که خاک رطوبت کافی دارد یا خیر. بنابراین یک ابزار تشخیصی خوب برای مراقبت از گیاهان از همه نوع است.
اگر خاک بسیار خشک باشد، می دانید که گیاه باید آبیاری شود.
اگر خاک خیلی مرطوب باشد، می دانید که نیازی به آبیاری ندارد.
اتصال سنسور رطوبت خاکی که ما می سازیم ساده است زیرا ما از یک ماژول از پیش ساخته شده استفاده می کنیم. این بدان معنی است که همه چیز قبلاً گنجانده شده است. ما فقط باید پایانه های خروجی را به یک میکروکنترلر مانند آردوینو وصل کنیم.
اگر «سنسور رطوبت خاک آردوینو» را در ebay تایپ کنید، نوع کامل سنسور مورد نیاز برای ساخت این مدار را خواهید دید.
سنسور دارای 4 ترمینال برای اتصال، Vcc (برای برق)، GND، خروجی آنالوگ و خروجی دیجیتال است.
Vcc و زمین نحوه دریافت نیروی مورد نیاز حسگر برای کار کردن است. در اینجا ما 3.3V-5V برق خارجی را وصل می کنیم.
خروجی آنالوگ مقداری را که سنسور می خواند نشان می دهد که با میزان رطوبتی که تشخیص می دهد مرتبط است. مقدار آنالوگ از 0 (بسیار مرطوب) تا 1023 (بسیار خشک) متغیر است. بنابراین اگر خاک خیلی خشک باشد، خروجی آنالوگ خوانش بسیار بالایی خواهد داشت. اگر خاک ما باشد، خروجی آنالوگ خوانش بسیار پایینی خواهد داشت. به این ترتیب ما متوجه خواهیم شد که آیا رطوبت خاک وجود دارد یا خیر.
خروجی دیجیتال به سادگی بالا یا پایین می شود. از آنجایی که ما با یک میکروکنترلر کار می کنیم که می تواند سیگنال های آنالوگ را تفسیر کند، این دقیق تر از سیگنال های دیجیتال است، بنابراین ما پین DO را وصل نمی کنیم. اگر از میکروکنترلر استفاده نمیکردیم، احتمالاً باید به جای AO از DO استفاده میکردیم.
سنسور رطوبت خاک، دوباره ابزار بسیار مفیدی برای مراقبت و نگهداری از گیاهان است.
اجزاء
- ماژول سنسور رطوبت خاک
- رهبری
- آردوینو
ماژول رطوبت خاک دارای 4 پین است.
جدول زیر این اتصالات پین را خلاصه می کند.
پایانه های سنسور رطوبت خاک |
پایانه های آردوینو |
Vcc | به ترمینال 5 ولت متصل می شود |
GND | به ترمینال GND متصل می شود |
AO | اتصال به ترمینال آنالوگ (A0-A5) |
انجام دادن | متصل نیست |
مدار پروب منطقی
مدار پروب منطقی که برای خواندن سطوح منطقی خواهیم ساخت، در زیر نشان داده شده است.
برای جزئیات بیشتر: نحوه ساخت مدار سنسور رطوبت خاک با آردوینو
در ادامه، متن انگلیسی این مطلب را میتوانید مشاهده نمایید:
In this project, we are going to build a soil moisture sensor with an Arduino microcontroller.
A soil moisture sensor, also called a hygrometer, measures the amount of moisture, or water, in the soil.
Therefore, we can tell whether the soil has enough moisture or not. So it is a good diagnostic tool for caring for plants of all types.
If the soil is extremely dry, then you will know the plant should be watered.
If the soil is very moist, then you will know that it does not need to be watered.
The soil moisture sensor we will build is simple to connect because we’re going to use a prebuilt module. This means everything is already included. We simply have to connect the output terminals to a microcontroller such as the Arduino.
If you type in ‘Arduino Soil Moisture Sensor’ into ebay, you will see the complete type of sensor needed to build this circuit.
The sensor has 4 terminals for connection, Vcc (for power), GND, Analog output, and Digital output.
Vcc and ground are how the sensor gets the power it needs to operate. Here we connect 3.3V-5V of external power.
Analog output shows the value the sensor is reading which correlates to the amount of moisture it detects. The analog value varies from 0 (very wet) to 1023 (very dry). So if the soil is very dry, the analog output will have a very high reading. If the soil is we, the analog output will have a very low reading. This is how we will know whether the moisture content of the soil.
The Digital output simply goes high or low. Since we are working with a microcontroller that can interpret analog signals, this is more precise than digital signals, so we will not connect the DO pin. If we weren’t using a microcontroller, then we probably would have to use DO instead of AO.
A soil moisture sensor, again, is a very useful tool for plant care and maintenance.
Components
- Soil Moisture Sensor Module
- LED
- Arduino
The soil moisture module has 4 pins.
The table below summarizes these pin connections.
Soil Moisture Sensor Terminals |
Arduino Terminals |
Vcc | Connects to 5V terminal |
GND | Connects to GND terminal |
AO | Connects to an analog terminal (A0-A5) |
DO | Unconnected |
Logic Probe Circuit
The logic probe circuit we will build to read logic levels is shown below.
For more detail: How to Build a Soil Moisture Sensor Circuit with an Arduino