How Do I Correctly Calculate Sensor Offset Conversion?

  • Thread starter Thread starter rocketman46
  • Start date Start date
Click For Summary
The discussion centers on calculating the correct offset conversion for a sensor that outputs a current of 4-20 mA corresponding to a speed of 0-20 mm/s rms. The user attempts to derive a linear equation but encounters confusion with their calculations, particularly regarding the constant and the mapping of values. Another participant clarifies that to convert the current readings to speed, the formula y = mx + c should be used, where m represents the slope derived from the two known points. They emphasize the importance of correctly determining the slope and intercept to accurately map the sensor readings. The conversation highlights the need for clarity in the formula and the relationship between current and speed.
rocketman46
Messages
1
Reaction score
0
Hi all,

I am just just trying to work out an offset conversion for a sensor I am using, but my transposition is not working out. OK below I will explain:

* Sensor 4 - 20mA coverts to 0 - 20mm/s rms

So:

y = m . x + c
4(mA) = m . 0(mm/s rms) + c therefore tidying up 4(mA) = 0(mm/s rms).m + c
20(mA) = m . 20(mm/s rms) + c therefore tidying up 20(mA) = 20(mm/s rms).m + c

So drawing graph out on paper I make x = 1

Therefore, 20(mA) = 1 . 20(mm/s rms) + c

Transposing 20mA - 20 = c

c = -19.98mA/C

y (mA) = x(mm/ r rms) + c

y (mA) - c = x(mm/ r rms)

so working formula back:

7ma reading on sensor

y (mA) - c = x(mm/ r rms)

7mA -(-19.98mA/C) = 26.98mm/ s rms, which is wrong?

Can somebody help with what I am doing wrong.

Thanks in advance.
 
Mathematics news on Phys.org
In order to map 4 to 20 into 0 to 20 you have to translate the left endpoint from 4 to 0 and then stretch the interval from length 16 to length 20. So x ma is mapped into (20/16)(x- 4)= (5/4)(x- 4)= (5/4)x- 5= 1.25x- 5 mm/s rms. A reading of 7 ma would be mapped to 1.25(7)- 5= 3.75 mm/s rms.
 
Ok, your explanation of what you are trying to do is pretty confusing. I am having to guess a lot of what is going on here.

It seems like you have a sensor that produces a current, and you want to relate that current to the speed of an object the sensor is "looking" at. That means that speed is "y" and current is "x", and you want y=mx + c. You read current, apply the formula, and get speed.

It looks like you get a reading of 4 mA at a speed of 0 mm/s. And 20 mA at a speed of 20 mm/s. And you want to know what the speed is when you get a reading of 7 mA.

Is that right?

There are several things that are confusing me.
Why do you mention rms? As in "Therefore, 20(mA) = 1 . 20(mm/s rms) + c"?
What is the C in "c = -19.98mA/C"?

Anyway, you seem to be trying to fit a straight line to two points. So you just have to remember that m is "rise over run." So y changes by this much divided by x changes by that much, and that's m. Careful to get the sign right. And c is the value of y at x = 0.
 
Here is a little puzzle from the book 100 Geometric Games by Pierre Berloquin. The side of a small square is one meter long and the side of a larger square one and a half meters long. One vertex of the large square is at the center of the small square. The side of the large square cuts two sides of the small square into one- third parts and two-thirds parts. What is the area where the squares overlap?

Similar threads

Replies
2
Views
2K
Replies
10
Views
2K
Replies
6
Views
2K
  • · Replies 22 ·
Replies
22
Views
3K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 1 ·
Replies
1
Views
831
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
5K