

Connect relay Common ("COM") pin to H1.Connect right potentiometer pin to ground, and left pin to A1.Connect relay Normally Open ("NO") pin to A1, and the Normally Closed ("NC") pin to middle potentiometer pin.Connect middle MOSFET pin to relay ground pin.Connect Photon Digital Pin D7 to left MOSFET pin, and a 10 kΩ resistor to ground.Connect Photon 3.3V pin to positive relay input.Connect A1 to third voltage regulator output (5V source).Connect 4.7 kΩ resistor from B1 to ground. One way to do this is to use a relay triggered by the Photon (with the aid of a MOSFET and potentiometer) - when the relay is not powered, the voltage across H1 is 5V, and when the relay is powered the voltage across H1 is ~ 1.5V. Connect a 4.7 kΩ resistor from B1 to ground.Īside: The MQ7 sensor requires cycling the heater voltage (H1) between 1.5V (for 90s) and 5V (for 60s).Connect B1 to Photon analog pin (LPG goes to A0, Methane to A1).Connect H1 and A1 to the output of one of the voltage regulators (recommended to use an electrical connector).For each regulator, connect positive battery output to the regulator input, and connect middle voltage regulator pin to ground.Ĭonnect the LPG (MQ6) and Methane (MQ4) sensors. Solder three voltage regulators to the PCB board. Solder wires to the gas sensor breakout board. Orientation doesn't matter, just be sure that the silkscreen (aka labels) are facing down so that you can read them (had to learn that one the hard way.). Solder gas sensor breakout boards to gas sensors. After making the connections on the Particle Photon's header pins and inserting the LiPo battery into the JST connector, you will stack the Particle Photon on the shield. It should be connected to the Photon Battery Shield's JST connector. Note: The LiPo Battery in the Fritzing diagram is connected to the Particle Photon's VBAT pin for illustration. Optional: Male-to-Female JST connector cable.One 2000 mAh Polymer Lithium Ion Battery.Here's a table that shows the approximate lifetime of a few different battery options. If you go with this option, you may need to include a correction factor when you calculate the sensor value or boost the battery voltage with a transistor or other component. LIBs have a higher capacity than AAs, but typically run at a lower voltage. These batteries will last about 4 hours.Īnother option is to use a lithium ion battery ("LIB"). One easy, and affordable, option is to use four (rechargeable) AA batteries in series. To make the system portable, we'll need a high capacity battery. The gas sensors used in this project require a fair amount of current, about 0.17 mA each at 5V. Highly recommended to peruse the datasheets for the three gas sensors.For powering the Photon, here's a thorough guide on the Photon Battery Shield.Here's a helpful overview on the N-Channel MOSFET.New to relays? Check out this a handy reference.
