Wideband Oxygen Sensor Display

Posted by: jag

Wideband Oxygen Sensor Display - 19/09/2006 16:04

Hello all,

I have recently started working on software to display the data from my innovate motorsports LC-1 wideband Oxygen sensor. The software is to the point where it displays the Lambda and AFR values and will draw a moving graph of the data. It also displays the error codes and status messages from the wideband. The code isn't quite to the point where I would want to post it anywhere but if anyone is interested feel free to contact me.
It currently only supports the LC-1 but it wouldn't take me long to add support for other innovate widebands. I might also add support for the diywb though that will take a little longer.

-Jeremy
Posted by: tfabris

Re: Wideband Oxygen Sensor Display - 19/09/2006 16:48

You mean it displays the data on the Empeg screen? Very cool. Did you have to do any custom hardware work to get the two devices talking, or did it just plug straight into the serial port with no modification?
Posted by: jag

Re: Wideband Oxygen Sensor Display - 19/09/2006 18:14

It plugs straight into the serial port. The innovate products have two mini phono jacks for serial ports. They are meant to be able to be chained so that you can have a whole string of them communicating to a display (or computer). So, it comes with mini phono to db9 cable that I just plugged into the back of the empeg.
I'm having a small problem where it seems that some garbage is getting sent out over the serial port when it gets set up, causing to wideband to do a free air calibration which, if it happened in the tailpipe wouldn't be a good thing (especially if the engine was running).
I'm not super experience with serial port programming so I might be doing something wrong....



I've attached some screenshots (the sensor isn't in a car at the moment so the data isn't interesting)
-Jeremy
Posted by: wfaulk

Re: Wideband Oxygen Sensor Display - 19/09/2006 18:19

Awesome.

It seems like there was some solution somewhere to the data being spewed out on the serial port. But I forget if the in-car serial port is the same as the back-of-the-empeg serial port, and, if it is, there's no way to prevent it from doing so. But you could put in a timed circuit so that the serial port isn't connected for, say, 15 seconds after the empeg powers on.

Someone else who's more familiar with the serial port hardware chime in.
Posted by: jag

Re: Wideband Oxygen Sensor Display - 19/09/2006 18:25

I haven't even gotten to bootup garbage on the serial port.
My problem is that the serial port is spewing something when I open it in my program.
I think I might just make a special cable that only has the transmit wire from the wideband to the empeg...

-Jeremy
Posted by: wfaulk

Re: Wideband Oxygen Sensor Display - 19/09/2006 18:31

That's weird. You don't have the non-data lines hooked up to data lines somehow, do you? No data should be sent out on program start, but the states of some of the ... metadata ... lines will change.
Posted by: jag

Re: Wideband Oxygen Sensor Display - 19/09/2006 18:42

There aren't any control lines, since it's only connected through a mini phono connector, there are only 3 lines, Ground, transmit and receive.
I'll have to do some more debugging later...
Posted by: wfaulk

Re: Wideband Oxygen Sensor Display - 19/09/2006 19:10

Yeah, but there are on the empeg, and if one of them got crossed with the transmit line....
Posted by: jag

Re: Wideband Oxygen Sensor Display - 19/09/2006 19:28

Well,
I did the intelligent thing and plugged the empeg into the serial port of my laptop and watched while starting the program. I got this:

hijack: removed menu entry: "Wideband O2"

So, now I just have to figure out how to stop the kernel from outputting on the serial port...

-Jeremy
Posted by: wfaulk

Re: Wideband Oxygen Sensor Display - 19/09/2006 19:46

Probably use the suppress_notify parameter for Hijack. I'm not sure if that'll suppress that sort of stuff or not. Also check out the "app uses serial port" setting. I don't think that has anything to do with kernel messages now that I think about it, though.
Posted by: jag

Re: Wideband Oxygen Sensor Display - 19/09/2006 22:14

suppress_notify=1 is in there. It doesn't seem to do it.
I guess I'll have to resort to breaking the transmit line from the empeg. That will solve the problem with boot messages too.

-Jeremy
Posted by: tfabris

Re: Wideband Oxygen Sensor Display - 20/09/2006 03:28

Since that message is generated by Hijack, an open-source kernel, you could edit the source code yourself. And perhaps make it an optional hijack feature to suppress those messages, and give the resulting code back to Mark for rolling back into the main Hijack code base.
Posted by: mlord

Re: Wideband Oxygen Sensor Display - 20/09/2006 05:24

Here's a fixed version of Hijack for you to try it with:

http://rtr.ca/zImage.v463+

Cheers
Posted by: jag

Re: Wideband Oxygen Sensor Display - 20/09/2006 11:21

Thanks!

That fixed it wonderfully. The problem that still remains is I assume boot loader messages. But, since they are at a different baud rate than the wideband, I don't think there is much chance of it understanding it. It only has a few commands and they are all plain letters like 'c'.
So, I'll see how it goes when I get the sensor installed in the car.
Thanks for the fixed kernel!

-Jeremy
Posted by: tman

Re: Wideband Oxygen Sensor Display - 29/09/2006 07:42

Quote:
But, since they are at a different baud rate than the wideband, I don't think there is much chance of it understanding it. It only has a few commands and they are all plain letters like 'c'.

You'll get garbage if the baud rate isn't correct but you'll still receive something. This may or may not be something that it'll cope with.
Posted by: jag

Re: Wideband Oxygen Sensor Display - 29/09/2006 10:22

I'm actually making a custom cable for it that only has the grounds and tx wires from the wideband. That way I can make it with a DB-9 male and wire it so I don't need the mess of adapters (two male-male adapters and a null modem adapter) that I have on there now.
So, it won't matter if the empeg is outputting anything since the line won't be connected.

-Jeremy
Posted by: tman

Re: Wideband Oxygen Sensor Display - 29/09/2006 12:27

Cool. Your project looks interesting! Keep us informed of how it goes
Posted by: RobotCaleb

Re: Wideband Oxygen Sensor Display - 13/10/2006 18:18

Ignore this post, just trying to clear the not-read tag on this thread.
Posted by: tfabris

Re: Wideband Oxygen Sensor Display - 13/10/2006 18:39

That's a bug in the BBS software, we think. Hopefully it'll go away when we upgrade to the next version.

In the meantime, to clear the stuck-on unread-mark, do this:
1. Make sure you're done reading all the messages on the BBS you wanna read.
2. Select "MY HOME" from the bar up top.
3. Select "MARK ALL READ" from the bar at the bottom near your user icon.
4. Select "MARK ALL POSTS AS READ" from the confirmation screen.
Posted by: wfaulk

Re: Wideband Oxygen Sensor Display - 14/10/2006 02:09

Or you can just create a bookmark to: http://empegbbs.com/ubbthreads/domarkallread.php?Cat=0
Posted by: RobotCaleb

Re: Wideband Oxygen Sensor Display - 14/10/2006 15:39

You don't say?
:P

I chose to not do that this time as I wasn't finished reading and it had been a bit since I'd made a frivolous post.
Posted by: tfabris

Re: Wideband Oxygen Sensor Display - 14/10/2006 20:59

Sorry, didn't realize you were the one who taught it to me in the first place.

Knowing this, how come you made the post you made in this thread?
Posted by: thenominous

Re: Wideband Oxygen Sensor Display - 24/11/2008 15:44

Does anyone know if Jag ever released this software to anyone?
This would be an absolute god send to me right about now!!
Posted by: Major_Sarcasm

Re: Wideband Oxygen Sensor Display - 29/11/2008 14:48

I, to, am interested in this.
Posted by: thenominous

Re: Wideband Oxygen Sensor Display - 04/12/2008 16:34

I guess no one knows ??

Shame. Annoying how much "stuff" on the internet just gets lost over time. <sigh>
Posted by: Robotic

Re: Wideband Oxygen Sensor Display - 04/12/2008 16:55

Originally Posted By: thenominous
I guess no one knows ??

Shame. Annoying how much "stuff" on the internet just gets lost over time. <sigh>

Now that my car is supercharged, I, too, think it would be interesting to watch the O2 sensor at work.
Piping it through the empeg would delete a gauge install from the process... even at an extra cheap gauge price.
Posted by: Major_Sarcasm

Re: Wideband Oxygen Sensor Display - 07/12/2008 15:17

That is only a narrowband gauge, designed to connect to the factory-fitted o2 narrowband sensor. That's why it's cheap ('cos it's not much use other than to see if the sensor's working).

The sensor mentioned by the OP is a wideband sensor which has a much more useful output range. I had a wideband sensor and VEMS gauge fitted to my GTR Skyline and it was a very handy tuning aid.

Having the wideband output displayed on the 'peg would be cool indeed.
Posted by: thenominous

Re: Wideband Oxygen Sensor Display - 08/12/2008 14:13

Narrow band is still certainly useful, better than nothing at all thats for sure!

WB is often a telltale sign that something isn't working correctly.
Logging the Innovate one with the empeg, one could also use it for actually tuning the car with new modifications! Certainly logging a bunch of other stuff is possible with the innovate projects so why not the emepg too since it's via serial.

I suppose it's a no go, asking the mods/admins for the email address he registered with for a shot in the dark email, or even some conserted googling for futher info ??
Posted by: Robotic

Re: Wideband Oxygen Sensor Display - 08/12/2008 14:51

Originally Posted By: Major_Sarcasm
That is only a narrowband gauge, designed to connect to the factory-fitted o2 narrowband sensor. That's why it's cheap ('cos it's not much use other than to see if the sensor's working).
Yes, but the factory O2 sensor would still be fun to monitor. If I can free up some funds (and the empeg could display the output) I'd certainly go for a wide-band sensor.
Posted by: thenominous

Re: Wideband Oxygen Sensor Display - 08/12/2008 16:28

Steve, have you got a LM-1 or LC-1 Innovate unit?

The format for the LM-1 is readily available on Innovates website and to be honest doesn't look that complicated to read. If one could program that is.
I guess a simple start would be to init the display and forward the values read from the serial port to the display before getting clever and drawing graphics as Jag did previously.

How's your C ?
Posted by: Major_Sarcasm

Re: Wideband Oxygen Sensor Display - 18/12/2008 20:55

Neither. When I had the VEMS gauge, the sensor was a Bosch item. Not had the pleasure of Innovate gear. If there was a utility for the Empeg that displayed the output, I'd grab one.

My C, like my grasp of all computer languages, is non-existent wink
Posted by: thenominous

Re: Wideband Oxygen Sensor Display - 23/12/2008 17:36

Well, no response to the PM unsurprisingly.
I'll try the admin email request route.
Posted by: jag

Re: Wideband Oxygen Sensor Display - 07/01/2009 11:48

Hi Everyone,

Sorry to have kind of disappeared. As tends to happen with most of my projects, I got this software to the point where it was usable to me and since no one else seemed interested in it at the time, I didn't do much else to it. So, the code isn't really commented at all and probably has quite a few bugs in it.

I'll attach the code to this post. I'm not 100% sure that this is the latest code. It took me a while to find it...

Let me know if anyone has any questions about the code. I don't currently have it installed on my empeg since I had to replace the hard drives recently and the wideband isn't installed in my car at the moment. I'll probably reinstall it when the weather gets a little nicer around here.
Sorry to have disappeared for so long, I'm not quite sure why I didn't get notifications of the posts on the subject.

I would love to know if people have success with the program!

-Jeremy

Posted by: jag

Re: Wideband Oxygen Sensor Display - 07/01/2009 12:44

Hi again,

Just so you know, if you aren't used to compiling your own software, I didn't post a binary of the program, just the source. I have to get a cross compiling environment set up to build a binary. I'll try to do that later today and post a binary.
Also, this requires the Hijack kernel to work. I had it set up so that I could launch it from the hijack menu. Also, I made a custom serial cable for the wideband that omitted one of the data lines so that the wideband didn't see the output from the kernel on boot.

-Jeremy

Posted by: Robotic

Re: Wideband Oxygen Sensor Display - 07/01/2009 13:31

Hi Jag!

Do you have some info regarding the cable you've made and how you wired it to your sensor?

Thanks!
Posted by: jag

Re: Wideband Oxygen Sensor Display - 07/01/2009 17:44

The serial port on the innovate wideband that I have is a mini phono jack (or maybe even the smaller ones that they use for cell phone headsets, I don't remember).
Normally, one wire would be data to the wideband, one would be from the wideband and the other would be ground. I just omitted the one that sends data to the wideband so that the garbage coming off the serial port of the empeg on boot wouldn't mess up the configuration of the sensor.
I can find out exactly which wire is which when I have a chance to pull the cable out of the car.
-Jeremy

Posted by: Robotic

Re: Wideband Oxygen Sensor Display - 07/01/2009 18:45

Thanks, Jeremy.

Meanwhile...
I see some good info on the LC-1 product page at Innovate Motorsports.
Posted by: thenominous

Re: Wideband Oxygen Sensor Display - 09/01/2009 12:24

Welcome back Jag smile

Thanks for posting the code.
I'm going to take a look through it as I have a LM-1 myself and I understand that the protocls are different in some way.

I have access to a LC-1 but it's been a bit dodgy. Never the less, I'll see if I can't get it on to my empeg and doing a little testing myself.
Posted by: jag

Re: Wideband Oxygen Sensor Display - 09/01/2009 12:49

I hope it works for you. I think the LM-1 protocol is pretty much the same. It data logs more than just Oxygen right? I have attached the PDF of the serial protocol that I used to right the code. I'm not sure how much I assumed about the data since I had an LC-1. I think I was trying to right it to be a little flexible but it was just a first stab at the code.
Let me know if I can help.

-Jeremy

Posted by: thenominous

Re: Wideband Oxygen Sensor Display - 22/01/2009 07:06

Not had any time to look at this yet. Struggling for time at present. I will be getting on with it as soon as I can. Didn't resurect you for nothing smile
Posted by: jag

Re: Wideband Oxygen Sensor Display - 03/02/2010 12:02

I think this is actually the more recent code. I haven't touched any of this code in years but there is a compiled binary in this archive so that makes me think that it's the more recent stuff...
Posted by: graynada

Re: Wideband Oxygen Sensor Display - 25/08/2010 16:07

I am having trouble with the attachment, when I tried to unpack it I get the message "tar: This does not look like a tar archive". Is it me or is it the file?
Posted by: canuckInOR

Re: Wideband Oxygen Sensor Display - 25/08/2010 18:49

Originally Posted By: graynada
I am having trouble with the attachment, when I tried to unpack it I get the message "tar: This does not look like a tar archive". Is it me or is it the file?

Possibly both, compounded by your browser "helpfulness". Are you unpacking the tarball using the 'z' flag? If you are, then your browser probably already uncompressed it for you, without renaming the file correctly. If you aren't, then you probably should be.
Posted by: canuckInOR

Re: Wideband Oxygen Sensor Display - 25/08/2010 18:53

It's the file. It's a compressed tarball (created with the 'z' flag), that was then passed through the gzip program a second time. So... gunzip it, and rename it to have a .tar.gz or .tgz extension, and tar will be happy to xvzf it.
Posted by: graynada

Re: Wideband Oxygen Sensor Display - 26/08/2010 08:59

Originally Posted By: canuckInOR
It's the file. It's a compressed tarball (created with the 'z' flag), that was then passed through the gzip program a second time. So... gunzip it, and rename it to have a .tar.gz or .tgz extension, and tar will be happy to xvzf it.


Many thanks, that worked for me.
Posted by: mlord

Hijack v509 - 26/08/2010 11:41

Originally Posted By: jag
So, now I just have to figure out how to stop the kernel from outputting on the serial port...

Okay, so it only took me four years..

Hijack v509 is now released.

The only significant change, is the addition of a new option for config.ini:
Code:
[hijack]
silent=1


This suppresses all (?) hijack messages at the serial port.

Posted by: tonyc

Re: Hijack v509 - 26/08/2010 16:25

Thanks! I was wondering why some serial messages were still getting out despite having suppress_notify=1 set. Thanks!