More information about NDIR sensors are avaiable in article Non-Dispersive Infrared (NDIR) gas sensors. The IR gas sensor contains a lamp which is pulsed at low frequency by a lamp drive circuit. The pulses of infrared radiation reflect internally to provide a long path through the target gas. Pyroelectric detectors (pyros) are used to detect the change in infrared signal. The active pyro is sensitive to changes at IR wavelengths which are typically absorbed by the gas being detected. The reference pyro is sensitive to changes at a nearby IR wavelength which is not absorbed by the gas being detected.
It is well known that many gas molecules can absorb radiation in the infrared portion of the electromagnetic spectrum. When infrared radiation is incident on the gas, the energy states of atoms vibrating in the molecules change in discrete steps when the wavelength of the infrared matches the molecules natural frequencies or resonances. Put simply, the vibrations of atoms held in their chemical bonds increase when excited by light of the right wavelength.
The 12-bit Analog-to-Digital Converter (ADC) allows conversion of an analog input signal to a 12-bit digital number. This module is based on a Successive Approximation Register (SAR) architecture and provides a maximum sampling rate of 200 ksps. The A/D module has up to 16 analog inputs which are multiplexed into a sample and hold amplifier. The output of the sample and hold is the input into the converter which generates the result.
This is basic example on how to send and receive data over dsPIC30F UART peripheral. It is easy to understand and if you have not worked with UART on microcontroller before, it is good starting point. In article UART - usage of registers we have explained details of register usage.
We will show how to send charachters, decimal values and strings and how to recive one charachter via UART. You can download whole project for MPLABX and try it at your own solution.