Shop OBEX P1 Docs P2 Docs Learn Events
C2H5OH Gas Sensor Module — Parallax Forums

C2H5OH Gas Sensor Module

TymkrsTymkrs Posts: 539
edited 2015-01-05 08:09 in Accessories
Hi folks!

I'm working on a different project and hope to include this sensor - only issue is I'm having difficulty finding the code in the OBEX. I've also been looking through the documentation to see how I'd make my own board, but from the datasheet it looks like all you need is one potentiometer? So I'm wondering if anyone knows what the other chips/parts are on the Parallax C2H5OH sensor board?

Thanks for any additional information! I'll continue looking around to see what I can find.

Addie

Comments

  • Tracy AllenTracy Allen Posts: 6,658
    edited 2013-08-11 10:52
    Addie,
    Download the manufacturer's data sheet, MQ-3 from the Parallax product page. Figure 2 shows the application circuit, 5V for the heater and a 200kΩ potentiometer for RL.
    Screen shot 2013-08-11 at 10.43.47 AM.png


    The breakout board from Parallax has the potentiometer. In additon it has an op-amp that buffers the Vout to a test point, and a comparator that provides the alarm trip point.
  • TymkrsTymkrs Posts: 539
    edited 2013-08-12 16:24
    Thanks Tracy,

    Yeah, it looks like there are a few schematics out there that I can check. But I still haven't been able to find the Spin code provided (back in the day) by Parallax?
  • Tracy AllenTracy Allen Posts: 6,658
    edited 2013-08-12 20:53
    I don't recall there ever being Spin code published for the gas sensors. Parallax offers the new breakout board #27983 that replaces the earlier individual boards. But like those, the only "official" output is the alarm that is either high (5V/1k) or low depending on a potentiometer trip point adjustment that you make on the board. What special code do you need for that? There is also a test point on the board where you can pick up the analog output to an ADC. You are on your own for calibration. The only one of the sensors that takes special consideration is the carbon monoxide sensor, because it requires pwm alternating at two levels on its heater pin. There is BASIC Stamp code for that, but it would be a snap to reproduce on the prop. The alcohol sensor does not require that. It just wants steady 5V on its heater.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2013-08-13 10:11
    I don't recall there ever being Spin code published for the gas sensors. The only one of the sensors that takes special consideration is the carbon monoxide sensor, because it requires pwm alternating at two levels on its heater pin. There is BASIC Stamp code for that, but it would be a snap to reproduce on the prop. The alcohol sensor does not require that. It just wants steady 5V on its heater.

    Tracy, you're right that there wasn't a specific program for the Propeller, but there are PWM objects, which is why we didn't make one. On the new website we'll link to an object eventually that can be used for such a purpose.
  • TymkrsTymkrs Posts: 539
    edited 2013-08-14 15:29
    Ahhh I see okay. Thanks for the info!
  • banjobanjo Posts: 443
    edited 2014-12-07 06:06
    I don't recall there ever being Spin code published for the gas sensors. Parallax offers the new breakout board #27983 that replaces the earlier individual boards. But like those, the only "official" output is the alarm that is either high (5V/1k) or low depending on a potentiometer trip point adjustment that you make on the board. What special code do you need for that? There is also a test point on the board where you can pick up the analog output to an ADC. You are on your own for calibration. The only one of the sensors that takes special consideration is the carbon monoxide sensor, because it requires pwm alternating at two levels on its heater pin. There is BASIC Stamp code for that, but it would be a snap to reproduce on the prop. The alcohol sensor does not require that. It just wants steady 5V on its heater.

    I'd like to pick up the analog output with the breakout board #27983 and CO Sensor, is this possible on a Propeller Activity Board through the A/C pins? If not, how about with the Professional Board?
    As a newbie I'd be thankful for some help, especially with the schematic and a starting point with Spin or C.
    BTW Can I connect the board to my Activity Board to 5V without any additional resistor, or should I connect it to 3.3V with a 3.9 kΩ–10 kΩ resistor as the manual recommends?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2014-12-08 08:09
    banjo,

    You can pick the buffered analog voltage from TP1. It won't be very high, though I don't remember the range at the moment. And yes, you should still use a series resistor on the ALM output. It has a 1K protection resistor, but that's not intended for the Propeller so much as it is protection against an connected I/O pin being set wrong. However, since there is 1K in series you can use a 3.3K-4.7K in series. You will use 5V power from the Activity Board for power and the analog output from TP1 can go directly into the A/D channel on the board. As for code, there is a driver for the ADC on the OBEX that was written by Jon McPhalen in SPIN. You would have to use a known gas level to calibrate your readings from the sensor though.
  • banjobanjo Posts: 443
    edited 2014-12-08 11:42
    Thx Chris, this will help me to get started when I get down to it later on.
    I tried the sensor on a BS2 Boe-Bot so now I understand a bit more how it works.
  • banjobanjo Posts: 443
    edited 2015-01-04 09:20
    I was actually able to get this working and can now display the analog voltage on a LCD display. Was successful with both the CO and Methane sensor although they need different programs.
    The sensors do need 10-15 minutes of 'heating' before they stabilize as also the data sheet is informing.

    Thx for the help!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2015-01-05 08:09
    banjo,

    Thanks for the update. Yes, it is reasonable to expect that the voltage ranges from each type of sensor will be different. There will no doubt be some minor differences between sensors of the same type. Each would require calibration. Glad to hear that you got things working though.
Sign In or Register to comment.