Step 5: Assembling The 2nd Part of the Gas Cap

IMG_2893.JPG
Screen Shot 2012-05-01 at 8.14.09 PM.png
IMG_2898.JPG
IMG_2895.JPG
IMG_2905.JPG
IMG_2907.JPG
Use the Fritzing example to understand the connections.

Wire up the methane sensor like so, but use your 330 ohm resistor instead of the 10K that they show in the example.  The reason for this is that the XBee's voltage reference is 1.2V, so we need a really low value, and replacing the voltage divider resistor it the exact thing to do.

Solder the XBee headers to the breakout board (not the actual XBee!) and attach one of the XBees to the new breakout board.  Looking at the Altoids tin, flip it over so that the clamshell end is at the bottom.  Open the top up and of the left, rotate the XBee breakout board so that the top of the breakout board is facing left.  Place the methane sensor in the right of the bottom of the tin.  Dremel the Altoids tin on the bottom so that it makes a small hole for the XBee's antenna.  Dremel a bigger hole for the methane sensor to the right of that. Make sure it fits, and then take out the sensor and the breakout board.  Take the XBee out of the breakout board.  Put electrical tape on all sides of the tin so that no metal is showing because we don't want it to get shorted out!

Now it's time for soldering!  Connect the analog input pin on the methane sensor to pin 20 of the XBee breakout Board (the top right pin).  Connect +5V of the methane sensor and connect it to VCC on the breakout board.  Connect GND's together on the sensor and then connect to GND on the breakout board.  Connect VREF on the breakout board to VCC on the breakout board.  Attach an LED and resistor between ON on the breakout board and GND.  Wire up a switch to the LiPo jack in-between VCC and GND.  Check the polarity of the LiPo jack by inserting the LiPo the correct way and soldering.  Cut the methane sensor's leads so that they do not touch the Altoids tin.

With the Altoids tin open, rotate it 180 degrees so that "smalls" label on the tin is facing you.  Put your XBee in the socket that we attached to the methane sensor, the switch, and the power LED.  Put the whole jumble of wires including the XBee socket, methane sensor, the switch, and the power LED into the altoids tin facing down so that the Xbee antenna and methane sensor go out of the holes that you Dremeled.  Put the 110mAh LiPo on top of the whole mess and connect it to the LiPo jack connected to the XBee socket.  Close the Altoids tin and flip over.
 
Remove these adsRemove these ads by Signing Up
Adambowker98 says: Jul 4, 2012. 8:18 PM
So does the methane sensor act like a switch? It senses gas and completes the circuit?
Qtechknow (author) in reply to Adambowker98Jul 5, 2012. 5:26 PM
Not entirely; the gas sensor changes resistance instead of acting like a switch. In my code, I change the bar graph according to the resistance of the gas sensor.
Adambowker98 in reply to QtechknowJul 5, 2012. 8:02 PM
So if I used a cluster of LEDs rather than a bar graph, would the LEDs get brighter as the fart got worse? And the LEDs not shine so brightly because of added resistance whenever the fart is kinda small?
Qtechknow (author) in reply to Adambowker98Jul 6, 2012. 4:39 PM
You should also try that; I don't usually do electronics without programming!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!