Lil' Blackbox

General => General Discussion => Topic started by: anothernord on December 09, 2015, 02:43:48 PM

Title: Load vs. RPM comp-speed mapping w/ OBD-serial interface
Post by: anothernord on December 09, 2015, 02:43:48 PM
Well Mr. Curtis is almost finished with my board and I was pre-pondering how I'll apply this to my 2001 V6 Tacoma that's getting the HE351VE treatment.  I was toying with the idea of using an OBD-UART serial adapter to take in engine load and RPM from the factory ECU and using those values to spit out a target compressor speed based on values in a 2D lookup table.

Any thoughts if this would work or not?  Dumb question?  I'm an ME but control systems is not an area of expertise of mine.

P.S. here's the adapter I was looking at
http://freematics.com/store/index.php?route=product/product&product_id=30
Title: Re: Load vs. RPM comp-speed mapping w/ OBD-serial interface
Post by: me78569 on December 09, 2015, 08:28:28 PM
That adapter didn't work for me and my 2000 dodge.  You need to verify what OBD protocol is being used on your truck. 

I am working through using a ELM327 obd adapter and piping that info into my setup using serial.println() and serial.read functions.
Title: Re: Load vs. RPM comp-speed mapping w/ OBD-serial interface
Post by: anothernord on December 16, 2015, 08:34:51 AM
Alright, I ordered this:

I should be able to make a multi-dimensional array to have a target shaft speed based on load and engine RPM. 

(http://i131.photobucket.com/albums/p310/anothernord/Freematics_OBD_Data_Logger_Kit3.jpg) (http://s131.photobucket.com/user/anothernord/media/Freematics_OBD_Data_Logger_Kit3.jpg.html)
Title: Re: Load vs. RPM comp-speed mapping w/ OBD-serial interface
Post by: me78569 on December 16, 2015, 09:35:45 AM
I really hope your truck is compatible with the 2 protocols that thing supports.  I was pretty unhappy with mine.  It didn't work worth a darn.
Title: Re: Load vs. RPM comp-speed mapping w/ OBD-serial interface
Post by: Rx7man on December 16, 2015, 12:41:38 PM
I would recommend tapping into the TPS sensor and doing your own calculations, though I will say you'll inevitably learn a lot by doing things another way, whether they're successful or not..  I'm going to try to hack a Garmin GPS to do my display... dont know if it'll work though
Title: Re: Load vs. RPM comp-speed mapping w/ OBD-serial interface
Post by: anothernord on December 28, 2015, 04:48:59 PM
So it turns out the order didn't go through, which is really great because I just found that it doesn't support my Toyota's ISO 9141-2 protocol.  Whew!

I suppose tapping the TPS and RPM signals are the best way option otherwise.   
Title: Re: Load vs. RPM comp-speed mapping w/ OBD-serial interface
Post by: Rx7man on December 29, 2015, 01:48:33 AM
Thats some good luck!

You might be able to tap into the tach signal to get your RPM, and into the TPS wire directly for TPS sensing... That's how I did it on my truck and it works pretty good
Title: Re: Load vs. RPM comp-speed mapping w/ OBD-serial interface
Post by: anothernord on December 29, 2015, 08:02:04 AM
Yeah TPS should be easy since it's just 0-5V already.  analogRead should work fine.  The tach signal seems trickier.  I'm guessing it's a square wave from the ECU with 12v amplitude, so a transition to convert to 5V will be necessary.  I suppose you have code for your tach reading?  I'd be interested to see it. 
Title: Re: Load vs. RPM comp-speed mapping w/ OBD-serial interface
Post by: Rx7man on December 29, 2015, 08:58:34 AM
I read the tach with a pin falling interrupt on pin 2.. interrupt increments a number, then whenever I recalculate my inputs I see how many times it fired..
On my truck, the tach signal from the ECU to the dash is ALREADY a 5V square wave (very very short duty though).  I will post up code once I smooth out a few more hiccups I'm working on