Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: analog input values

analog input values 6 years 5 months ago #9322

  • brew
  • brew's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 108
  • Karma: 0
Hello All,

I got a small problem...

I have a analog pressure sensor hooked up through the Arduino Mega
AiPressure1

and its reading numbers in the Av window -
500 for zero pressure
and 1500 for 15 PSI

so i want to put in a formula
(ANALOG INPUT - 500) / 66

this will give me the reading of PSI in the Av window

what is the best way to do this?

thanks!!!

bill
Attachments:
The administrator has disabled public write access.

analog input values 6 years 5 months ago #9338

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3173
  • Thank you received: 499
  • Karma: 133
Hi Bill,

If you are using the standard sketch the Representation shoul be be Int16, and RawValueRange is the range for the integer value in the message from Arduino and this is 0 - 1023.
ChannelSigValRange is the range for the input channel on the Arduino and use to be 0 - 5 V.
SensorSigValRange is the range of the output from the sensor, that maybe is something like 1 - 3 V as 0 PSI is not 0 V. Finally ActValRange is the engineering value that corresponds to 1 and 3 V, maybe 0 - 15 PSI.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: brew

analog input values 6 years 4 months ago #9401

  • brew
  • brew's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 108
  • Karma: 0
Thanks Claes!
worked fine.
you are the wizard of proview.

bill
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 7.526 seconds