Help with math problum

Jul 18, 2006 5 Replies

I have a pressure transducer that I am trying to make its output linear to drive a digital readout. The digital readout takes a voltage of 0 to 2 Volts. The problem I am having is Cumming up with an algorithm to crunch the following numbers to feed the digital display. Any and all help will be greatly appreciated.


PSI Output (m volts)



3400 649 3300 629 3200 610 3100 591 3000 570 2900 550 2800 532 2700 514 2600 495 2500 476 2400 456 2300 437 2200 417 2100 398 2000 380 1900 360 1800 341 1700 322 1600 302 1500 284 1400 265 1300 246 1200 227 1100 208 1000 190 900 171 800 152 700 134 600 115 500 98 400 79 300 60 200 42 100 27.5 98 27.2 96 26.8 94 26.5 92 26.2 90 25.8 88 25.5 86 25.2 84 24.8 82 24.4 80 24.1 78 23.8 76 23.5 74 23.1 72 22.8 70 22.5 68 22.1 66 21.8 64 21.5 62 21.2 60 20.9 58 20.6 56 20.2 54 19.9 52 19.6 50 19.3 48 19 46 18.7 44 18.4 42 18.2 40 17.8 38 17.5 36 17.2 34 16.9 32 16.7 30 16.4 28 16.3 26 16 24 15.8 22 15.7 20 15.6 18 15.6 16 15.6 14 15.6 12 15.6 10 15.6 8 15.6 6 15.6 4 15.6 2 15.6 0 15.6


Piecewise linear interpolation?

(Are you using an ADC and DAC? )

Doesn't your 'number cruncher' have its own display? Why use a separate voltage driven display?

rb

I am using an ADC with a 2.5v Reference voltage. I was hoping to get around using a number cruncher. I was hoping to use an OP AMP to drive the Voltage Display. I do have the option of using a DSP, but want to keep the cost down.

Bill

around

Voltage

to

to

PSI, output mV

3400,649 3300,629 3200,610 3100,591 3000,570 2900,550 2800,532 2700,514 2600,495 2500,476 2400,456 2300,437 2200,417 2100,398 2000,380 1900,360 1800,341 1700,322 1600,302 1500,284 1400,265 1300,246 1200,227 1100,208 1000,190 900,71 800,152 700,134 600,115 500,98 400,79 300,60 200,42 100,27.5 98,27.2 96,26.8 94,26.5 92,26.2 90,25.8 88,25.5 86,25.2 84,24.8 82,24.4 80,24.1 78,23.8 76,23.5 74,23.1 72,22.8 70,22.5 68,22.1 66,21.8 64,21.5 62,21.2 60,20.9 58,20.6 56,20.2 54,19.9 52,19.6 50,19.3 48,19 46,18.7 44,18.4 42,18.2 40,17.8 38,17.5 36,17.2 34,16.9 32,16.7 30,16.4 28,16.3 26,16 24,15.8 22,15.7 20,15.6 18,15.6 16,15.6 14,15.6 12,15.6 10,15.6 8,15.6 6,15.6 4,15.6 2,15.6 0,15.6

It looks pretty linear to me. Except at the low end, but math won't fix that. Applying a gain of 5.37 to your mV (output) signal, then knocking

50.5mV off of that will result in mV equal to PSI, within about 1% of the full scale value (e.g. within about 35PSI).

Crossposting to some electronics groups.

j

Now that it's comma-delimited, I was able to copy it into Excel and partially parse it into two columns and plot part of it. You can try it. Use, in col B: = INT(A1/1000) and col C: = A1-B1*1000. Copy the formulas down to the bottom but **. You can highlight the two columns down to 600, 115 and then do an XY scatter plot. Plot is clearly quite linear except a bobble atat 900,71 should be

900,170. **Formulas wouldn't work below 600; you can fool with it. JP

An A/D converter feeding a lookup table rom design can be very simple. Depending on other considerations, you may want to add input and output data latches.

Input --> A/D (8bits) --> ROM --> output (8-bits) --> display.

The contents of the ROM can be anything that makes sense so that the display reads out "linearly", or you can add switches (and increase ROM size) to display mv from the transducer or anything else you like.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required