Project: Digital Fuel Injector Pulse Width Analyzer
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
Project: Digital Fuel Injector Pulse Width Analyzer
Purpose
The intent of this project is to read and display automotive fuel injection pulse widths on individual cylinders, up to 8. The expected range of the length of the pulse width's is from 1ms to around 100ms worst case under Wide Open Throttle. Observations will have to be made after the initial part of this project is complete, in order to determine not only the pulse width, but the final resolution of the binary digital counters. These variables are only known to the creator of the original, proprietary board, and whether to increase resolution of the counters to 16 bits, will be determined later. It is desired that this project have greater resolution than the system being observed, for greater control purposes.
Other Inputs
The previous paragraph describes the primary data that will be measured, namely fuel injector pulse width, as it will show the 'flow' of fuel at any given point in time. Other sensors must be observed. First and most importantly, the Throttle Position Sensor, along with the Coolant Temp Sensor, are expected to have the most effect on fuel injector pulse width. Other critical inputs which need consideration are: the Crankshaft Position Sensor, Camshaft Position Sensor, Mass Air Flow Sensor and/or Manifold Air Pressure sensors. Vehicle speed must be measured as well, along with Air Temp. Pre-Catalyst O2 sensor/s will be observed as well as post Catalyst. Post Catalyst sensor info will be observed only for simulation, for reasons to be explained later.
A MUX'd 8-bit A/D Converter is planned for reading the following: TPS, CTS, MAF/MAP, Air Temp, and Pre/Post? O2 sensors. 74HC4050 logic level converters will be used to translate to following sensors from automotive 12-15VDC to LVTTL 3.3VDC: Cam Sensor, Crank Sensor, and Injectors.
Edit: Re-Edited to further clarify
The intent of this project is to read and display automotive fuel injection pulse widths on individual cylinders, up to 8. The expected range of the length of the pulse width's is from 1ms to around 100ms worst case under Wide Open Throttle. Observations will have to be made after the initial part of this project is complete, in order to determine not only the pulse width, but the final resolution of the binary digital counters. These variables are only known to the creator of the original, proprietary board, and whether to increase resolution of the counters to 16 bits, will be determined later. It is desired that this project have greater resolution than the system being observed, for greater control purposes.
Other Inputs
The previous paragraph describes the primary data that will be measured, namely fuel injector pulse width, as it will show the 'flow' of fuel at any given point in time. Other sensors must be observed. First and most importantly, the Throttle Position Sensor, along with the Coolant Temp Sensor, are expected to have the most effect on fuel injector pulse width. Other critical inputs which need consideration are: the Crankshaft Position Sensor, Camshaft Position Sensor, Mass Air Flow Sensor and/or Manifold Air Pressure sensors. Vehicle speed must be measured as well, along with Air Temp. Pre-Catalyst O2 sensor/s will be observed as well as post Catalyst. Post Catalyst sensor info will be observed only for simulation, for reasons to be explained later.
A MUX'd 8-bit A/D Converter is planned for reading the following: TPS, CTS, MAF/MAP, Air Temp, and Pre/Post? O2 sensors. 74HC4050 logic level converters will be used to translate to following sensors from automotive 12-15VDC to LVTTL 3.3VDC: Cam Sensor, Crank Sensor, and Injectors.
Edit: Re-Edited to further clarify
Last edited by ElEctric_EyE on Wed Sep 01, 2010 4:50 pm, edited 7 times in total.
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
Here's the Address Decode. i think I have it correct.
6502.org wrote:
Image no longer available: http://i207.photobucket.com/albums/bb73/ultimateroadwarrior/oldbadmemdecode.jpg
Last edited by ElEctric_EyE on Sat Mar 14, 2009 1:17 am, edited 1 time in total.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
What do you plan to do with the I/O select lines? With three HCT138's in a row, you could have nearly 100ns propagation delay at room temperature, and more if you run it in a hot engine environment. You're not guaranteed to be able to reach more than about 7MHz with that, and that's if your I/O ICs are simple quick latches. If you use 65c22's for I/O, you can get away with a single 74xx00 and no more than two gates' delay for all your address decoding for as many as ten 65c22's. See http://www.6502.org/users/garth/project ... chematic=2
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
The I/O select lines will enable reading fom the tri state latches,8 bit counters, and 8 bit ADC's. All have tri-state outputs... I dont like using 3 gates in a row for address decoding either, but I think the phase 2 high will keep them in order. I'll have another schematic soon for the data acquisition section.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Quote:
It's why i am using phase 2 clock to do the adress enable down to the last logic circuit.
A 154 is faster tha two 138's in series, and gives you 16 outputs.
ROM enable does not need to be gated by phase 2, but SRAM enable must be.
- BitWise
- In Memoriam
- Posts: 996
- Joined: 02 Mar 2004
- Location: Berkshire, UK
- Contact:
As much as I hate to say it, seems like a lot of work for something that could probably be done with a couple of Microchip 18F PICs and some I2C temperature sensors.
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
GARTHWILSON wrote:
A 154 is faster tha two 138's in series, and gives you 16 outputs.
BitWise wrote:
As much as I hate to say it, seems like a lot of work for something that could probably be done with a couple of Microchip 18F PICs and some I2C temperature sensors.
BTW, I see errors on that schematic, so disregard that
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Quote:
You're probably right, I wish I knew more about PIC's, but I like the flexibility of software and I know the language of the 6502.
What I hate about the PICs is their processor. The 6502 and '816 are way ahead in that regard.
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
I was thinking as I was doing the new memory decoding logic, that it would be nice to use an 64Kx8 EEPROM for addressing functions. So you could program your data out for each 16 bit address. A 64Kx16 would be ferfect but at such a misuse of memory, but I would already have the programmer. I know what you're thinking Garth: too much prop delay. Maybe I can find a fast 64Kx16 EEPROM... Maybe a 64Kx4, still thinking how this would work.....
I think bitwise's suggestion to use PIC's for the whole project is not what I am looking for, however, it may be the answer to what I need for address decoding. Something similar to a programmable logic array. I'm looking to learn and progress from what I did 10 years ago, but the bad thing here is that I need to spend more money on another programmer.
I think bitwise's suggestion to use PIC's for the whole project is not what I am looking for, however, it may be the answer to what I need for address decoding. Something similar to a programmable logic array. I'm looking to learn and progress from what I did 10 years ago, but the bad thing here is that I need to spend more money on another programmer.
- GARTHWILSON
- Forum Moderator
- Posts: 8773
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Unfortunately using the PIC as programmable logic is way, way too slow. At 14MHz, a phase-2 high time is about 35ns. A PIC running at 20MHz needs 200ns for a single instruction. An SX at 75MHz and true single-cycle instructions can get less than three instructions done in 35ns, which is still not nearly fast enough. Even 500MHz (five instructions in 10ns) would not be enough. For the ROM, since you can get it going before phase 2 goes up, you would almost be able to get away with a 45ns ROM with super-fast address decoding. Otherwise it will have to be faster. RAM definitely has to be faster, but much faster RAM is available, so that part is not a problem.
What kind of A/D converter do you plan to use? The MAX153 half-flash can be read like a memory location at 1MHz, but not 14. I have a MAX153 connected through a 65c22 since my clock rate is 5MHz.
What kind of A/D converter do you plan to use? The MAX153 half-flash can be read like a memory location at 1MHz, but not 14. I have a MAX153 connected through a 65c22 since my clock rate is 5MHz.
Last edited by GARTHWILSON on Wed Nov 04, 2009 2:57 am, edited 1 time in total.
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
GARTHWILSON wrote:
RAM definitely has to be faster, but faster much faster RAM is available, so that part is not a problem.
One question though since I am planning to run the CPU at full speed 14 MHz. How much of a prop delay is acceptable for memory mapping logic?
ElEctric_EyE wrote:
I think bitwise's suggestion to use PIC's for the whole project is not what I am looking for, however, it may be the answer to what I need for address decoding. Something similar to a programmable logic array. I'm looking to learn and progress from what I did 10 years ago, but the bad thing here is that I need to spend more money on another programmer.
One: The Atmel AVR's instruction set is very similar to 6502, and easy to pick up. They are not as widespread as the PIC's, but their costs are also not very high. You can contact me off-list if you would like more info on them.
Two:
My $50 programmer I got on ebay 4 yrs ago can do EPROM, EEPROM, and the basic GAL16V8 and 22V10's. I had trouble with a few subtypes, but was able to do Lattice 16V8D's. The CPLD software is free and I can send you a few source files I created for decoding a simple 65C02 system (we started about a year or more ago to come up with a simple entry level machine for new folks to break into on. I had wanted to use the 16V8's to handle the device decoding.) Anyhow, if you are interested, check the details on the programmers you are researching to see if they support these basic GAL's.
Daryl
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
GARTHWILSON wrote:
What kind of A/D converter do you plan to use? The MAX153 half-flash can be read like a memory location at 1MHz, but not 14. I have a MAX153 connected through a 65c22 since my clock rate is 5MHz.
I've overclocked MOS6502's rated at 1MHz to 4MHz. But I am anticipating problems going for the full speed of the new 65c02's from what you've said so far. Maybe I should reconsider using F series of TTL eh? Or just start out at 5MHz and make necessary adjustments as I increase speed.
-
ElEctric_EyE
- Posts: 3260
- Joined: 02 Mar 2009
- Location: OH, USA
8BIT wrote:
Two thoughts here:
One: The Atmel AVR's instruction set is very similar to 6502, and easy to pick up. They are not as widespread as the PIC's, but their costs are also not very high. You can contact me off-list if you would like more info on them.
Two:
My $50 programmer I got on ebay 4 yrs ago can do EPROM, EEPROM, and the basic GAL16V8 and 22V10's. I had trouble with a few subtypes, but was able to do Lattice 16V8D's. The CPLD software is free and I can send you a few source files I created for decoding a simple 65C02 system (we started about a year or more ago to come up with a simple entry level machine for new folks to break into on. I had wanted to use the 16V8's to handle the device decoding.) Anyhow, if you are interested, check the details on the programmers you are researching to see if they support these basic GAL's.
Daryl
One: The Atmel AVR's instruction set is very similar to 6502, and easy to pick up. They are not as widespread as the PIC's, but their costs are also not very high. You can contact me off-list if you would like more info on them.
Two:
My $50 programmer I got on ebay 4 yrs ago can do EPROM, EEPROM, and the basic GAL16V8 and 22V10's. I had trouble with a few subtypes, but was able to do Lattice 16V8D's. The CPLD software is free and I can send you a few source files I created for decoding a simple 65C02 system (we started about a year or more ago to come up with a simple entry level machine for new folks to break into on. I had wanted to use the 16V8's to handle the device decoding.) Anyhow, if you are interested, check the details on the programmers you are researching to see if they support these basic GAL's.
Daryl