- Joined
- Jun 18, 2001
- Messages
- 2,180
So, I added an oil pressure sensor and tied it into my Powerlogger, and wanted it to register correctly in ALDLDroid. The default for the analog inputs just spits out the voltage coming from the sensor.
I bounced some emails back and forth with Sebastian (the guy that wrote ALDLDroid) and this is how I got it to work.
In the SCMG_BT_ALDL_001.adx file you get from Bob, there are blocks for the analog inputs. Here's what the block for Analog Input 4 looks like:
The parts we care about are the title in the first line, and the MATH equation. The Title changes the display name for whatever gauge you assign on the dashboard, and also changes the name of the field in your data logs.
The Equation part is where you tell the software how to take the value coming from the sensor and turn it into something that relates to what you care about. In this case, (X*5/65535) is how the software takes the sensor value and turns it into voltage (0-5v).
The 100psi pressure sensor I got for my car reads 0psi at 0.5v, and 100psi at 4.5v. So, the conversion is ((X*5/65535)-0.5)*25 = psi.
So, the completed block is:
So, change this block in the ADX file and save to a new name, then upload it on your tablet and tell ALDLDroid to use it, and viola, you'll have a pressure reading in PSI instead of volts!
I bounced some emails back and forth with Sebastian (the guy that wrote ALDLDroid) and this is how I got it to work.
In the SCMG_BT_ALDL_001.adx file you get from Bob, there are blocks for the analog inputs. Here's what the block for Analog Input 4 looks like:
Code:
<ADXVALUE id="Analog4" idhash="0x9840CBD8" title="Analog Input 4">
<packetoffset>0x0E</packetoffset>
<sizeinbits>16</sizeinbits>
<range low="0.000000" high="255.000000" />
<alarms low="0.000000" high="255.000000" />
<digcount>2</digcount>
<outputtype>3</outputtype>
<unittype>32</unittype>
<MATH equation="X*5/65535">
<VAR varID="X" type="native" />
</MATH>
</ADXVALUE>
The parts we care about are the title in the first line, and the MATH equation. The Title changes the display name for whatever gauge you assign on the dashboard, and also changes the name of the field in your data logs.
The Equation part is where you tell the software how to take the value coming from the sensor and turn it into something that relates to what you care about. In this case, (X*5/65535) is how the software takes the sensor value and turns it into voltage (0-5v).
The 100psi pressure sensor I got for my car reads 0psi at 0.5v, and 100psi at 4.5v. So, the conversion is ((X*5/65535)-0.5)*25 = psi.
So, the completed block is:
Code:
<ADXVALUE id="Analog4" idhash="0x9840CBD8" title="Oil Pressure">
<packetoffset>0x0E</packetoffset>
<sizeinbits>16</sizeinbits>
<range low="0.000000" high="255.000000" />
<alarms low="0.000000" high="255.000000" />
<digcount>2</digcount>
<outputtype>3</outputtype>
<unittype>32</unittype>
<MATH equation="((X*5/65535)-0.5)*25">
<VAR varID="X" type="native" />
</MATH>
</ADXVALUE>
So, change this block in the ADX file and save to a new name, then upload it on your tablet and tell ALDLDroid to use it, and viola, you'll have a pressure reading in PSI instead of volts!