Đồ án Hệ thống tưới nước tự động (Phần 1)
Bạn đang xem 20 trang mẫu của tài liệu "Đồ án Hệ thống tưới nước tự động (Phần 1)", để tải tài liệu gốc về máy bạn click vào nút DOWNLOAD ở trên
Tài liệu đính kèm:
do_an_he_thong_tuoi_nuoc_tu_dong_phan_1.pdf
Nội dung text: Đồ án Hệ thống tưới nước tự động (Phần 1)
- BỘ GIÁO DỤC VÀ ĐÀO TẠO TRƯỜNG ĐẠI HỌC SƯ PHẠM KỸ THUẬT TP.HCM KHOA ĐÀO TẠO CHẤT LƯỢNG CAO ĐỒ ÁN TỐT NGHIỆP NGÀNH CÔNG NGHỆ KỸ THUẬT CƠ ĐIỆN TỬ HỆ THỐNG TƯỚI NƯỚC TỰ ĐỘNG GVHD: PGS.TS. NGUYỄN TRƯỜNG THỊNH SVTH: HÀ NGUYỄN QUỐC HUY MSSV: 11146046 SVTH: TRẦN QUỐC CẦN MSSV: 11146210 S K L 0 0 4 1 8 1 Tp. Hồ Chí Minh, tháng 1/2016
- MINISTRY OF EDUCATION AND TRAINING UNIVERSITY OF TECHNICAL EDUCATION OF HO CHI MINH CITY FACULTY OF HIGH QUALITY TRAINING GRADUATION PROJECT AUTOMATIC WATERING SYSTEM STUDENT : HA NGUYEN QUOC HUY 11146046 TRAN QUOC CAN 11146210 Year: 2011 Major: MECHATRONICS ENGINEERING Supervisor: Assoc. Prof. NGUYEN TRUONG THINH Ho Chi Minh City, January 2016
- CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM Độc lập – Tự do – Hạnh phúc NHIỆM VỤ KHÓA LUẬN TỐT NGHIỆP Họ và tên sinh viên: Hà Nguyễn Quốc Huy MSSV: 11146046 Họ và tên sinh viên: Trần Quốc Cần MSSV: 11146210 Ngành: Công nghệ kỹ thuật Cơ điện tử Lớp: 11146CLC Khóa: 2011 – 2015 Giáo viên hướng dẫn: PGS.TS. Nguyễn Trường Thịnh Ngày nhận đề tài: 30-09-2015 Ngày nộp đề tài: 05-01-2015 Tên đề tài: HỆ THỐNG TƯỚI NƯỚC TỰ ĐỘNG Nội dung thực hiện đề tài: - Thiết kế, lắp đặt phần cứng của hệ thống. - Lập trình trên máy tính. - Điều khiển hệ thống tưới nước. TRƯỞNG NGÀNH GIÁO VIÊN HƯỚNG DẪN
- CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM Độc lập – Tự do – Hạnh phúc PHIẾU NHẬN XÉT CỦA GIÁO VIÊN HƯỚNG DẪN Họ và tên sinh viên: Hà Nguyễn Quốc Huy MSSV: 11146046 Họ và tên sinh viên: Trần Quốc Cần MSSV: 11146210 Ngành: Công nghệ kỹ thuật Cơ điện tử Tên đề tài: HỆ THỐNG TƯỚI NƯỚC TỰ ĐỘNG Họ và tên giáo viên hướng dẫn: NHẬN XÉT 1. Về nội dung đề tài và khối lượng thực hiện: 2. Ưu điểm: 3. Khuyết điểm: 4. Đề nghị cho bảo vệ hay không? 5. Đánh giá loại: 6. Điểm: (Bằng chữ: ) Tp. Hồ Chí Minh, ngày tháng năm 2016 Giáo viên hướng dẫn
- CỘNG HÒA XÃ HỘI CHỦ NGHĨA VIỆT NAM Độc lập – Tự do – Hạnh phúc PHIẾU NHẬN XÉT CỦA GIÁO VIÊN PHẢN BIỆN Họ và tên sinh viên: Hà Nguyễn Quốc Huy MSSV: 11146046 Họ và tên sinh viên: Trần Quốc Cần MSSV: 11146210 Ngành: Công nghệ kỹ thuật Cơ điện tử Tên đề tài: HỆ THỐNG TƯỚI NƯỚC TỰ ĐỘNG Họ và tên giáo viên phản biện: NHẬN XÉT 1. Về nội dung đề tài và khối lượng thực hiện: 2. Ưu điểm: 3. Khuyết điểm: 4. Đề nghị cho bảo vệ hay không? 5. Đánh giá loại: 6. Điểm: (Bằng chữ: ) Tp. Hồ Chí Minh, ngày tháng năm 2016 Giáo viên phản biện
- LỜI CẢM ƠN Với 4 năm được đào tạo tại trường Đại học Sư phạm kỹ thuật thành phố Hồ Chí Minh chúng tôi đã tích lũy được không ít những kiến thức chuyên môn và cả những kỹ năng mềm cần thiết để sẵn sàng bước vào giai đoạn cao hơn của cuộc đời mình. Chúng tôi sẽ không thể có được những điều đó nếu không nhận được sự động viên, giúp đỡ của thầy cô, gia đình và bạn bè. Ngôi trường mà chúng tôi đang theo học cũng đã hộ trợ chúng tôi rất nhiều khi đã cung cấp kiến thức thông qua những chương trình đào tạo, những cuộc thi thật tuyệt vời. Vì vậy lời cảm ơn đầu tiên chúng tôi xin được trân trọng gửi đến trường Đại học Sư phạm kỹ thuật thành phố Hồ Chí Minh, Khoa đào tạo Chất lượng cao và Bộ môn Cơ điện tử. Khóa luận tốt nghiệp này có thể thành công là nhờ sự giúp đỡ to lớn từ giảng viên hướng dẫn. Dưới sự hướng dẫn tận tình của thầy chúng tôi đã cải thiện được những thiếu sót của mình và dần chững chạc hơn để có thể nghiên cứu, đánh giá các ý tưởng và đề ra được nhiệm vụ cần làm trong đồ án. Chúng tôi xin gửi lời cảm ơn chân thành đến thầy. Tp. HCM, ngày 1 tháng 1 năm 2016 Nhóm sinh viên thực hiện i
- OPENING PART 1. The necessity for the research to be conducted Firstly, Vietnam’s agriculture is still out of dated with a small number of scientific and technological researches to be applied in reality. So many cultivation techniques and processes have been conducted based on farmers’ experiences rather than scientific requirements. Besides techniques applied to growing and taking care of plants, watering is one of the most important works in agriculture to make sure that plants can grow well. Once plants are watered properly according to scientific requirements in agriculture, it is less likely for pests to develop, therefore, it will be unnecessary to use pesticides. Consequences, productivity will be higher and agricultural products shall be safer. The second reason is the fact that using watering trucks on roads in the city center can contribute to cause traffic jams. On the other hand, industrialization and modernization has appeared in all aspects of Vietnam’s society so automatic equipment and machines are being gradually used to replace human beings. Therefore, more and more watering equipment are being researched, designed, manufactured and applied. There are many types of watering equipment (rain ejectors, atomizers ) with many different parameters which are suitable with many different kinds of plants. They are made in many different countries such as Israel, Korea, Taiwan, China, etc Consequently, it will be very convenient for users to choose one that best suits their needs. In order to apply them on large scale, it is necessary to select watering systems that both meet scientific requirements and are suitable with economic and technical conditions. Watering system must make sure that roots, leaves and atmosphere have sufficient moisture so that plants can grow well; water-saving system shall create conditions for plants to absorb nutrition minimizing erosion, land degradation and environmental pollution. Automatic watering systems can be combined with ii
- fertilization and using chemicals in agriculture. Moreover, with an automatic watering system, humans shall not have to water and supervise watering time anymore so it helps save labor force. With this system, watering is totally automatic. Water level shall be adjusted depending on temperature, moisture, seasons, etc. All these conditions shall be inputted into the system then it shall calculate and give accurate time to pump water. Laborers shall not need to care the watering work any more. Thanks to proper watering and calculating more accurate water level, plants shall grow better. 2. Reasons for choosing the topic Automatic watering system (drip watering, atomizers ) is now the best watering system to be applied widely in developed countries which can meet scientific requirements for plants. The automatic watering system is a reasonable form of watering that helps save labor force and cost. It has been widely used in many countries in the world. However, only in the past few years, using this system has been a trend in Vietnam. In the context of modernization in agriculture and rural areas, automatic watering system has become more and more popular; nevertheless, not all farmers are able to use it because of its high price. On the other hand, strong development of science and technology makes life more convenient and modern. Thanks to the development of electronic techniques, modern devices and machines are manufactured to take over hard jobs requiring high accuracy that were conducted by humans before. Advancements in electronic technique have been quickly applied in many sectors: industry, transport, aviation, etc. Automatic devices have played very important parts in constant development of these sectors. Vietnam’s agriculture still depends heavily on weather conditions. Besides, traditional cultivation methods don’t bring high yield. With the development of economy and society, human demands have gradually increased, requiring an increase in quantity and quality as well. Hence, advanced devices that can measure and adjust parameters such as temperature, atmosphere moisture, nutrition to suit every single stage during the process of development of plants are iii
- needed. For the above-mentioned reasons, we have decided to research and design “Automatic Watering System”. 3. Purpose for conducting the research We wish to apply accumulated knowledge to research and design an automatic watering system model in order to apply to Vietnam’s agriculture. We hope to bring new methods to watering plants so that agricultural production can be more effective. 4. Outline - Overall introduction about the topic - Introduction about components used in control circuits - Designing automatic watering system - Result and development orientation 5. Research method In order to conduct the research, we use the following methods: Inheritance research results - Inheriting researches by past generations on theoretical backgrounds for programming and modeling software - Inheriting researches applied in reality Research orientation - Researching programming and modeling software on computers - Seeking simple, easy-to-use and effective programming methods Test - Conduct the test run repeatedly, check and find out mistakes then perfect the system iv
- INDEX Lời cám ơn i Opening part ii Index v Figures and charts vii CHAPTER 1: OVERVIEW 1 1. 1. Definition of ‘Automatics’ 1 1. 2. The role of automatics in production 1 1. 3. How ‘automatics’ is applied in watering plants 2 1. 4. Researches conducted in foreign countries 3 1. 5. Domestic researches 5 1. 6. Domestic researches 5 CHAPTER 2: CONTROLLER ELEMENTS 6 2. 1. Central processing unit 7 2. 1. 1. Board Arduino Mega 2560 7 2. 1. 2. Diagram of Board Ardunio Mega 2560 ports 8 2. 1. 3. Technical specifications of Board Arduino Mega 2560 9 2. 2. Receiver unit 9 2. 2. 1. Temperature sensor LM35 9 2. 2. 2. Humidity measure sensor FC-28 Error! Bookmark not defined.0 2. 2. 3. Matrix keypad 4x4 Error! Bookmark not defined.2 2. 3. Display unit Error! Bookmark not defined.3 2. 3. 1. LCD 2004 Blue Error! Bookmark not defined.3 2. 3. 2. Communication module LCD 1602/2004 Error! Bookmark not defined.5 2. 4. Real-time unit Error! Bookmark not defined.6 2. 5. Equipment controlling unit Error! Bookmark not defined.7 v
- CHAPTER 3: DESIGNING PLANT WATERING SYSTEM 18 3. 1. Set up the problem for the system 18 3. 2. Designing the mechanical parts 18 3. 2. 1. Estimating the needs of water each time and the ability for water supply 19 3. 2. 2. Dividing watering zones Error! Bookmark not defined.9 3. 2. 3. Calculating the main pipes 20 3. 2. 4. Calculating the branch pipes, secondary pipes 20 3. 2. 5. Selecting the watering method 21 3. 2. 6. Materials used in construction of watering system 22 3. 3. Designing controlling circuit Error! Bookmark not defined.3 3. 3. 1. Designing the hardware 243 3. 3. 2. Designing software Error! Bookmark not defined.4 CHAPTER 4: TEST AND RESULTS 25 4. 1. Testing “Display unit” 25 4. 2. Automatic watering 26 CHAPTER 5: CONCLUSION AND DEVELOPMENT ORIENTATION 27 5. 1. Conclusion 27 5. 2. Limitation of the topic 27 5. 3. Development orientation 27 REFERENCE 29 vi
- FIGURES AND CHARTS Figure 1-1: Watering Robot Droplet 4 Figure 2-1: Diagram of units 6 Figure 2-2: Pin diagram of board Arduino Mega 2560 8 Figure 2-3: Temperature sensor LM35 10 Figure 2-4: Humidity measure sensor FC-28 11 Figure 2-5: Matrix keypad 4x4 12 Figure 2-6: LCD 2004 Blue Error! Bookmark not defined.3 Figure 2-7: Pin diagram of LCD 2004 blue Error! Bookmark not defined.4 Figure 2-8: Communication module LCD 1602/2004Error! Bookmark not defined.5 Figure 2-9: Module RTC 1307 16 Figure 2-10: Pin diagram of Module RTC 1307 16 Figure 2-11: 4-Channel 5V Relay Module 17 Figure 3-1: The hardware according to figure 1-1 23 Figure 3-2: Plastic box of hardware 23 Figure 3-3: Interface of programming software 24 Figure 4-1: Manual mode 25 Figure 4-2: Time mode 26 Figure 4-3: Alarm mode 26 vii
- CHAPTER 1: OVERVIEW This chapter deals with the following parts: brief introduction about automatics in agriculture, domestic and foreign researches on automatic watering system models, and additional solutions to the research topic. 1. 1. Definition of ‘automatics’ Automatic systems which comprise automatic components are systems used to control processes happening in the nature and life without direct interference from human beings. Automatic control systems are combination of physical elements which are related to each other and used to monitor, adjust or control other systems. Automatic control systems are very popular nowadays. - Air conditioning systems - Moisture adjusting systems - Fire alarm systems In factories/plants: - Automatic machines - Automatic production and assembly lines - Control machines operating based on programs, computers, robots, etc. 1. 2. Role of automatics in production Thanks to mechanization and electrification, production tools and equipment have gradually developed and perfected. Innovations in the material technology field then electronics and information technology fields have created favorable conditions for automatic technology to thrive which brings so many benefits to the society. 1
- In reality, when automatic technology is applied in production, results are huge such as decrease in production cost, improvements in productivity and production conditions, meeting high intensity requirements in modern production, specialization in production, etc. Thanks to these results, competitiveness shall be advanced, meeting production requirements. In the near future, automatics shall play an indispensable part because it is not only applied in production but also daily life. In production, it replaces humans when it comes to hard, dangerous, toxic works and works requiring sophistication etc. And in daily life, this technology shall serve various demands of humans. It will be an indispensable means in our daily lives. 1. 3. Application of automatics technology in watering plants Vegetation work is the agricultural production base and is a typical example of modernization. All processes in agricultural production can be controlled automatically in order to decrease labor force, increase yield, etc. Although automatic technology was applied to watering for a long time, it only developed in some developed countries. For developing countries, even though agriculture occupies a high proportion in their economies, applying automatic technology in watering plants is not popular. Today, with assistance from foreign countries, developing countries especially Southeast Asian countries including Vietnam have been applying automatic technology to life and production. Nowadays, with strong development of automatic technology and achievements in microelectronics and information technology, automatics in all fields become possible. It is possible to affirm that automatics have become a trend in all industries of any country. 2
- 1. 4. Researches conducted in foreign countries There have been many researches on automatic watering system in foreign countries so far: In early 1980s, Soviet Union (the old name of Russia) manufactured an auto machine applied in its agriculture. While it was being operated, this machine could observe land moisture, atmosphere temperature, wind force, etc. It could determine watering method and water plants thanks to a machine that could produce artificial rain. Robot manufacturer Droplet has introduced watering robots integrated with latest automatic technologies, cloud computing and some other connection services allowing Droplet to be able to automatically observe injectors, adjust water volume and watering frequency. Thanks to this, it can automatically water plants according to schedules calculated by itself based on analyzing input date. Droplet is an automatic injector that is able to adjust water to be injected from roots to trunks within a radius of 9.14 meters. Before the robot automatically operates, what users need to do is providing names of trees in the garden through a telephone or a tablet wirelessly connected with the robot. Based on the given information, Droplet shall search information on the Internet by itself in order to determine water volume and watering frequency suitable with each kind of tree. Moreover, Droplet also searches information about local weather conditions to determine whether it is going to be sunny or rainy in order to calculate an appropriate schedule. Israel automatic watering controller is easily programmed according to users’ demands. Installation of the automatic watering system according to advanced technology only requires some small programs, providing the system with an input water source and leading injectors to positions needing watered. 3
- Figure 1-1: Watering Robot Droplet There are two kinds of control: based on watering time and circle: - Control based on watering time: Systems operate according to real time shown in clocks - Control based on watering circle: Systems operate according to repeat circles of the time Time and magnetic valve controllers: - Auto controller: used to set auto watering time such as operating time, operating duration, and time for stopping water or switching to new positions. The rain sensor will help the machine to automatically stop watering when it rains or moisture in the atmosphere is high. - Magnetic valve: is device which receives and transmits signals from the controller to injectors so that they can operate properly. Watering systems’ operation principle: Watering time shall be set, when it comes to operating time, the controller shall automatically transmit signals to magnetic valves. Then these valves shall be automatically opened and supply water for injectors. Users can set the watering time anytime they want. 4
- 1. 5. Domestic researches There have been many researches on automatic systems conducted in Vietnam so far and they have been also applied in reality. People created semi-auto watering systems that helped save labor force and productivity was higher than when it is done manually. However, this system still has many shortcomings and it needs improving to have best results possible. In technology universities, students conducted many research topics on auto watering system. But they also have many drawbacks. Multipurpose automatic watering system is a scientific work conducted by two teachers from Hue College of Industry, Dr. Le Van Luan and MS. Le Dinh Hieu. Main parts include a temperature sensor and land moisture sensor installed at a poly-greenhouse for growing flowers and a controller programmed on PLC-S7- 1200. When parameters shown in the sensors about land’s moisture or atmosphere temperature at the poly-greenhouse signals that water is needed, this signal shall be transmitted to the PLC controller. Then functions shall be automatically controlled to receive and inject water based on installed injectors and automatically stop within 5 minutes after the temperature sensor or the land moisture sensor meets requirements. The multipurpose automatic watering system is product of a very good and realistic idea realistic. It was experimented and brought good results. 1 . 6. Problems needing further research Above researches have been applied for a long time. However, because of their high prices, many people can’t afford to buy them. Therefore, the author conducted a research on a watering system using a sensor for measuring atmosphere moisture to determine watering time. This system is easy to manufacture and repair and more importantly, it doesn’t cost much money 5
- CHAPTER 2: CONTROLLER ELEMENTS Controller design has feature to control close/open auto electrical equipment via temperature and humidity sensors. System designed including 05 units: - Receiver unit including temperature & humidity sensors, a Matrix keypad 4x4 - Processing unit Board Arduino Mega 2560 - Display unit with LCD - Equipment controlling unit using Relay 5VDC to close/ interrupt equipment. - Real-time unit (timer) Figure 2-1: Diagram of units Features of each unit: - Central processing unit: Board Arduino Mega 2560 controls total activities of circuit such as follows receiving data to decode temperature and humidity 6
- signals. Bringing displays to LCD and then giving signals for controlling open/close (timer for open /close) electrical equipment. - Receiver unit: are sensors to collect signals from outside environment to provide to Board Arduino Mega 2560 for processing, including: temperature sensor LM35 and humidity sensor FC-28, there out we have Matrix keypad 4x4 to import parameters for controlling by hands. - Display unit: is LCD with 04 lines 20 characters to display temperature and humidity of environment, time. - Real-time unit: Using Module 1307 to set up and adjust time of starting to sprinkle and sprinkle time. - Open/close electrical equipment unit: using Relay 5 VDC to close / interrupt active circuits of electrical equipment this unit receives signals from Board Arduino Mega 2560 There out we have source unit provides supply current for total accessories in circuits. It creates stable voltage that compliant with index about voltage and current. 2. 1. Central processing unit 2. 1. 1. Board Arduino Mega 2560 Board Arduino Mega 2560 is integrated circuit controlling microcontroller ATmega2560. It has 54 digital I/O ports (including 15 PWM ports), 16 analog input ports, 4 UARTs (Universal Asynchronous Receiver – Transmitter), a Quartz Crystal Oscillator 16 MHz, USB connection, a Electric jack, a ICSP header, and a reset button. It contains everything is needed for supporting microcontroller; only connect it to computer by USB cable or provide source with AC-to-DC adapter or battery for performing. 7
- 2. 1. 2. Diagram of Board Arduino Mega 2560 ports Figure 2-2: Pin diagram of Board Arduino Mega 2560 8
- 2. 1. 3. Technical specifications of Board Arduino Mega 2560 - Microcontroller: ATmega2560 - Active voltage: 5V - Outside source (request) : 7-9V - Outside source (maximum) : 6-12V - Current for each I/O port: 20mA - Current for 3.3V port: 50mA - Quantity of Digital port: 54 (15 PWM ports) - Quantity of Analog port: 16 - Universal asynchronous receiver/transmitter UART: 4 UART sets - Serial Peripheral Interface SPI:1 set (port 50-53) using SPI Arduino library - Inter Integrated Circuit Communications I2C: 1 set - Outside interruption : 6 ports - Flash memory: 256 KB, 8KB used for Bootloader - SRAM: 8 KB - EEPROM: 4 KB - Clock frequency: 16 MHz - Length: 101.52 mm - Width: 53.3 mm - Mass: 37g 2. 2. Receiver unit 2. 2. 1. Temperature sensor LM35 Temperature sensor LM35 is a sensor type very useful to implement real-time temperature measurement. Because it work correctly with small errors, and with small size and cheap price also is a good point. 9
- S K L 0 0 2 1 5 4