Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: AEM EMS Tutorial Notes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Runs on alcohol. The car does too. Not Verified
    Join Date
    Sep 2010
    Owner Since
    1999

    Location
    San Francisco, CA
    Posts
    638
    Thanks
    18
    Thanked 49 Times in 35 Posts

    AEM EMS Tutorial Notes

    Who knows if I'll ever finish the tutorial... it's a lot of work. So I've decided to start dumping my notes. These are going to be dense and not organized for easy consumption, but you might find them useful. Let me know if you notice any errors or something isn't clear.

    Timing Basics

    We start with some basic facts about the 6G72:
    • 4-stroke - 720° in a full engine cycle.
    • 6 cylinder - 120° between cylinders (720° / 6 = 120°).
    • Waste spark ignition - paired cylinders are 360° out of phase (1&4, 2&5, 3&6).


    The cam and crank sensors (either the 1st gen CAS or 2nd gen Hall effect sensors) are the most important inputs and the basis of all timing. As Jeff's notes (Stealth 316 - 3S Ignition System) show, these provide two square wave signals to the EMS. The rising and falling edges are used as reference points for timing calculations.

    Take a look at this chart. It shows how these signals correspond to the engine cycle and each cylinder's individual strokes:



    Syncing Up

    The first thing we're interested in is how the EMS synchronizes itself with these signals. Jeff says,

    If the TDCS signal is high when the CAS goes from low to high, the ECU knows that cylinders 2 and 5 are in either the compression or exhaust stroke. When the CAS then goes from high to low, the ECU uses this as a reference to turn power transistor "B" off to produce sparks in cylinders 2 and 5. If the TDCS is still high at this time the ECU also knows that cylinder 1 was near TDC and is currently on the combustion stroke, and that it was cylinder 2 that was on the compression stroke.

    If the TDCS signal is low when the CAS goes from low to high, the ECU waits until the CAS signal goes from high to low to determine which of the other two cylinder pairs should be fired. When the CAS signal goes from high to low and the TDCS is high, then cylinders 3 and 6 are in either the compression or exhaust stroke. If instead the TDCS is low, then cylinders 1 and 4 are in either the compression or exhaust stroke. In each case, the ECU uses this (the CAS signal going from high top low) as a reference to turn the appropriate power transistor off ("A" for cylinders 1 and 4 or "C" for cylinders 3 and 6) to produce sparks in the cylinder pair.
    I don't know if this is actually how the stock ECU works (maybe the flashable ECU guys can tell us) but it is NOT how the EMS works.

    Being a generalized ECU for multiple platforms, the EMS has multiple sync strategies. The one used on a 3S is called Sync Crank S Count. It is extremely simple - it watches for a particular number (Sync Teeth: 4) of crank "teeth" (both rising and falling edges, Crank Falling Edge: ON, Crank Rising Edge: ON) to pass between cam "teeth" (falling edges only, Cam(T2) Falling Edge: ON, Cam(T2) Rising Edge: OFF).

    I want to take the previous diagram and make it a bit more intuitive. First, all the events are listed in degrees BTDC of the following cylinder. Instead, let's think about a full 720° engine cycle, starting at TDC of the #1 cylinder. Here are the cam and crank signals with each edge's degree in the cycle:



    Let's drop the cam rising edges (Cam(T2) Rising Edge: OFF). This represents the significant events as seen by the EMS:



    Notice that between the cam edges at 550° and 70°, there are 4 crank edges. This is the ONLY time this occurs in the 720° cycle, and is what the EMS uses as its sync signal. This is very important - the EMS considers the passage of 4 crank signals between cam signals to be the sync event, and synchronizes on the following crank edge at 115°. This won't make much sense yet, but 115° is the tooth reset point for the 3S.

    How the EMS "Counts"

    Remember that the rising crank edge at 115° (5° BTDC #2) is the reset point. The EMS keeps an internal counter called A Tooth that counts the number of crank teeth seen since the reset point. At that point, it is reset to 0.



    Just remember that for A Tooth, 1 crank signal edge = 1 tooth.

    Now, the EMS must convert A Tooth into an even pattern of six (Spark Teeth: 6, Fuel Teeth: 6) for use as injection / ignition timing references. These are counted in Fuel Tooth and Ign Tooth, based on A Tooth and configured via the table Crank Tooth Control.



    It's not necessary to cover every function, but in short they are:

    Value Function
    0 Do nothing.
    1 Process significant edge.
    2 Process alternative edge, used for crank firing.
    3 Force reset of A_Tooth, if loss of sync.
    4 Test for synchronisation
    5 Process significant edge and Test for synchronisation.
    6 Process alternative edge and Test for synchronisation.
    7 Reserved

    All you really need to worry about is function 5, which increments Fuel/Ign Tooth, and function 3, which forces a reset (we should never get to A Tooth: 12). In layman's terms: when we hit a crank edge, if the current A Tooth value is 0, 2, 4, 6, 8, or 10, increment Fuel/Ign Tooth.



    TODO: Actually explain how the sync happens. Cam Tooth, S Tooth, S Sync Tooth. Sync Early. Stat Cranking, Stat Sync. Crank Alt Options.
    Last edited by Intropy; 07-23-2012 at 09:03 AM.

    AEM s2 EMS | E316Gs | E85

  2. The Following 4 Users Say Thank You to Intropy For This Useful Post:


  3. #2
    Runs on alcohol. The car does too. Not Verified
    Join Date
    Sep 2010
    Owner Since
    1999

    Location
    San Francisco, CA
    Posts
    638
    Thanks
    18
    Thanked 49 Times in 35 Posts
    So here's the complete picture:

    

    Injector Phasing

    Once you get this, some spooky options make sense. We like to think of "0" as TDC #1, but as far as the EMS is concerned, "0" is 115°, or 5° BTDC #2.

    Injector firing order and timing is determined by the Injector Tooth X options. These correspond to the Fuel Tooth values depicted above. E.g., if Injector Tooth 1 = 0 as it does in the basemap, we are saying that we want to fire injector #1 when Fuel Tooth = 0 at 165°.

    Obviously, this is wrong. Injector #1 needs to fire much later when Cylinder #1 is in its intake stroke, around 4XX°. The other injectors will be off as well. So we need to retard all the injectors using the Injector Phasing option. In the basemap, this is set to 5 teeth, or 5 * 120° = 600° (remember 1 tooth = 120°). But that would mean Inj #1 opens at 165° + 600° = 765° (45°), which is still wrong!

    This is where AEM engineers made a decision that I don't really understand, but it is what it is and once you know about it, it's not a problem. There is also the Injector Advance map, which tells the EMS how much additional advance is required at higher RPMs. In the basemap, it is set to 0° at 0 RPM and increases from there. The maximum advance is 357°.

    The weird thing is that this value does not behave exactly like you might expect. First, it is injector "advance" so it is the opposite of injector phasing - higher values are more advanced, lower values are more retarded (heh heh). Furthermore, to fire Inj #1 at 45° like we thought, Injector Advance would need to equal 357°. If it is 0°, you need to add (retard) 357° to the Injector Phasing. So in this case, Injector #1 opens at 165° + 600° + 357° = 402°, which is thankfully where we want it.

    Why did they do it this way? I'm not really sure. Just remember it like this: If...
    Injector Tooth 1 = 0, and
    Injector Phasing = 0, and
    Injector Advance = 357, then Injector #1 fires exactly at 165° when Fuel Tooth = 0.

    Read more here: Injector Phasing Information
    Last edited by Intropy; 07-25-2012 at 05:42 PM.

  4. The Following User Says Thank You to Intropy For This Useful Post:


  5. #3
    Runs on alcohol. The car does too. Not Verified
    Join Date
    Sep 2010
    Owner Since
    1999

    Location
    San Francisco, CA
    Posts
    638
    Thanks
    18
    Thanked 49 Times in 35 Posts
    A Quick Illustration

    Here's a screen from AEMData showing this in action.



    You can see that A Tooth is counted and filtered to Fuel Tooth. Also displayed is Fuel Inj 1 Open, which is the location (in teeth) of the injector 1 event. It is about 1.84 or approximately 386° = 165° + (5 * 120°) + 340° (the 340° comes from the Injector Advance table which is not pictured but is 17° at this RPM, so add 357° - 17° = 340°).

    Do I really need to know all this?

    Nope. To actually tune injector phasing, it's really easiest to just log the Fuel Inj X Open channels and do it by feel. But you could do some really crazy things with this information, like changing your trigger wheels or syncing to valve events.
    Last edited by Intropy; 07-23-2012 at 09:01 PM.

  6. #4
    Banned J. Fast's Avatar
    Join Date
    Sep 2010
    Owner Since
    - O - SIX -

    Location
    Colorado, USA
    Posts
    2,711
    Thanks
    405
    Thanked 200 Times in 140 Posts
    Anyone seen my Etch-A-Sketch? I need to get this!

  7. #5
    Runs on alcohol. The car does too. Not Verified
    Join Date
    Sep 2010
    Owner Since
    1999

    Location
    San Francisco, CA
    Posts
    638
    Thanks
    18
    Thanked 49 Times in 35 Posts
    Thanks, I need a wiki so other people can edit it.

  8. #6
    Quote Originally Posted by Intropy View Post
    Thanks, I need a wiki so other people can edit it.
    You can put this on my wiki. FrozenApps Wiki

  9. #7
    Intropy, this is an awesome thread. Thanks for posting it so long ago. I made a post on 3SI about a month ago asking for these types of details, one guy responded. He basically said: "don't ask here because no one knows." Anyway, I wanted to thank you because it gives me some idea of which cylinder I see as knocking -- very useful thread.

  10. #8
    Runs on alcohol. The car does too. Not Verified
    Join Date
    Sep 2010
    Owner Since
    1999

    Location
    San Francisco, CA
    Posts
    638
    Thanks
    18
    Thanked 49 Times in 35 Posts
    Ignition Timing

    Spark timing works just like injector timing, with only a few minor differences.

    First, notice that Ign Tooth and Fuel Tooth are not the same. Ign Tooth's "0" point is at 45°. Don't think too hard about this right now, just accept it as brute fact.

    Just like injector order and timing is determined by the Inj Tooth X options, coil order and timing is set in the Ign Tooth X options. They are listed here under "Coil Phasing":



    You'll notice a few things are different. First, they are not even values like the Inj Tooth options. That may seem a little weird, but remember that 1 tooth = 120°, so it's completely fine to have fractions of a tooth.

    The next thing you'll notice is because this is a waste spark ignition, we have paired coils 1 & 1B, 2 & 2B, and 3 & 3B. These are the same, i.e. 1 & 1B are both "Coil 1" and drive the same output, just at different times. As you would expect, the firing order is 1 - 2 - 3 - 1 - 2 - 3, corresponding to cylinders 1-6.

    Again, we have a global phasing option like Injector Phasing, which in this case is Ignition Sync. This is the option you adjust when you run the Ignition Timing Setup Wizard.

    Finally, we have the oh-so-familiar Ignition Map, which adjusts the timing relative to engine speed and load. The same odd behavior that applies to the Injector Advance map applies here. The maximum value is 72.6° of advance, so if this table is 0°, you need to add (retard) the spark timing by 72.6° when doing your calculations.

  11. #9
    Runs on alcohol. The car does too. Not Verified
    Join Date
    Sep 2010
    Owner Since
    1999

    Location
    San Francisco, CA
    Posts
    638
    Thanks
    18
    Thanked 49 Times in 35 Posts
    An Example

    So here's a real example from AEMData showing that this is all true:



    You can see that the car is basically idling (1000 RPM) and so the "timing" that we're all familiar with (Ign Timing) is 14.641°. In this state, Ign 1 Firing Loc is 5.26953 teeth. That number is the sum of the Ignition Sync option (3.652 in the base map) and the Ign Tooth 1 option (1.141 as seen above), along with the weird calculation based on the timing (72.6° - 14.641° / 120°) = .48299 teeth:

    3.652 + 1.141 + .48299 =~ 5.27
    Last edited by Intropy; 07-25-2012 at 06:53 AM.

  12. #10
    Runs on alcohol. The car does too. Not Verified
    Join Date
    Sep 2010
    Owner Since
    1999

    Location
    San Francisco, CA
    Posts
    638
    Thanks
    18
    Thanked 49 Times in 35 Posts
    TODO: 72.6° is not a hard max, can be chaged. Maybe talk about this.

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
  •  
The 3000GT/Stealth/GTO Web History Project
3000gt.com
3000GT / Stealth International WWWboard Archive
Jim's (RED3KGT) Reststop
3000GT/Stealth/GTO Information and Resources
Team 3S
3000GT / Stealth / GTO Information
daveblack.net
3000GT/Stealth/GTO Clubs and Groups
Michigan 3S
MInnesota 3S
Wisconsin 3S
Iowa, Nebraska, Kansas 3S
North California 3000GT/Stealth
United Society of 3S Owners
3000GT/Stealth/GTO Forums
3000GT/Stealth International
3000GT/Stealth/GTO Event Pages
3S National Gathering
East Coast Gathering
Upper Mid-West Gathering
Blue Ridge Gathering