(312f) Portable Wet Process Control Laboratory for Every Student's Desk and Home
AIChE Annual Meeting
2017
2017 Annual Meeting
Education Division
Steal This Activity/Demonstration/Assignment
Tuesday, October 31, 2017 - 9:40am to 10:00am
With the dramatic decrease in the price of microcontrollers such as the Arduino and of compatible instrumentation it is now possible to have each student build an inexpensive individual portable wet experimental lab that can be transported between the classroom and home. The only classroom requirement is an adequate supply of power outlets. The software/hardware system described here can be used for an entire series of experiments that form the basis of a Process Control laboratory class or in a class that combines Process Control theory and experiments. The setup also enables a wet lab experience for remote online students.
Using the Arduino UNO microcontroller attached via a USB port to a laptop, a software/hardware system has been designed and tested that controls the temperature of a water-filled cylindrical container with thin walls of high thermal conductivity (e.g., a soda can) by low frequency pulse width modulation (PWM) of a 125W beverage heater (immersion coil). This is done using an enclosed and finger-protected solid state relay. In addition, two 5V fans powered from the Arduino (peak draw current 180 mA each) are used to increase the maximum cooling rate, the fraction of time the heater is on at safe temperatures, and to provide disturbances. The fan velocity can be changed by using Arduino-provided low frequency PWM of a logic-level MOSFET which controls both fans. The temperature is measured using a DS18B20 waterproof sensor. Running an Excel VBA program (PLX-DAQ version 2), the experimental results are continually tabulated and plotted in Excel. Although a version of the class software uses an Excel sheet for the user interface (UI), the preferred version uses the Arduino Serial Monitor. To make this possible, a software serial port is created and connected to a second laptop USB port via a TTL serial to USB cable. The entire cost of the experimental setup (excluding the laptop) is about $80.
The experimental system is shown disassembled for transportation in Fig. 1 and assembled in the classroom in Fig.2. Assembly involves connecting nine DuPont wires and requires less than 5 minutes.
Main Components
1. Temperature Probe
A DS18B20 probe [1, 2] in waterproof housing was selected due to the combination of good performance in the target temperature range and low cost. It is digital and outputs to a single UNO digital input/output pin. It has resolution 9 to 12 bits and requires about 750 ms to complete a reading at the highest resolution. It is supported by the OneWire library originally developed by Jim Studt [3]. The DS18B20 can operate in normal mode or in parasitic mode where it powers up from the communication wire. The normal mode is used and the probe is powered from the UNO 5V pin (the current drawn is only up to 1.5 mA).
2. Immersion Heater and Relay
Safety considerations put an upper limit to the temperature at which the experiments should be run and evaporative losses become significant at higher temperatures. Therefore the target range of heater operation was selected to be 25-60 ËC (and the software implements a safety shutdown if the temperature exceeds 75 ËC). Given these temperatures, a minimal power heater is desired. The lowest-power widely-available heater that could be located is the 125W Lewis N' Clark beverage immersion heater. To manipulate its heating output, a 0-5V input relay is controlled by the UNO using low frequency (the program currently uses 4 Hz) pulse width modulation (PWM). As the setup presented here requires at least 15 minutes inactive time for many experiments, it is intended for usage in a classroom where the instructor lectures while the experiment progresses. This prohibits the selection of noisy electromagnetic relays. Solid state relays (SSRs) are silent, but there is no commercial unit that integrates a suitable SSR with an AC outlet. Several SSRs were investigated and an option is the OMRON G3NA-210B (load 24-240VAC, input 5-24VDC), which is totally enclosed and has finger protection over the screw terminals to prevent user shocks. Its cost is relatively low, it has an LED that indicates when it is closed, and it does not require a heat sink for this application. This relay must be coupled with a power cord (where the heater plugs in), and a polarized two-prong cord is recommended. The hot wire must be separated, cut and stripped, and then connected to the relay screw terminal. Although this is a simple operation, to avoid any danger to the students, a professional or an experienced instructor should connect the power cords to the SSRs.
3. Cooling Fans and Their Control
To increase the maximum rate of cooling and the fraction of time the heater is on in the target temperature range of 25-60 ËC, the water-filled container is sandwiched between two 5V cooling fans (see Fig. 1). The fan speeds can be manipulated via PWM allowing them to be used as disturbance inputs. As the current drawn by each fan is much higher than the 20 mA UNO PWM pins can safely provide, the speed of both fans is manipulated via PWM of a single logic level N-channel MOSFET. A 10 kohm pull-down resistor is used to ensure proper MOSFET output at all times, and two rectifier diodes have been added to protect the MOSFET from reverse voltages as explained in [4, 5]. In addition, a 220 ohm current-limiting resistor has been added to protect the UNO as suggested in [6, 7]. The MOSFET gate is controlled by PWM using an UNO digital pin. To obtain optimal fan performance and reduce fan noise, the PWM frequency had to be lowered from the default 488 Hz to the lowest available, 31 Hz, using the code provided in [8]. To reduce cost and avoid the need of an additional outlet, the UNO is powered through a laptop USB port. In this case the maximum available current is 370 mA. A fan that perfectly satisfies this need is the Evercool EC8025M05CA, which draws a peak current of 180 mA and has a steady draw of 140 mA.
4. Real-Time Output to Excel and User Interface
The Parallax data acquisition tool, PLX-DAQ [9], is a software add-on for Microsoft Excel that can be used for real-time output (and therefore plotting) from the UNO to Excel. Unfortunately, Parallax no longer supports it, and it can only be used with earlier 32-bit versions of Excel. Fortunately, Jonathan Arndt developed a new version of PLX-DAQ with full Office support (32 bit and 64 bit and versions up to Office 2016) [10]. Two versions of the main class software have been developed. One uses an Excel sheet for the UI (Fig. 3). But this interface requires a minimum sampling period of 15 s to properly process inputs from Excel. The second version (Fig. 4) enables sampling periods as low as 3 s by using as UI the Arduino Serial Monitor. To enable two serial communications (one for Excel and one for the Serial Monitor) a second serial port is created via software [11]. A TTL serial to USB cable is required for the software port and the SiLabs CP2102 chip works well with all versions of Windows if the driver instructions posted in [12] are followed.
5. Control Algorithm
The default algorithm used is the velocity form of the PID control law modified so as to remove derivative kick and proportional kick [13]. Low-pass filtering can be used for the derivative term (and is recommended). For instructional purposes, a flag replaces the velocity form with the position form of the PID law. This incorporates anti-reset windup, bumpless tuning changes, and bumpless transition from manual to automatic following methods discussed by Brett Beauregard [14].
Initial Class Offering
The first classroom use of this system will take place this summer in a class of 40-50 students. The introductory lecture will feature a student contest in which they manipulate the heater output manually and must respond to pre-programmed set-point and disturbance changes (the winner is the one who finishes the exercise with the lowest average squared error). Other planned class experiments include experimental determination of the parameters of an energy balance model, obtaining transfer functions from step changes, obtaining transfer functions from pulse changes, feedback performance of different tuning methods, the effect of filtering, and the effect of time delay. In addition, the experimental set-up will be used for homework assignments. The class will be assessed by comparing student test performance to that of the previous simulations-based class offering, and by extensive student surveys.
References
- http://www.best-microcontroller-projects.com/ds18b20.html
- http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
- http://bildr.org/2011/07/ds18b20-arduino/
- http://enricosimonetti.com/control-a-motor-speed-with-arduino/
- http://bildr.org/2012/03/rfp30n06le-arduino/
- http://www.oddwires.com/using-a-mosfet-to-control-a-dc-motor/
- http://fritzing.org/media/fritzing-repo/projects/m/mosfet-motor-example/images/MOSFET%20Motor.png
- http://playground.arduino.cc/Code/PwmFrequency?action=sourceblock&num=2
- https://www.parallax.com/downloads/plx-daq
- https://forum.arduino.cc/index.php?topic=437398.0
- https://www.arduino.cc/en/Reference/softwareSerial
- https://learn.adafruit.com/adafruits-raspberry-pi-lesson-5-using-a-console-cable/software-installation-windows
- http://www2.widener.edu/~crn0001/Engr314/Digital%20PID%20Controllers-2.pdf
- http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction
Fig. 1: The experimental system disassembled for transportation.
Fig. 2: Assembled experimental system in the classroom.
Fig. 3: Excel tabular and plot output with Excel sheet as the UI.
Fig. 4: Excel tabular and plot output with Serial Monitor as the UI.