I'm using an MQ sensor at 5v to drive an LCD bar graph to 'sniff' for gas, the problem is that adjusting the pot (10k) on the sensor just drops the display as it effectively 'sees' less gas.
Is there a way to keep the display reading the full 0-1023 but adjust how sensitive the sensor is?
Can I just multiply the reading using another pot to control the level (bit like squelch on a CB radio)...
My understanding is that this is a resistance type sensor with no inbuilt amplifier circuit. therefore any form of potentiometer on its output will only be able to decrease sensitivity ( which is what you report).
However a drawing of your actual circuit and the model number of the actual sensor, rather than just a manufacturer's generic type might result in a more informed answer.
What you want is not possible.
The resistor is the only way to adjust the sensor output.
You could use the resistor as "Adjust".
And you could use software for "Sensitivity", using the map() function : map() - Arduino Reference
If the bar on the LCD is the only output, it is very rough. The analogue value could easily be mapped for the LCD bar with the map() function.
Thanks for the replies, so far the sensor circuit wise is the same as the light sensor in the tutorials (or the MQ playground) and I have a speaker tracking the level. I'm trying to achieve a sensor that is functionally like a metal detector rather than a smoke alarm, but looks for a gas not metal.
The idea is to sweep for a leak on an ultra sensitive setting to find the general area, then drop the sensitivity down to pin point an accurate point as the source of the leak. However if the incoming value is de-sensitised the result on the bar graph will just drop too and that's kind of a 'catch 22' problem!
Thanks for explaining. Now I understand.
The resistor is the only way to adjust that.
You could use an programmable resistor for the load resistor, so the Arduino could set the sensitivy by itself. That way you can control it all in software.
Instead of a programmable resistor, you could even use a few resistors connected to Arduino outputs. By setting those outputs either to high impedance (set as input) or ground (set as output LOW), you have a programmable resistor.
A hard squelch seems to me not possible, it is almost impossible to decide when a gas is detected. Using a tone (like in a metal detector) that increases frequency with a higher gas concentration should work.
The bars on the LCD could use some automatic scaling or a logarithmic scale.
Do you use a fan to pull air into the sensor ?
If you sweep the sensor, the air flow is not constant, causing inaccurate readings since the sensor is one moment more cooled by the air than at an other moment.
Yes there is a vacuum pump to suck air into the sensor, that part is constant as the sensor sits in a chamber (or at least I'm proposing to) with a feed and exhaust via the pump (12v).
There are devices out there (£3000+! ) that do this and I've had a look at them.
I'm hoping that the amount of gas will trigger the 100ppm minimum very quickly and I'll need to use a pot to dumb it down, problem being it will dumb down the LCD result too.
The sensor is 221027608690 on ebay
Could I use a rotary switch with say 4 positions to select 4 pins on the Arduino and then use division and multiplication of the results mapped to the pins (sounds a bit caveman with rock )