ข่าวประชาสัมพันธ์

มาร่วมเป็นกำลังใจให้เว็บด้วยการสมัครสมาชิกวีไอพี ~~ เลือกปีที่ท่านต้องการได้โดยไม่ต้องเรียงปี ~~ ปีละ 350 บาท สมัคร 2 ปีลดเหลือ 600 บาท ~~ มีไลน์กลุ่ม VIP จำนวนหลายร้อยท่าน เอาไว้ปรึกษางานซ่อม ~~ เข้าถึงข้อมูลด้านเทคนิค ข้อมูลเชิงลึกมากมาย.....


ผู้เขียน หัวข้อ: FORD 1996 CKP crank signal simulator 36-1  (อ่าน 626 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ Auto Man

  • Administrator
  • หัวหน้าศูนย์ซ่อมสร้าง
  • *****
  • เจ้าของกระทู้
  • Joined: ก.ย. 2558
  • กระทู้: 37591
  • สมาชิกลำดับที่ : 1
  • เพศ: ชาย
  • มือผู้ให้ย่อมสูงกว่ามือผู้รับ
    • เว็บชุมชนคนรักช่างยนต์
    • อีเมล์
FORD 1996 CKP crank signal simulator 36-1
« เมื่อ: 09 กรกฎาคม 2565, 15:55:53 »
  • ขึ้นบน
  • ลงล่าง
  •      เป็นเครื่องซิมมูเลเตอร์ สำหรับให้นักเรียน/นักศึกษา ฝึกใช้เครื่องสแกนเชื่อมต่อกับกล่อง ECU
    เพื่อการอ่านค่าดาต้าลิสต์ โดยไม่ต้องไปต่อกับเครื่องยนต์จริง ประโยชน์คือประหยัดน้ำมันและอื่นๆ

        สามารถนำไปใช้ได้กับรถ/กล่องบ้านเรา โดยเฉพาะกล่องของรถโตโยต้า รุ่นยอดฮิต 1NZ-FE
    ยัดลงกล่อง แล้วใช้ Arduino สร้างสัญญาณ CKP, CMP ป้อนเข้ากล่อง ต่อปลั๊ก OBD-II
    และอื่นๆ สามารถจำลองสัญญาณต่างๆ ได้

       FORD 1996 CKP crank signal simulator 36-1   
    https://forum.arduino.cc/t/crankshaft-sensor-code/144435

    โค๊ด: [Select]
    /* FORD 1996 CKP crank signal simulator 36-1
     by Ichabod mudd
     */
    #include "Arduino.h"
    #define PULSE_PIN 10
    #define CAM_PIN  8
    #define MPH_PIN 12
    int mph_toggle = 1 ;

    // the setup routine runs once when you press reset:
    void setup()
    {
      pinMode(PULSE_PIN, OUTPUT);
      pinMode(CAM_PIN, OUTPUT);
      pinMode(MPH_PIN, OUTPUT);
    }


    //reluctor wheel
    // subroutines first

    //function to first go HiGH

    void triggerHigh(int duration, int count)
    {
    switch (count)
    {
      case 1:  // cam CMP pin 8
    digitalWrite(CAM_PIN, HIGH);
    break;
      case 2:
    digitalWrite(CAM_PIN, LOW);
    digitalWrite(MPH_PIN, LOW); //VSS
    break;
       
      case 12:
    digitalWrite(CAM_PIN, HIGH);
    break;
      case 13:
    digitalWrite(CAM_PIN, LOW);
    break;
      case 24:
    digitalWrite(CAM_PIN, HIGH);
    break;
      case 25:
    digitalWrite(CAM_PIN, LOW);
    break;
    } // end cases


      //hold CKP PIN high for this delay.
      digitalWrite(PULSE_PIN, HIGH);
      delayMicroseconds(duration);
      // now CKP go low
      digitalWrite(PULSE_PIN, LOW);
      delayMicroseconds(duration);
      // end function
    }

    //Simulate the reference marker on a
    //reluctor wheel for #1 cyclinder firing
    //function to do trigger
    void triggerReference(int duration)
    {
      // pin should be low already see above....
      delayMicroseconds(duration);
      // add more duration to make ECU HAPPY

    }
    //end function


    //Simulates a 36 tooth reluctor wheel
    //with a  1 tooth reference

    // begin main loop program section
    void loop()
    {
      // read potentiometer wiper pin 0?
      // analog A/D channel 0
      int val = analogRead(0);
      // analog pin A0
      val = map(val, 0, 1023, 150, 1000);
      // for loop 36 counts  , 150 uS to 1000 uS or  5000 to 800 rpm
      for (int i = 0; i <= 34; i++)
      {
        // go high then low , in Symmetry
        triggerHigh(val,i );
       
          }
      // end for 35   pulse loop
      // simulate the missing tooth next
      triggerReference(val); // cyl, 1 firing now.
      // 35+1 = 36 total
         
          digitalWrite(MPH_PIN, HIGH);
               
      }
    // end main loop  version 7 , now perfect  800 rpm to 5000
    // added cam pulse 7/4/2013 
    // using Delay calls, suck but , this is easy.
    // the switch case trick, gets the cam sensor working.
    // the engine fires every 120 degr. on crank, 12 teeth, and 10 degr per tooth=120
    // added MPH pin, for VSS signals to ECU


    ตรงนี้มีภาพ! แต่ท่านจะมองไม่เห็น , ท่านต้อง  สมัครสมาชิก หรือ ลงชื่อเข้าระบบ

    « แก้ไขครั้งสุดท้าย: 09 กรกฎาคม 2565, 17:05:35 โดย Auto Man »
    สวัสดีคุณ...ผู้เยี่ยมชม  กด ❤ ถูกใจโพสท์นี้ หรือยัง...
    ต้องการสมัครสมาชิก VIP สมัครได้ที่นี่...   หรือทาง Line ID: k.sonchai

    ออฟไลน์ Auto Man

    • Administrator
    • หัวหน้าศูนย์ซ่อมสร้าง
    • *****
    • เจ้าของกระทู้
    • Joined: ก.ย. 2558
    • กระทู้: 37591
    • สมาชิกลำดับที่ : 1
    • เพศ: ชาย
    • มือผู้ให้ย่อมสูงกว่ามือผู้รับ
      • เว็บชุมชนคนรักช่างยนต์
      • อีเมล์
    สวัสดีคุณ...ผู้เยี่ยมชม  กด ❤ ถูกใจโพสท์นี้ หรือยัง...
    ต้องการสมัครสมาชิก VIP สมัครได้ที่นี่...   หรือทาง Line ID: k.sonchai

    FORD 1996 CKP crank signal simulator 36-1
    « ตอบกลับ #1 เมื่อ: 09 กรกฎาคม 2565, 15:58:27 »