Pages: 1 [2] 3   Go Down
Author Topic: How can I convert AnalogRead to something useful?  (Read 10156 times)
0 Members and 1 Guest are viewing this topic.
Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What do you mean by convert it to digital?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i mean converting it to ppm values..
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know. I imagine the datasheet for your sensor will have that information.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i see.. thank you sir.  i already have a code. but still im not that confident about the about.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 19
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i see.. thank you sir.  i already have a code. but still im not that confident about the about.

Why do you want to convert to PPM?
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What sensor are you using?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

im using MQ-7 sir.. and im very confused with its datasheet..
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
im using MQ-7 sir
A link would be far more useful.

Why are you using this thing? What is it that you expect this thing to tell you? Before you can convert the value returned by analogRead to something useful, it is necessary to know what the sensor is measuring, what the output of the sensor is, whether the output is linear or logarithmic, and what you want to do with the output.

You seem to have omitted a few of these details and not enabled us to find any of them.
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 65
Posts: 3638
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I assume it's this: http://www.sparkfun.com/products/9403
Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Since the datasheet expresses the PPM value as a ratio of the resistance of the device of the device in clean air with 100PPM carbon monoxide, it suggests that  the PPM value isn't accurately available without calibration with a sample gas of the correct constituants. Which is what Retrolefty said several posts back. There is a value given for clean air which is much easier to obtain but with a much lesser degree of accuracy. It still needs you to calibrate the thing though.  If accuracy isn't too much of an issue, the first step would be to wire the thing up and see what its resistance is when its been running a while in clean air. Then when you have this figure you work out a nice value for a static resistor for the other side of the voltage divider for the anticipated ranges you want it to measure. I'd use a lookup table to get a figure out what the PPM is.

A completely unsuitable device to be selling to home users in other words....
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes sir.. im using that one.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi all,

how should I do the preheating? does it need to be 24+ hours continously, or can I do it in 2 or 3 passes (so 2x12 or 3x8 hours)?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everybody,
I'm a newbie of arduino and I'm playing with air quality sensors.
I want to purchase this MQ-135 sensor
http://www.ebay.com/itm/170969528013

There are 4 pins (S,Vcc,TTL, G)
There is a LM393 chip on pbc

Description says that there are 2 outputs:
analog output, and TTL-level output
I do not fully understand what is the usage of TTL-level output:
TTL output valid signal is low (low output signal light, which can be accessed microcontroller IO port)


what will be read from an arduino digital pin connected to TTL?

let me know where I can found a sketch that explains usage of  TTL pin

regards
Logged

Greenville, IL
Offline Offline
Edison Member
*
Karma: 15
Posts: 1328
Warning Novice on board! 0 to 1 chance of errors!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 A little google goes a long way.

http://wiring.org.co/learning/basics/airqualitymq135.html

http://itp.nyu.edu/~sl2631/blog/?p=576
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is the most concise reference for air quality sensors
http://www.staceyk.org/airSensors/sensorsetup.php

I'm already reading from MQ-135. I want to buy another one which is mounted on a little pcb with a LM393.
There is an extra pin that they said it can be used for digital read from a microprocessor.
LM393 is low power dual voltage comparator.
I would like to know if anyone is using that kind a sensor.

You can find other sensor of mq type mounted on small pcb (with a variable resistor to change load resistance) but they have only 3 pin to read analog value like this one
http://itp.nyu.edu/physcomp/sensors/Reports/MQ135

Logged

Pages: 1 [2] 3   Go Up
Jump to: