Author Topic: Strange analog readings.  (Read 2383 times)

0 Members and 1 Guest are viewing this topic.

Offline cameronasmithTopic starter

  • Newbie
  • Posts: 2
Strange analog readings.
« on: April 07, 2014, 07:10:23 pm »
Hi Guys,

I have an INA125 plugged into a breadboard (i read that this might be a problem) with a strain gauge connected to an Arduino analog pin.

When I take readings it seems to jump around. For example:

101, 102, 101, 101, 102, 101, 101, 101.

Is this normal for a strain gauge? And can anyone recommend a way to not make the signals so erratic.


Thanks,

Cameron.
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5128
  • Country: nl
Re: Strange analog readings.
« Reply #1 on: April 07, 2014, 07:13:03 pm »
I donĀ“t see a problem here: imagine that the signal is 101.5, what readout would you suspect?
Keyboard error: Press F1 to continue.
 

Offline cameronasmithTopic starter

  • Newbie
  • Posts: 2
Re: Strange analog readings.
« Reply #2 on: April 07, 2014, 07:19:08 pm »
Hi, paopbz,

I'm sorry, I don't think I explained it very well. If I put a 100gram weight on the scale. The reading will jump around like:

202, 201, 201, 202, 202, 201.

If I put a 101 gram weight on the scale I will get something like this:

203, 202, 203, 203, 203, 202.

You can see how this can become a problem when weighing in 1 gram increments.

I really need it to just give me one reading.

Thanks,

Cameron.
 

Offline KJDS

  • Super Contributor
  • ***
  • Posts: 2442
  • Country: gb
    • my website holding page
Re: Strange analog readings.
« Reply #3 on: April 07, 2014, 07:44:04 pm »
You will always have some variation due to noise.

Just display an average.

Offline lewis

  • Frequent Contributor
  • **
  • Posts: 704
  • Country: gb
  • Nullius in verba
Re: Strange analog readings.
« Reply #4 on: April 07, 2014, 07:47:46 pm »
You need some digital averaging! I use an IIR filter like this: http://electronics.stackexchange.com/questions/30370/fast-and-memory-efficient-moving-average-calculation

Think about why the reading will jump around and why you will never get a single consistent value.
I will not be pushed, filed, stamped, indexed, briefed, debriefed or numbered.
 

Online PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5128
  • Country: nl
Re: Strange analog readings.
« Reply #5 on: April 07, 2014, 08:03:47 pm »
Hi, paopbz,

I'm sorry, I don't think I explained it very well.

I think you did explain it very well, just look at my answer again and think about it...
Keyboard error: Press F1 to continue.
 

Offline kfitch42

  • Frequent Contributor
  • **
  • Posts: 300
  • Country: us
Re: Strange analog readings.
« Reply #6 on: April 07, 2014, 08:56:43 pm »
Expanding on the concept a bit more, this is a case were noise can be a good thing. By using an average you can get a more precise reading than what you get with a single reading.

Think about those cheap digital oral thermometers, they can take quite a while to give a reading ... but the ones they use at the doctor's office only take a couple seconds.

This is because the cheap ones are using a cheaper/noisier sensor and wait until the average settles down. The more expensive ones at the doctor's office use a better(more expensive) sensor so they don't have to average for so long.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf