11/22/16 Status Update

Goals:

We will begin interfacing the PIC with the moisture sensor over I2C to attempt to create a connection as we have never used I2C before. Adam will be looking at this part while Christer will be working with the flow sensor and looking over the specifications for communicating with the PIC. If the connection can be made and data transmission occurs, we will then put water through the flow sensor and attempt to record some data.

Work Completed:

Adam:

  • Configured LCD screen to input/output touchscreen positions serially (we did this with parallel configuration in previous labs). Recalibrated touch positions.
  • Created FSM and button on LCD so solenoid valve may be actuated. This should ease the troubleshooting of the flow meter setup.
  • Added additional circuitry to power transistor. The optoisolator from Lab 4 is now used to further protect the PIC.
  • Tested the toggling of the solenoid valve; found to work properly. Problem with overheating of power transistor seems to be gone.
  • Soldered pins to Soil Moisture Sensor, got ribbon cable prepped so we can begin interfacing with PIC.
  • Interfaced the Soil Moisture Sensor with the PIC, was able to read and store values read in with the ADC. Tried to calibrate values to extremes, as well as a watered plant found on the 4th floor. If I consider open air as “0%” the sensor reads “11”, and submerged in water “100%” moisture, the sensor read “75”. When stuck in the plant (which I could tell had been watered recently) the sensor read 30. This was approximately the 40% moisture reading we were seeking. Also set the PIC up to only power the sensor when taking a reading with the toggle of a button. This will slow down the corrosion of the sensor (recommended by SparkFun).
  • Created schematic of design thus far, including PIC pins used (physical/mapped) as well as external circuits. This will help in the future when we need to interface additional sensors.
  • Added the oscillator crystal to our design, and updated the schematic. Verified accuracy by enabling the output pulse on physical pin 7 of the PIC. Initially had an error of roughly 5%. This was corrected by being more careful with the placement of the crystal on the board, and the ground I used. By bridging the clock pins directly, and grounding to the PIC itself, was able to reduce error to roughly 0.00007% (when measured on the oscilloscope). Also created an initClock() function, which enables and starts the clock, based on #define values at the top of our program. These are user configurable so an accurate set time/date is made. The current time and date are displayed on the LCD. Attempted to set the Chime feature up, but was not successful.

Christer:

  • Extended the leads to the flow sensor so when mounted to the tank, the board with PIC could be stored elsewhere.
  • Drilled mounting points for the system underneath the tank. Our current thought was to secure the system with zip ties. If these are not strong enough, we will likely find brackets that we can use for mounting.
  • Assembled the 9 to 3.3 V voltage regulator. Looked at the documentation online and located resistors and capacitors and was able to correctly step down to the desired 3.3 V that will be read from the flow sensor. The system did begin to overheat and will debug the circuit in lab time.
  • Assisted Adam in connecting the solenoid onto the board and toggling it with a voltage source. We determined the issue was the power transistor as we believe we created a short circuit previously that fried the chip. This was replaced and the system functioned as expected.

Current Challenges:

Our main challenges at the moment include: communicating through I2C with the temperature and humidity sensor, determining if hysteresis is necessary for the flow sensor, and creating an alarm using the real time clock peripheral. Christer will be working on interfacing with the flow sensor while Adam will begin communicating with the temperature monitor.

Upcoming Goals:

This week will be more difficult to work on the project due to the holiday weekend and both members will be leaving the state. We hope to have the flow sensor calibrated and able to record the amount of water dispersed before the lab section on November 29. We would also like to have the clock triggering an alarm and begin making connections to the temperature sensor to set up the I2C connections required.

Leave a Reply

Your email address will not be published. Required fields are marked *