I'm new in the forum and I have a few time working with arduino duemilanove 328, on last week I buy the 5v MQ-3 alcohol gas sensor from sparkfun; well when I did connect this sensor to the arduino 5v output it reads 'ok' with the line:
int val= analogRead(pin);
and val are 'stable' values, for example
478
478
479
478
477
478
477
472
477
477
477
but when I tried to supply the power changing the arduino 5v aoutput to a regular 5v power supply the values from the input changes for
I did try this 'solutions': change the arduino board, change the input pin, change the sensor, change a load resistance, change the power supply, but anything works, and everytime I get almost the same 'wrong' values
When I check the voltage and the amperage and the sensor works in the same way with the arduino or with the external power supply (reading values from multimeter) so I discard a connection issue... but in the Arduino output it works totally different.
Do you have any idea? Do you think than I need to use the AREF pin on the arduino?
Not clear if you have wired it correctly or not. Here is a much cleaner hookup drawing from the SparkFun site. You might want to check your wiring against it.
Notice that the diagram Lefty posted has a 10K resistor and you have a 100K one. Such a high value on the analogue input will cause a lot more noise to be picked up.
I have a 100k potentiometer, I did change the values since 1 k to 100 k but I get the same result when I try to connect to an external power supply, anyway later I'll try to connect follow the schematic posted by retrolefty and "connected the ground from your power supply to the ground of the arduino and that of the sensor." as Grumpy_Mike says