Page 1 of 3 123 LastLast
Results 1 to 100 of 248

Thread: ZFuel

  1. #1
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default ZFuel

    Hello All,

    I thought I'd start a new thread to get some feedback on my ZFuel project. To recap, I began a tuneable LJet ECM replacement long long ago in the early 90s, stalled out due to life/growing business, and then rekindled it last year when my son was driving a 77 280. He went away (along with car) to college, so again I stalled on development. I'm glad to say that I have the car back now, and I'm excited about getting this unit off the drawing board and into the garage. I think at the rate that AFM's and ECMs are aging, it's long overdue. Here is a quick overview:


    Standard Features
    -100% drop in replacement for stock (should be a 10min install - pull kickplate, ecm, unplug old, plug new, hit the starter)
    -Also can run in Speed-Denisty (MAP) if you wish. This would allow you to nuke the stock AFM. I think this will be handy for anyone who thinks their AFM is suspect with aging wipers)
    - Realtime data monitoring via USB/Laptop (now you can check the status of those pesky sensors easily)
    - Internal diagnostics/logging of sensors.
    - You can of course tune it and adjust the map with the laptop interface.
    - Run any size injectors you want to plumb in (within reason of course)
    - Tune for aftermarket performance parts (cam, headers, porting, ect)
    - Some general purpose I/O for shift lights, ect.
    - Will have CAN bus output on an optional connector (thinking aftermarket gauges).
    - Idle air control/quick warmup mode
    - Support for O2 sensor and closed loop mode.
    - Run any throttle body and TB sensor you wish. (analog position, or just off-idle/WOT)
    - copy/save/email tunes back and forth between users.


    The primary concept is to have it plug-n-play with a bone stock unit, yet still have some flexibility to accommodate other configurations. While one could run it alongside ALL the existing stock equipment, to me the following would be an ideal setup. I say ideal mostly because all the additional plumbing/wiring complexity of the L-Jet under the hood annoys me.

    - Replace the AFM with a straight pipe and run with the Map sensor. Now, no worries about the aging AFM, no restriction for incoming airflow, no but ugly AFM in the engine compartment with it's 40year old connectors.
    - Leaky cold start valve? Remove all of this nonsense & the accompanying plumbing/thermo-time switch/wiring.
    - AAR would be replaced with more modern idle air control. (or just remove it completely if you are in a warmer climate).

    Well, that's the concept/idea. I'm actively soliciting feedback as to likes/dislikes or things I might have not thought of. Ignition timing is also possible, although I'm going to ignore that aspect on the first pass.

    Superlen

  2. #2
    No more body roll! SteveJ's Avatar
    Member ID
    CZCC-5413
    Join Date
    Dec 2003
    Location
    Gainesville, GA
    Age
    54
    Posts
    3,651

    Default

    One of the functions of the AFM is to cut power to the coil on the fuel pump relay when the engine isn't running. If you replace the AFM, what are you going to do to compensate for that signal?
    73 240Z
    74 260Z

    Blue's collection of tech tips - A great place to look for answers
    XenonS30 -The cheap source for FSMs
    Georgia Z Club
    Fiddling with Z Cars - Z car tips & tricks and pictures of my car-loving life.
    Steve's CARtography - Just car pictures.

  3. #3
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    If I were doing a project like this, I would simply control the fuel pump with the new digital ECU.

    After all, the signal required to control the fuel pump is already available at the ECU connector. The original ECU doesn't do anything with that signal, but it's available.

  4. #4
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Superlen, Admirable task.

    My advice would be to start small and just get something that will drop in and run. Add all the other stuff like the ability to tune and use MAP for later. Don't include data logging. Skip the CAN bus and don't mess with the AAR or cold start. Run open loop with no O2 feedback, and set it up for the stock throttle body.

    Once you get to the point where you have one that drops in and works, then start adding features. And BTW... Personally, I would completely skip the "copy/save/email tunes back and forth between users" thing. Completely unnecessary complexity.

    I actually started a project like this myself, and it's fate has been the same as your project to date, stalled due to life.

    I know the OEM fuel injection system pretty well, and my car is running pretty well accordingly. I've unfortunately got other things on the car that are crying for more attention than a FI system that's working.

  5. #5
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Superlen, Forgot something...

    What about the mechanicals? What's your plan on where is that going to come from? Are you thinking you'll harvest and re-use the case and connectors from original ECU's or are you thinking that you'll buy new connectors and fabricate a new enclosure?

    Have you priced the mechanical stuff? You won't be happy.

  6. #6
    No more body roll! SteveJ's Avatar
    Member ID
    CZCC-5413
    Join Date
    Dec 2003
    Location
    Gainesville, GA
    Age
    54
    Posts
    3,651

    Default

    Quote Originally Posted by Captain Obvious View Post
    Superlen, Forgot something...

    What about the mechanicals? What's your plan on where is that going to come from? Are you thinking you'll harvest and re-use the case and connectors from original ECU's or are you thinking that you'll buy new connectors and fabricate a new enclosure?

    Have you priced the mechanical stuff? You won't be happy.
    You can usually get price breaks when you buy in quantities of 10,000 or so.
    73 240Z
    74 260Z

    Blue's collection of tech tips - A great place to look for answers
    XenonS30 -The cheap source for FSMs
    Georgia Z Club
    Fiddling with Z Cars - Z car tips & tricks and pictures of my car-loving life.
    Steve's CARtography - Just car pictures.

  7. #7
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Haha! Yeah, but after me, Len, and Fastwoman install them, what's Len going to do with the other 9997?

    I recently rebuilt my FI harness with new connectors and while perusing catalogs, I saw the connector that mates with the ECU. I didn't quote it since I didn't need it, but maybe I'll look into the cost just for entertainment value.

  8. #8
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Just took a quick look back, and I believe the Amp (TE) P/N is 825213-(color). 35-Pin "Junior Timer" series with 90 degree board mount.

    Price wasn't as bad as I was imagining... At quick glance at a few suppliers, Digikey was the cheapest and says they have them for a little over ten bucks with a min purchase qty 0f 176.

  9. #9
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Steve,

    Great question on the fuel pump relay. Captain is spot on about it. I have control over it via the ECU, but one can always leave the AFM connected and operating the fuel pump if desired. The main reason I wanted to be able to run a MAP sensor in lieu of the AFM is that many AFMs are so old that the wiper for the potentiometer inside them is becoming suspect. I'm truly amazed that they still work as well as the do....or do they? (I have a feeling that many of these old systems are working, but far from as good as they worked in 1975) Running MAP (but leaving the AFM in) would allow someone with a flaky AFM to go ahead and use it, as opposed to pay for a replacement/refurb.

    Even if someone chose to run Speed- Density because their AFM wiper was suspect, the fuel pump relay connection inside the AFM would still function the same. In that case you wouldn't be able to take advantage of removing the vane restriction out of the airflow. bit I'm not sure it's that a big problem in a stock configuration anyway.

    Captain,

    Great minds think alike....or at least yours and mine are. The first pass out the gate will just be the simple stock replacement, but most of the features are just software functions once the hardware has been tested. The load/save/copy tunes I already have from other projects. It's nothing more than a file save/load from the GUI. The GUI will allow you to suck the tune out and write to file, and of course do the opposite as well. I've got the GUI already as I've written it to test/debug the hardware and simulate the control algorithm. I'm traveling this week, but I'll clean it up a little and post a screen shot next week.

    My thinking on this would be that if you had a tune that worked for your setup, you could post it /email it to someone else that wanted to test it on their similarly configured engine.

    My mechanical plan is to re-use the stock case and ECU connector. I just assumed the ECU connector was custom for Bosch. (I'll check out the AMP part & have Digikey send me a sample- thanks for the pointer Capt.) I can either re-use existing/or try the AMP (fastest way to start) or tool up a replacement. I have contacts in the plastics molding industry and my company has designed/manufactured several products with multiple plastics, metal enclosures, electronics (our primary line) so tooling up won't be forbidding. It's another cost that I'd rather avoid, but at least not a deal breaker as I have multiple supplier relationships already qualified. That goes for sheet metal, aluminum extrusions, injection molded plastics, pcbs, cables, ect. We source all of these on a daily basis.

    As for the cases, I'll stock a bunch and can send out on an core exchange basis. The customer won't get their exact case back with that program, but they will have the shortest down time. (Hopefully 10 min) If someone just really wants their own case back, they can send it in, I'll update it and send it back. There's very little machining that I will have to do to the stock case. Just a few holes & I'll laser cut them. The old stock circuit boards of course get scrapped (except for the connector which I'll pull for use on the new circuit boards)

    Thanks for the interest and ideas.

    And yes. After three units sold, sales will plummet. Maybe, I'll buy a few more Zs to keep sales going.

    Superlen

  10. #10
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Captain,

    That connector certainly looks like it. I would have bet money that it wasn't still being produced. It's a non stock connector for them with 0 in stock. 176 is certainly the min/mult qty. (Amp probably ships them in 176 piece cases). The non stock stuff at DK is common now. Many years ago, pretty much EVERY item the DK catalog was in stock. Not so anymore, but for prototypes, they still rock.

    This part could still be a pain to get in smaller quantities. I have an AMP rep that calls on us, I'll sick him on finding some of these. Hopefully, he'll turn them up. The stock connector on the ECM's I've inspected have all been in great shape, so worst case, I'll just pull them from the core exchanges.

    Superlen
    Last edited by superlen; 07-18-2013 at 07:57 PM.

  11. #11
    Z geek at large FastWoman's Avatar
    Member ID
    CZCC-19635
    Join Date
    Jul 2009
    Location
    Hampton Roads, VA
    Posts
    2,787

    Default

    Hi Len,

    Welcome back! I'm afraid I'm now in "life gets in the way" mode, but I can certainly find time for a 10 min PnP swap. My Z runs pretty well, but I recognize the ECU isn't entirely stable. I think it's needs tweaks every now and again, and I haven't stayed on top of that.

    What I would eventually like to do is to hand over control of the ignition to the ECU, as I recognize the distributor advance mechanism is one of the weak links in these engines. Unfortunately rebuilds have spotty availability. I feel ECU control of the advance would give us quite a bit more efficiency in these engines, so that's a worthwhile goal. I would also love to run a MSD ignition system, but that mucks with the ECU, as the spark is used to trigger it. I suppose I'd need a Pertronix distributor that would put out a clean square wave that I could split between the ECU, the tach, and the MSD?

    I can understand your not wanting to take on every bell and whistle up front, but it will be great if you can have forward compatibility to future ECU versions, such that the programming can be transferred forward and the new capabilities then invoked. I would suggest that your design also utilize an internal connector (inside the ECU box) that can be used to swap out boards. Perhaps you could use a card edge connector. That way it would not be necessary for someone to mail in their ECU and suffer down-time between upgrades. And I'm curious: Would it be advantageous to have heat sink capabilities, for instance for the power transistors that actuate the injectors? Maybe passive heat sinking to the body, where the ECU mounts? Maybe a cooling fan? Otherwise the box might become a bit of an oven.

    Anyway, I think much of your market for this ECU will be from the "life gets in the way" crowd, and I'm currently one of them. I think the initial PnP aspect, with the ability to improve engine control incrementally (an IAC here, a MAP sensor there) will have very broad appeal.

    So talking business here, what sort of arrangements are you proposing with your initial guinea pigs? We'll be contributing by helping you to debug your system. I presume you sell to us at a "not ready for prime time" discount? Also, I hate to trash any boards. I can send you an empty ECU box (my spare) with the connector. Does that work?
    Last edited by FastWoman; 07-19-2013 at 08:51 AM.
    My last three sports cars while I still owned all three:

    2001 BMW Z3 Roadster 3.0i soft/hard top (sold)
    1966 Ford Mustang Coupe (sold)
    1978 Datsun 280Z (enjoying very much )

  12. #12
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Fast,

    I agree on the ignition being iffy sometimes, so I am designing the hardware to handle ignition as well, all the inputs/outputs will be there via an auxiliary non-stock connector. In fact, the hardware will be able to handle crank trigger and coil on plug if someone is crazy enough to want that (and I am. ) However, I'll wait on the software until the stock fuel program is working. You won't need any other distributer other than the stock unit. Zfuel can read the pulse from the reluctor, filter/square it up & then fire any aftermarket ignition box such as the MSD unit as well as the tach. Those inputs will be on the auxiliary connector.

    I will be using the existing heatsinks in the ECM & possibly another extruded piece internal. No fans are planned as they are just a point of failure. I'll do a thermal analysis & then as is usually the case, throw it out the window once a real unit is on the bench/car and some actual case temps (Transistor cases, not ZCar ecm cases) are recorded.

    Core exchange can be just an empty case and connector, or find a salvage unit to send in so you can keep your stock original one. I'll start building up a few in inventory as well. I have a few now as you can imagine, and I think most Z enthusiast that have been picking in bone yards probably have some stashed as well. And yes there will be a GPD (Guinea pig discount). Feedback early on will be important as I can tune the initial map to my bone stock 77 & it may work for most, but it's also likely that my bone stock 77 sensors are so old and have drifted so much that further tweaking with several other stock cars to average these out may be needed.

    Superlen

  13. #13
    Registered User
    Member ID
    CZCC-26864
    Join Date
    Apr 2012
    Location
    Durango, Colorado, United States
    Posts
    692

    Default

    Ok, I'll be the guy to piss on your parade, since I helped design early digital ECM's for Bosch...

    Forget a plug and play L-jet replacement. And you already have the moment you discussed unplugging the AFM and plugging in a MAF. Should you decide you want your new ECM to also replace the (worn out) mechanical advance mechanisms in most Z-car distributors, you're already cutting wires and adding new connectors. Along with adding a fuel pump control (oil pressure based, etc?)

    You'd simply have to make TOO MANY compromises to make a new, tunable ECM plug and play on this old warhorse. You're far better off to get out the wirecutters and do it right....

    It's time for you to go for broke. Megasquirt.

    MegaSquirt - Electronic Fuel Injection Computer by Bowling and Grippo 2010

    Megasquirt is an off the shelf DIGITAL fuel injection system. There's a community of thousands of users, tons of code, laptop monitoring, everything. You can buy a microcontroller, download some code, and be running in a week or two.

    And there are already Z car owners running Megasquirt, building harnesses, and writing software. MADKAW here on this forum is apparently involved.

    Your first task is to locate some guys actually daily driving some Z's running Megasquirt and road trip out to visit with them.

    Because that's all you will do with Megasquirt; wire it in, and write code to optimize it for the size injectors you chose, brand of MAF, 02 sensor, etc. There are hundreds of code snippets already available for you to cut and paste. Tuning software. Everything under the sun for a do-it-yourself ECM guy.

    If you want something to help and possibly to SELL TO other Z-car owners, come up with a complete Z- Megasquirt package, controller, optimized code, plugNplay wiring harness, replacement MAF, distributor kit, etc.

  14. #14
    Z geek at large FastWoman's Avatar
    Member ID
    CZCC-19635
    Join Date
    Jul 2009
    Location
    Hampton Roads, VA
    Posts
    2,787

    Default

    Quote Originally Posted by Wade Nelson View Post
    If you want something to help and possibly to SELL TO other Z-car owners, come up with a complete Z- Megasquirt package, controller, optimized code, plugNplay wiring harness, replacement MAF, distributor kit, etc.
    This would work for me as well.

    But what I would MOST like, and what I think many Z owners would also like, is an easy drop-in replacement. This would be a solution for someone who is too busy with other stuff to spend days tweaking their Z. It would need to handle I/O with existing equipment, such as the AFM, but it should ideally be expandable/improvable for when life is no longer in the way, so to speak.

    And Wade points out something very important: It's not the antiquity of a distributor that's at issue with our ignition, but rather that our advance mechanisms are falling apart. The breaker plates typically get stuck and may randomly stick at various stages of advance. Rebuilt units are apparently getting scarce, and the rebuilding process comes with some risk of damage to the shaft. So to get a Z running "right," usually involves straightening out the ignition somehow. In my case, I was able to do it with a rebuilt OEM distributor. Many people upgrade to a Pertronix distributor/ignition system. I think it would also be feasible to go with a crank sensor and a wasted spark ignition. But what we should NOT do is to rely on the OEM distributor to provide an accurate timing input going into the future, barring some sort of modification like mechanically fixing the breaker plate in place (now there's an idea) and handing over all advance to the new ECU.
    Last edited by FastWoman; 07-22-2013 at 07:06 AM.
    My last three sports cars while I still owned all three:

    2001 BMW Z3 Roadster 3.0i soft/hard top (sold)
    1966 Ford Mustang Coupe (sold)
    1978 Datsun 280Z (enjoying very much )

  15. #15
    Z geek at large FastWoman's Avatar
    Member ID
    CZCC-19635
    Join Date
    Jul 2009
    Location
    Hampton Roads, VA
    Posts
    2,787

    Default

    BTW, Wade, there is nothing wrong with the ECU box or the wires. The engine compartment connectors might be a bit crusty, but they're easily replaceable (another project). Nobody needs a completely new harness. An upgrade from AFM to MAP could simply involve the re-purposing of the AFM wires. That could be accompanied internally (inside the ECU box) by the shifting of a jumper connection or the substituting of an internal connector. That could be achieved in the engine compartment either with a plug-in adapter, for those terrified to make their own connections (such Z owners exist and are probably in the majority) or with a quick snip/rewire job for those comfortable working with wire. The adapter would be appealing even to someone like me, because it would keep the car reconfigurable to stock if needed. I don't like snipping wires, even when I do. And it's not because I'm even the slightest bit shy about electronics.
    My last three sports cars while I still owned all three:

    2001 BMW Z3 Roadster 3.0i soft/hard top (sold)
    1966 Ford Mustang Coupe (sold)
    1978 Datsun 280Z (enjoying very much )

  16. #16
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Hey, why are my cornflakes all soggy?

    I agree Megasquirt is a perfectly acceptable solution to many. However, in my case I just like doing things from scratch & I think there are a few others that would like something similar to my concept of a Digital L Jet replacement. And while I will offer units for sale to the Z community, the primary reason for the project is because I personally want to design one.

    Superlen

  17. #17
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Just wanted to post an update for anyone interested.

    I've been working on the software and it's coming along well. The GUI is to a state that I can read/write all the control structures to/from the target hardware & view pulse timing & sensor readings, the communications between the two is in place, and the embedded firmware that runs on the hardware is in place and running as well. For now, I'm using hardware that I already have from another current project & it doesn't have any of the signal processing electronics on it, so I'm just using a potentiometer to simulate the AFM and a signal generator for RPM to test *extremely* basic functionality. I'll hard code the other variables until I have the actual hardware reading real world sensors. The test system has a Freescale Kinetis K60 processor on it which is a bit of overkill for a simple ECU, but it makes an easy test platform.

    The next few steps are:
    - Hook up one of my stock LJets on the bench and start testing to get a rough transfer function of it's AFM/RPM/IAC ->pulse width.
    - Finish the schematic (More realistically, just call it finished as I keep wanting to add more features for later options)
    - Layout the pcb

    I have been doing a crapload of research on EFI tuning of speed-density and MAF systems. For anyone interested, here are some pretty good books that have a lot of good information:
    "How to Tune and Modify Engine Management Systems" by Hartman
    "Engine Management - Advanced Tuning" & "Designing & Tuning High Performance Fuel Injection Systems" both by Greg Banish.
    When I first started this project in the 90s all I had was a book on the Bosh systems and it also had some great information, but I forget the title and have since loaned/gave the book to a friend. It covered L-Jet great, but of course was very dated in it's overall engine management overview.

    Of the above, all are good. Both the Banish books cover basically the same thing & are a little more current than Hartman. Hartman has a little more total information & some of the explanations in Hartman are really good. In particular, Hartman has some great info on intake manifold design/tuning & how it effects VE. (Not that this helps at all with Zfuel, but it's a nice rabbit trail to follow)

    One thing I'm anxious to do is see how my calculated pulse widths based on MAF & the Zcars Stock engine/injectors match the pulse widths measured on both the car and the test bench. In theory they should be very close, but bear in mind, the ECMs I have to compare to are 40yrs old, likewise for the AFMs.

    More to come, and as always any questions or comments are welcome. Feel free to critique, hassle, praise, call BS, encourage (a lot of that would be good), or ask technical details.

    Lenny

  18. #18
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Just wanted to post an update for anyone interested.

    I've been working on the software and it's coming along well. The GUI is to a state that I can read/write all the control structures to/from the target hardware & view pulse timing & sensor readings, the communications between the two is in place, and the embedded firmware that runs on the hardware is in place and running as well. For now, I'm using hardware that I already have from another current project & it doesn't have any of the signal processing electronics on it, so I'm just using a potentiometer to simulate the AFM and a signal generator for RPM to test *extremely* basic functionality. I'll hard code the other variables until I have the actual hardware reading real world sensors. The test system has a Freescale Kinetis K60 processor on it which is a bit of overkill for a simple ECU, but it makes an easy test platform.

    The next few steps are:
    - Hook up one of my stock LJets on the bench and start testing to get a rough transfer function of it's AFM/RPM/IAC ->pulse width.
    - Finish the schematic (More realistically, just call it finished as I keep wanting to add more features for later options)
    - Layout the pcb

    I have been doing a crapload of research on EFI tuning of speed-density and MAF systems. For anyone interested, here are some pretty good books that have a lot of good information:
    "How to Tune and Modify Engine Management Systems" by Hartman
    "Engine Management - Advanced Tuning" & "Designing & Tuning High Performance Fuel Injection Systems" both by Greg Banish.
    When I first started this project in the 90s all I had was a book on the Bosh systems and it also had some great information, but I forget the title and have since loaned/gave the book to a friend. It covered L-Jet great, but of course was very dated in it's overall engine management overview.

    Of the above, all are good. Both the Banish books cover basically the same thing & are a little more current than Hartman. Hartman has a little more total information & some of the explanations in Hartman are really good. In particular, Hartman has some great info on intake manifold design/tuning & how it effects VE. (Not that this helps at all with Zfuel, but it's a nice rabbit trail to follow)

    One thing I'm anxious to do is see how my calculated pulse widths based on MAF & the Zcars Stock engine/injectors match the pulse widths measured on both the car and the test bench. In theory they should be very close, but bear in mind, the ECMs I have to compare to are 40yrs old, likewise for the AFMs.

    More to come, and as always any questions or comments are welcome. Feel free to critique, hassle, praise, call BS, encourage (a lot of that would be good), or ask technical details.

    Lenny

  19. #19
    Registered User LeonV's Avatar
    Member ID
    CZCC-19146
    Join Date
    Apr 2009
    Location
    Bay Area, CA
    Posts
    1,961

    Default

    Very cool project! I haven't really been following as I don't have a 280Z but sounds like you've put forth a TON of effort and research. If I owned a 280Z or ZX with stock EFI, I'd be pretty damn excited!

    Are you designing and coding the tuning software/interface as well?
    2/74 260Z

  20. #20
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Leon,

    Thanks.

    Yes, I'm writing the Windows Tuning software interface as well. That interface pretty much goes hand in hand with the firmware as it makes a handy real time debug interface, and in reality the guts of firmware that will ultimately run on the embedded board, have been written up on on the windows platform as well. The two processes just communicate directly through dummy function calls as opposed to the usb link. When simulating I just have a screen that lets me set things like RPM, MAP, IAT, CLT, ect. with sliders and up/down arrows and such.

    For now, the communication protocol is just a derivative on one that I use all the time for numerous projects. I'll publish it in case someone wants to write their own software interface. In the future (after the basic system is done) I will add in OBD2 so ANY tuning software can at least pull a majority of the sensors and display them. I'm not sure if OBD2 specifies a format for maps ( I don't think it does - someone please correct me or point me in the right direction if you know), or if there is a default communications protocol for this. I mostly thought the OBD2 would be nice for someone if they already had a digital dash type app that they liked using (plus I wanted to play with can some more).

    I saw in your tag line you have 2 260's. My first z when I was 14 as a 74-260. I miss it, but not those flat top carbs. grrrr... You need to take one of your 260's and add a Zfuel to it, then tune tune tune.

    Lenny

  21. #21
    Registered User madkaw's Avatar
    Member ID
    CZCC-7622
    Join Date
    Dec 2004
    Location
    bloomington IN
    Age
    58
    Posts
    2,288

    Default

    Somehow I missed this thread until now. This is very interesting and waayyy over my head as far as understanding code and all that stuff..
    I wish you luck. I have purchased the MS3X for my car being it was the closest to plug and play-and it's a far cry from it. But, I wanted an Standalone system that I didn't have to actually break into the ECU and make changes. This will be primarily hooking up wires and tuning.
    I would also love to see dyno comparisons between the stock EFI and something like you are developing or MS.
    Steve
    71 240z,bw-5sp 2.4-40 over,balanced,e-88,big valves,ported&polished, stage2,header, triple Mikuni's 40's
    3.90 Subaru STI LSD

  22. #22
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Madkaw,

    This one's primary goal is 100% plug and play....and then if you want you can start fiddling with it and tune it till the cows (kaws in this case) come home. I too would like to see the dyno diff & will have a few for sure before this is over with. Realistically, I don't think there will be a huge performance gain with the stock motor. At least if your ECU and AFM are both in spec. However, if you change one of our EFIs to even a mild cam you're basically screwed in getting everything back to perfect. The MS you have or Zfuel will be able to handle all that and more.

    I'm working on a screen shot to upload. I'll try that in just a bit.

    Lenny

  23. #23
    Registered User madkaw's Avatar
    Member ID
    CZCC-7622
    Join Date
    Dec 2004
    Location
    bloomington IN
    Age
    58
    Posts
    2,288

    Default

    Plug n play would be huge - optimistically watching!
    Steve
    71 240z,bw-5sp 2.4-40 over,balanced,e-88,big valves,ported&polished, stage2,header, triple Mikuni's 40's
    3.90 Subaru STI LSD

  24. #24
    Registered User LeonV's Avatar
    Member ID
    CZCC-19146
    Join Date
    Apr 2009
    Location
    Bay Area, CA
    Posts
    1,961

    Default

    Quote Originally Posted by superlen View Post
    Leon,

    Thanks.

    Yes, I'm writing the Windows Tuning software interface as well. That interface pretty much goes hand in hand with the firmware as it makes a handy real time debug interface, and in reality the guts of firmware that will ultimately run on the embedded board, have been written up on on the windows platform as well. The two processes just communicate directly through dummy function calls as opposed to the usb link. When simulating I just have a screen that lets me set things like RPM, MAP, IAT, CLT, ect. with sliders and up/down arrows and such.

    For now, the communication protocol is just a derivative on one that I use all the time for numerous projects. I'll publish it in case someone wants to write their own software interface. In the future (after the basic system is done) I will add in OBD2 so ANY tuning software can at least pull a majority of the sensors and display them. I'm not sure if OBD2 specifies a format for maps ( I don't think it does - someone please correct me or point me in the right direction if you know), or if there is a default communications protocol for this. I mostly thought the OBD2 would be nice for someone if they already had a digital dash type app that they liked using (plus I wanted to play with can some more).

    I saw in your tag line you have 2 260's. My first z when I was 14 as a 74-260. I miss it, but not those flat top carbs. grrrr... You need to take one of your 260's and add a Zfuel to it, then tune tune tune.

    Lenny
    Well keep up the awesome work!

    Fortunately, both the 260s have triple Webers.
    2/74 260Z

  25. #25
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Here's a quick screen shot. I tried to attach inline, but couldn't get the upload manager to be happy.

    It's not real pretty at the moment. It's mostly being used to test they system and I tend to splat buttons and crap all over the place just to test this or that. I'll clean it up and make it user friendly towards the end. For now, it's just a tool.

    screenshot1 | Flickr - Photo Sharing!

    This shows about a 7ms pulse being calculated at 4300rpm 100kpa so pretty much WOT. There is no enrichments enabled & the VE table is just total SWAG at this point so who knows if that is an accuate pulse. I'm betting no. The form at the bottom lets me fake out sensor settings, then the realtime code processes, calculates air mass->fuel mass->enrichments->fuel pulse width. After that it sends it back to the main form though the fake communication link and the GUI draws the pulse train & updates some gauges/icons/bar graphs ect.

    You can see the two 7ms fuel delivery pulses for this cycle, and the Speed Density cell is light blue in the 5000rpm and 100kpa col/row.

    For Stock AFM mode, air mass will be pulled from our Air flow meter instead of calculated via MAP/RPM. The map sensor in that mode will just be used to altitude correct. That will be handy for all of us that start our car in Death Valley and drive to the top of Pikes Peak in one shot, whining about our mileage & smoky tailpipe. lol


    Lenny

  26. #26
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Here's another screen shot showing just a bunch of settings and calculations. Unless you're tweaking the system quite a bit, none of these will ever be touched, but they are needed to test the combinations. This screen needs a lot of work to make it easy to find the right option/configuration and understand what they do. For now, they are just lumped into one big scary screen of numbers.

    screenshot2 | Flickr - Photo Sharing!

    Lenny

  27. #27
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Quote Originally Posted by LeonV View Post

    Fortunately, both the 260s have triple Webers.
    Now you're just teasing. Cruel... I tell you. haha.

  28. #28
    Registered User rcb280z's Avatar
    Member ID
    CZCC-21454
    Join Date
    Apr 2010
    Location
    Ventura Ca.
    Age
    58
    Posts
    873

    Default

    Wow, yes plug and play would be the ticket. I bow to you. If this could be done to my 77 280 and it not change the "emissions" appearance then I am ready! CA is very strict even when it comes down to the "visual" inspection. If you lived closer I would loan you my 280 for testing Yah I know, wishful thinking . Anyway like I said I'm in.

  29. #29
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Nice update Lenny.

    If I were doing something like this, I would write everything in assembly and do it without a pre-packaged operating system. For reliability (and liability) I would want to know exactly what that processor was doing at all times.

    No RTOS, No high level languages. No optimizing compiler. Nothing open source. Nothing fuzzy... I would want complete control over the horizontal and the vertical.

    Funny Work Jokes: Funny Software Engineers on a Plane

    At a recent software engineering management course in the US the participants were given an awkward question to answer. "If you had just boarded an airliner and discovered that your team of programmers had been responsible for the flight control software how many of you would disembark immediately?"

    Among the ensuing forest of raised hands, only one man sat motionless. When asked what he would do, he replied that he would be quite content to stay onboard.

    With his team's software, he said, the plane was unlikely to even taxi as far as the runway, let alone take off.

  30. #30
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    I hadn't realized how strict CA was but after fielding a few questions about Zfuel from CA owners, I am beginning to understand. Zfuel would work very well for you "race" application in California. I'm sure no one would leave it in place during testing at the smog shop.

    I'm in Arkansas and we have very few regulations on emissions. I'm sure there are some, but no one knows what they are. Out there, does the law state you can't have ANY modification to your fuel/emissions system at all that aren't factory? Even if it actually improves emissions greatly? Just thinking out loud, technically you could extrapolate that to disallow any vacuum hose that isn't from the Nissan factory. There is obviously quite a jump from vacuum hose to ECU, but both would be a form/fit/functional replacement.

    Lenny

  31. #31
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    BTW - I'm not poo-pooing what you've done. I think it's awesome.

    I'm just telling you what I would do.

  32. #32
    Registered User rcb280z's Avatar
    Member ID
    CZCC-21454
    Join Date
    Apr 2010
    Location
    Ventura Ca.
    Age
    58
    Posts
    873

    Default

    Even if it's an improvement it doesn't matter to CA. They don't allow "tampering" with the stock components.

  33. #33
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Captain,

    You obviously have a lot of the same background as me from your comments. FYI, there's nothing open source, nor any RTOS. I personally really hate developing firmware within an RTOS environment. I understand that there are places where it's useful, handy, & faster to market....but I'm still a lil' old school. However, not so much that I still write everything in assembly. I did hold onto assembly as long as was feasible, but many of my clients don't care about C vs Assy & it just costs them more for me to write in Assy so I migrated to C quite a few years back. The original code I wrote for this in '93 in fact was 100% Motorola assembly.

    The firmware that runs in the car is written in straight C (not C++) with just a little bit of assembly at startup. It's also all my own C code so I do know exactly everything that's going on, no third party libraries or objects. Oh, and no fuzzy logic was harmed in it's creation. lol

    Side Note:We have a project going on at work that are the controls for large water treatment systems, such as cooling towers, industrial chillers, large public pools, ect. It is like Zfuel in that we read a bunch of inputs & flow rates & such, and then control pump deliveries of acid or similar chemicals to control the target. Much the same stuff as Zfuel, but way more boring. Anyhow, the customer requested a fuzzy logic loop for controlling PH is really large pools and OMG it makes your head hurt. And testing is all but impossible as we can't have an Olympic size pool in the shop, no matter how much I want one.

    The GUI is in C++ and of course has gobs of third party libraries/objects for graphic widgets and what not.

    Lenny

  34. #34
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Captain,

    I didn't read anything else into your post. I knew where you were coming from. I also happen to agree with most of it. (I would do the beer thing Icon if I were smarter).

    RCB,

    How do they define tampering? Such as my example of non Nissan factory vacuum lines? Obviously I think any sane person would agree that the ECU going from 1977 analog to 2012 digital *might* be considered tampering in the first degree. I'm just wondering how/where they draw the line. I'm not saying it's good/bad either way. Most laws/regulations have at their base a good reason (or at least they did when they started). I was just interested in how they determine if you are a "tamperer". It's quite the foreign concept here. We don't even have to have our car inspected to see if all the lights/horn/ect work. We did back in the 80s, but not now. You just go to the dmv, pay your money, prove you have insurance, and they give you tags. You can of course get a ticket if you are driving around with something broken.

    Lenny

  35. #35
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Quote Originally Posted by superlen View Post
    You obviously have a lot of the same background as me from your comments.
    Haha! No kidding. Our controls were used prominently in petrochemical, waste water treatment, food processing, steel and other metals... Oh, and Jack Daniels. And almost everything was Motorola based.

    So everything embedded you wrote everything yourself in C. I'm feeling better. I've got a software engineer buddy who scoffed at me the last time I mentioned assembly. He says I'm out of touch and that the compilers of today are so much better than they were even ten years ago. He says there's really no reason to write in assembly anymore.

    My back of napkin sketch included something from the Microchip PIC24 family. The smallest and simplest part I could get that had at least a 12 bit A/D and enough channels to digitize the analog stuff. Then I had a beer and used my napkin to catch the condensation, and I haven't seen it since...

  36. #36
    Registered User rcb280z's Avatar
    Member ID
    CZCC-21454
    Join Date
    Apr 2010
    Location
    Ventura Ca.
    Age
    58
    Posts
    873

    Default

    I installed a cold air K&N air filter assembly and they told me to put the original air filter on it! I had to do that to pass emissions. Stupid I know but it happens. I think as long as it can be hidden I should be ok. It's worth a shot.

  37. #37
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Captain,

    WARNING: A bunch of geeky programmer stuff to follow for Captain's piqued interest. Others may get bored.

    You're buddy is right...you're out of touch..errr I mean today's compilers are way better/more predictable.

    I think what really killed assembly programming is speed. Chips today just run so damn fast that speedy assembly code isn't that critical for most applications. Even if the compiler does silly things & bloats the code, it still runs 100 times faster than it has too. I've noticed myself migrating my code style from effeciency -> readability. I'll code up a function now and make sure it's readable and understandable to whoever looks at it later & I don't worry about efficiency. Sometimes I have to go back and tweak it for performance, but it's getting more and more rare.

    On this project I find myself waffling between oldschool (optimizing variable sizes for sensor readings & upcoming math functions on them) vs newschool. (make 'em all floats and let the ALU do it's thing). For speed of development I probably should just make most floats, but so far I haven't. Many vars are integers with a resolution of tenths. Here's a copy of one of my structures.

    //Engine
    typedef struct {
    //fixed vars
    UINT16 Num_Cylinders;
    UINT16 Num_Injectors;
    float Bore; //in mm
    float Stroke; //in mm
    float Displacement; //in cc's
    float Degrees_Per_Cycle;

    //realtime vars
    UINT16 BAT; //in tenths of volts
    UINT16 RPM; //revs/min
    UINT16 MAP; //in tenths of kPascal
    UINT16 MAF; //mass airflow in g/s from aftermarket MAF
    UINT16 AFM; //mass airflow from stock AFM
    UINT16 IAT; //Intake Air Temp in tenths of deg F
    UINT16 CLT; //Coolant Temp in tenths of deg F
    UINT16 EGO; //EGO Narrow Band
    UINT16 AFR; //Wideband AFR tenths

    UINT16 BAR; //in tenths of kPascal - set at startup

    UINT16 TPS; //throttle position %- true analog if aftermarket is used
    //If stock system, 0=idle, 100.0 = WOT,

    UINT16 Pulse_Width; //cur pulse_width in uS
    UINT16 Status; //System Status - uses bit defines above
    //b.0 - b.15

    } ENGINE_struct;

    It's a 32bit processor so it would be better if my UINT16's were 32, but I wanted to keep the size down so when I transfer to the PC, I can send it over the link faster. I want a nice snappy interface for feedback/tuning. I though about two different packets going back: One that has only a few vars that change the fastest: RPM, MAP, ICPW, TPS, AFM and then another that reports slow sensors such as CLT,IAT and such, but I think that's overkill. The link is 115200 & I can do all the above sensors (around 30bytes) in 2.5ms if I send in raw hex. If I send in ascii (which is more handy to debug/test) it's more like 10-12ms which is still plenty fast enough. The simulator I have updating at 100ms (10/sec) and it's still quite snappy and responsive on the graphs/gauges.

    The A/Ds by the way are all 16bit as well. The pic line would also make a good starting point. I've done several smaller pic projects, but never anything with their larger parts. Coming from a Motorola background, I could never get past their 'Not Bit test skip if not clear | the moon phase is waning' method of branching. It always made my head hurt.

    Lenny

  38. #38
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    RCB,

    That's hilarious on the K&N filter. The Zfuel in plug n play mode could not be detected unless someone:
    1) pulled the drivers side kickplate off
    2) Disconnected/removed your ecu
    3) Opened the case to look at the printed circuit board
    4) & knew the difference between late 70's electronics and modern electronics.

    The only thing that may make them curious is that your emissions should be lower than any Zcar they have every measured. I'm obviously not the one to condone tricking the 'man' in this manner, I'm just saying that it's possible.

    Lenny

  39. #39
    Registered User LeonV's Avatar
    Member ID
    CZCC-19146
    Join Date
    Apr 2009
    Location
    Bay Area, CA
    Posts
    1,961

    Default

    This escalated above my programming experience very quickly! Great work Lenny, this is a fantastic project.
    2/74 260Z

  40. #40
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Quote Originally Posted by superlen View Post
    I think what really killed assembly programming is speed. Chips today just run so damn fast that speedy assembly code isn't that critical for most applications. Even if the compiler does silly things & bloats the code, it still runs 100 times faster than it has too.
    Makes sense. Moore's Law historically has been as accurate as Murphy's Law, and if memory space and processor cycles are cheap enough to burn off, then why not, right? However, for this application my plan for all assy wasn't driven so much by cost or speed, but for reliability and predictability. I wanted to know exactly what was in all the registers at all times.

    I'm out of touch and I'm comfortable with that. I always wrote the low level interface code for the stuff I designed, but I've never been a software jockey. I've done just enough to be dangerous.

    You're clearly going a lot more complex than I had planned to do. I was thinking just model the transfer function of the original ECU and that's it. Let's see... Of your vars above, the only things I need to know are AFM, IAT, CLT, TPS, and Pulse_Width. Everything else was for phase II.

    So I don't want to hear about it when your interrupts hiccup once every few days and you can't track it down. Are you sure you main loop will be able to keep up at 100ms worst case update at redline? You got a pulse width module timer in that beast so you don't have to babysit digital output pins to drive the injectors?

    About the battery voltage... The original ECU tweaks the injector pulsewidth WRT battery voltage. Higher voltage opens injectors faster and all that. However, if I were doing this, I would probably switch to one of the pre-canned injector driver IC's that has the voltage correction built in. That would be one less thing to worry about and would be much more consistent than the stock system or trying to make that adjustment yourself. If you use something that has the fast opening peak/hold current control as well, then you can get rid of the injector resistors and run Vbatt right to the high side of the injectors.

    The PIC stuff was intriguing. I did maybe three projects with them, and it sure was a paradigm shift from the Motorola stuff. It took a little sideways thinking to figure out that branching stuff, but once I got a handle on it, I really liked it. It's like Whaaaat? Skip the next instruction? What the crap is that? You have to use goto's? I was always taught that goto's were evil.

    You need to embrace the goto.

    But guess what... The newer bigger PIC stuff has conditional branches just like Mot. Feels like home.

  41. #41
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Quote Originally Posted by LeonV View Post
    Fortunately, both the 260s have triple Webers.
    Fortunately???

    Wuss.

  42. #42
    Registered User rcb280z's Avatar
    Member ID
    CZCC-21454
    Join Date
    Apr 2010
    Location
    Ventura Ca.
    Age
    58
    Posts
    873

    Default

    Lenny,

    I say we trick the "man" and make this work. Sounds like the ball is in my court so to speak. I'll bet I can make it work.

    Bob

  43. #43
    Registered User LeonV's Avatar
    Member ID
    CZCC-19146
    Join Date
    Apr 2009
    Location
    Bay Area, CA
    Posts
    1,961

    Default

    Quote Originally Posted by Captain Obvious View Post
    Fortunately???

    Wuss.
    Ha! :P

    The original flat-tops are sitting in storage, just in case.
    2/74 260Z

  44. #44
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Haha! If you weren't so far away, I'd put em back on for ya.

    I bet I could convert you to the dark side...

  45. #45
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Captain,

    I too though the exact same.. just model the transfer function and knock it out....then damn feature creep. And, when I have the interrupts flaking out, I'll do more than tell you about, I'll put a scope in your hand and have you babysit/trigger on the event while I drink beer. haha.

    Loop time is no problem. All timing inputs/outputs are input capture & output compare timers accordingly. The only thing main does is check the serial, read the sensors, calculate the pulse start/stop times, set the timer registers. Plus, it's running at 100mhz & has a floating point unit so the "calculate the pulse start/stop" step should also be blazingly fast. That's why I thought about just using floats. I ended up NOT doing that; most are all integers. It makes the code a little less readable as units are sometimes 10x or 100x larger than displayed on screen.

    As for the injector drivers..I hate 'em. They work great, not too expensive, have lots of handy features for short circuit test/reporting ect, and are packaged well. However, the supply side of the equations sucks. Since they are primarily sold to the large OEMs, you are at the mercy of what the OEMs want. If they change to a newer style, your supply then drys up. Back in the 90s I had an industrial chicken skinner that I used one on to drive some external solenoids, and every 6 months they would go obsolete and be replaced by a newer/better part. Granted, that was early on in FI driver IC development, so designs and supply are more likely stabilized now, but it left a sour taste in my mouth.

    My plan was to use some discreet FETs so that there were multiple manufacturers to ensure a good supply & not be sole-sourced to one specific part. It would be easier to use a driver though (less design time, less testing, more features). I should look back into them again and see what the supply chain looks like now. It's possible that more than one manufacturer has adopted a common package/function. I didn't know that they were available with battery correction built in. I wonder how they accomodate different characteristics of injectors? Thanks for asking about these.

    I'll be able to support both low & high impedance injectors, but for now to get the plug and play going, I'll just use stock high impedance. You'll still need your resistor pack.

    Len

  46. #46
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    I don't know anything about the supply side as I'm jut datasheet shopping. Never actually tried to buy any of the injector drivers.

    From fuel injection to industrial chicken skinner... You'll have to walk me through that one over drinks sometime.

    FYI, the original ECU used a pair of NPN Darlington BJT's to drive the injectors. Three injectors per driver pulled to ground. They segregated the ground for these drivers from the rest of the circuitry so the switching currents didn't mess with the analog front end. Separate analog and digital grounds inside the ECU.

  47. #47
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    You can't be an engineer in Arkansas unless you do some project related to chickens. It may be a state law?? I've worked on poultry skinners, evisceration equipment, turkey baggers, popup timer inserters, automatic weighing systems, chicken house dimmers, curtain controllers....it's a good think I like chicken.

    If we can ever connect in the same city sometime, I'll buy beer...and or course chicken.

    I haven't reverse-engineering the analog ecu mutch, but it doesn't surprise me that they did some careful layout. I'm still constantly amazed at how well they made that system work with the technology they had. Of course, I was always in awe of my father rebuilding a carb & actually understanding them as well. He was an old school mechanic and owned a garage/body shop in the small town I grew up in. When the electronics began showing up in the late 70s, early 80's. He was in his early 50s and was quite annoyed with anything electronic controlling an engine. His theory on engine tuning was if you can't turn it, bend it, or drill it, it should just be set on fire and rolled into the creek.

    I was in my early teens at that time, loved electronics, & so naturally ended up debugging most electronic issues. That's what made me decide to become an EE.

    I have to fix a massive injector rail leak on the Z today, but once fixed I'm hoping to start characterizing the pulse widths at some know conditions and then compare them to some of my calculated values. I have several sets of wiring harnesses and extra sensors so I'll make a bench test setup as well...assuming I can find my bench. It's currently completely covered with parts, tools, the cat, ect.

    Lenny

  48. #48
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Yeah, the original ECU is a highly trimmed black box full magic and voodoo. I didn't do a lot of reverse engineering either, but I did get through the output stage and the "After Start" enrichment section. Tough part is there are three IC's in there and I have no visibility into what's inside the cans. They predate DIP packages, and there's no discernible standard like "opposite corners are power and ground". So for the sensor inputs, I've traced the circuits up to the IC's, but once they connect to one of the IC's, I hit a wall.

    I hooked the ECU up on the bench with a scope and a sig-gen and tried to get it to speak, but no luck. I just stuck in fixed resistors for the sensors, but I must have missed something because I couldn't get any injector pulses. Then I ran out of time on that project and moved on to something more pressing. My car runs well so it was an academic investigation only.

    But think about this... All analog. Instantaneous continuous response. Smooth transfer function. And has been bulletproof reliable since 1977.

  49. #49
    Nova Scotia,Canada,Earth Blue's Avatar
    Member ID
    CZCC-7641
    Join Date
    Jan 2005
    Location
    NS
    Posts
    4,085

    Default

    I think that once this is working, there is a huge market for retrofitting all the porsche and other german classic vehicles as well as other x-jetronic vehicles from the mid 70's to mid 80's. Great project and it can make a lot of $$$.
    Last edited by Blue; 08-12-2013 at 04:55 AM.
    There is scarcely anything in the world that some man cannot make a little worse, and sell a little more cheaply.
    The person who buys on price alone is this man's lawful prey.


    John Ruskin (1819 - 1900)



    ZCars in Eastern Canada seaport ready for shipment to Europe

    http://ZSportCanada.com


  50. #50
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Captain,

    You have done more investigating than I on the internals. My investigation was mostly just modeling up the enclosure in cad to make sure the new circuit board fits, & making the pinout match.

    Blue,

    I know the L-jet was in quite a few different vehicles, but I'm not sure how many still have enough followers to make any really huge market. Without any market analysis, my gut feel says I'll most likely break even after a year or so which is fine. If I start buying Porsches that may stretch to...forever.

    Lenny

    I

  51. #51
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Update & Opinion solicited:

    After quite a bit of work on the software, I've transitioned to finishing up the schematic and board layout. The software is taking shape nicely. I have the system responding to RPM, AFM, MAP, & Intake Air Temp and calculating pulse widths appropriately. I still need to add in the code to handle all the system enrichments, but the basic guts would now meter fuel correctly if I had hardware to test with. Thus the switch to schematic and layout.

    Due to the mechanicals of the factory case and mounting locations, I'm having trouble locating the usb connector where I want it. The usb port will be for updates and/or any tuning the user wishes to do. In a simple stock setup, it doesn't even need to be there. However, if someone upgrades to a hotter cam, or adds other goodies, eliminates the AFM, ect... they will need to get to it at least once during setup.

    My original plan was to have a panel mount connector in the housing & the user could plug into it. This connector was to be located in the top left of the case as there is already an access hole in the plastic toe kick panel that hides the ECU. For anyone familiar with looking at the ecus this is exactly where the model sticker is located. That's apparently what the hole in the toe kick is for, to allow someone to check the number without pulling the toe kick panel. This would be a really nice clean setup & the ideal spot for a usb bulkhead connector.... However, due to some other mechanical clearances, I don't know if I will be able to mount it there. I have some other options that I have considered.

    1. Mount in in the bottom right of the ECU.. This would require the user to add another hole in their toe kick to get to the connector to plug in which I don't like at all.
    2. Just have the usb cable itself come out of the box & dispense with the bulkhead connector altogether. This is better in that there is less cables/connectors. However, it has the downside that the cable is then attached to the ECU all the time & would need to be coiled up and hidden under the dash when not used. To tune, one would unroll the cable out and plug into the laptop. This is probably ok, but I'm not thrilled with it.
    3. A modified approach to number 2. Use an extension cable that comes out of the ECU but has the bulkhead connector on the end. This connector could be then mounted under the dash much like an OBD connector is. The user would then connect the laptop via another typical USB A to B cable.

    I'm open to any thoughts or other ideas that anyone has. I haven't completely give up on the top left location, I'm waiting for the panel mount connector to come in so I can test how well it fits, but I'm not confident there is enough room.

    Lenny

  52. #52
    Nova Scotia,Canada,Earth Blue's Avatar
    Member ID
    CZCC-7641
    Join Date
    Jan 2005
    Location
    NS
    Posts
    4,085

    Default

    Just have a small tail cable with a usb female connector on it and let the user connect to it as they want during installation....such as running a standard USB cable to the undredash or to the center console or to the glove box or to a jack on the dash, etc.

    Just give them something standard to connect to outside the box and let them deal with it.
    There is scarcely anything in the world that some man cannot make a little worse, and sell a little more cheaply.
    The person who buys on price alone is this man's lawful prey.


    John Ruskin (1819 - 1900)



    ZCars in Eastern Canada seaport ready for shipment to Europe

    http://ZSportCanada.com


  53. #53
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Bluetooth?

    IR?



    Seriously though... I would just put the connector anywhere on the unit your board layout will allow. Anyone who knows enough to mess with their engine in depth enough that they need a custom tuning set-up better be able to take the kick panel off to get to the connector. Drive around for a little while until you get the tune just right? Seems like a small price to pay.

  54. #54
    Registered User rcb280z's Avatar
    Member ID
    CZCC-21454
    Join Date
    Apr 2010
    Location
    Ventura Ca.
    Age
    58
    Posts
    873

    Default

    I'm with Blue....under the dash, inside glove box, inside center console, ash tray. I myself would make it easy to access the cable.

  55. #55
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Blue,

    If the bulkhead connector won't fit, I think that is the next best choice. I'll run a 6" pigtail out with a female usb a. It can still be right there where the current access hole is.

    Capt.. I thought about BTooth right off the bat, but held off. I did decide on using an injector driver IC like you had brought up earlier in the thread though. They are more common now and availability is good. I chose a MC33810. There will be two on there & this will allow us to have enough outputs to also do ignition timing.


    Lenny

  56. #56
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Cool. I like the idea of the injector driver chip. Assuming the availability is stable, I think they'll make for a better end result.

    So, if you would like another set of eyes on the schematic and/or board layout, I'd be happy to have a peek. I'm probably not previously familiar with any of the parts you're using, but that shouldn't stop me. PM me if you're interested.

  57. #57
    Z geek at large FastWoman's Avatar
    Member ID
    CZCC-19635
    Join Date
    Jul 2009
    Location
    Hampton Roads, VA
    Posts
    2,787

    Default

    Are there any unused pins on the ECU connector? If so, perhaps they could be used for the USB. Then a dongle could be soldered in to the appropriate pins on the vehicle side of the connector. Otherwise my vote would be for a SHORT USB pigtail that could be tucked neatly away when not in use.
    My last three sports cars while I still owned all three:

    2001 BMW Z3 Roadster 3.0i soft/hard top (sold)
    1966 Ford Mustang Coupe (sold)
    1978 Datsun 280Z (enjoying very much )

  58. #58
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    FastWoman, Haha! I was thinking about the exact same potential solution, and the answer to your question is yes... There are plenty of unused ECU connections on the stock connector.

    Problem is, however, that the receiving connector on the wiring harness shrouds all the connections whether they are used or not and you would have to chop an access hole into that connector or the rubber boot on the back side of it. IMHO that violates one of the prime "plug-n-play" directives of this endeavor.

  59. #59
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Sarah,

    As Captain said, there are several unused pins on the ECU. Not only do you run into the harness wiring issues, but there is another hidden one as well. On the stock ECU, many of the unused pins aren't actually loaded on the connector. I'm assuming to save money, they just didn't mold those pins in. So while they are available in location, there's no physical connection down to the pcb. This is only a problem if I re-use the stock connector on the new PCB which is undecided at this point, but I think it's a good backup plan if the supply of Connectors becomes problematic.

    The missing pins aren't a problem for true plug-n-play, but one important pin is annoying. Pin 20 is a wire from the FI relay and +12V on this pin will fire the fuel pump. It's wired and ready to go in the harness so the ECU could control the fuel pump if it wanted to (and I want to). I have an option in the GUI to turn on a fuel pump prime pulse for 3-5sec (configurable) every time you turn the key on. This was to let those that have a leaky check valve (myself included) to ensure there is good pressure in the line before start. However, that pin isn't connected down to the pcb, so if we re-use the stock connector we have to move that wire in the harness. Not hard, but not plug-n-play if you want the new feature of Fuel Pump Prime. The same thing exists with the cold start valve. However, I don't care about controlling it.

    There will also be an auxiliary harness option so extra pins could be in it. This would be a short 6" harness that comes out the back and has a free-hanging connector. It's primarily for ignition IO connections for tying to the disty or even a crank angle sensor if someone wants to add a ring & sensor. A few GPIO will be in there as well for fan relays, or ??? This connector isn't defined fully yet. Thoughts anyone? Also, I should note, that the two inputs will be duplicated on both the ignition connector AND two spares on the ECU. These are earmarked for inputs from the disty. All the ECM needs is a reluctor input from the disty to completely take over spark control. By adding those two locations in the ECM harness, someone who wants a really clean stock look can add just two wires to the stock harness and run them 4' over to the ignition module under the glove box & connect to that harness. They won't even have to penetrate the firewall. Now, the stock ignition module can be pitched, and the ECM takes over with programmable ignition maps. Woot Woot!


    On the USB cable, I think the consensus is that a short pigtail (6" or so) that can hide no problem will work well. It will have a usb A female connector on it. That allows a common usb A-A extension cable to be used to connect to the laptop. I'll supply one with the unit, but they are common as dirt now so when the user loses it they can get another easily. If the user did want to get nifty, they could add their own extension cable with a nice plug in socket someplace else like glove box, console, ect.

    Lenny

  60. #60
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Just a quick update. Still working on finishing up schematics & layout.

    - The USB cable is going to work well.
    - Added accelerometer on board for future development.
    - Have my inside Tyco source working on finding some of the stock connectors. (crossing fingers)

    Lenny
    Lenny

  61. #61
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    New Update:

    Just finished routing the circuit board a few minutes ago. I'll turn it loose to the board house next week so I should have raw boards a week or so after that. I'll take some pics when they come in. Woot Woot!

    Not much new to report on software. I did add some nice sensor calibration windows to the Gui. No one but me will probably need to use it as the ECM will already be calibrated for the stock sensors. However, if someone wants to add different sensors for custom applications, this will be the cat's meow.

    For instance, if you make your own custom nifty intake manifold with a throttle body from a K24 engine or some other donor car, you can easily calibrate to the new Intake Air Temp sensor & wouldn't have to use the stock Bosh unit from your Z. The same goes for water temp sensors, throttle position sensors, ect. ect. Anything you want to throw at it, you can tune/calibrate.

    Also, I will tweak this calibration screen for the Air Flow Meter. This will make it easy to bring your AFM back into spec without adjusting the internal spring. Basically you will be able to tweak the "SPRING" electronically. I think most everyone might want to play with this to get peak performance out of there engine. (or just because it's fun)

    I imagine that if we took 10 cars and tested their AFMs we would get 10 different curves of voltage vs airflow. All would be close, but not SPOT on like they were calibrated at the factory. I plan to sample as many of these AFMs as possible and adjust the factory shipped calibration numbers to the middle of the road.

    As always, any thoughts/comments are welcomed.

    Superlen

  62. #62
    Z geek at large FastWoman's Avatar
    Member ID
    CZCC-19635
    Join Date
    Jul 2009
    Location
    Hampton Roads, VA
    Posts
    2,787

    Default

    Lenny, great news! Very exciting!

    FAIW, I would kick out the "outlying" AFM data and shoot just a bit towards the rich side of the tuning. The reason is that it's better to be a bit too rich than a bit too lean. At least I have always erred just a tad towards rich. Not only is lean running hard on the engine, but a lean mixture can cause a flaky idle and possibly harmful backfiring. The consequences of rich running are fewer -- less motor oil life, harder on the cat (which most of our cars don't have), fouling of the plugs.
    My last three sports cars while I still owned all three:

    2001 BMW Z3 Roadster 3.0i soft/hard top (sold)
    1966 Ford Mustang Coupe (sold)
    1978 Datsun 280Z (enjoying very much )

  63. #63
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Lenny, A while ago I derived the Steinhart-Hart coefficients for the air and water temperature sensors.



    Don't know if you're beyond this point already or you were even planning to use this method to determine temperatures, but here's what I got:

    C = 1.89571E-07
    B = 0.000257545
    A = 0.001305386

    These numbers are based on info from the FSM and I believe they are slightly suspect. If you find from experiment that they are off a little, let me know and I've got a different set of cooefs that were derived from info directly from Bosch instead of from Datsun.

  64. #64
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Sarah,

    That's exactly the plan..just a touch rich as shipped. Also don't forget power falls off much faster when you are too lean rather than rich.

    Captain,

    I looked at implementing the equations directly in the firmware, but went with a lookup table with linear interpolation between the points. Of course the table has to be calculated ahead of time and stored. That's where we can either measure & log real world data and/or use the equation within the GUI to make building the table easier/better. The first pass, I have just implemented the numbers out of the FSM & plan on checking/tweaking the results when hardware gets here & I can get real numbers.

    Len

  65. #65
    Supporting Member Zedyone_kenobi's Avatar
    Member ID
    CZCC-16285
    Join Date
    Mar 2008
    Location
    Houston
    Age
    47
    Posts
    2,919

    Default

    I am going to print this an save it the next time somebody tells me tuning triples is in ANY way difficult.

    good luck my fellow engineers and tinkerers extrodiare!
    1971 240Z HLS30-38691
    93.9% done and getting better every day
    Now with 100% more DATSUN SPIRIT L28 Power
    1968 Datsun 2000 SRL311-03416

  66. #66
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Lenny, are you kidding me??? All that floating point and you're gonna use a look-up table for the conversion? You don't have to be embarrassed... I'm embarrassed for you.

    I'm just kidding of course. But if it were me, I wouldn't even ever convert the resistance to a temperature. The ECU doesn't really even ever need to know the "real" temperature in degree units. The only reason you need that is so you can display it on your interface. All the ECU really needs to know is how much fuel to add to base at that resistance (voltage actually) sensor input.

    Lookup table... Volts in, and increment to base pulse width out. Who cares what that is in "degrees".

    And BTW, there was some problem with the numbers in the FSM. I did a post about it a while ago. Let me see if I can dig that up.

    On edit - Found it:
    http://www.classiczcars.com/forums/f...s-manuals.html
    Last edited by Captain Obvious; 09-26-2013 at 06:14 PM.

  67. #67
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Quote Originally Posted by Zedyone_kenobi View Post
    I am going to print this an save it the next time somebody tells me tuning triples is in ANY way difficult.
    Haha! Honestly, I'm not sure which I'd rather tune... Off the top of my head though, I'm going with the triples.

  68. #68
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    And by the way, the other thing you do with the Steinhart-Hart coefficients is use them to build your look-up table. There aren't nearly enough data points in the FSM and if you try to linearly interpolate between only what's published, your error will be huge at the midpoint between your table points.

    Back in the Mesozoic Era when I used to do this...

    First thing you need to do is determine the amount of acceptable error. Then you calculate enough data points along the curve such that the linear interpolation between your table points never varies more than your max error budget from ideal. Works out such that the table points will be farther apart in areas where the curve is naturally more linear, but in the areas where the curve is nasty, you'll need more points.

    Did I say that right?

  69. #69
    Registered User siteunseen's Avatar
    Member ID
    CZCC-24724
    Join Date
    Jul 2011
    Location
    Alabama
    Posts
    1,967

    Default

    I skipped over this thread thinking it was about the difference in 87 octane and 93. I remembered reading this before I put the potentiometer in coolant sensor line thinking I might get myself one, Simple Digital System EM-5, I like what Lenny's doing better though. He's a Z man.
    1972 240Z #918 New Sight Orange
    1977 280Z #305 Light Blue Metallic
    1972 240Z #110 Persimmons Red

  70. #70
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Captain,

    Thanks for the link to the numbers post. I'll have to investigate. The reason for the lookup table was that I have a common structure/component that I use for all the sensor inputs, and the lookup table is way easier to implement across different types of sensors, temp MAF,AFM, TPS, ect. Some are simple such as TPS, it's just two points as it's a linear pot, others such as temp sensor will need more.

    Yes, you said it right. And my lookup tables are configurable for both the number of points and the locations along the x axis, so you can spread them out where the curve is nice & linear and squeeze them together where its curving. I can just keep adding points until the error % is down to what is acceptable for any sensor.

    Using Steinhart-Hart in the gui is a distinct possibility to help generate the tables, but my guess is that if I have tables already figured out for the stock sensors, plus a few other common temp sensors used such as GM and Ford, those tables would work for most people.

    Oh also, I need actual degrees when I'm doing speed-density calculations. If I implemented only the stock LJet version, you're right I could just adjust the numbers of how much extra fuel to dump for colder air and I wouldn't need to know or care what the actual temp was.

    Here's some more related info, and I'd like your feedback on it.

    Note: for the following discussion we aren't considering any type of enrichments such as acceleration, or different target Air-Fuel ratios, ect. We just care about matching 1 part fuel to 14.7parts air.

    The way I have the code architecture set up is that the primary fuel calculation function takes MASS of air flowing into the engine as one of the variables. I will use this function regardless of what type of air input method is on someones car. The following are three common methods to tell the ECM how much air is flowing into the engine.

    M1. Hot wire Mass Air Flow (MAF)
    M2. Speed-Density using Manifold Pressure, rpm, & VE table.
    M3. Stock Bosh Vane type AFM

    Of the three, M1 (MAF) is the easiest for the software as this sensor typically give you an output that is proportional to the MASS of air flowing into the engine. This is perfect as the temperature of the air you don't care about because the sensor is compensating for that. This method I already have written and tested in the firmware.

    Now lets look at M2 (MAP) This method uses manifold pressure and a table called the Volumetric efficiency table (VE) to determine at any given RPM/MAP combo how much air is flowing into the engine in VOLUME (not mass). This is where we need the real temperature (in Kelvin no less) and use Boyles Ideal gas law pv=nRT to convert volume of air to mass of air at this temperature and pressure. Zedyone_kenobi are you following along? I may end up just buying triples as well. JK, I have this one already figured out and the code written/tested as well.

    Now on to M3 (our stock AFM). This one is of course the most interest to us. It is also the one that I don't understand the physics of exactly. The vane meter output measures airflow, but is that output related mostly to volume of air or mass of air?

    Consider two possibilities:
    a) volume of air flowing past without ANY regard to the density of the air
    b) volume of air flowing past but vane position changes depending on the density of the air cold/hot.

    The ECU definitely samples the air temp (IAT) & corrects for cold heavy dense air vs light warm air, and I'll do the same. What I'm not 100% clear on is this. Does the AFM output *also* get affected by cold vs warm air? I think it does. Maybe not by a tremendous amount but I think cold dense air flowing at a given cfm will move the vane farther that warm light air flowing at the same cfm.

    Regardless of how much (if any) the air temperature affects the vane position, my lookup tables will adjust it out. However, I would like to understand the physics behind it.


    Lenny

  71. #71
    Nova Scotia,Canada,Earth Blue's Avatar
    Member ID
    CZCC-7641
    Join Date
    Jan 2005
    Location
    NS
    Posts
    4,085

    Default

    Quote Originally Posted by superlen View Post
    Sarah,

    That's exactly the plan..just a touch rich as shipped. Also don't forget power falls off much faster when you are too lean rather than rich.

    Captain,

    I looked at implementing the equations directly in the firmware, but went with a lookup table with linear interpolation between the points. Of course the table has to be calculated ahead of time and stored. That's where we can either measure & log real world data and/or use the equation within the GUI to make building the table easier/better. The first pass, I have just implemented the numbers out of the FSM & plan on checking/tweaking the results when hardware gets here & I can get real numbers.

    Len

    I use software called curve expert for analysing data and generating formulas and tables to represent it accurately. Works nicely for "applied" theory. A geeky example at the bottom of this old page: http://atlanticz.ca/zclub/techtips/t...sor/index.html
    There is scarcely anything in the world that some man cannot make a little worse, and sell a little more cheaply.
    The person who buys on price alone is this man's lawful prey.


    John Ruskin (1819 - 1900)



    ZCars in Eastern Canada seaport ready for shipment to Europe

    http://ZSportCanada.com


  72. #72
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Blue,

    Thanks for the link, I'll check it out.

    Also, after more research and learning about specific heat ratios and formulas involving the speed of sound, I have it figured out. The final result of all of this is that for our purposes, the AFM could only vary by about 0.2% across a temp range of 0-200C! That's a pretty small number and for my purposes, I can assume the AFM to be a perfect volume measurement device INsensitive to air temperature.

    The AFM's output will be *slightly* larger with colder air, but tiny tiny. The reason I kept thinking it should be affected more is because air is a compressible fluid so the density does not play a large factor in the pressure applied to the vane. For a compressible fluid, it's all about the speed. If we were trying to measure an INcompressible fluid, then the density change that occurs with temperature would be much more pronounced.

    Len

  73. #73
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Quote Originally Posted by superlen View Post
    However, I would like to understand the physics behind it.
    I'm no expert on the topic, but I believe the flowmeter style used in the L-jet is more akin to an anemometer in that it measures more "flow velocity" than "flow volume". Of course, if you know the cross sectional area and the velocity, you can calculate volumetric flow per unit time.

    I'm assuming this is the same thing you found out with your research and why you said "For a compressible fluid, it's all about the speed." Is that the case?

  74. #74
    Registered User
    Member ID
    CZCC-26354
    Join Date
    Feb 2012
    Location
    VA
    Age
    33
    Posts
    16

    Default

    The 280z AFM is actually vane meter sensor also known as a Volumetric Airflow sensor. It doesn't measure mass or density directly. it's closest mesurment would be drag force which is what actually moves the flap of the air flow meter which is dependent on fluid density. that movement is conveted into voltage drop by the potentiometer connected to the vane which is calabrated to a certain actual mass air flow. It's also good to note that the temp please a decent roll in determining the mass of a fluid. At least that's what Wikipedia says and from my ChemE background it makes sence. But it's a crapy way to measure air speed. Mass flow sensor - Wikipedia, the free encyclopedia I also found this web too http://www.sdsefi.com/techtheo.htm
    Last edited by Hodgimus-maximus; 09-29-2013 at 08:34 PM.

  75. #75
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Quote Originally Posted by Hodgimus-maximus View Post
    The 280z AFM is actually vane meter sensor also known as a Volumetric Airflow sensor.
    Actually it traces directly back to what is called a "Pressure Plate Anemometer".



    See:
    pdf doc about instrumentation
    Anemometers
    More about instrumentation

  76. #76
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Captain,

    Yes, you and I are thinking alike. I do equate the AFM as a velocity measuring device. Great picture,BTW I'll have to investigate those links.


    Hodgimus-maximus,

    Yes, temp does play a major roll in the mass of the air, but from my research it doesn't change the drag force on the vane tremendously. Since the air is a compressible fluid, the speed of the fluid is the primary initiator of the drag and overshadows the mass. I couldn't wrap my head around this very well until after some research I realized the "compressibility" of the fluid is what makes it this way.

    Then as Captain pointed out the speed gets turned to volume by using the cross sectional area of the AFM. The cross section won't change of course, so I really don't have to worry about that math or calculating any of that. I will simply use the voltage output as an indicator of volume flow. Now that we have an accurate measure of volume/time we definitely must use the air temperature as you noted to calculate the mass/time.



    Len

  77. #77
    Registered User
    Member ID
    CZCC-26354
    Join Date
    Feb 2012
    Location
    VA
    Age
    33
    Posts
    16

    Default

    I would not like to solve that equation because the cross sectional area of the depends on the speed of the air flowing threw it. :
    Name:  image.jpg
Views: 610
Size:  14.4 KB
    Last edited by Hodgimus-maximus; 09-30-2013 at 01:05 PM.

  78. #78
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Quote Originally Posted by superlen View Post
    I do equate the AFM as a velocity measuring device. Great picture,BTW I'll have to investigate those links.
    High-tech back in 1450 as originally invented by Leon Battista Alberti! There isn't any technical info in those articles, just history and a pic or two. The pic I linked to above is Robert Hooke's anemometer from the mid-1600's. And yes, it's the same Hooke as "Hookes Law" (the spring guy).

    About the cross sectional area, it does change as the vane lifts up. I have absolutely no idea how linear the pot output is however. One of the sources I found indicated that it was intentionally non-linear and was in fact a logarithmic output.

    If it were me, I would put it in series with a known transfer function mass flow meter and pump some air through it at varying rates and characterize it. I wouldn't try to predict the output... I would cheat and test it.

  79. #79
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Hodg, I thought about the cross section changing, but I think that only affects the area right near the flap. So, the air right there speeds up, but a few inches later is slows back down to an average airflow for the round duct size. Still looks iffy doesn't it? Regardless, I'm not going to try and model it in software. I'm perfectly fine just calibrating the output and going forward.

    Captain,

    Yes, it's purposely non-linear to give more resolution down in the idle/off-idle area.

    I too think that putting in series with a MAF is a great idea. I had been thinking I would tune with Speed Density first and then use it to calibrate the AFM, but the MAF would be less work & dyno time. MAF was going to be the last sensor I worried with, but maybe I should make it first. Much easier than building a flow bench which I thought about as well. Time to walk the local yard & surf Ebay.

    FYI. I have written the firmware to actually calculates air mass flow for any/all meters that are enabled. For instance, I could get the grams/sec flowing from all the following algorithms every cycle.

    1. AFM
    2. Speed Density
    3. MAF
    4. Alpha-N

    The theory being that if the AFM started giving strange readings, I could revert to Speed-Denisty on the fly, like a limp mode. Most all OEM ecu's do this. If MAF goes south, they revert to Speed -Density or even Alpha-N. With the frankenMaf spliced in between the filter and AFM & an replacement linear TPS I could drive around with the test car with FOUR redundant air mass sensors. hahaha.

    Lenny

  80. #80
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    This looks like a great test candidate for MAF. It even has the Bosch style connector, so if one wanted to go ahead and replace their AFM with a MAF, the harness would still look "stockish".

    New Maxima J30 I30 Q45 Mass Air Flow Sensor MAF Meter 2268031U00 2268031U05 | eBay
    Last edited by superlen; 10-02-2013 at 09:50 AM.

  81. #81
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Just another quick update. I've been sidetracked with other projects, but I did get the raw circuit boards in this week & will try and get time to populate them next week. Pics as well to follow.

    Lenny

  82. #82
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Here's a quick picture of the HellFire ECU. It passed it's first test. It fits in the stock ECU frame perfectly. All mounting hole locations were spot on and the stock connector attaches as it should with no interference. I do have one resistor that is a little close to the frame, but it's acceptable. It's also an optional part for someone running more than six injectors, so stock configurations it won't even be loaded.

    For inquiring minds, here's some technical details:

    1. It's a four layer board with internal power and ground planes, not a cheap simple 2-layer. The internal planes are further split into multiple analog and digital planes to keep *ALL* the analog signals above/below their respective planes. This should give me us extremely clean analog signals from the external sensors. I'm extremely anal about routing mixed analog/digital and for many pcb designs I do it's pretty critical. For the signals on this board it's a fair amount of overkill, but it's nice to know that the signals that hits the a/d converters are going to be as clean as possible.

    2. All the optional cam/crank trigger inputs are in the top right section of the pcb. They are isolated of course with their own filtered supply, and I even added guard rings to the ttl signals as they made there way to the CPU input capture pins.

    3. Injector driver circuits and optional ignition drivers are all along the bottom edge. Again, all are highly isolated. The same drivers will run the external fuel pump relay & some additional general purpose inputs/outputs that someone may need. (thinking in the future for turbo/nos/shift light, ect. ect)

    4. USB communication, & optional blue tooth module & accelerometer module are near the top middle. The USB connection will pigtail out with a simple cable to cabin & a female B connector. You can let it hide up over the odometer reset cable/hood latch cable or extend it to somewhere else like the glove compartment or console.

    Now, all I need is more time...

    This shows the HellFire on the bottom with my test harness connected and the stock ECU above it.


    For comparison here's the entire stock ECU guts. There are actually two circuit boards in the stock design with a ribbon cable connecting them.

  83. #83
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Lenny, Awesome. Can't wait to see what happens when you get one assembled and powered.

    I see in the pic you've got the board edge connector installed. Did you harvest that from a stock ECU, or did the part numbers we talked about earlier pan out? I worry sometimes about large low volume parts like that... They say they have stock, but they're in the dark dusty part of the stockroom and they only think they have stock.

    BTW - Enjoy the smoke from prototype #1!

  84. #84
    Z geek at large FastWoman's Avatar
    Member ID
    CZCC-19635
    Join Date
    Jul 2009
    Location
    Hampton Roads, VA
    Posts
    2,787

    Default

    NICE!

    I'm getting rather excited! With the Bluetooth capabilities, are you going to have an app for that?

    I would love to help you beta-test in my Z. It's not the freshest engine in the world (about 170k), but it it's straight, with the exception of the wonky ECU.
    My last three sports cars while I still owned all three:

    2001 BMW Z3 Roadster 3.0i soft/hard top (sold)
    1966 Ford Mustang Coupe (sold)
    1978 Datsun 280Z (enjoying very much )

  85. #85
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Quote Originally Posted by Captain Obvious View Post
    BTW - Enjoy the smoke from prototype #1!
    I laugh.....Sadly, because many times that's true.

    The connector you see is scavenged from an old ECU. The part numbers are still valid & get listed as a current orderable part, but only in extremely large quantities. To begin with I plan on just scavenging from the core ECU that's sent in. While I would prefer a newly manufactured connector, the existing connectors are robust & with a quick deox cleaning should perform just like they left the factory.


    Sarah,

    Yes, at some point there will be an Android and Iphone app. I won't write any of it until the base system is up and going though.


    Lenny

  86. #86
    Registered User EuroDat's Avatar
    Member ID
    CZCC-26512
    Join Date
    Feb 2012
    Location
    The Netherlands
    Posts
    1,420

    Default

    Hi Lenny,

    The title of this thread threw me a bit. Thought it was something about fuel, but I just spent the last hour reading all the posts and finding it very interesting. Looking forward to seeing it develop into a usable system. I would love to help with testing, but Im really out in the wilderness with my 280Z.

    I will remain an eager follower.
    Chas
    Chas
    5/77 280Z HLS30 403100 with some modifications
    Original colour: 305 Light Blue. The PO changed it to Red

  87. #87
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Quote Originally Posted by superlen View Post
    I laugh.....Sadly, because many times that's true.
    I know that we've both been there.

    So are you going to populate the board yourself? I've done a fair share of surface mount assy by hand, but not everyone is comfortable with the geometry.

    Or maybe... You could tell me that you're gonna toss it onto the pick-n-place at work during lunch break. Wouldn't that be sweet!

  88. #88
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    Lenny, I sent you an email a couple days ago. You probably didn't see it because you're too busy soldering?

  89. #89
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Cap,

    I'll populate it myself....well when I say myself, I'll have one of my SMT employees do it for me. For just the one board, it will be placed by hand, but otherwise goes through the same process as production boards. It's screen printed with solder past, part's placed, then ran through the reflow oven. This is much faster than hand soldering every component (however, not as fast as the 13,000 part/hr pick&place) & as a bonus you get a nicely soldered board with a process controlled temperature curve.

    At least it will look good to start with . After I get through debugging/modifying/destructive testing it'll look like hell. Oh, and check your email.

    - General Update for anyone interested.
    - I had purchasing order all the parts that I didn't already have in inventory & I'm hoping to get a prototype built next week by Thanksgiving.

    Lenny

  90. #90
    Z geek at large FastWoman's Avatar
    Member ID
    CZCC-19635
    Join Date
    Jul 2009
    Location
    Hampton Roads, VA
    Posts
    2,787

    Default

    ^^^ When asked on Thanksgiving what I'm thankful for, I'll be able to say Lenny is burning the midnight oil to give my Z digital fuel injection!
    My last three sports cars while I still owned all three:

    2001 BMW Z3 Roadster 3.0i soft/hard top (sold)
    1966 Ford Mustang Coupe (sold)
    1978 Datsun 280Z (enjoying very much )

  91. #91
    Registered User rcb280z's Avatar
    Member ID
    CZCC-21454
    Join Date
    Apr 2010
    Location
    Ventura Ca.
    Age
    58
    Posts
    873

    Default

    God I can't wait!!! Going digital was just a dream to me until Lenny came along Very exciting!

  92. #92
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Happy Thanksgiving to all my fellow Z Heads.


    ....oh and another update for those playing along at home.

    The HellFire digital ECU Board is populated & powered up!! (No smoke yet Captain, but it's still early! - and to be honest there was a bit of a close call on a tantalum cap loaded backwards on the 3.3V supply input on first power up. ) I was running off current a limited power supply for initial power up as a precaution so there wasn't enough "ooomph" to smoke it. Had I connected directly to a full 12V battery.....well it would have been a little exciting when the power came on. Virgin power up.. Pop! & parts fly off the board. That's not how to start a project. Thankfully, that didn't happen.

    Once I swapped out the cap for a new one (& not soldered on backwards), the board came right up. The laptop detected the onboard USB interface, installed drivers appropriately & the JTAG programmer connected & allowed me to download code. Woot! Woot! I now have a development platform!!

    Here's a populated pic:


    And here is a picture of the target car & the test harness/bench.


    Hmmm. Picture looks like it cuts off top half. Try here: ImageShack - test harness.jpg

    I have limited time over the holiday but hope to have serial communications up and going between the HellFire and the Windows GUI & begin testing all the analog inputs.

    Len

  93. #93
    Boat Anchor Repairman Captain Obvious's Avatar
    Member ID
    CZCC-24608
    Join Date
    Jul 2011
    Location
    Philadelphia, PA
    Posts
    1,845

    Default

    I love the smell of tantalum in the morning.

    Excellent. That's a huge first step! Glad you didn't get any gravy inside.

    PS - Big three phase thickness planer?

  94. #94
    Z geek at large FastWoman's Avatar
    Member ID
    CZCC-19635
    Join Date
    Jul 2009
    Location
    Hampton Roads, VA
    Posts
    2,787

    Default

    Very, very exciting, Len! That's a nice looking board!

    There's not much I can contribute at this point, except my enthusiasm and my willingness to offer up my Z as one of your guinea pigs.

    Perhaps also I can give you a chuckle: One of my whimsical pipe dreams is to build a vacuum-tube-based EFI for a vacuum-tube era car. It would be a period-correct "what if they had done this" sort of project. I would of course find some way to showcase the glowing array of tube circuitry in a plexiglass housing, almost certainly with magic eyes to indicate things like mass airflow!

    But seriously, if you hadn't come along with your digital ZFuel board, I might have eventually designed/built an analog system using socketed, standard, off-the-shelf op amps. Weird, yes... but no weirder than the L-Jet systems we already have.
    My last three sports cars while I still owned all three:

    2001 BMW Z3 Roadster 3.0i soft/hard top (sold)
    1966 Ford Mustang Coupe (sold)
    1978 Datsun 280Z (enjoying very much )

  95. #95
    Registered User
    Member ID
    CZCC-23818
    Join Date
    Mar 2011
    Location
    Prairie Grove, Arkansas
    Age
    52
    Posts
    235

    Default

    Captain,

    Love the tantalum line...it was beginning to stink. And yes..the planer is a 1920's Porter 24" thickness planer. 5hp 3ph on the cutterhead. I just finished restoring it & have been using to plane a bunch of quartersawn white oak for trim in the house. I should have been doing that today as the weather was nice, but some deer hunting and Hellfire bringup took precedence.

    Sarah,

    I love the vaccum tube idea. That would be quite cool. One thing I just realized on the LJETS is that some of the later models actually have dip part ICs in them instead of the old style can ICs. I didn't run the numbers, but I'm sure they are opamps or maybe some comparators for the multistable vibrator circuit. I have too much on my plate now, but I would still like to reverse engineer the analog details of an l-jet.

    Hellfire Update:
    1. Status leds are blinking.
    2. Communication is tested & I'm reading to/from unit via the USB. The classic "Hello World" or in this case, "Hello Z World", came across the link first pass.
    3. Beginning on testing the rest of the basic I/O functionality and integrating my existing communications framework for the GUI.

    Lenny

  96. #96
    Z geek at large FastWoman's Avatar
    Member ID
    CZCC-19635
    Join Date
    Jul 2009
    Location
    Hampton Roads, VA
    Posts
    2,787

    Default

    Hey Lenny,

    I didn't know there were ECUs with DIP ICs in them! Where there's a DIP IC, there's hope. The nice thing about linear ICs is that there are not really that many different pinout configurations, and they are quite substitutable. If I were a purist, I would probably want a reverse-engineered reproduction DIP ECU board with all of the OEM equipment intact. However, I'm not a purist, so I think I greatly prefer your Hellfire board, especially considering the availability of essential fuel-conserving technologies such as lambda feedback.

    Very exciting, Lenny!
    My last three sports cars while I still owned all three:

    2001 BMW Z3 Roadster 3.0i soft/hard top (sold)
    1966 Ford Mustang Coupe (sold)
    1978 Datsun 280Z (enjoying very much )

  97. #97
    Registered User rcb280z's Avatar
    Member ID
    CZCC-21454
    Join Date
    Apr 2010
    Location
    Ventura Ca.
    Age
    58
    Posts
    873

    Default

    You guys really seem to be having lots of fun with this. Wish I understood electronics a lot more than I do.
    I'm following this because it looks like there is hope for my Z's F.I., maybe? I Don't understand what "DIP ICs or what Tatalum cap's" are So I'm not even going to pretend I know what you are talking about. But rest assured I'm going to google everything

  98. #98
    Registered User
    Member ID
    CZCC-20998
    Join Date
    Feb 2010
    Location
    amarillo,tx
    Age
    81
    Posts
    103

    Default

    The only question I feel smart enough to ask " How much money will this sell for?"
    1978 280z

  99. #99
    Registered User rcb280z's Avatar
    Member ID
    CZCC-21454
    Join Date
    Apr 2010
    Location
    Ventura Ca.
    Age
    58
    Posts
    873

    Default

    Cost is really no issue for me, I think I want to believe it will be worth it to have no smogging issues with my car. And of course any improvement it would make would be a plus.

  100. #100
    Z geek at large FastWoman's Avatar
    Member ID
    CZCC-19635
    Join Date
    Jul 2009
    Location
    Hampton Roads, VA
    Posts
    2,787

    Default

    RCB, "DIP" stands for Dual Inline Pins. The black,rectangular integrated circuits you're probably most used to seeing, with pins on each side, some looking a bit like caterpillars, are DIP. The problem with the boards I've seen is that they have the ICs packaged in tiny little cans (with oil!) and wires coming out the bottom like some spider from Fukushima. There's no telling anything about what's inside the can! But give me a DIP IC, and I at least have a few clues, if not possibly off-the-shelf part numbers.
    My last three sports cars while I still owned all three:

    2001 BMW Z3 Roadster 3.0i soft/hard top (sold)
    1966 Ford Mustang Coupe (sold)
    1978 Datsun 280Z (enjoying very much )

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •