Summary of MQ-8 Hydrogen Gas Sensor Circuit Built with an Arduino
This project shows how to build a hydrogen gas sensor circuit using an MQ-8 sensor and an Arduino to detect hydrogen (H2). The MQ-8 board provides Vcc, GND, AOUT (analog output) and DOUT (digital output). Power connects to Arduino 5V and GND; AOUT to analog pin A0; DOUT to digital pin D8. When gas exceeds a threshold, DOUT goes high and the Arduino can light an LED. The sensor board includes an adjustable potentiometer to change the digital trigger threshold. The MQ-8 board is recommended over the bare sensor for easier integration.
Parts used in the Hydrogen Gas Sensor Circuit with an Arduino:
- MQ-8 Hydrogen Gas Sensor (recommend complete MQ-8 sensor board)
- Arduino
- LED
In this project, we will go over how to build a hydrogen gas sensor circuit with an arduino.
The hydrogen gas sensor we will use is the MQ-8 sensor. This is a sensor that is sensitive to effects of hydrogen gas.
Hydrogen gas (H2), at room temperature and under standard pressure conditions, is tasteless, odorless, and colorless.
Hydrogen gas is receiving very special attention now because hydrogen is being used as an alternative energy source to operate certain new automobiles coming out in the auto industry now. The chemical energy of hydrogen is converted by a combustion method similar to current engines or in a fuel cell which produces water and electricity by reacting hydrogen with oxygen. Engineers and car manufacturers are researching the possibility of using hydrogen gas as a viable car fuel.
Hydrogen can also be a potential danger to human beings. Hydrogen can be a spark for fires when mixed with air.
For this reason, either for its beneficial and its potentially detrimental effects, hydrogen is something that can be very important to monitor and measure.
If building a engine running off of hydrogen, then you definitely need to measure the amount of hydrogen gas input into the engine.
If working in an environment with with the potential for great hydrogen emission and flame spark capability, then hydrogen gas should be monitored and measured, for safety purposes.
Though more precision may be needed than what an MQ-8 hydrogen sensor offers, it’s a good start to get crude estimates for the amount of hydrogen in a given environment.
So having this overview of hydrogen gas, we can see its importance and why we would want to measure the amount of hydrogen gas that may be present.
So we will now build our hydrogen gas sensor circuit.
Components Needed
- MQ-8 Hydrogen Gas Sensor
- Arduino
- LED
The MQ-8 can be obtained very cheaply, just a few bucks. A good place to look for it is on ebay, which always has auctions on them for the $2-$3 range.
Important, it is recommended that you do not obtain the standalone sensor but the whole MQ-8 board. This is because if you buy the standalone sensor, you will have to finish building the whole schematic before you can connect it to the arduino. So that less work is required for integrating it with the arduino, it is recommended that you buy the complete MQ-8 sensor circuit. This you can see below.
If you buy the complete board, there are 4 leads which need to be connected.
There 4 leads are Vcc, AOUT, DOUT, and GND.
The Vcc and GND leads establishes power for the hydrogen sensor.
The other 2 leads are AOUT (analog output) and DOUT (digital output). How the sensor works is the terminal AOUT gives an analog voltage output in proportion to the amount of methane the sensor detects. The more methane it detects, the greater the analog voltage it will output. Conversely, the less CO it detects, the less analog voltage it will output. If the analog voltage reaches a certain threshold, it will send the digital pin DOUT high. Once this DOUT pin goes high, the arduino will detect this and will trigger the LED to turn on, signaling that the methane threshold has been reached and is now over the limit. How you can change this threshold level is by adjusting the potentiometer to either raise or lower the level.
MQ-8 Hydrogen Gas Sensor Circuit Schematic
The hydrogen gas sensor circuit we will build with an MQ-8 sensor integrated with an arduino is shown below.
The connections are pretty basic.
To connect the sensor, there are 4 leads. 2 of them are for power. The Vcc terminal of the sensor connects into the 5V terminal of the arduino board. The GND terminal of the sensor connects into the GND terminal of the arduino. This establishes power for the sensor.
The other 2 connections are the analog and digital output of the sensor. These connect to analog pin A0 and digital pin D8, respectively.
For more detail: MQ-8 Hydrogen Gas Sensor Circuit Built with an Arduino
- What sensor is used to detect hydrogen in this project?
The MQ-8 hydrogen gas sensor (preferably the complete MQ-8 sensor board) is used. - How many leads does the MQ-8 sensor board have and what are they?
The MQ-8 board has four leads: Vcc, AOUT, DOUT, and GND. - Where does the Vcc lead of the MQ-8 connect on the Arduino?
The Vcc terminal connects to the Arduino 5V terminal. - Where does the GND lead of the MQ-8 connect on the Arduino?
The GND terminal connects to the Arduino GND terminal. - Which Arduino pin should AOUT be connected to?
AOUT should be connected to analog pin A0 on the Arduino. - Which Arduino pin should DOUT be connected to?
DOUT should be connected to digital pin D8 on the Arduino. - What happens when the MQ-8 detects hydrogen above the threshold?
When the analog output reaches a set threshold, the DOUT pin goes high and the Arduino can trigger the LED to turn on. - How can the digital trigger threshold be adjusted?
The threshold level can be changed by adjusting the potentiometer on the MQ-8 board. - Why is the complete MQ-8 sensor board recommended over the standalone sensor?
The complete board is recommended because it is pre-built for easier integration with the Arduino, avoiding additional circuit assembly required for the bare sensor.