connect@howdiyworld.com
|

Hydrogen Sensor

What is Needed?

Hydrogen Sensor
ADS1115 ADC
Jumpers
HowDIY

BLOCK DIAGRAM

Procedure

  1. Hydrogen Sensor and ADS1115 ADC
  2. Setup Blynk Application
  3. Connections
  4. Program
  5. Output

Procedure

Hydrogen Sensor

A hydrogen sensor is a gas detector that detects the presence of hydrogen. They contain micro-fabricated point-contact hydrogen sensors and are used to locate hydrogen leaks. They are considered low-cost, compact, durable, and easy to maintain as compared to conventional gas detecting instruments.

ADS1115 ADC

The ADS1115 is an external digital analog converter (ADC) that we can connect to a processor like Raspberry Pi to measure analog signals. Raspberry Pi doesn’t have internal ADCs that we use when we use the Raspberry Pi analog inputs.

Setup Blynk Application

Download Blynk Mobile Application.

  • Sign in and add new device (Raspberry Pi 3) in Blynk App.
  • An Authentication code will be sent to your mail
  • Check the Authentication code and replace it in the Python Code.

After Authentication we will create a new Value Display in Blynk app to Display Hydrogen Sensor Value.

  • Click the + Button
  • Select Value Display
  • A Value Display is created to edit it’s properties click the created Display
  • Now in the Value Display settings click the PIN Button
  • In the Select PIN pop-up, Select Virtual and V2
  • You can change the Name and output should be 0 and 1023

Now if you go back you can see that you have successfully created Value Display.

Connections

  • Connect Hydrogen Sensor’s VCC to 2nd
  • Connect Hydrogen Sensor’s GND to 9th
  • Connect ADS1115’s VCC to 1st
  • Connect ADS1115’s GND to 6th
  • Connect ADS1115’s SCL to 5th
  • Connect ADS1115’s SDA to 3rd
  • Connect ADS1115’s A0 to Hydrogen Sensor’s AOUT or A0.

Python Programming

from gpiozero import LED, Button, Buzzer

import blynklib

import Adafruit_ADS1x15

import time

BLYNK_AUTH = ‘Enter_Your_AUTH_CODE’

adc = Adafruit_ADS1x15.ADS1115()

GAIN = 1

# Initialize Blynk

blynk = blynklib.Blynk(BLYNK_AUTH)

# Register Virtual Pins

@blynk.handle_event(‘read V22’)

def my_write_handler(value):

print(‘Current V1 value: {}’.format(value[0]))

if int(format(value[0])) == 1:

led8.on()

else:

led8.off()

def my_user_task():

hydrogen = adc.read_adc(2, gain=GAIN)

hydrogen=hydrogen/500

print(hydrogen)

blynk.virtual_write(7, ‘{:.2f}’.format(hydrogen))

time.sleep(2)

try:

while True:

blynk.run()

my_user_task()

except KeyboardInterrupt:

sys.exit(0)

Output

The Hydrogen level will be updated on your mobile application (Output Visible in Mobile VIA Application)

Social media & sharing icons powered by UltimatelySocial
Facebook
Twitter
YouTube
LinkedIn
Instagram