SSZT637 August   2018 MSP430FR2355


  1.   1
  2.   2
    1.     3
    2.     Additional Resources

Mitch Ridgeway


It’s hard to imagine that throughout most of the 20th century, canaries were used as toxic gas detectors to monitor the air in coal mines. Miners brought canaries down into the mines with them and listened to their continuous singing as an indication that the air was safe to breathe. There were no electronic devices dedicated to gas detection – or any type of air-quality monitoring, for that matter.

Toxic gas and particulate matter (PM) with a diameter less than 2.5µm (PM2.5) are harmful to human health when inhaled. But since it’s not possible to see or smell most toxic gases or PM2.5, how can you protect yourself? Thanks to advances in modern technology, there are now much more reliable and accurate systems for detecting harmful substances in the air.

Gas detectors use electrochemical cells to detect the presence of toxic gases. These electrochemical cells consist of three electrodes immersed in an electrolyte solution, which is dispersed throughout the entire cell (Figure 1). When a toxic gas penetrates the gas diffusion barrier, the gas will either oxidize (lose electrons) or reduce (gain electrons) when it interacts with the working electrode. This interaction will create a current between the counter electrode and the working electrode through the electrolyte solution; thus, monitoring the current change can detect the presence of toxic gases. A reference electrode ensures that the performance of the working electrode does not degrade over time.

GUID-3B60BF2E-ACFA-44EF-930E-A1F90AE27998-low.png Figure 1 Electrochemical Cell

One way to design a PM2.5 detector is to use an optical-based method. A light source (like a light-emitting diode [LED]) projects light onto the particles, and a detector (like a photodiode) detects the amount of light scattered or absorbed by the particles. The photodiode outputs a current depending on how much light it detects, and like the gas detector, a change in that current indicates the presence of PM2.5.

Gas and PM2.5 detectors call for very similar designs – converting the current output of a sensor into a voltage that a microcontroller can process. Figure 2 shows the conversion of current from a photodiode into a voltage for sampling by an analog-to-digital converter (ADC) or comparator. The output current of the photodiode feeds into a transimpedance amplifier to convert it into a voltage. Next, this voltage feeds into a second-stage operational amplifier (op amp) to provide gain so that the ADC can properly sample the voltage. This same principle applies to electrochemical cells in gas detectors.

GUID-C3ED3DB7-F63B-4B3C-A7F8-2611E4EC6494-low.png Figure 2 Photodiode Transimpedance Op-amp Configuration

As I mentioned in my previous post on designing smoke detectors, the MSP430FR2355’s Smart Analog Combo (SAC) peripheral is a great choice for designing a wide range of gas, PM2.5 or smoke detectors. The SAC peripheral lets you configure as many as four internal op amps (each with programmable gain and a digital-to-analog converter [DAC]) into many different modes, including general-purpose mode, buffer mode, noninverting programmable gain amplifier (PGA) mode, inverting PGA mode and DAC mode. Having access to four internal op amps lowers bill-of-materials costs and saves printed circuit board (PCB) space.

Figure 3 shows how to configure the MSP430FR2355 for a PM2.5 detector design. The first SAC module is configured in general-purpose mode with a DAC for bias voltage to create a transimpedance amplifier. This converts the photodiode current into a voltage. The second SAC module is configured in an inverting amplifying stage to provide gain to the signal before feeding it into an ADC or comparator. You can also apply this configuration to the electrochemical cells in gas detectors.

GUID-7903C040-20C9-4DFC-AEB4-15E85BF2244E-low.png Figure 3 Using SAC Modules for Photodiode Current Conversion

The MSP430FR2355 is optimized for low power, so you can be confident about getting long battery life in your detector designs.