An Arduino-based Smart Transducer Interface Module for Toxic Gases
Transcription
An Arduino-based Smart Transducer Interface Module for Toxic Gases
Better Data from Smarter Sensors: An Arduino -based Smart Transducer Interface Module for Toxic Gases TM Ken McGary | Nerds for Nature | Citizen Science Association 2015 | San Jose, CA Introduction Materials & Methods Results We are challenged to monitor a growing array of environmental factors in more remote locations with smaller budgets. Commercial equipment can produce impressive results — but at great expense. Open source tools like Arduino and cheap sensors from popular DIY sources promise more affordable and adaptable solutions. Yet the resulting projects are typically time-consuming to build, not reliable in the field, and produce dubious data without traceable calibration. How can we bridge the gap? Prototypes strongly suggested that an Analog Front End chip coupled with a precision, programmable data acquisition IC could perform most of the required linear circuit functions with adequate precision. The echem328 Smart Transducer Interface Module (STIM) can autonomously sense atmospheric or process concentrations of a target gas with low noise and impressive resolution. Many circuit options are selectable by jumper or software modification. The connectors and mounting holes are all on a 0.1” grid for easy stacking and prototyping. A universal pad layout on the back accepts sockets for most gas-sensing echem cells available from Alphasense, SGX Sensortech, DD Scientific, City Tech, and others. Objectives Develop an open, highly-integrated smart sensor platform that approaches the accuracy of commercial instruments costing much more, while providing ease of use and versatile mounting, programming, and interface options in embedded and DIY apparatus. An Analog Front End (AFE) monolithic circuit from Texas Instruments (LMP91000) provides a programmable electrochemical potentiostat and current-to-voltage converter (transimpedence amplifier) in a tiny leadless package. This 3x4mm device replaces most of the Alphasense circuit board in the previous image. Diagram from Texas Instruments A common microcontroller (ATMega328P) was chosen due to low cost and power consumption as well as compatibility with ubiquitous Arduino tools and libraries. The schematic and four-layer board layout were designed using KiCAD. Comparison of sensitivity (nA/ppm) to zero offset current at 20C (nA) for a batch of fifty Alphasense CO-B4 carbon monoxide sensors demonstrates excellent manufacturing process control of both paameters but no clear correlation between the two. Data from Alphasense, Inc. High-quality electrochemical toxic gas sensors from Alphasense (<$100 in volume) are suitable for atmospheric-level sensing, with performance similar to expensive gas analyzers: ● ● ● ● ● ● The complex four-layer PCB design provides excellent noise shielding and ensures signal integrity. The board is compact (1.75" square, 2.35" diagonal) and consumes little power (<10mA max@ 3.3V). Low noise and ppb-level sensitivity Low cross-sensitivity to other species Extremely linear and repeatable response Initial 1% sensitivity and zero offset calibration Zero offset compensation via an "Aux" pin Available for CO, NO, NO2, O3, SO2, H2S It can also interface with other sensors and perform other remote sensing and data acquisition functions. Estimated $129 retail price as shown (without sensor). Functions contained within 3 in3 include: ● Standard Arduino MCU ● Echem Analog Front End ● Real Time Clock with battery and recharger ● Quad differential-mode 16-bit A/D Converter ● Programmable Gain Amplifier ● 64KB of EEPROM for data logging ● Low-noise 5V/3.3V regulator ● Precision 2.048V reference ● Precision op-amp for aux pin ampifier or other functions ● Three status LEDs ● Spare analog and digital pins Noise and signal resolution approaches that of an Alphasense ISB used with commercial data acquisition equipment. Better signal processing software shows promise of meeting or exceeding the remaining performance gap. Early field test results were promising. A bicycle ride near an SF freeway showed reasonable fluctuations. A short car ride demonstrated trapped CO from the exhaust, which dissapated after opening windows. Conclusions Increased design effort and higher board complexity/miniaturization coupled with modern linear ICs and well-supported standardized platforms like Arduino and other open source design tools can result in compact, self-contained, versatile, easy-to-use, and accurate sensing modules with decreased overall cost. Next Steps Software integration with the calibration rig will allow automated, traceable calibration routines. Improved signal processing software will increase signal resolution and analysis options. The echem328 forms the core of 25 air quality monitoring stations now being deployed in the Louisville, KY metro area. We seek collaboration with researchers, schools, public agencies, and community groups. We are also developing other types of smart sensor modules and integrating them into remote networks. References Top layer contains most signal routing as well as power input along the top edge. ● Enviromental Monitoring Sysems: A Review -- by Kumar, Kim, and Hancke, Univ of Pretoria (STIMs using echem sensors). ● Towards Plug-and-Play Functionality in Low-Cost Sensor Networks ITEE, Univ of Queensland. ● SEMAT — The Next Generation of Inexpensive Marine Environmental Monitoring and Measurement Systems, Univ of Queensland et al ● 1451.5-2007 - IEEE Standard for a Smart Transducer Interface for Sensors and Actuators ● Stack: A Modular Platform for High Density Wireless Sensing -- MIT Media Lab Responsive Environments Group Inner ground layer provides a lowimpedence power return path and excellent noise shielding. Acknowledgments An early normalized step-test comparison between the Alphasense COB4 and a cheaper, less sensitive model from DD Scientific shows a dramatic difference in noise vs response time. An off-the-shelf approach to logging gas sensor data (cw from top right): ● ● ● ● ● ● ● Alphasense Individual Sensor Board (ISB) -- $150 Chronodot Real Time Clock module -- $18 AdaFruit ADS1115 16-bit A/D Converter & PGA module -- $15 Arduino Uno board -- $25 EEPROM, voltage reference, op amp (not shown) -- $10 Other circuitry, connectors, and hardware (not shown) -- $10 Time and effort to get it all wired up and working properly -- plenty! However, careful circuit and system design is required to minimize noise from multiple sources and other errors such as thermal drift and self-heating. Also, "echem" sensors can be sensitive to the deployed climate, so methods of monitoring sensor health and confirming proper operation over time are required to ensure data quality. Inner power layer cutouts for echem sensor pads and sensitive analog/AFE circuits significantly reduce coupled noise from digital power transients. Bottom layer provides limited signal routing and an analog ground plane that is connected to the inner ground plane only at the voltage regulator, upper right. A calibration rig was devised using Sensirion SFC4100 mass flow controllers managed by an Arduino Mega2560 board. Pre-mixed CO calibration gas at a nominal 10ppm or 50ppm by volume was metered and mixed with N2 balance gas into a smallvolume (~100mL) exposure chamber to acheive sophisticated step response tests. ● Manylabs, Inc/Peter Sand and Elliot Dicus -- vital and significant technical and project support. ● Robert Wood Johnson Foundation -- crucial funding via grant Identifying regional environmental drivers of asthma and COPD and improving outcomes in Louisville, Ky. ● Creative Commons/Puneet Kishor -- effective advocate for open data and Louisville AQ project. ● HEDLabs/Shaun Houlihan -- inspired prototype boards and design input. ● Azonde/Neil Hancock -- poster review and thoughtful feedback. ● Ed Brownson -- helpful editing assistance and insight. ● Nerds for Nature -- passionate nerds discussing and trying Big Ideas. About the Author Ken is an electronics engineer and lifelong tinkerer who has worked for leading aerospace, telecommunications, and biomedical companies. For over a decade he helped neuroscientists develop research apparatus at the UCSF School of Medicine. Now he’s developing Clever Circuits for Serious Science. Initial 100ppb step testing shows results similar to the Alphasense COB4 datasheet, with a bit more noise. Error from the calibration rig starts to show up here as well, with some slightly malformed steps due to flow controller error. KenMcGary orcid.org/0000-0002-6697-8509