Input Devices




Group Assignment

For this week's group assignment the goal is to "probe an input device's analog levels and digital signals". to be added as soon as possible

Individual Asignment

Motion Sensor

I am a new plant owner and have no clue how to understand the plant's needs and make sure it is watered enough. Because of my fear of the plant going dry I think I might be overwatering it regularly. So I decided to use a soil moisture sensor. The moisture sensor I have available, which typically comes with arduino kits, is a resistivity sensor. The soil resistivity sensor works by "measuring how strongly the soil resists the flow of electricity between two electrodes."

See more on Seeed Studio



Code

To begin working on the sensor I wrote the code to be able to read the value given by the sensor and then displaying the data, and then if the data is below a certain limit the LED light will be turned on.



Connections

Connect the 3.3V power supply to the Vcc of the Comparator, as it does not require a higher power supply, and the Gnd and A0. From the comparator connect the + and - to the sensor. I was confused whether the sensor itself had a direction already and so I plugged the sensor and tested it and then flipped it and tested again, the numbers did not change so I made the assumption that it did not. Once the sensor is set, you can connect the arduino to the LED on the breadboard.

Testing

Once I made sure that the connections were okay and the code was compiling I began testing the sensor. Once I first plugged it in and opened the serial monitor, the analogue value was around 600. As the sensor was in the air the level of water was low which meant that there was higher resistance. The limit that I have placed in the code is 300, so when I put the sensor inside the soil and the water content is high the number shoul begin to decrease and once it is below 300 the LED will turn on.

Working Steps

Final Thoughts

Working with a designed board will not be as easy as the arduino but it is the next step I have. This process of connecting an input and reading it was easy and I have not challenged myself further. I would like to try to work with the RFID sensor soon and would like to find a way to include it in my final project.

Files