Status Update – Week 3

Goals for this past week:

  • Configure UI, including a main menu and the following features, through the use of the LCD screen and multicolor LEDs
    • enter new password
    • lock device
    • unlock device
  • Have accelerometer more accurately identify the horizontal and vertical directions of motion (left or right / up or down)
  • Begin pattern recognition, having the PIC identify whether or not the inputted pattern matches the stored password
  • Ability to set and reset a password, storing the new pattern in place of the existing password
  • Make further progress on Bluetooth in hopes of having it set up to transmit simple data

Work Completed this week:

  • Craig
    • Developed a user interface which instructs users on what task they are completing (lock, correct password, incorrect password)
    • Ability to store and reset password
    • Device can now be both locked and unlocked using directional input (currently buttons as accelerometer is still being improved)
    • Lock device can now determine whether or not the inputted pattern matches the password stored in the PIC
  • Rachel
    • Hooked up master bluetooth chip to the “key” device, ensuring the chip has proper firmware to act as a master
    • Further work on the bluetooth capabilities, adding header files and source code to progress towards data transmission
    • Scaling and functionality of accelerometer, making it have more accurate directional readings

Current Challenges:

Our challenges this week were bluetooth, which seems to be the constant challenge, and time. This past week was thanksgivingbreak, thus with both students out of the lab it was hard to get much work accomplished. With bluetooth, a general confusion over what steps need to be completed in order to have it work have set us a bit behind schedule. We believe that since the bluetooth is the only major feature still not complete we will still be able to complete the project on time.

Goals for upcoming week:

  •  Both partners
    • Establish a bluetooth connection in which the “key” device can tell the “lock” device the motion in which it was moved
  • Craig
    • Finalize details of UI
      • Dummy proof UI (avoid crashes)
      • Easier ability to switch between screens (be able to cancel inputs that were not intended)
      • Include incorrect attempts counts
    • Determine a set encoding to send, where numerical values represent a direction or input
      • i.e. single click = 1, double click = 2, holding = 3, up = 4 …
  •  Rachel
    • Further improve accuracy of accelerometer
    • Establish a bluetooth connection in which the “key” device can tell the “lock” device in which motion it was moved
    • Begin to sketch a container for the finalized product, hopefully creating a wooden prototype by next lab

2016-11-28

Goals for previous week:

  • Perform hardware test on the station boards
  • Create a map of bytes to rail sections
  • Create a map of switch bits
  • Test remaining base stations
  • Build a routing map so that trains can be steered from one area to another
  • Finish implementing basic Bluetooth communication
  • Begin connecting the Bluetooth and the train control

Work Completed:

Greg:

  • Built the hardware for testing multiple stations
  • Created a map of the network

Jack:

  • Found a number of additional bugs with the Bluetooth code

Challenges:

Neither of us were on campus for Thanksgiving break, so not much work could be completed.  Also the soldering irons in the lab are not very efficient making it difficult to build the boards.

Upcoming Goals:

Jack:

  • Finish implementing basic Bluetooth communication
  • Begin connecting the Bluetooth and the train control

Greg

  • Figure out the bit mapping
  • Test the hardware

11/29/2016 Status Update

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 setup the I2C connections required.

Work Completed:

Adam:

  • Soldered temperature sensor breakout board in order to interface with PIC.
  • Setup PIC connections, and began working on getting the I2C communication up between the PIC and sensor. Updated schematic.
  • Designed preliminary FSM for watering sequence. Wrote the C code, as well as default values used throughout watering process.

Christer:

  • Setup voltage regulator to work with the flow sensor. Provides 9 V power to the sensor and scales the output down to 3.3 V.
  • Attempted to use Input Capture to read the pulse signal from the flow sensor. Realized that this would not work with the application we are trying to use it for. Are using comparator now to count the number of pulses we receive.
  • Updated schematic to include voltage regulator and flow sensor.

Current Challenges:

I2C communication is still not fully understood. Working through example code supplied by Sparkfun to get the sequence of packets used retrieve data from the temperature sensor. Another challenge we are currently working through is the flow sensor, and getting an accurate count of the pulses it outputs. This has been difficult due to the transitions, and the idle state of the flow meter, which is seems to toggle between an output high and low.

Upcoming Goals:

We would like to finalize the FSM we are developing now to determine how we are moving through the watering sequence. The largest contingency on this is how we are determining the optimal watering time based on temperature. We will come to a conclusion on this and Adam will continue to frame the FSM for our final design. Christer will finalize the comparator and be able to record the number of pulses output from the flow sensor that will directly translate to the amount of water being passed through the system. We will both be working on the I2C communication for the temperature sensor as we both will be executing this for the first time.

2016-11-22

Goals for previous week:

  • Capture schematic of base station – Achieved
  • Run diagnostics on all sections of track – 2/5 Stations tested
  • Have a basic Bluetooth setup for testing and proof of concept – Close, hit unexpected complications

Work Completed:

Greg:

  • Captured the schematic required for a base station
  • Programmed a PIC to be able to send valid packets to the train tracks

Jack:

  • Test Bluetooth code written, but still needs to be debugged.
  • Researched Redbear Bluetooth chip.

Challenges:

The biggest challenge at the moment is time management.  With a large amount of additional projects it is challenging to invest enough time into this project.  After Thanksgiving we should be able to add additional time to this project.

Another challenge is working with the Bluetooth code from last year, which is far more hacked together than we initially thought.

Additionally, I found a problem with one of the Bluetooth chips when attempting to change its software from the slave code to the master code. I connect the chip to the computer and it comes up fine, but when I try to copy the updated software onto the chip it disconnects mid-transmission.

Upcoming Goals:

  • Perform hardware test on the station boards
  • Create a map of bytes to rail sections
  • Create a map of switch bits
  • Test remaining base stations
  • Build a routing map so that trains can be steered from one area to another
  • Finish implementing basic Bluetooth communication
  • Begin connecting the Bluetooth and the train control

 

Status Update – Week 2

Our Goals for this week:

  • Begin interfacing Bluetooth or at least get a better understanding of what needs to be done to make it functional
  • Work on user interface, including multicolor LED lights to show status of device operation, as well as LCD display to show important things such as the lock status
  • Accurately and consistently detect motion

Work Completed this week:

  • Craig
    • Full integration of button press interpretation (hold, single press, double press)
    • Programmed multi-color status LED which will change color based on button input (including timers and interrupts to trigger based on input)
    • Soldered through-hole pins into accelerometer
    • Assisted with initial calibration of accelerometer
  • Rachel
    • Background research and initial testing of Bluetooth devices
    • Scaling and functionality of accelerometer
    • Beginning to work with accelerometer to make it detect and identify direction of motion

Current Challenges:

One of the biggest challenges we faced was understanding and working with the Bluetooth devices. We are currently sharing the devices with Jack and Greg, who will be ordering another set this upcoming week. We realized that one of the devices has a faulty power LED and has trouble communicating with the computer via USB. For this week we decided to work more on the accelerometer than initially planned, having that aspect advance further to offset the lack of progression with Bluetooth. We hope to have the Bluetooth issues worked out in this week’s lab so it does not set us back any further.

Goals for upcoming week:

Since we do have a holiday break this week, we are unsure of how much of our list will be complete by the beginning of next Tuesday’s lab, but below is what we hope to have completed. If either partner happens to have all of their tasks complete before lab, or faces an obstacle that prevents them from making adequate progress on a task, they will try to assist the other partner and/or begin working on the user interface, including LCD lock and instructional LEDs (if device is on, processing motion, or accepted a valid pattern).

  • Craig
    • Configure the barebones of the UI. This includes:
      • Lock screen – Shows “lock” and failed attempts counter
      • “Main Menu” upon unlocking – Ability to set a new password or lock device
  •  Rachel
    • Have accelerometer accurately identify the horizontal and vertical directions of motion (left or right / up or down)
    • Begin pattern recognition, having the PIC identify multiple motions and acknowledge whether or not it matches the given password. For this step, the password will be hard-coded into the system since the functionality to store motion as a password is not yet complete.
  • Both Members
    • Further work on Bluetooth together should the issues not be resolved in this week’s lab

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.

Status Update – Week 1

Week In Review

This past week our group had a few small victories. We reviewed our final parts list and even got some of our parts delivered, we also began discussing the user interface. Both group members sat down to review the initial design proposal, more concretely divide up responsibilities, and figure out what the next goal is to ensure that we are meeting our schedule.

Goals For The Week

  • Begin interfacing Bluetooth
  • Start User Interface
  • Receive Accelerometer

Stretch Goals

  • Get Bluetooth interface communicating completely
  • Develop system to recognize distinction between holding a button, single, and double clicks

Challenges

Currently, neither Rachel nor Craig have any prior experience with Bluetooth communication. While there is plenty of documentation both online and from groups last year, it is still an unfamiliar form of data communication to us. We believe this could pose as the biggest threat as we do not want to burn all of our time interfacing Bluetooth communication. Furthermore, we do not have all of our parts yet which will delay our progress. The most inconvenient part about the lack of parts is that we are missing the accelerometer which is the crux of our project.

Task Breakdown

  • Rachel – Begin reviewing documentation on Bluetooth interfacing from last year
  • Craig – Begin reviewing documentation on Bluetooth interfacing from online
  • Rachel & Craig – Begin implementation of Bluetooth interface
  • Rachel – Begin CAD model for final product
  • Craig – Begin button press interpretation (hold, single click, double click)

11/15/16 Status Update

Goals:

Our goals for this week were:

  • Order, receive parts
  • Acquire and build test set-up
  • Begin build of circuit components for interfacing with peripherals

Work Completed:

This week we submitted our Design Proposal, as well as ordered and received our parts. We were also able to locate a bucket that we believe will serve as our test reservoir, that already had some of the fittings needed to mount of valve and flow meter on. Over the weekend, we continued to assemble the test reservoir, and acquired the necessary PVC components to finalize the mounting of the valves.

Adam got the solenoid valve working and powered using the wall adapter and power transistor. We will now be able to interface with the PIC. Additionally, the DC provided to the solenoid valve will be used to provide the necessary voltage to the flowmeter.

Current Challenges:

As of now, neither of us have used I2C before, so interfacing and communicating with our temperature and humidity sensor we believe will be a challenge for us both. We hope to get this protocol completed soon, as acquiring this data will allow us to begin implementing our temperature algorithm.

Upcoming 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.

2016-11-13

Goals

  • Get a train to move
  • Get a good packet sent
  • Test all stations

Tasks accomplished

Over the past week a lot of time has been spent on bringing the old hardware back online. On Tuesday we were able to work with the Professor who designed the track and communication protocols many years ago. This allowed us to try sending test packets via RealTerm to an individual station. This allowed us to perform a quick diagnostics on a station but we needed to be next to a computer.

To make it easier to perform the diagnostics a board was designed that would plug into each station and transmit the appropriate packets to power up all of the train tracks. This board will also be able to interface with the BlueTooth connection.

The board had 2 LDOs, one to step from the power supply to 5V and one to step from 5V to 3.3V. This was required since the PIC runs at 3.3V but the UART must be at 5V.

Problems

  • Power supply for PIC
  • BlueTooth connections

To do

Next week the objectives are:

  • Build a protoboard with the components
  • Run diagnostics on all stations
  • Update code to test all PICs and sections of track
  • Start to develop switching logic.