PDA

View Full Version : Custom ADX



buddrow
06-29-2014, 07:25 PM
Need help coming up with the correct conversion formula for TPS data sent from an Arduino to TunerPro5. Communication is working, after connecting the device, open dash, turn the Throttle Position sensor and the gauge rolls over 4 times while doing a full sweep but will go from 0.49 to 5.0vdc at about 1/4 travel. I am using the conversion in the $42 TPS adx( X * .0196).

Im a little confused as to why the needle sweeps from 0.49-5.0 4 times instead of just 1 and I am assuming it's the conversion but I could be wrong. Any insight is appreciated.

Buddrow

RobertISaar
06-29-2014, 08:05 PM
...... the arduino natively doing 10-bit A/D reads wouldn't come into play here, would it? because that happens to be 4X the resolution...... otherwise, i couldn't say why 4X.

buddrow
06-30-2014, 12:07 AM
...... the arduino natively doing 10-bit A/D reads wouldn't come into play here, would it? because that happens to be 4X the resolution...... otherwise, i couldn't say why 4X.

I tried dividing by 4, multiplying by .25 and that just seems to jam up the value. It either locks at 5vdc, narrows the travel, say between 1.0-2.28vdc for instance. I know Im missing something and Im sure its something simple. How do I convert the 10 bit arduino to the 8 bit TP format in either instance. I dont want to mess with the arduino code to fix it because as it is now seems to be the only way for it to spit out semi-correct info.

Buddrow

buddrow
06-30-2014, 09:09 AM
I tried dividing by 4, multiplying by .25 and that just seems to jam up the value. It either locks at 5vdc, narrows the travel, say between 1.0-2.28vdc for instance. I know Im missing something and Im sure its something simple. How do I convert the 10 bit arduino to the 8 bit TP format in either instance. I dont want to mess with the arduino code to fix it because as it is now seems to be the only way for it to spit out semi-correct info.

Buddrow

Ok, so I figured it out with one line of code on the Arduino. All downhill from here. :rockon:



Buddrow