Pages: [1] 2   Go Down
Author Topic: Weird data from Analog Input  (Read 1641 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,
I have a problem with Analog Input on my Arduino Uno. I have A0 port to AD620N in-amp (powered from Arduino - +5V from USB), which amplifies signal from MPX2010DP sensor (powered from external 12V power supply). Readings I get from A0 port are far from I expect - they tend to oscillate from around 400mV to 4000mV (with the same frequency as sine signal I get when A0 is not connected to anything), when, standard, simple voltometer shows "steady" 1700+-10mV - and I don't know why.

I've tried connecting AD* to the same power supply as MPX* (power supply has +5V and +12V rails with two ground lines), disconnecting external supply, changing AD* - but no success.

I would be very thankful for any help/ideas why this may be happening.

Thanks in advance.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What gain resistor are you using on the IA?

Do you have an oscilloscope handy?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

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

I am using 47 Ohm resistor (for very high gain, since changes in pressure I'm going to detect are very small) - but changing it does not change the reading form A0 - it still oscillates.

Unfortunately, I do not have an oscilloscope, only very simple voltometer.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13739
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


If you have a second Arduino you could make a (simple) scope - http://arduino.cc/blog/2010/10/06/xoscillo-cheap-arduino-based-oscilloscope/ -
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

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

I do not have second Arduino either. I have tried connecting IA to other analog inputs, but with the same results - oscillating input (with nothing connected, it is simple sine wave).
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you short -IN and +IN on the AD620 do you get 0 volts out?

Are you using long wires between the pressure sensor and the AD620?  They might act as antenna and shielded twisted-pair cable might be a better choice.

Are you sure the 12V to the sensor is well filtered?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

0
Offline Offline
Shannon Member
****
Karma: 207
Posts: 12200
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can you photograph or sketch your whole circuit?  We're guessing otherwise.

The AD620 will struggle work from a single 5V supply - its inputs both need to be very close to +2.5V  (about 2V to 3.5V) or it'll saturate.
Logged

[ I won't respond to messages, use the forum please ]

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

I'll post the sketch as soon as I get home. What baffles me is that readout from voltometer works (or looks like it is) OK- it changes from 1700mV to 1600mV (or 1900mV) as I change pressure on sensor inputs.

I can try and connect AD620 to 12V power, but I don't know if Arduino AIn can handle its output.
Logged

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

Little selfbump, here is my board, +5V comes from Arduino and AD620 is grounded by Arduino.


I have shorted IN+ an IN- and I do not get 0 volts, I get around 1.6V. Cables are quite short (max 5cm).
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There's your problem!  You are hooking one side os a differential output to both sides of the amp!

Shouldn't you connect Vout+ (Pin 2) to +IN and Vout- (Pin 4) to -IN?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

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

OK, i forgot so specify that MPX image is wrong here - in database I found it has only one output. I have VOut+ connected to VIn+ and VOut- to VIn-. My bad ^^'' But, nevertheless, when I shor the AD620 i do not get 0 volts...
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You don't seem to be providing a reference voltage on the REF pin of the IA.  Have you tried grounding that pin?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

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

I have grounded that pin, output still oscillates but with different pattern (i get "peaks" from time to time), and when shorted i still get 0.5V volts on IA. Voltometer reports changing pressure better, and "peaks" change in amplitude when I change pressure)
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8856
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there something plugged into the AOUT jack?  If not it appears to be wired to short DOUT to Ground. smiley-sad
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Miramar Beach, Florida
Offline Offline
Faraday Member
**
Karma: 147
Posts: 6040
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is the datasheet at Analog Devices.
http://www.analog.com/static/imported-files/data_sheets/AD620.pdf

Note carefully in the specifications the output swing (page 4) and the input voltage range (page 3). Neither goes to the ground rail.

edit: I think that IC was designed for a dual power supply. Maybe there is a better op-amp for this?  smiley
« Last Edit: May 27, 2012, 04:35:54 pm by SurferTim » Logged

Pages: [1] 2   Go Up
Jump to: