how to calculate equations to log 0-5v sensors

160 And 8192 Baud Aldl
User avatar
delcowizzid
Posts: 5493
Joined: Sat Feb 28, 2009 8:38 pm
Location: Wellington NZ
Contact:

how to calculate equations to log 0-5v sensors

Post 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
If Its Got Gas Or Ass Count Me In.if it cant be fixed with a hammer you have an electrical problem
User avatar
The1
Posts: 4694
Joined: Mon Jan 04, 2010 10:23 am

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

Post 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/
User avatar
delcowizzid
Posts: 5493
Joined: Sat Feb 28, 2009 8:38 pm
Location: Wellington NZ
Contact:

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

Post 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
If Its Got Gas Or Ass Count Me In.if it cant be fixed with a hammer you have an electrical problem
User avatar
delcowizzid
Posts: 5493
Joined: Sat Feb 28, 2009 8:38 pm
Location: Wellington NZ
Contact:

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

Post by delcowizzid »

to dumb to operate the program LOL
If Its Got Gas Or Ass Count Me In.if it cant be fixed with a hammer you have an electrical problem
User avatar
The1
Posts: 4694
Joined: Mon Jan 04, 2010 10:23 am

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

Post 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
User avatar
delcowizzid
Posts: 5493
Joined: Sat Feb 28, 2009 8:38 pm
Location: Wellington NZ
Contact:

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

Post 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
If Its Got Gas Or Ass Count Me In.if it cant be fixed with a hammer you have an electrical problem
User avatar
delcowizzid
Posts: 5493
Joined: Sat Feb 28, 2009 8:38 pm
Location: Wellington NZ
Contact:

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

Post by delcowizzid »

ahha i figured my mistake was entering 2 different series of numbers not 2 in one series i have output now lol
If Its Got Gas Or Ass Count Me In.if it cant be fixed with a hammer you have an electrical problem
User avatar
delcowizzid
Posts: 5493
Joined: Sat Feb 28, 2009 8:38 pm
Location: Wellington NZ
Contact:

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

Post 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
If Its Got Gas Or Ass Count Me In.if it cant be fixed with a hammer you have an electrical problem
User avatar
The1
Posts: 4694
Joined: Mon Jan 04, 2010 10:23 am

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

Post by The1 »

i get page not found for the aliexpress link
User avatar
The1
Posts: 4694
Joined: Mon Jan 04, 2010 10:23 am

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

Post 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 5643 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?
Post Reply