Page 1 of 3

how to calculate equations to log 0-5v sensors

Posted: Mon Oct 09, 2017 12:17 pm
by delcowizzid
hoping vl400 gets down on this thread LOL.i just bought 2 sensors to log backpressure and fuel pressure with $12p on the vb.they work on 5v and the one that arrived today has 0.5-5v output 0-1.2mpa or 174psi.how or what maths is required to display the correct readings in $12p on pin b12 for this one .so far i used X / 51*38.6-18.8 to get 0.12psi just sitting on the bench and i can get 1.8psi with the lungs lol.X/51 was allready there to display 0-5v i devided 174 by 4.5 as thats the voltage swing allowing for 0.5v no psi which was 38.66666 then i had to -18.8 to get it back to zero psi .it doesnt need to be super accurate but within a psi or 2 over the range would be nice am i close or have i got -18.8 of offset at max psi.
i think the other sensor may b e 0-100psi and 0-5v actual but wont know till it arrives

Re: how to calculate equations to log 0-5v sensors

Posted: Mon Oct 09, 2017 12:25 pm
by The1
i use this program called graph, insert a series point, then input your x and y values, so x 0.5-5v y 0-1.2mpa, hit ok, insert trendline hit ok, right click and edit on the equation and you get the calc 0.26666667*x-0.13333333
https://www.padowan.dk/

Re: how to calculate equations to log 0-5v sensors

Posted: Mon Oct 09, 2017 12:40 pm
by delcowizzid
sweet program just downloaded equation not quite correct 6.8psi at 0.5v might have to get some calibrated psi on the sensor it came with no datasheet LOL

Re: how to calculate equations to log 0-5v sensors

Posted: Mon Oct 09, 2017 12:51 pm
by delcowizzid
to dumb to operate the program LOL

Re: how to calculate equations to log 0-5v sensors

Posted: Mon Oct 09, 2017 12:56 pm
by The1
use the buttons on the toolbar. for X and Y eg put 0.5 in the first box, then 5 in the box directly under it, then Y sensor real values for 0.5 - 5v, hope that helps

Re: how to calculate equations to log 0-5v sensors

Posted: Mon Oct 09, 2017 1:46 pm
by delcowizzid
re-read the add its Output Voltage: 0.5-4.5 0-174psi VDC can you please smash me out a new equation ive tried to work it to no avail lol
link to the cheapo sensor https://www.aliexpress.com/snapshot/0.h ... 2673407346

Re: how to calculate equations to log 0-5v sensors

Posted: Mon Oct 09, 2017 3:13 pm
by delcowizzid
ahha i figured my mistake was entering 2 different series of numbers not 2 in one series i have output now lol

Re: how to calculate equations to log 0-5v sensors

Posted: Mon Oct 09, 2017 3:49 pm
by delcowizzid
ive entered all the equations i could get still mine looks closest or x/51*43.5-21.75 the software spat out 43.5*x-21.75 but thats just wrong says 65psi on the bench

Re: how to calculate equations to log 0-5v sensors

Posted: Mon Oct 09, 2017 4:11 pm
by The1
i get page not found for the aliexpress link

Re: how to calculate equations to log 0-5v sensors

Posted: Mon Oct 09, 2017 4:23 pm
by The1
Here's what i do.

0.5-4.5
0-174psi

open graph
press F4 and input your data like this
1.JPG
1.JPG (43.58 KiB) Viewed 5777 times
Press ok then CTRL + T
Press ok on linear
Press Enter and your function equation should be there
i got 43.5*x-21.75

so for eg 43.5*4.5-21.75 = 174

If your only getting 65psi with that equation then your prob only getting around 2volts, what's the Raw A/D count say?