KenF:
If you're using the USB to power it in all cases it shouldn't make that amount of difference. What exactly is hanging on that analog input pin?
The analog input is connected to the output of instrumentation amplifier.
The input of instrumentation amplifier is connected to the sensor output.
I just measured the output of the instrumentation amplifier and the value is about 525mV.
It's stable and does not change.
If I connect Arduino to my desktop than the results are below, First column is mV and second is bit. just 4.9 is multiplied.
499.80 102
499.80 102
494.90 101
499.80 102
499.80 102
470.40 96
455.70 93
460.60 94
485.10 99
490.00 100
494.90 101
494.90 101
494.90 101
494.90 101
490.00 100
450.80 92
450.80 92
475.30 97
499.80 102
494.90 101
494.90 101
499.80 102
499.80 102
494.90 101
455.70 93
450.80 92
480.20 98
490.00 100
After than, I have not changed anything and just take out USB from desktop and plug into my laptop
Than the results are shown below
122.50 25
504.70 103
215.60 44
627.20 128
352.80 72
308.70 63
147.00 30
230.30 47
671.30 137
553.70 113
343.00 70
911.40 186
249.90 51
578.20 118
0.00 0
725.20 148
289.10 59
847.70 173
833.00 170
225.40 46
499.80 102
573.30 117
460.60 94
681.10 139
Like you said Peter, there may be so many things to consider. like usb cable, power,, or something else.
Then, how can I correct this?
What is the method that you said, set internal reference of 1.1V?
One more thing, I need to connect several sensors to this Arduino and take the multiple data.
However, it seems like Arduino mega 2560 ADC is not stable much for my applications.
Like this, I just connect one sensor and has some problem.
Is there any other candidate for my application other than Mega2560?
Thanks for your help.