project2 team1 - CourseReps/ECEN489-Fall2015 GitHub Wiki
Project 2 - Team 1
PCB Design, PID Control & 3-D Modelling
Team Members
- Abhay Anand
- Kartic Bhargav
- Thomas Branyon
Responsibilities
1. PCB Layout Design & Fabrication
The first PCB design relied on soldering wires into thru-holes. This was a poor design and likely caused some of the issues that made the initial design ineffective. The second design is shown below:
This design calls for screw terminals to connect the motor and peripherals. It has optional inputs for a second motor/pump drive, a solenoid, and a flow sensor, in addition to the standard pump and IR connections. The top and bottom layer are filled in with GND pours, which are tied together all around the board with vias to improve EMC/EMI performance and ensure the ground planes don't drift apart in voltage (ground shift). Capacitors were added to the input and output of the voltage regulator to improve voltage regulation and noise performance.
2. Input Signal Processing and Pump Actuation
There are two inputs for this system:
- IR Sensor: The IR sensor senses the distance to current water level in the tank.
- Water Level Setpoint: This is a user-defined input that accepts a desired setpoint for the expected height of water in the tank (measured from the bottom).
The IR sensor gives an analog voltage output - the closer the object, the higher the voltage output and vice versa. This analog voltage is read on a 10-bit analog-in pin on the Teensy (min:0 and max: 1023). We observed a large fluctuation for the IR sensor values (about +/-100) for a steady height of water level. To dampen this fluctuation, a low-pass filter is used. This filtered value is considered as the IR Input.
Calibration of the IR sensor is done by setting a measured level of water and reading the IR input on the Teensy. These values were exported into a spreadsheet and an equation relating the height and IR sensor values was obtained.
height = 32.222 * pow(IRvalFilt, -1.327)
To smoothen out the flow required to reach the height of water level specified as input, a PID controller is used. The PID controller was tuned using the Ziegler–Nichols method. The obtained coefficients were:
Kp = 20
Ki = 4
Kd = 2
3. Data Visualization and Qt Control
The Teensy is serially connected with a Bluetooth module (BC-06). Every 200ms, Qt reads (via Bluetooth), from the Teensy, the current height of water and displays the same. The setpoint is a user input value and when there is a change in value, this setpoint is sent (via Bluetooth) to the Teensy as the latest setpoint.
The interface is designed such that both the setpoint and current height can be visually compared to determine the accuracy of the controller.
4. 3-D Modelling using SolidWorks
A few components that were needed to connect the provided apparatus were designed & printed. The list of components modeled is as follows:
a) Funnel to connect the Flowtube with the TopTank: This also included additional facility to mount the funnel onto the SupportTube and connect the FeedbackTube.
b) Lid for the TopTank: This included room to insert the nozzle extending from the TopTank as well as adquate thickness to mount the IRSensor at the bottom.