Ammonia Click Board™
Product Code: MIKROE-4151
How Does The Ammonia Click Board™ Work? The Ammonia Click Board™ uses the MQ-137 gas sensor from Hanwei Electronics, which uses the SnO2 (tin-oxide) alloy, which decreases its resistance while exposed to the NH3 gas. The greater the NH3 concentration is, the more conductive this material becomes. This can be utilized to obtain the NH3 concentration readings. The sensor itself contains a small heating element, connected to 5V power supply. For lower power consumption the heater element can be controlled via a MOSFET power switch, connected to the PWM pin on the mikroBUS™ socket. It needs to be preheated for minimum 24h before it can perform as specified. The sensor is protected against particles and mechanical damage by a stainless mesh, however, exposing to excessive moisture and corrosive gases can damage the inner structure. The measuring circuit consists of the MQ-137 sensor, a power source and a load resistor (RL) between the output pin and GND. The sensor with its internal resistance forms a voltage divider with the load resistor.
The RL is designed as a variable resistor, allowing the output voltage to be trimmed to the desired value. The calibration should be performed in controlled conditions, as the resistance of the sensor is affected by both the ambient temperature and humidity. The sensor can be used to measure relative NH3 concentration change without an accurate calibrating, which is useful for building applications that can be used as warning systems. The middle tap of the sensor RL voltage divider is routed to an SMD jumper labeled as ADC SEL. This jumper can be used to redirect the measuring voltage either to the ADC for sampling or to the AN pin, so it can be used in an external circuitry (external ADC or some other form of measurement signal conditioning).
The MCP3551, a 22bit sigma-delta ADC from Microchip is used to sample the output of the sensor when selected by the ADC SEL jumper. This ADC converts the input voltage with a very high resolution of 22 bits and low noise, to a digital data, which can be obtained via the SPI interface of the Click board™. This ADC uses the reference voltage which is the same as the power supply voltage, and in this case, it is powered by 5V from the mikroBUS™ power rail. The reference voltage is used to calculate the value of the input voltage based on data received from the SPI bus, by using the following formula:
VSENS = DATA x VREF / FS
VREF is the same as the power supply for this circuit, which means VREF = 5V, and the highest number written with 22 bits (FS) is 4,194,303. DATA is the 22-bit conversion value. As already mentioned, the ADC uses a 5V power supply. Therefore, this board needs a level conversion circuitry in order to be interfaced with 3.3V MCUs. The Ammonia Click Board™ uses the TXB0106 IC, a 6-bit bidirectional level shifting IC from Texas Instruments, which is used to shift communication logic voltage levels from 5V to 3.3V. The voltage shift depends on the reference voltage on the VCCA pin, which can be selected with the SMD jumper, labeled as the VCC SEL.
SPECIFICATIONS
Type
Gas
Applications
It can be used in different Ammonia concentration detectors for air quality control, or for gas leak detection.
On-board modules
The Ammonia Click Board™ uses the MQ-137, a high accuracy Ammonia sensor, from Hanwei Electronics.
Interface
Analog,GPIO,SPI
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V,5V
PINOUT DIAGRAM
This table shows how the pinout on the Ammonia Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes
Pin
Pin
Notes
Analog Out Pin
AN
1
AN
PWM
16
PWM
Sensor Heater Enable
NC
2
RST
INT
15
NC
Chip Select
CS
3
CS
RX
14
NC
SPI Clock
SCK
4
SCK
TX
13
NC
SPI Data Out
SDO
5
MISO
SCL
12
NC
NC
6
MOSI
SDA
11
NC
Power Supply
3.3V
7
3.3V
5V
10
Visit the Debug Store website for more information on Ammonia Click Board™