USB Datalogging

K-Series Programmable ECU installation questions / support issues
Post Reply
taohawaii
Posts: 27
Joined: Thu Mar 25, 2010 2:55 pm

USB Datalogging

Post by taohawaii »

To Hondata: I'm hoping you guys are really cool about all this...

I had my radio stolen. Searching for replacements, I came across computers that fit in the dash. I am planning to author an application which implements the USB logging features of K-Manager but with "fancy" (er) virtual gauges.

Please note that this is not for profit and I am not in business. This is just for my own personal enjoyment.

My question is: what do I need to know to datalog through the USB port?

I assume that the FTDI chip does the standard RS232 stuff but I really don't know what I need to send to the board to get it to start/stop sending sensor values (and avoid stepping on the other features of the board). Or does it even work this way... Would i need to iteratively query for each sensor value by ID (like CAN BUS ID)?

Additional implementation info:

My goal is to have any external sensors such as GPS receivers, accelerometers, an pyrometer, and the sensor data from the K-Pro ECU fed into a single common operating picture for fancy (near real time) processing and display. (A la GT-R)

I would like to use an Arduino microcontroller as a multipurpose interface/microcontroller/muxer. It will query|receive sensor data from K-Pro via USB and send this information to the "car-puter" through another interface. The car-pc can then perform any intensive conversions/computations and (if necessary) send a command to the microcontroller. The microcontroller I have spec'd has 14 digital input/outputs and 6 analog input/outputs (with PWM capability). So something like a pyrometer could be fed into the car-puter by connecting directly to this board. The board then, is an interface which muxes the data coming from K-Pro with data from directly connected sensors which can also be used to extend the number of I/O pins available for auxillery systems controlled by the car-pc.

There is also potential for an alternative use in this application. If you send information such as input states back to the K-pro (and also commands from the K-Pro to the board) you could extend the number of I/O pins available to the ECU. I thought you guys might be interested in this as an alternative to reusing existing ECU pins. My first thought on this is that you guys didn't do it because the ECU's main processor only has direct access to existing pins.

My guess is that the K-Pro datalogs by passively sniffing the CAN BUS and so is in fact isolated from bi-directional communication with the ECU. If this is true one would only need to reset (interrupting the ECU's processor) and write (the new firmware) to the ECU. But even so it would seem posible to use shared memory for communication. Anyway, all I am personally interested in is getting raw data OUT of the ECU.


I would really like to see K Manager implement a slick dashboard which I could simply run on my car PC. I would still need to find a way to add the accelerometer/GPS/pyrometer so I can do dyno-estimations and economy tuning.


On another note, a feature request: Should you guys find yourself with lots of extra time and money (we should be so lucky), an "economy" module in K Maganer would be fantastic! I see that you provide products for more vehicles than the RSX to which this could be a selling point. I think something like short term (last 2 seconds) fuel rate per minute/mile, long term fuel rate I.E. since [trip beginning]/[last reset] per minute/mile, and some extensions for a pyrometer would do the trick...

Thank you!
Floppie
Posts: 71
Joined: Thu Mar 18, 2010 11:11 pm
Location: Philadelphia, PA
Contact:

Post by Floppie »

First, let me say I'd be interested in collaborating with you on the software end of things. I'm a developer myself - I don't know a whole lot about the low-level driver/hardware interfacing side of things, but aside from that my skills cover a pretty wide range :)

That said, there's no way (with current Honda/Hondata hardware) for Kpro/KManager to be able to calculate fuel economy, because it can't reliably calculate fuel consumption. As it stands, it knows four things about fuel consumption - injector pulse width, injector duty cycle, RPM, and injector maximum flow rate (tuner specifies the last one in the kal).

There are a number of missing factors from the equation. Part of the pulse width is spent actually opening the injector, during which time fuel can't flow through it - this is known as injector dead time (I apologize if I'm explaining things you already know), which the ECU/KManager are not aware of. I might be wrong, don't have my laptop in front of me...tuner might specify this as well, but even so, that's only one more piece of the puzzle.

There's still fuel pressure, and fuel viscosity (once the injector opens, the fuel does require a finite amount of time to actually start flowing through). Both will have an effect on the amount of fuel entering the combustion chambers. Also, injector variance - not all ID1000s, for example, are 100% identical.

The only way to reliably determine fuel consumption is to hook up a flow meter between the pump and the rail.

Now, I'm not trying to rain on your parade or anything, like I said I'm definitely interested in the project :) just saying, the ECU alone cannot calculate fuel consumption.

Additionally, there are some pretty cool displays available for Kpro. I'll post a screenshot of mine when I get home. The only problem is it's missing a few indicators I want - oil pressure, fuel pressure, and EGT for example.
taohawaii
Posts: 27
Joined: Thu Mar 25, 2010 2:55 pm

Great Info. USB any one?

Post by taohawaii »

Consider parade rain check'd.

I like the idea of using someone else's work but haven't come across anything that does what I want... Maybe the info you've got is that answer I couldn't find?

My main point of contention is that I have to disable some of my dash gauges to output data from the ECU. I would prefer to simply use the USB port... I understand that this is not normally considered an issue as the digital and physical dashes duplicate displays but I just hate to see "dead" gauges on my dash.

Maybe I'll just expand the scope of the project and look into replacing the dash with an LCD display... This is more work than I originally intended though.

All-in-all this should be a fun project. I have no dead lines and look forward to seeing which direction it goes in. Hopefully Hondata will chime in sooner or later.
kb58
Posts: 81
Joined: Sat Nov 28, 2009 2:53 pm

Post by kb58 »

http://www.hondata.com/forum/viewtopic.php?t=11668

As far as signal levels, it's not RS-232. It sits idle at +12V and drops to 0V for a "1".
Mid-engine K24 turbo Locost, http://www.midlana.com
taohawaii
Posts: 27
Joined: Thu Mar 25, 2010 2:55 pm

Actually...

Post by taohawaii »

Thanks for taking the time to help... But this is an apple and orange thing. I am looking to use the USB interface (virtual serial device over USB called FTDI named after the company who pioneered them).

The post and information from Hondata regards connecting through an ecu pin...
locash
Posts: 280
Joined: Sat Mar 20, 2004 11:27 am
Location: Phoenix, AZ
Contact:

Post by locash »

You may also want to talk to James over at HRTuning, as he is obtaining data via the USB port for his TunerView screen systems..
Locash Racing, LLC
Hondata Sales and Tuning
Dynapack 4000 2wd Dyno
In-Shop CNC Machining and Product Manufacturing
taohawaii
Posts: 27
Joined: Thu Mar 25, 2010 2:55 pm

Awesome! Thank you.

Post by taohawaii »

That is why I love these forums. Someone is always out there with the answers already! It is great to see someone likeminded taking the initiative.

Thank you for the information. I will contact him and see what I can gleam for my little project.
Floppie
Posts: 71
Joined: Thu Mar 18, 2010 11:11 pm
Location: Philadelphia, PA
Contact:

Post by Floppie »

Haven't had a chance to get my laptop out and take a screenshot of the display, but here's a thread full of them on ClubRSX:
http://forums.clubrsx.com/showthread.php?t=629507

There are some pretty sweet ones on there. This is the one mine's based on - I just took this one and modified it a bit to provide some more information:
http://i235.photobucket.com/albums/ee68 ... 11/new.jpg
I also maximized the Display window and gave the actual display a bit more height, I don't care about seeing the graph while driving.

I also found when reskimming that thread just now, this link - http://sourceforge.net/projects/digitalgauges/ - it's a CentraFuse plugin to provide gauges/alerts/etc. I'm not sure if it uses KPro's USB port or if it uses OBD2, but it might be something you'd be interested in.
taohawaii
Posts: 27
Joined: Thu Mar 25, 2010 2:55 pm

Guilty as charged. Didn't RTFM...

Post by taohawaii »

Actually, that is not far from what I had in mind, much better than I thought possible with K-Manager, and probably as good as anything I could create.

I believe that I can be happy with the tools that K Manager provides. They obviously put a lot of work into this. (Much more than I realized.)

But there are only a handful of "alarm" sounds which appear to have been compiled into the software. I would like the ability to choose a sound file (or at least add them in) so that a nice sexy australian woman's voice tells me when I am running 17:1 AFR under full throttle... It sure would be great if something like "dumbass" would erupt triumphantly from my cars over-amplified stereo system.

Which leads me to another point... I see that the audible alarm/warning will trigger continuously when above the minimum and/or below the maximum. I would like to be able to trigger an single instance of an alert when say... I vtec, switch to open loop, knock, etc without it continuously going off. Is there already a way to do this?

Maybe later hondata will have alarms based on lookup tables like the lean protection feature so we can choose the (multiple) conditions of the alarm triggers.
Floppie
Posts: 71
Joined: Thu Mar 18, 2010 11:11 pm
Location: Philadelphia, PA
Contact:

Post by Floppie »

Honestly, it WOULD be nice to be able to integrate, say, oil pressure, fuel pressure, fuel economy, etc. into a one-stop display. If you're still interested in doing the project, now that the ideal (visually) is there, it wouldn't be difficult to duplicate it.
McCoy
Posts: 1
Joined: Thu Mar 19, 2009 2:44 pm
Contact:

Post by McCoy »

It would be nice to have a dedicated in dash feature whereby you could access and manipulate the calibrations through the K-Manager in one mode as well as a monitoring mode.
Post Reply