Announcement

Collapse
No announcement yet.

An Engine Simulator is Born - Part 1

Collapse
This is a sticky topic.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #91
    Your going to have bats flying into your window playing with that thing

    The best source for cheap shielded audio cable is to buy a length of microphone cable, usually 2 or 3 core + shield layer. Best for shielding would be a length of coax, but more expensive.
    91CQ20v - Gone to a new home
    93UR-S4 - The Magic Carpet
    94S2Bus - The Emerald Express

    Comment


    • #92
      Basically yes - I had some bits lying around and the wee breadboard so was easy to start out that way. I don't have the tools to build into FPGA. That might be something for another phase, but then a Raspberry Pi path is also an interesting option. Will consider all options (including creating a PCB version) after prototype with G28, G4 and G40 simulation is working.
      Paul Nugent
      Webmaster http://S2central.net
      Administrator http://S2forum.com

      1994 S2 Coupe ABY - aka Project Lazarus
      2001 A6 allroad 2.5TDi - family tank
      2003 S4 Avant 4.2 V8 - daily burble

      Purveyor of HomeFries and Exclusive agent for Samco hose kits (S2/RS2)

      There are only 10 kinds of people that understand binary - those that do, and those that don't

      Comment


      • #93
        Originally posted by mcandmar View Post
        Your going to have bats flying into your window playing with that thing

        The best source for cheap shielded audio cable is to buy a length of microphone cable, usually 2 or 3 core + shield layer. Best for shielding would be a length of coax, but more expensive.
        Lol - yeah the soundtrack was just for purposes of the video. If I kept that on it would drive me batty.
        Paul Nugent
        Webmaster http://S2central.net
        Administrator http://S2forum.com

        1994 S2 Coupe ABY - aka Project Lazarus
        2001 A6 allroad 2.5TDi - family tank
        2003 S4 Avant 4.2 V8 - daily burble

        Purveyor of HomeFries and Exclusive agent for Samco hose kits (S2/RS2)

        There are only 10 kinds of people that understand binary - those that do, and those that don't

        Comment


        • #94
          So here are some diagrams to entertain / educate anyone who is interested. I have the 'Q8' latch working and all the other bits in place that I need to finish this first phase, but I am still waiting for a bigger breadboard to place it all. Note the diagrams are just work in progress so far - I don't have all the low level designs captured in this form yet. The waveforms on the last page show pretty well how the count logic and latches are intended to work.

          The other weird thing I have at the moment is that the G4_TTL (N=135) circuit only works when a scope probe is actually connected to the CPC pin (clock input) on the counter... its almost like I have some weird earth loop dependency on that probe somehow but it doesn't make any sense. There is something silly going on that I am just blind to right now.

          BTW - I don't suggest for a moment the designs I have for this thing are the only ones possible - its what I came up based on a desire to work with easy & accessible 74 series logic. It would be good see if others can cook up other ways of doing things. I am happy to share this kind of thing and just ask that everyone has the decency to not pass it off as their work for kudos or financial gain in other places !
          Attached Files
          Paul Nugent
          Webmaster http://S2central.net
          Administrator http://S2forum.com

          1994 S2 Coupe ABY - aka Project Lazarus
          2001 A6 allroad 2.5TDi - family tank
          2003 S4 Avant 4.2 V8 - daily burble

          Purveyor of HomeFries and Exclusive agent for Samco hose kits (S2/RS2)

          There are only 10 kinds of people that understand binary - those that do, and those that don't

          Comment


          • #95
            Still got the oddity with the 'scope probe requirement. I have double checked all the earth points... PSU, Sig-Gen and Scope all grounded thru same power outlet and 0V reference from PSU is strapped to GND as well for good measure.

            Next thing to experiment is if the combination of resistive & capacitive load provided by the probe is the voodoo making the difference here. Most odd.
            Paul Nugent
            Webmaster http://S2central.net
            Administrator http://S2forum.com

            1994 S2 Coupe ABY - aka Project Lazarus
            2001 A6 allroad 2.5TDi - family tank
            2003 S4 Avant 4.2 V8 - daily burble

            Purveyor of HomeFries and Exclusive agent for Samco hose kits (S2/RS2)

            There are only 10 kinds of people that understand binary - those that do, and those that don't

            Comment


            • #96
              Wild *** guess, the G4_TTL output may need some kind of a load across it to be stable.
              91CQ20v - Gone to a new home
              93UR-S4 - The Magic Carpet
              94S2Bus - The Emerald Express

              Comment


              • #97
                Nuhhh - the problem is dependency on a scope (or some loading) at the clock input, not the G4 output. I tried again today to resolve it, but it still eludes me. I am going to plough on for now as the scope will be pretty much attached for the foreseeable on the bench.

                I did get time to finish up the documenting the circuit design today.
                Attached Files
                Paul Nugent
                Webmaster http://S2central.net
                Administrator http://S2forum.com

                1994 S2 Coupe ABY - aka Project Lazarus
                2001 A6 allroad 2.5TDi - family tank
                2003 S4 Avant 4.2 V8 - daily burble

                Purveyor of HomeFries and Exclusive agent for Samco hose kits (S2/RS2)

                There are only 10 kinds of people that understand binary - those that do, and those that don't

                Comment


                • #98
                  Still waiting on other bits to complete this, so I ploughed on with just enough space on current little board to build an O2 probe simulator - very easy 555 astable circuit with a potential divided output that gives me around 2Hz frequency with a DC swing between 0 and 800mV and near enough 50% duty cycle. I might have to tweak the voltage level a little higher if ECU cries foul but that is easy fixed later... actually with adjustment on the voltage swing it should be possible to move it around to confirm where the ECU raises fault codes for being out of adaptation limits on the bench.
                  Paul Nugent
                  Webmaster http://S2central.net
                  Administrator http://S2forum.com

                  1994 S2 Coupe ABY - aka Project Lazarus
                  2001 A6 allroad 2.5TDi - family tank
                  2003 S4 Avant 4.2 V8 - daily burble

                  Purveyor of HomeFries and Exclusive agent for Samco hose kits (S2/RS2)

                  There are only 10 kinds of people that understand binary - those that do, and those that don't

                  Comment


                  • #99
                    Quick update... I solved the dependency on a scope probe at the clock input to the counter by adding a pair of 100pF capacitors between that pin and ground. Whatever black magic is behind that I am not really sure but is rock solid now.

                    I added a single 100pF and could see an improvement (versus scope probe removed) so it was a case of either that being a touch too much or not enough. Luckily adding the 2nd did the trick.

                    I suppose this means the edges coming from the Schmitt trigger output that drives the clock are too sharp for the counter - weird as you would think digital edges can never be too sharp.

                    Anyway - another mystery solved so hope the rest of bits arrive next week to get G40 cooking.
                    Paul Nugent
                    Webmaster http://S2central.net
                    Administrator http://S2forum.com

                    1994 S2 Coupe ABY - aka Project Lazarus
                    2001 A6 allroad 2.5TDi - family tank
                    2003 S4 Avant 4.2 V8 - daily burble

                    Purveyor of HomeFries and Exclusive agent for Samco hose kits (S2/RS2)

                    There are only 10 kinds of people that understand binary - those that do, and those that don't

                    Comment


                    • There is a formula for working out the value, not that i know it off hand. You basically take the Capacitor Load value from the datasheet as a starting point, add a bit of stray capacitance for the PCB traces and it spits out the "theoretically" ideal value, usually below 30pf. If your using a breadboard it a bit of a moot point really as the capacitance will be huge on those traces so just try and stab the parts in as close to the chip pins as possible for stability.

                      Just dont try and build a switching power supply on a breadboard using a small value cap for timing as the instability can cause it to blow up in your face. ...he says with experience
                      91CQ20v - Gone to a new home
                      93UR-S4 - The Magic Carpet
                      94S2Bus - The Emerald Express

                      Comment


                      • Its an odd one alright... when I go to soldered strip board (or a proper PCB) then I will maintain accommodation for the conditioning caps.

                        Attached is the latest diagram including the G39 simulator circuit.

                        I am still hoping the G4_TTL signal is enough to fool the ECU, but I have a horrible feeling it will need some conditioning to make a suitable AC waveform that looks vaguely right.... but until I get there I won't know for sure.
                        Attached Files
                        Paul Nugent
                        Webmaster http://S2central.net
                        Administrator http://S2forum.com

                        1994 S2 Coupe ABY - aka Project Lazarus
                        2001 A6 allroad 2.5TDi - family tank
                        2003 S4 Avant 4.2 V8 - daily burble

                        Purveyor of HomeFries and Exclusive agent for Samco hose kits (S2/RS2)

                        There are only 10 kinds of people that understand binary - those that do, and those that don't

                        Comment


                        • Updating the diagrams to reflect a small but important detail in respect to tooth counting. I was doing some more accurate measurements today and noticed a small difference between measured and expected time between the G4 pulses. Turns out I should be counting to 134 when the count of teeth (N) is 135. D'oh !

                          In my defence - I originally thought my counter was resetting to 0 (after reaching 135), then advancing to 1 before the next output clock (because of the way CPC and CPR are inverted), but closer inspection found that to be wrong... I have drawn out the detailed tooth counting in this version and I am now seeing better accuracy so its all good.
                          Attached Files
                          Paul Nugent
                          Webmaster http://S2central.net
                          Administrator http://S2forum.com

                          1994 S2 Coupe ABY - aka Project Lazarus
                          2001 A6 allroad 2.5TDi - family tank
                          2003 S4 Avant 4.2 V8 - daily burble

                          Purveyor of HomeFries and Exclusive agent for Samco hose kits (S2/RS2)

                          There are only 10 kinds of people that understand binary - those that do, and those that don't

                          Comment


                          • Something else I was looking at today was whether the 0V reference (pin 30) for the 5V sensor supply is common to 0V chassis earth on the car.

                            Weird thing is that the AAN diagrams clearly show that ECU pin 30 is pulled to chassis earth, while the ABY schematics show that ECU pin 30 is a floating reference point - hence my concern about tying to chassis earth and causing odd behaviour.

                            So... with my ESIM loom plugged into an ECU on the bench (actually from AAN), I verified 0 ohms between pin 30 and the 0V earth pins with the wires otherwise connected to nothing externally - that must be a common point inside the ECU.

                            Also... out to the car (ABY) and verified on my breakout box that ECU pin 30 is common to 0V chassis earth.

                            This is good as it means I can use the 5V supply coming from the ECU to drive the fraction of an Amp required to drive the ESIM components and reference the same common 0V.
                            Paul Nugent
                            Webmaster http://S2central.net
                            Administrator http://S2forum.com

                            1994 S2 Coupe ABY - aka Project Lazarus
                            2001 A6 allroad 2.5TDi - family tank
                            2003 S4 Avant 4.2 V8 - daily burble

                            Purveyor of HomeFries and Exclusive agent for Samco hose kits (S2/RS2)

                            There are only 10 kinds of people that understand binary - those that do, and those that don't

                            Comment


                            • Not much progress today - still waiting on bigger breadboard (sigh)... Wired up ESIM circuits so far to be powered from ECU 5V supply... All good.

                              One thing worth stating is that if you power up the ECU (pins 18 and 27 together for time being) with G28 simulating idle rpm (G28 rate approx 1800Hz) then the fuel pump relay isn't activated by ECU pin 3...

                              You have to crank G28 down to 0Hz and gently increase above cranking speed for the ECU to activate fuel (I am just using an LED for indication on that right now).

                              Increasing revs further to approx 4400rpm sees the fuel pump being deactivated while ECU is ONLY seeing the G28 signal... I don't have G4 and G40 on air yet !
                              Paul Nugent
                              Webmaster http://S2central.net
                              Administrator http://S2forum.com

                              1994 S2 Coupe ABY - aka Project Lazarus
                              2001 A6 allroad 2.5TDi - family tank
                              2003 S4 Avant 4.2 V8 - daily burble

                              Purveyor of HomeFries and Exclusive agent for Samco hose kits (S2/RS2)

                              There are only 10 kinds of people that understand binary - those that do, and those that don't

                              Comment


                              • This came up today on hackaday
                                http://hackaday.com/2014/11/24/direc...d-by-bil-herd/
                                Seemed a bit on topic.
                                If you want an FPGA I have a spare Cyclone II dev board (like the second board in the video) and same programmer , I can post up to you.
                                If anything else it would introduce you to programmable logic and the wonderful world of library logic drag and drop and eventually VDL or verilog.
                                Eric

                                95 S2 Avant under rebuild.

                                Comment

                                Working...
                                X