Author Topic: Analogue Input Raw Values  (Read 891 times)

nathanknz

  • Newbie
  • *
  • Posts: 16
Analogue Input Raw Values
« on: October 20, 2009, 08:46:57 PM »
I see that the action triggers for analogue inputs are defined by the Raw value only.

Is there a resource around (I had a poke around the wiki - but perhaps I missed something) which gives a formula for calculating the Raw value from things such as Temp C, Temp F etc?

Looking at the specs of the temperature probe it operates for the range -40C to 104C. Is it safe to assume that -40C would have a Raw value of 0, and 104C have a Raw value of 1023? (I'm assuming it is linear?) If that is the case, then it should be easy to calculate.

The wiki states "Figure out the raw value of the analog input trigger. You can do this by choosing the appropriate analog scale and entering your trigger value. Then change the scale to Raw. Write down this raw value, you'll need it later", but I couldn't see where to do this?

Thanks.

jason

  • Administrator
  • Hero Member
  • *****
  • Posts: 502
    • ioBridge.com
Re: Analogue Input Raw Values
« Reply #1 on: October 20, 2009, 09:14:59 PM »
It's not quite a linear scale.  I wish it was, but unfortunately it's done with a look-up table.

Here is one way to figure out the raw value of a scaled value:

1.  Go to the Module settings page for a module that is online.

2.  Find an I/O channel that you aren't using for anything.

3.  Change the Analog Scale from Raw to the scale of interest and wait a second or two for the page to reload.

4.  Now the Analog Trigger and Analog Reset are in terms of the scale you picked.

5.  Change the Analog Trigger to the scaled value (30C, 4.2V, etc)

6.  Now set the Analog Scale back to Raw.

7.  When the page reloads, the value you entered for the Analog Trigger will be according to the Raw scale.
Jason Winters
ioBridge Developer

nathanknz

  • Newbie
  • *
  • Posts: 16
Re: Analogue Input Raw Values
« Reply #2 on: October 21, 2009, 03:21:38 AM »
Gotcha. Thanks for the further explanation. When reading the note in the wiki I didn't realise it was specifically referring to the ranges in the module listing.

Makes good sense now  :)