Project resurrect Innovate unit...

Started by Prof, August 29, 2010, 03:26:50 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Prof

Thought I\'d post up about my little impromptu project to get analog outputs back from the Innovate LC-1 after the unit\'s built in ones decided to fail (well failing - as they sometimes work - which I find worse to be honest !).
 
I\'ve got the protocol for the LC-1 so thought I\'d hook up a laptop, run Hyperterminal and grab a couple of minutes of the digital output so that I could use it to test my gizmo.
 
Originally I was just going to use a PIC microcontroller to produce the 2 analog outputs using PWM (pulse width modulation), but decided I might as well decode more of the protocol and display any errors, calibration messages, o2 % and of course the lambda.  So I attached an 8x2 LCD to my little project board - and kind of wished I hadn\'t
 
Anyway - 2 weeks later and too late to help with tuning the car for Rotorstock, I have a working prototype unit.
 
It connects to the serial wire from the Innovate and produces the following:
 
8x2 LCD showing:
 
AFR\'s (7.3 - 22.3) with 1 decimal place
O2% with 1 Decimal place (displayed when engine isn\'t running)
Warmup, calibration, heater, and Errors 1-9
 
2 outputs:
 
one 0-1V for standard a/f gauge (the cheapo type)
one 0-4.7V for emanage input (range 7.3 - 22.3)
 
I\'ll throw up some piccies later - still yet to plug it into the car, as I\'ve only just got it working from the laptop.
"Plus this engine is probably one of the most volumetric engines going! It passes more air than a herd of cows eating vindaloo\'s" - courtesy of AtomicRex


Prof

Well finally got it in a ready enough state to plug into the innovate serial lead today :)  It needs smartening up and putting in a case, but this is it working from a cold start.  AFR\'s are pretty rich - but you can see when I accelerate and lift off the fuel cut happening - even as far as getting the meter briefly into O2% mode :)
 
Here\'s the vid:
 
http://www.youtube.com/watch?v=_qPpXSFkVPI
"Plus this engine is probably one of the most volumetric engines going! It passes more air than a herd of cows eating vindaloo\'s" - courtesy of AtomicRex


philiwily

That\'s excellent mate. Is the AFR display digital like the XD16 or is it taken from an analog?
How are the faults displayed and are you going to produce them?
Sorry for all the questions.

Phil

Prof

#3
The LCD actually displays the digital output from the Innovate - and the PIC chip uses the same data to produce 2 PWM signals which have a resolution of 8 bits.
 
It was sort of a 1 off project because the LC-1 unit itself is actually quite good - just let down by the analog outputs which seem to dye on them rather to easily. This one was going to be a 1st version - the next version will be based on an oled graphic display in a 52mm gauge pod - and will display much more than AFR\'s - it\'s going to look similar to the PLX gauges - but without the big stack of boxes.
 
But that project is slow getting off the ground - and this was a \'quick\' knockup to get analog outputs back for tuning - as you can see by the vid - the car is a tad rich on idle ;)
 
If there is some interest in it, I am happy to make the pic source code availabe - and the circuit diagram, I might even see about getting a pcb design.
"Plus this engine is probably one of the most volumetric engines going! It passes more air than a herd of cows eating vindaloo\'s" - courtesy of AtomicRex


grinder

mate .. that is AWESOME !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


1990 Black Turbo II ( Updated 24th October 2006 ) : Click Here !!
1991 Turbo II Cab ( Updated 21th May 2009 ) : Click Here !!
Piccies >>> July 2004 / August 2005
My Feedback Thread: Click Here !!
Official Mazda Rotary club Tight A$$ :King (So tight only dogs hear him fart)
MRC Bargain Hunter 2005/6/7/8/9/10/11/12/13/14 :god
Inventor of the 96p car cover:D
**Special award for services to tightness**
Lifetime achievement award for services to tightness
The tightest man on earth
:Giggle

philiwily

Could you send me the circuit diagram and source code? It will probably be way over my head but im very interested. I always wanted a serial gauge but im to tight to fork up for a XD16.Lol.

Phil

Prof

Quote from: philiwily;714201Could you send me the circuit diagram and source code? It will probably be way over my head but im very interested. I always wanted a serial gauge but im to tight to fork up for a XD16.Lol.
 
Phil

Same here ;)
 
I\'ll pen up a circuit diagram over the next couple of nights - but the board I used was from cstech - www.cstech.co.uk - it\'s there 28 pin PIC board.
 
http://www.cstech.plus.com/ebay/pic28.html
 
The source code files are attached:
 
 
Note: - The innovate LC-1 serial data actually has the selected AFR for the fuel type in the message - but to simplify the maths I just ignore it - I\'m assuming 14.7 for gasoline.  I actually take the lambda value - which for 0 is 7.3 and scale it from there - there calculation is (Lambda + 500) * 147 / 10000 = AFR which gives 22.3 for my upper limit I\'m interested in - I squidge the value down to fit into a byte - throwing away the top 3 bits of the lambda word (very very lean), and losing 2 bits of accuracy.  This gives 1 decimal place of accuracy which is enough for my needs ;)  I should also make the calculation with the AFR for the fuel - but it was easier to just use a lookup table to get the AFR value for output on the LCD.  Code needs a bit more cleanup, but works as is - acknowledments to Nigel Goodwin for some of the LCD routine, and can\'t remember who I nabbed the serial routines from - but again not my work.
 
If you need a PIC programming I can do that for you.
"Plus this engine is probably one of the most volumetric engines going! It passes more air than a herd of cows eating vindaloo\'s" - courtesy of AtomicRex


Brett

Brap Brap Brap Brap

ashc

awesome ! i\'ve been trying to work on a solution to get the LM-2 outputs into my Defi display, (so the defi thinks it a temp & displays AFRs on the dash).
not got very far though!!

philiwily

I might take you up on the PIC programming. Spent a few hours trying to get my head around it. Do you need to change those txt files to hex using a converter?

Phil

Prof

Basically yes - you can download a free development environment from Microchip - which will then assemble these source files - producing a code file which can then be programmed onto the chip.
"Plus this engine is probably one of the most volumetric engines going! It passes more air than a herd of cows eating vindaloo\'s" - courtesy of AtomicRex


philiwily

Downloaded MPLAB_ide last night, for debugging (im learning):o

philiwily

Hi Prof.
I apologize for all the questions, Ive started getting bits together but a couple of things stumped me.
I looked into connecting the PCB to the LC1 through the jack plug which would connect to pins 2,3&5 on the RS232 plug, are pins 7&8 needed?
Did you use a 4MHz crystal and 33pf ceramic disks?
Would there be any benefit in fitting a larger one?
Did you get a chance to do a circuit diagram?

Phil

Prof

Hi Phil,
 
No probs about the questions - must confess - I haven\'t done the circuit diagrams yet - but I\'ll do those for hte extra bits - most of it is based on that board - it\'s just the LCD and analog circuits that are added on - so I\'ll cover those off.
 
For the RS232 connetion - it\'s only 2,3 and 5 - the board has a jumper on it that loops 7 and 8 together, but the innovate doesn\'t need that, and if you\'re tesing with a PC terminal program - setting \'no handshake\' will mean you don\'t need it for testing either.  In actual fact, the circuit only uses the output from the innovate - so it\'s only the pin connected to RX.  I had to make an adaptor to use the cable that came with the Innovate unit - it\'s male to male and swaps 2 and 3 over.
 
I did use the 4Mhz crystal and the caps that came with it - you can go to 20Mhz, but you would need smaller caps (12-20pf - but it\'s not an exact thing - depends on the crystal), you would then have to change the xtal freq in the file so that it sets the board rate correctly - it will also throw the delays out by a factor of 20/4 - so the code for the base delay would need to be \'stretched\' - at the moment it uses about 4 instruction times for 4us - but at 20Mhz you need to do that loop 5 times for the same delay - it\'s easy enough to multiply all the timing numbers by 5 - except the 250msec one - as that \'s already too big to multiply - Either call it more times, or add an extra loop delay - there\'s plenty of ram left for another counter.
 
To be honest, even at 19200 baud - the PIC can get through a large number of instructions and I did try and reduce the delays in the LCD output routines to speed them up - I ended up having to add delays back in to stop it corrupting the decimal point in the number routines !! :)
 
Here\'s the analog circuit attached.
"Plus this engine is probably one of the most volumetric engines going! It passes more air than a herd of cows eating vindaloo\'s" - courtesy of AtomicRex


philiwily

Hi Prof. Thanks for that, never thought about the decimal point looking like an 8 if it was too fast.
I have been reading some tutorials and and im getting there but got a bit stumped I have assembled the 2 .asm files but the value table needs to be a .inc, can you point me in the right direction.

Phil