MQ2 and PIC16F877A

Discussion in 'The Projects Forum' started by 12610, Nov 15, 2011.

  1. 12610

    Thread Starter New Member

    Nov 15, 2011
    3
    0
    Hi! Im having trouble in interfacing the mq2 sensor with pic16f877a.. because our original schematic diagram has an A/D converter. Since we changed PIC16f84 to PIC16F877A, we're having trouble on how to interface the MQ2 sensor with PIC16f877A.. Help me guys please..

    Thanks..
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    What is a MQ2 sensor? I have no idea.
     
  3. debe

    Well-Known Member

    Sep 21, 2010
    947
    184
    LPG/Propane/Methane/Alcahol gas sensor.
     
  4. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Then you ask questions in this forum. It is very important to provide information like links to data sheet and any code schematics you may have. Also a short description on what you have done so far. And why and how you struggle. First then we will be able to help.
     
    Last edited: Nov 15, 2011
  5. 12610

    Thread Starter New Member

    Nov 15, 2011
    3
    0
    im sorry for the incomplete information..
    here is the original diagram http://www.google.com.ph/imgres?q=g...rt=0&ndsp=22&ved=1t:429,r:14,s:0&tx=115&ty=57

    as you can see, it has an a/d converter which is the TLC548 here is the data sheet http://www.datasheetcatalog.com/datasheets_pdf/T/L/C/5/TLC548.shtml

    and since TLC548 is not available here in our country, i decided to change the pic from pic16f84 to pic18f877a. because the pic has already built in a/d converter. bbut how are we suppose to interface the MQ2 sensor to pic 16f877a?
     
  6. 12610

    Thread Starter New Member

    Nov 15, 2011
    3
    0
  7. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    As I understand the data sheet. This sensor is resestive. And may have a resistance in range 3KΩ-30KΩ depending on gas type and concentration? A typical circuit will be like fig 2 in the data sheet. Using a 5KΩ resistor as load resistance. And measure the voltage changes over the latter resistor
     
  8. John P

    AAC Fanatic!

    Oct 14, 2008
    1,634
    224
    It looks pretty trivial. +5, Gnd, a resistor, output to the processor. One snag I can think of though, is that the output impedance of the sensor, which is determined by the combination of the sensor itself and the external load resistor, might be too high for the processor's A/D. In that case you'd need a buffer amplifier.
     
Loading...