Skip to content

project1 team4

Travis Taghavi edited this page Oct 22, 2015 · 6 revisions

Project 1 - Team 4

Sensing, Actuation, and Data Visualization

Members and Responsibilities

  • Blade Roybal
  • Kaimen Walters
  • Steven Jinpeng You
  • Travis Taghavi

Hardware

The hardware used in this project consisted of the NUC, Teensy, and the circuit board for regulating and connecting the sensors to the Teensy. Ubuntu was installed onto the NUC along with the necessary software programs such as SQLite, Boost libraries, and blueman to help read the values from bluetooth consistently. The schematic for the components and the micro-controller is here.

Interfaces and Networking

Four sensors are used to read through the Teensy using the digitalRead/analogRead function.

  • IR Sensor
  • Flow Sensor
  • Relay (Solenoid)
  • Pump

The four sensors are being read through Bluetooth communication, HC-06, and read using blueman functionalities on Ubuntu. The NUC reads and records the values every second and sends the Team ID, IR Sensor reading, Flow Rate, Pump PWM reading, and Solenoid state (relay) into the SQlite database.

The Flow Sensor is implemented using a hall sensor to detect the frequency of the rotations of the internal fan. There is a delay of 1 second in between measurements and the quantity is printed out in L/hour. The output was converted into L/min to compared to the results gathered from timing how long it took to fill a 500mL bottle.

The pump is controlled using Pulse Width Modulation (PWM) ranging from values 0-255. For the testing of the flow rate of the pump, the pump rate was maxed at a value of 255. A more robust version of the PWM code to control the flow rate was implemented after testing. No testing was completed on comparing the flow rate from the flow sensor to actual timing of filling a bottle for various flow rates.

To control the relay, a transistor is needed to supply the necessary voltage of 5v at the appropriate time since the relay would not function properly with the 3.3v supply from the Teensy.

Data Storage and Visualization

A storyboard of the layout was developed on paper and reviewed with team members as well as the other teams to determine a universal look.

This is comprised of a single graph for each of the four sensors, with a plot/line for each of the "devices". This way, someone can view the relative values of all devices in pseudo-real time.

The visualization component was written in C++ using QCustomPlot/Qt. It pulls its values from an SQLite database, which is populated by a client program. The client program polls the available NUCs, each of which is running a server program which will provide a set of the most recent readings for its connected sensors. This information is then pushed to the aforementioned database.

Locally, each NUC should be keeping a database of only its local sensors' values, so that it is able to quickly respond to any requests for data.