int reading = analogRead(0); float voltage = (reading * 5) / 1024.0; float temperatureC = (voltage-0.5) * 100;
int reading = analogRead(0); float voltage = ( reading * 4 ) / 1024; float PSI = voltage * 50;
...but the output is radiometric...
Definition of RADIOMETRIC1 : relating to, using, or measured by a radiometer2 : of or relating to the measurement of geologic time by means of the rate of disintegration of radioactive elements
That seems to address the key elements of the ADC issues. Would you agree?
Radiometric? Are you sure that's the correct word?
If the project is just to determine engine wear and such, then it may be more important to stay with simple solutions. Most compression testing is to compare pressure variations between the cylinders in a single engine. I think the compression testers I've seen have a check valve between the cylinder and the readout device so the cylinder pressure is trapped in the readout device. This would be the ideal area to locate the pressure transducer.
Anyway, this doesn't address the issue I raised.
No big deal though, I'll just go with what I have 'cause it makes sense.
int PSI = (((analogRead(0) - 102) * 400L) + 819L) / 1638L
Don't. It's wrong.
Try this...Code: [Select]int PSI = (((analogRead(0) - 102) * 400L) + 819L) / 1638LI assume to-the-nearest PSI is acceptable.
And where did you come up with those numbers, ergo what do they represent? I suspect that the stuff on the end is to avoid FP math, but...
((analogRead(0) - 102) * 200) / 819
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16