Saturday, February 29, 2020

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. 



No comments:

Post a Comment