Single CMOS Sensor System for High Resolution Double Volume Measurement Applied to Membrane Distillation System M. G. Lorenza, M.A. Izquierdo-Gilb, R. Sanchez-Reilloa, C. Fernández-Pinedab aDept. de Tecnología Electrónica, Universidad Carlos III, E-28911 Leganés (Madrid), Spain; bDept. de Física Aplicada I, Universidad Complutense, E-28040 Madrid, Spain ABSTRACT Membrane distillation (MD) [1] is a relatively new process that is being investigated world-wide as a low cost, energy saving alternative to conventional separation processes such as distillation and reverse osmosis (RO). This process offers some advantages compared to other more popular separation processes, such as working at room conditions (pressure and temperature); low-grade, waste and/or alternative energy sources such as solar and geothermal energy may be used; a very high level of rejection with inorganic solutions; small equipment can be employed, etc. The driving force in MD processes is the vapor pressure difference across the membrane. A temperature difference is imposed across the membrane, which results in a vapor pressure difference. The principal problem in this kind of system is the accurate measurement of the recipient volume change, especially at very low flows. A cathetometer, with up to 0,05 mm resolution, is the instrument used to take these measurements, but the necessary human intervention makes this instrument not suitable for automated systems. In order to overcome this lack, a high resolution system is proposed, that makes automatic measurements of the volume of both recipients, cold and hot, at a rate of up to 10 times per second. Keywords: 3D measurement, 3D sensing, 3D Data processing, CMOS image area sensor, FPGA, DSP, Membrane distillation. 1. INTRODUCTION Membrane distillation (MD) [1] is a relatively new process that is being investigated worldwide as a low cost, energy saving alternative to conventional separation processes such as distillation and reverse osmosis (RO). This process offers some advantages compared to other more popular separation processes, such as: working at room conditions (pressure and temperature); low-grade, waste and/or alternative energy sources such as solar and geothermal energy may be used; a very high level of rejection with inorganic solutions; small equipment can be employed; etc. The driving force in MD processes is the vapor pressure difference across the membrane. A temperature difference is imposed across the membrane, which results in a vapor pressure difference. The lower vapor pressure on the permeate side can be set up in various ways: direct contact MD (DCMD) [2], osmotic MD (OMD) [3], sweeping gas MD (SGMD) [4], vacuum MD (VMD) [5], and air gap MD (AGMD) [6,7]. In DCMD, hot temperature solution (feed) is brought into contact with one side of the membrane and cold solution (permeate) into contact with the other, so that the vapor pressure is different at each side of the membrane. This pressure difference drives the vapor through the membrane pores, and then the vapor condenses in contact with the cold solution on the other side. The hydrophobic nature of the membrane prevents the penetration of the liquid solution into the pores unless a higher pressure than the so-called liquid entry pressure (LEP) is applied. This is one of the major restrictions in MD processes. In membrane distillation processes different transport mechanisms may be involved: Knudsen flow, viscous flow, ordinary diffusion and surface flow. In Knudsen flow the molecules of different species move entirely independently of each other and there is no fundamental distinction between flow and diffusion. Viscous flow means that portion of the gas flow in the continuum region due to a pressure gradient. Finally, the air trapped within the membrane can be considered as a stationary film and as a result, the steady-state diffusion of water vapor through that film occurs. The experimental setup used in the DCMD experiments is shown in Fig. 1. Feed and permeate solutions were contained in two double-wall reservoirs (1). Both solutions were driven by both variable flow gear pumps (8). The flow rate was measured with a liquid flow sensor (5) set at the inlet and outlet of both semicells. The pressure was measured at both Videometrics IX, edited by J.-Angelo Beraldin, Fabio Remondino, Mark R. Shortis, Proc. of SPIE-IS&T Electronic Imaging, SPIE Vol. 6491, 64910P, © 2007 SPIE-IS&T · 0277-786X/07/$15 SPIE-IS&T/ Vol. 6491 64910P-1 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 11/10/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx tij ————.. Sn sides of the membrane inside of the cell, using digital pressure transducers (4). The temperature control was achieved using thermostats (2) connected to the reservoirs. The temperature was measured at both sides of the membrane, at the inlet, inside and at the outlet of the cell, using Pt-100 probes (7). In order to improve the thermostatization process two heat exchangers (3) were connected between the reservoirs and the thermostats. One of the main experimental measurements in DCMD processes is the mass flow through the membrane. During the experiment the liquid level in both reservoirs (feed and permeate) is changing. These levels must be measured at regular time intervals. The volume flow through the membrane is determined from the temporal evolution of the liquid level in the reservoirs. The permeate flux is calculated by plotting the cumulative volumes, multiplied by their respective densities, versus time. This procedure also provides a means for detecting membrane wetting or excessive evaporation from the reservoir. Fig. 1. Experimental setup. Double-wall reservoirs (1), Thermostats (2), Heat Exchangers (3), Digital pressure transducers (4), Liquid flow sensor (5), Membrane Cell (6), Pt-100 probes (7), Variable flow gear pumps (8) 6 1 2 PermeateFeed 2 7 5 7 1 5 7 55 7 3 3 8 8 7 44 7 SPIE-IS&T/ Vol. 6491 64910P-2 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 11/10/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx LASER - WATER LEVEL WATER LEVEL B The accurate level measurement is one of the main problems in this kind of processes. At the moment this level is measured with a cathetometer, with up to 0,05 mm resolution, but it requires the necessary human intervention. This makes impossible the complete automation of the process. The rest of measurements such as, temperatures, flows, pressures have already automated by means of a data acquisition system (consisting of a Digital Multimeter Keithley 2700 and a 40-channel differential multiplexer module). The flow sensors are made of a rotatory turbine with a pulsed output signal, whose frequency is proportional to the flow going through it. The pressure transducers have an analogical output 4-20 mA. The output signal for temperature sensors are resistances. All these signals are acquired by the Digital Multimeter through the multiplexer module. At the moment it has been impossible to find any commercial level meter suitable for our system, or the accuracy that they offer is not enough to detect the small changes in the liquid level. In order to overcome this lack, a high resolution system is proposed, that makes automatic measurements of both reservoirs, cold and hot, at a rate of up to 10 times per second. 2. METHODOLOGY In order to overcome the lack in water height measurement in the reservoir, a triangulation based system is proposed. In this system a laser line is projected trough the reservoirs. Fig. 2. The laser penetrates into the water and follows the direction determinates by Snell’s law. The laser also penetrates into the air and follows the direction determinates by Snell’s law, but in this case, the refraction index is different, and also the direction. The water surface acts like a mirror generating a discontinuity in the laser line projected in the screen. This discontinuity allows the measurement of the water height. Fig. 2. Laser projection trough the water reservoir. A) Maximum water level. B) Water level under measurement. In this system the laser is adjusted leveled in the maximum height of the water level. If this level decreases a distance A, the projection line of the laser increases a distance B. As shown in Fig.2.B The level B is a measurement that can be calculated: sinB D a (1) The distance D is a geometrical constant of the system and B is the distance to be measurement. sin Ba D (2) SPIE-IS&T/ Vol. 6491 64910P-3 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 11/10/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx SCREEN LASER LASER The water level A is calculated from Fig. 2.B: ( ) sinA D C a (3) From Eq (2): (1 )CA D B (4) The parenthesis in Eq. (4) is a geometric constant of the system, and can be used as multiplier of the system’s sensitivity. If this quotient increases, the projected laser line increases the distance B accordingly. So the measurement of the distance B can be performed with greater accuracy. This geometrical principle is applied to both reservoirs as follows. 3. SYSTEM IMPLEMENTATION The physical system is implemented as shown in Fig. 3. Two Lasers with line output, one for each reservoir, are fitted to the system. The line of the lasers is projected in a screen through the reservoirs and lines projected in the screen are recorded by the digital camera. Fig. 3. Experimental Layout The level acquisition system is implemented in three blocks: A CMOS camera board, a FPGA (Field Programmable Gate Array) board, and a DAC (Digital analog converter) board, as shown in Fig.4. A standard VGA monitor is used for control and visualization purposes. 3.1 CMOS camera The camera board uses a CMOS camera chip from Micron Fig.5.B [8]. The MT9T001 camera chip is a QXGA-format ½-inch CMOS active-pixel digital image sensor with an active imaging pixel array of 2,048H x 1,536V. It incorporates sophisticated camera functions on-chip such as windowing, column and row skip mode, and snapshot mode. It is programmable through a simple two wire serial interface. The sensor can be operated in its default mode or programmed for frame size, exposure, gain setting, and other parameters. The default mode outputs a QXGA image at 12 frames per second (fps). An on chip analog-to-digital converter (ADC) provides 10 bits per pixel. The lens is a high definition lens from Pentax in C-format Fig.5.A. The focal length has been chosen to get a field of view of approximately 50 mm V x 35 mm H. SPIE-IS&T/ Vol. 6491 64910P-4 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 11/10/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx CMOS CAMERA FPGA BOARD : 0/A CONVERTER PROPOSED SYSTEM VGA MONITOR > * Fig. 4. System Diagram 3.2 FPGA Board A Xilinx FPGA board has been chosen to host the double level acquisition system. The Xilinx Spartan-3 Starter board provides a powerful, self-contained development platform for the design [9]. It features: a 200K gate Xilinx Spartan-3 FPGA with twelve 18-bit multipliers, 216Kbits of block RAM, and up to 500MHz internal clock speeds, 1M-byte of Fast Asynchronous SRAM, for image memory and a VGA port for image visualization. The board has three 40-pin expansion connectors where the CMOS camera and the Digital analog converter are plugged. Fig.5.A. Fig. 5. A) FPGA board with Camera attached. B) Camera detail without Lens 3.3 Digital Analog Converter In order to fulfill backwards compatible with the system is necessary converting the level measurements in an analog voltage. These analog voltages, from both levels, must be connected to the Keithley 2700 Digital Multimeter in a 40- channel differential multiplexer module, in order to control automatically the system. An especially designed Digital Analog Converter board, DAC board, has been designed. This board uses a double output digital analog converter from Maxim MAX5230 [10]. The DAC has a 12 bit resolution with a voltage range from 0 to 2,04750 V in 0,0005 steps, 4096 steps in total. SPIE-IS&T/ Vol. 6491 64910P-5 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 11/10/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx 4. SYSTEM OPERATION Before the system can operate it is necessary a previous adjustment of the image values, as follows. 4.1 System adjustment It is necessary a previous adjust of the system. The camera takes a picture of the projected laser lines in the screen and is displayed in the VGA monitor. The operator with the pushbuttons of the FPGA board selects the correspondent areas in the image. It is necessary to select initial level, vertical index, and the positions of both laser lines, horizontal index. Once both areas are selected, and then are stored in the internal memory of the FPGA board. With these data the control system calculates the windows necessary to perform the level acquisition. In this way the system only take a reduced part of the 3 Mega pixel image, actually about 20000 pixels per laser line. 4.2 System operation Once the system has been adjusted, begins the normal operation mode. The CMOS camera controlled by the FPGA Board begins to takes images. The images are stored in the SRAM of the FPGA Board, and then processed. The image processing includes image filtering, threshold level adjustment and edge detection. Once the edge of the laser line is detected the relative position is calculated. Due the lens distortions a linearization is mandatory. A scaling factor is necessary, 1 C D as in Eq 4; the linearization includes this scaling factor. After this linearization the data is send to the Digital analog converter board and introduced in the Keithley control of the distillation system. In presence of waves on the water surface, the water tilts produces errors in the measurements In this case it is necessary a statistical treatment of the measurements. The operator can choose from the median of the last 1, 8, 32, or 128 measurements, depends on the frequency amplitude of the waves The FPGA board allows a concurrent operation, the acquisition of the image and the processing of the data can be performed simultaneously. With microprocessor of Digital Signal Processor systems this is not possible but in expensive multiprocessors high end systems. 5. EXPERIMENTAL RESULTS In Fig.6 can be seen the laser line projected in the screen, with the laser in orthogonal to the reservoir. In Fig. 6.A. the image is taken with full automatic control from the CMOS camera chip. It is necessary a manual adjustment of the Fig. 6. Images from projection screen with laser line orthogonal to the reservoir. A) Without threshold adjustment. B) Partial threshold adjustment. C) Total threshold adjustment SPIE-IS&T/ Vol. 6491 64910P-6 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 11/10/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx image illumination threshold. In Fig. 6.B. a partial threshold adjustment has been performed. In the middle of the picture can be seen the level of the reservoir. In Fig. 6.C. can be seen the picture after complete adjustment. In the middle is clear visible the interruption of the laser line. In Fig.7 the laser line strike in a tangential manner at the reservoir, as in Fig.3. In Fig.7.A, several scattered light lines can be seen, from reservoirs inner and outer walls, water surface, etc... This scattered light must be filtered before any calculation. In Fig.7.B, the threshold adjustment has been performed. The lines have a clearly visible horizontal gap. This gap makes that the measurements are easily performed. With the sensor resolution 2048 pixels in vertical size, and a field of view of aprox 50mm, the resolution achieved is 0.0244 mm. This resolution can be incremented using sub pixel techniques. The measurement data rate is up to aprox 10 times per second several orders of magnitude better than the cathetometer method, and completely automatic. Fig. 7. Images from projection screen with laser line tangential to the reservoir. A) Without threshold adjustment. B) Total threshold adjustment 6. CONCLUSIONS A high resolution systems is proposed, that makes automatic measurements of the volume of both recipients, feed and permeation, at a rate of up to 10 times per second. Only one 3.1 Mpixel CMOS area sensor is used, connected to an FPGA Board. The FPGA is programmed with a specially tailored control system. This complex control system includes: camera control, image acquisition, image processing, image data extraction, linearization of data, and statistical processing of the data. A specially designed line-laser illumination system makes possible the use of only one area sensor for both recipients, making the system simpler and cheaper, less than 500$. The system is easily calibrated using a VGA monitor where the measurement image is presented. The measurements have an accuracy and resolution, better than the cathetometer (0,025mm). However higher resolution can be increased with sensors with more resolution or stacking additional sensors or using sub pixel techniques. During operation appears water surface tilts caused by vibration, these tilts are canceled trough statistical treatment of the measurement data [11]. The accumulator-multipliers embedded in the FPGAs, and the parallelism in the operations inside the FPGA makes possible to design a specifically system, which calculates the statistical treatment at higher throughput and lower cost, than conventional microcontroller or DSP (Digital Signal Processor) systems. SPIE-IS&T/ Vol. 6491 64910P-7 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 11/10/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx REFERENCES 1. K.W. Lawson and D.R. Lloyd, Review: Membrane distillation, J. Membr. Sci., 124 (1997) 1. 2. M.A. Izquierdo-Gil, M.C. García-Payo and C. Fernández-Pineda, Direct contact membrane distillation of sugar aqueous solutions, Sep. Sci. Technol., 34 (9) (1999) 1773. 3. J.I. Mengual, J.M. Ortiz de Zárate, L. Peña and A. Velázquez, Osmotic distillation through porous hydrophobic membranes, J. Membr. Sci., 82 (1993) 129. 4. M. Khayet, P. Godino and J.I. Mengual, Nature of flow on sweeping gas membrane distillation, J. Membr. Sci., 170 (2000) 243. 5. M.A. Izquierdo-Gil, G. Jonsson, Factors affecting flux and ethanol separation performance in vacuum membrane distillation (VMD), J. Memb. Sci., 214 (2003) 113. 6. M.A. Izquierdo-Gil, M.C. García-Payo and C. Fernández-Pineda, Air gap membrane distillation of sugar aqueous solutions, J. Membr. Sci., 155 (1999) 291. 7. M.C. García-Payo, M.A. Izquierdo-Gil and C. Fernández-Pineda, Air gap membrane distillation of aqueous alcohol solutions, J. Membr. Sci., 169 (2000) 61. 8. Micron Technology, Inc. MT9T001 - 1/2-Inch 3-Megapixel Digital Image Sensor, http://www.micron.com 9. Xilinx Inc. Spartan-3 Starter Kit Board User Guide, http://www.xilinx.com 10. Maxim Integrated Products MAX5230/MAX5231 12bits dual DACs Datasheet, http://www.maxim-ic.com 11. H. Maas, B. Hentschel, and F. Schreiber, Optical triangulation method for height measurements on water surfaces Videometrics VII Volume 5013 pp. 103-109. SPIE-IS&T/ Vol. 6491 64910P-8 Downloaded From: http://proceedings.spiedigitallibrary.org/ on 11/10/2015 Terms of Use: http://spiedigitallibrary.org/ss/TermsOfUse.aspx