External Power Supply issue

Hi there

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

898
0
0
462
1230
698
0
0
0
784
1230
210
0
0
0
75
1230

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?

Regards from Mexico

The RedCat

Post a schematic of how you have hooked up the sensor to your arduino. Your own schematic, not "one like this."

Do you have any idea?

yes I think you have not connected the ground from your power supply to the ground of the arduino and that of the sensor.

However a schematic from you would clinch it.

hi there, my schematic is

with a 100k potentiometer

regards

the RedCat

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.

Lefty

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

Regards

Hi there, today I was connect from the external power supply ground to the arduino ground and to the sensor and everything works fine!!

Thanks a lot for your help

The RedCat