Site icon BBBlimp

Hydrogen sensor

Next morning after our initial Hydrogen generation test, I’ve realized that couple months back we’ve bought several MQ8 Hydrogen Gas sensors for our Arduino and this would be also an excellent opportunity to check if & how that’s working.

So I asked Seb and Christopher to put it together and about an hour later – voila – they had it working!

Arduino code looks pretty straightforward.

long sensorValue;
void setup() {
void loop() {
  sensorValue = 0;
  for (int i = 0; i < 100; i++) {
    sensorValue += analogRead(A0);
  sensorValue = map(sensorValue/100, 0, 1023, 100, 10000);
  Serial.println("ppm: " + String(sensorValue));
  if (sensorValue > 300)
    tone(3, sensorValue/5);

As you may see on video below, they also added a “buzzer” to signal number of particles detected and connected it to a plotter to show values on a graph. They are using hydrogen from a previous day to test that it is really working.

Having that buzzer there came later pretty handy as it served us well to detect all the leaks whilst generating hydrogen, but that’ll have to wait for another post. 🙂

Exit mobile version