Go Down

Topic: AnalogRead - readings are erratic (Read 9701 times) previous topic - next topic

dlloyd

Quote
Thank you for the suggestion. I have the pin connected to 15 because:
Pin 16 is for 10 volts
and Pin16 is for 5 volts.


Just noticed this in the datasheet, pg11.

Positive supply voltage must be 1.25V above the desired
reference voltage.


So it looks like you need to use VREF2.5 (jumper 4 & 14).

cameronasmith

Hi dlloyd,

Thanks for your post. Yeap, that improved things, but I think I just need a higher resolution ADC to get more accurate results. I guess I have to wait for a week while it comes in the mail.

The only other thing I thought about was maybe there was some calculation I could do:

For example:

834 = 500 grams
133  = 0 grams

When I increase the gain the 500 grams goes over the scale:
834 = Unknown weight
526 = 0 grams

Can anyone think of a way to calculate what the weight might be here? That way I could adjust the sensitivity with the previous 500 gram reference.



dlloyd

#32
Apr 09, 2014, 08:17 pm Last Edit: Apr 09, 2014, 08:32 pm by dlloyd Reason: 1
If you try (jumper 3 & 13), VREFBG (1.24V) it would probably give you further improvement but limit the high end. It might be OK because 200g max is all you want to measure.

Start out by using the min gain of 4 (remove the gain resistor between pins 8 and 9).

cameronasmith

Hi dlloyd.

Do you mean jumper 3 & 13 or jumper 4 & 13

BEcause i have been so far:

jumper 4 - 16
jumper 4 - 15
jumper 4 - 14


cameronasmith

Thanks, dlloyd,

You have been a great help. The suggestion you made did make an improvement, but I think I still need an ADC with more bits.

I'm not really sure how the INA125 pins 4 & 13 really work. Please could you explain it to me.

Thanks,

Cameron.

dlloyd

#36
Apr 10, 2014, 04:27 am Last Edit: Apr 10, 2014, 04:31 am by dlloyd Reason: 1
Quote
I'm not really sure how the INA125 pins 4 & 13 really work. Please could you explain it to me.


It sets the reference voltage...its effect can be seen in the formula below.

I think the main difficulty here in being able to use the full range of Arduino's ADC, is that there is no -5V supply, so you need to make single supply connections as in figure 6. In this diagram, they are connecting pins 4 & 14 for 2.5V reference. Note that (load -) is also Vref, so the maximum linear range (I think) would be from code 512 to 1023.

So, by lowering Vref to 1.24V you could achieve maximum linear range of code 256 to 1023.
With a -5V supply and figure 1 diagram, you could achieve full range (0 to 1023).

The formula here tells all:

dlloyd

Forgot to mention, with 767 steps in code (1023-256) and 200 grams max weight,
you would get 200/767 = 0.26 grams per step.

To calibrate, you would need to use a 200g weight, then adjust gain for maximum code. If your zero gram reading is at 256, then the formula to calculate any weight from 0-200g would be ((code reading - 256)/767)*200 grams.

cameronasmith

Thanks dlloyd,

You've helped a lot! I'll let you know when I get a 16bit ADC :) Hopefully, that will improve things.

Go Up