Saturday, February 29, 2020

Introduction

Objective

The aim for this experiment is that,  the system should be able to identify whether the soil is dry or wet and accordingly apply the right amount of water to it. This is an open loop system as the output of the system does not depend on the input.

Required Apparatus

The main components required are as follows:
  • Sensor and ADC - Used to measure the humidity level in the soil


Fig. 0.0

  • DC motor - Pumps water to the soil when power is supplied


Fig. 0.1
  • Arduino Board - Controls when the motor should do work


Fig. 0.2

  • Power supply - Used to power the motor and the Arduino

Fig. 0.3

  • LEDs, connecting wires, SK-10 board and a relay - Relay is an electronically operated switch


Fig. 0.4

  • Diode - Used in the connection between the Arduino and the motor in case a reverse current is produced, it would not damage the Arduino


Week 1

Tasks for the week 


  • connecting the components
  • generating a code for the motor to work using the Arduino Uno
  • Making a simple block diagram 

All the components were segregated. The Arduino was placed at the centre and a motor was connected to one of its pin.  In order to check the functioning of the motor, a simple code was uploaded to the Arduino. 

The motor worked perfectly and we added a delay of five seconds. The motor spun for a while and stopped for five seconds and the cycle continued. 

To ensure that there would not be any negative voltage development that would destroy the Arduino, we tried to put in a diode and a resistor in series with the motor. Any negative current would not be allowed to go back to the Arduino since the diode is forward biased.

The figure shown below is the simple block diagram for the circuit constructed above. A one kilo-ohm resistor was used in series with a diode.



Fig. 1.0


Problems generated
  • The motor was rated at 5V, but takes about 4V.  When the resistor and diode was connected, the motor was not working
  • Resistance value was too high, since it was draining voltage
  • With just small resistance, motor worked but with low power as the voltage drop was low across it



Week 2

Tasks for this week
  • Implementing code for the Arduino to measure the moisture value using the sensor and for the motor to pump accordingly
  • Fixing the issue regarding the power of the motor


Fig. 2.0


The figure shown above is how the connections were made from the motor to the Arduino and also the sensor to it as well. 

The code was made to measure the values of the moisture for the sensor. If the moisture value goes below a certain level, the program indicates the function as dry and would make the pump start. 

A cup filled with water was placed nearby. If the sensor was dipped in the water, it would read as wet and the pump would stop in less than a second.

Diode was placed in series with a resistor of low resistance. For obvious reasons the power for the motor would be low. To tackle this problem, a power supply of 6V was connected to the motor. 

Before, the motor was charged by the 5V from the Arduino port which was not enough to fully power it. But the motor would continue to run regardless of the code, since it is connected to an external power supply.

A relay was introduced and connected to one of the ports in the Arduino, therefore it can control when the switch for the relay should be closed. By doing so, the motor can be controlled even though the power supply is connected externally. Another 6V power supply was connected to the Arduino to power it. 



Week 3

Tasks for the week


  • Improving the code
  • Finishing the circuit 


Fig. 3.0

The figure 1 shows the circuit made during the third week. Four LEDs and corresponding resistors were added to improvise the project. 

Fig. 3.1

The figure 2 shows the top view of the circuit.   

A pair of green LEDs was placed in the circuit which is connected in series with the resistor. One is connected to the power supply which supplies power to the motor while the other is connected to the one that supplies power to the Arduino. 

The two green LEDs will be on whenever the switch for the power supply is switched on. If the brightness of the light decrease it would mean that the voltage in the power supply is dropping. 

Thereby, voltage level is directly proportional to the light intensity in this case. A yellow LED was placed between the motor. Whenever the motor does work, the yellow light
will be turned on.

The code was improvised in a way that, even if the sensor fails to work the motor will continue to do work. The code activates in such a way that, if the moisture value remains constant for a long period of time, motor will pump water into the system every fixed interval of time.  A red LED is placed on the board, and if the sensor is damaged it will light up.


Week 4

Tasks for this week


  • Measuring the volumetric rate
  • Adding more LEDs to indicate other problems
  • Drawing the circuit diagram
  • Creating a design for 3D printing

By measuring the volumetric flow rate and approximate time needed to register change in the moisture of the soil, interval times have been estimated and implemented into the code to optimise performance and prevent flooding.

 Different mode of operation has been developed in case of the pot’s sensor failure. It relies only on time and volume flow rate as opposed to a feedback provided by the sensor in normal mode.

There has also been an attempt to make it as universal as possible by offering a customisation determined by the needs of a plant used and by making the system independent on the relative position (height) between the plant pot and the water tank.

Two other LEDs have been added to the circuit. A sensor is also attached to the water tank, if the water drops below a certain level, a red light will be lit. 

In the case of any leakage in water, the system will identify the fault and will shut the system down making sure there will not be any wastage in water. A red light system is used for this failure as well. 


Fig. 4.0


The figure above is the circuit diagram of the whole system. The first sensor goes to the soil of the plant where it measures the moisture, while the other one goes to the water tank where it measure the water level. 

For 3D printing the design for the project we came up with a design a shown in Fig. 4.1 below : 

Fig. 4.1

The big compartment would be were the main circuit would be. The two holes above are for the sensors and the motor to go through. The other compartment is where the water tank would be held. It could be a bottle or anything.

 The motor would be placed inside the the tube will go through one of the holes to the plant. There would be two lids placed on top. To refill the water, the user only has to open one compartment. Instead of opening the whole thing, so that water would not spill to the main circuit. 

There would be also be a  small lid at the bottom of the main compartment where the user can open and change the batteries in the power supplies. 






Week 5

Task for the final week

  • Make the desired box using an ordered box
  • Solder all the components and place them in


The plan to 3D print the design was dropped out. Instead a box was ordered and holes were drilled. Six holes were made on the side of the box for the LEDs and the lid of the box was cut in half. An acrylic board was laser cut(shown in the figure below) and placed in the half. The one half is for the two power supplies. The other half is for the Arduino and the circuit. The motor and the water tank are placed outside.

Fig. 5.0

 In Fig 5.0, two holes are for the wires from the power supply to go through to the next compartment. The big hole is where the USB port of the Arduino will be placed. If the user wants to change the code for the Arduino he/she can do so by inserting a USB cable through that hole.

Fig. 5.1

 Fig 5.1 shows the back side of the box. The two big holes are for the switch for the power supplies. The user can just flick the two switches ON/OFF whenever they feel the need to. It is usually always kept on since the work is automatic.


Fig. 5.2


Fig 5.2 shows the interior layout of the box when the compartment is added. The hole in the middle is for the Arduino port. The small two holes at the bottom is not seen because of its small size.


Fig. 5.3


 Fig 5.3 shows how the design would look like externally. The six holes for the LEDs are placed on the side. Theres one LED placed outside, that is how the other LEDs would be placed like.


Fig. 5.4


Figure 5.4 shows the backside of the veroboard where the components and the wires are soldered. 


Fig 5.5


The final picture shows all the soldered components and how the LEDs would be arranged outside the designed box.