This is the same problem as last time but figured I'd start a new thread so we can start fresh (you can forget the old thread I've included all the info in this one).
I use your ADC-16 onboard an underwater vehicle and have uploaded the settings file to my Website:
I'm trying to write a new interface for it but find that the values in the included VB6 sample project don't match up to the readings I get when I run my settings file. These are the values I get:
PicoLog Recorder reads:
Water alarm 2154mv
Heading 303 degrees
Pod Vacuum 1.02bar
Pod Vacuum 0.17bar
Pod Vacuum 1.02bar
24v Monitor 24.12 volts
Depth -0.0metres
So I realise that the conversion formula I use is incorrect but - when I use that to calculate the Channel 1 value it read (I get a raw value of 13.9982760000001 ) and then put that through the correct formula:
(5 * raw value/8191) -2.5
I get -2.4915 which is completely off the 2154mv reading your software gave.
The installed software is version 5.16.2.
Cheers,
Michael
Last edited by MHims on Sat Jul 11, 2009 9:01 pm, edited 1 time in total.
I'm afraid I cant work out what you have done here.
Firstly, I've no idea why are doing sum (value * 2500) / 65535 on every timer event. If you intend to convert to mv you should use the equation (5 * raw value/max ADC value) -2.5, as you say later on in your post.
Your equation, (5 * raw value/8191) -2.5, is correct for 13bit resoltion but your raw value appears to be wrong. The raw value should be in the range 0-8192. Working back from the PicoLog result, you should expect an ADC count of 7624 for a input voltage of 2.154V.
You seem to be applying too many equations to the data causing you these errors.
I cant really help until I know how you convert from mV into temperature or pressure etc. Could you post your PLS or PLW file so that I can take a look at the settings.
Ok I've changed it like you said....added on a few If statements to convert the raw data to mV using the appropriate value in the formula and then tried it:
Firstly, I've no idea why are doing sum (value * 2500) / 65535 on every timer event. If you intend to convert to mv you should use the equation (5 * raw value/max ADC value) -2.5, as you say later on in your post.
I'm afraid the above statement is incorrect. The ADC16 has a resolution of 16bits plus sign so you were correct with your initial statement.