1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

mr513 hotwire alcohol gas sniffer interface to arduino

Discussion in 'Arduino' started by tommowas, Nov 21, 2011.

  1. tommowas

    tommowas New Member

    Joined:
    Nov 21, 2011
    Messages:
    9
    Likes:
    0
    hey guys just working on a high school project and wondering if anyone can help me with reading the analogue data from a mr513 hot wire sensor. i have set up a mq3 sensor but i am getting inaccurate readings. it would be appreciated if i could get some help.

    cheers
     
  2. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,777
    Likes:
    281
    Location:
    Cleveland, Ohio USA
    Hi and Welcome

    Can you provide a schematic and your setup? It would make things much easier. What voltages are you seeing from the sensor? In what atmosphere?

    Ron
     
  3. tommowas

    tommowas New Member

    Joined:
    Nov 21, 2011
    Messages:
    9
    Likes:
    0
    hey thanks for the quick response. I am getting propper readings from the mq3 just that this type of alcohol sensor has a 48hr burn in period. The results vary but according to other people's mq3/arduino setups, everything i have done is correct. i have opted to use a hotwire mr513. This sensor doesnt require the 23h> burn in period, lower voltage and is of higher accuracy.. Just i have no idea how to interface this sensor with the arduino.. the datasheet is http://www.electro-tech-online.com/custompdfs/2011/11/MR513.pdf
    please excuse my ignorance, appreciate whatever help you can give Reloadron!!
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,777
    Likes:
    281
    Location:
    Cleveland, Ohio USA

    OK, the basics would be the sensor has a milli-volt output. You want to amplify the signal to something a little more useable. I would amplify anyway, the choice is yours. The sensor signal would be fed to a A/D (Analog to Digital) pin of your uC or commonly called an analog input pin. Which Arduino are you using and while I am not an Arduino type we have people here who are.

    Ron
     
  6. tommowas

    tommowas New Member

    Joined:
    Nov 21, 2011
    Messages:
    9
    Likes:
    0
    im using the arduino uno. the datasheet doesnt have the pinouts marked clearly so im not sure which pin i put to vcc, which pin i put to ground and which pin i put to the analogue input of the arduino. with the mq3 sensor we had to put a resistor before putting to ground and also it just went off a 5v supply. This unit uses 3v..
     
  7. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,777
    Likes:
    281
    Location:
    Cleveland, Ohio USA
    This is a pdf drawing of your board. It can easily be opened to 200% and shows the pin outs clearly. I have also found the Arduino Playground pretty useful for ideas. While it may not have exactly what you want, there are plenty of easy to modify circuits. The playground can be found here. I also suggest you work on understanding the A to D process. The Arduino Uno should be a complete well marked circuit card? The card should look like this with the Analog IN (A0 through A5) clearly marked?

    Ron
     
  8. tommowas

    tommowas New Member

    Joined:
    Nov 21, 2011
    Messages:
    9
    Likes:
    0
    thanks ron. ill read into it. the arduino unit im fine with its just connecting that sensor. the datasheet to me is cryptic.. i keep reading up though until i solve this one.

    cheers
     
  9. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,777
    Likes:
    281
    Location:
    Cleveland, Ohio USA
    If you have questions just ask. I am not real good with Arduino or really any PIC. However, since the chip has I believe 6 ADC (Analog Digital Converter) pins you can use any of them. The input you use just needs to be called out when you write the code to program the Arduino chip. So for Analog In if you use A0 your code you write would tell the chip what to do with the data (your analog signal) on that pin. What you need to do with a chip set like this is really read up on it starting at the very beginning. It's all in the code and programming.

    Ron
     
    Last edited: Nov 22, 2011
  10. tommowas

    tommowas New Member

    Joined:
    Nov 21, 2011
    Messages:
    9
    Likes:
    0
    cheers ron. the coding of the arduino isnt the problem just hooking up the the sensor with the right pins is what im having trouble wth. because the datasheet is so cryptic(to me anyway) im not sure which pins are for power and ground and which pin is for the output(to be inputted to the arduino) also hooking up resistors etc..
    back to electronics 101 i have to go... :)
     
  11. tommowas

    tommowas New Member

    Joined:
    Nov 21, 2011
    Messages:
    9
    Likes:
    0
    After reading up on the wheatstone bridge i now know that i need to connect to nodes to power(excite) and two to analogue input. what i need to know is do i then subtract the differnce in values of the two pins to get a accurate read out, with a sensor such as this do i need an amplifier for the read seeing asthough the max read of the analogue pin is 1024?

    also with the arduino 3.3v pin the mA throughput is only 50mA this sensor needs atleast 100mA to run. Each i/o pin on the arduino is 40mA, could i just turn 3 pins to output and power the sensor of these 3 pins(total 120mA)?

    appreciate the help
     
    Last edited: Nov 24, 2011
  12. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,777
    Likes:
    281
    Location:
    Cleveland, Ohio USA
    The data sheet does leave a little to be desired. They do show a bottom view pinout with Compensation and Detector labeled. The charts also show the expected outputs for gas concentrations. Here is what I suggest you do. Provide a 3 volt or so excitation and measure the output voltage. Try subjecting the sensor to gas concentrations. This is sort of hit/skip short of having standard concentrations. See what the output voltage does. This should give you an idea as to if you will or will not need amplification. The charts show an output of about 400 mV for a 1200 ppm (Parts Per Million) concentration. That would lead me to opt for some amplification.

    The sensor is a complete little bridge circuit. You provide the excitation of 3 volts and it outputs a millivolt signal proportional to the gas concentration it senses (sniffs).

    The analog input pins are 0 to 5 volts to a 10 bit A/D and thus 0 to 5 volts in = 0 to 1023 or 1023 A/D quantization levels.

    Ron
     
    • Like Like x 1
  13. tommowas

    tommowas New Member

    Joined:
    Nov 21, 2011
    Messages:
    9
    Likes:
    0
    thanks ron! i seem to be getting a reading by just blowing on the sensor without having any alcohol in my system(not even vapor in my mouth). would you have any idea as to what could be causing this?
     
  14. tommowas

    tommowas New Member

    Joined:
    Nov 21, 2011
    Messages:
    9
    Likes:
    0
    also would you know the wiring for the c and d nodes? i have this setup c to capacitor to vcc, c2 to d1 to analogue input, d2 to ground not working out really well for me... any help would be appreciated. i have tried different combinations with no luck..
    cheers
     
  15. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,777
    Likes:
    281
    Location:
    Cleveland, Ohio USA
    Hi Ya

    Your bridge should look like the attached image. The M513 sensor is the two nodes. You are adding 3 resistors total using two each of 2 K Ohm and a 500 ohm potentiometer. You are applying an excitation voltage not to exceed 3.1 volts maximum. When you start getting above 3.0 volts the bridge will have a self heating effect. Resistors R1 and R2 which are 2 K Ohm resistors should be 1% resistors. Well as closely matched as possible anyway. Resistor R3 is used to balance the bridge (the zero).

    According to the data sheet it looks like a concentration of about 1,000 PPM should output about 400 mV while 0 PPM is 0 mV. With 0 PPM you would use the 500 Ohm pot to adjust for zero out. If there is drift (excessive) drift on the output at zero then the bridge excitation voltage is is too high. The normal bridge current should be about 100 mA +/- 10 mA.

    Now are you setup like the attached drawing? I would get this much working first measuring the output using a DMM. Then I would worry about maybe some amplification to drive the Arduino but first get the bridge working and balanced.

    Ron
     

    Attached Files:

    • Like Like x 1
  16. tommowas

    tommowas New Member

    Joined:
    Nov 21, 2011
    Messages:
    9
    Likes:
    0
    hey ron
    this is how i have it setup, attached is a bottom view pic of the sensor with d & c pins divided up and marked.
    c1 goes to 20ohm resistor then to the 5v power rail. d2 goes to ground, c2 & d1 goto analogue inputs. the difference of c2 and d1 is the result. i cannot get a reading though.. is there anychance i could of blown the circuit of the wheatstone bridge?
    also when i was getting a reading i was getting a reading with alcohol present and without alcohol present. scratching my head for hours..
    cheers
     

    Attached Files:

  17. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,777
    Likes:
    281
    Location:
    Cleveland, Ohio USA
    Measure using an ohmmeter across C1 & C2 then D1 & D2. You should get approximately 2 K Ohm across each. That will tell us if the elements are still good.

    As to the module itself:
    The two elements are placed into a Wheatstone Bridge configuration as I show in the drawing I posted. The resistance of the D (Detection) element will change in the presence of alcohol atmosphere. That change causes a bridge imbalance resulting in an output voltage signal from the bridge. The compensation element is only for compensation. Any temperature change felt by D will be compensated for by C. You need to add the additional 2 K resistors shown as R1 and R2 in my drawing. Based on what you posted there is a good possibility the elements are toasted from excessive current. Measure the resistance across the D and C elements as I suggest and see what you get.

    Ron
     
  18. Tanyon

    Tanyon New Member

    Joined:
    Jan 22, 2014
    Messages:
    4
    Likes:
    0
    Hi guys !

    I'm working on the Mr513 gas sensor and have been reading your comments which helped me a lot!
    Tommowas, what was your conclusion ? Have you managed to get so good results?
    Reloadron, When i tried to measure the resistance between C1 & C2 and D1 & D2 i have nothing on the ohmmeter ! I don't understand why i have not approximately 2 K Ohm across each..?

    Thank you to share your experiences.

    Tanyon.
     
  19. DerStrom8

    DerStrom8 Super Moderator Most Helpful Member

    Joined:
    Aug 9, 2010
    Messages:
    5,484
    Likes:
    503
    Location:
    Vermont (GMT-5:00)
    Hi Tanyon,

    It would be better to start your own thread for this topic. Hijacking someone else's thread is not a good idea, and is generally not allowed here.

    Thanks,
    Matt
     
  20. Reloadron

    Reloadron Well-Known Member Most Helpful Member

    Joined:
    Dec 23, 2009
    Messages:
    6,777
    Likes:
    281
    Location:
    Cleveland, Ohio USA
    Hi Tanyon,

    Since this thread is pretty old as DerStorm8 mentions it would be wise to start your own new thread as suggested. That will also likely get more input also. :)

    Ron
     
  21. Tanyon

    Tanyon New Member

    Joined:
    Jan 22, 2014
    Messages:
    4
    Likes:
    0
    Ok I'm sorry of that. I didn't know.
    I've just created a new thread here.
     

Share This Page