PJSC(Pump Jet Solenoid Controller)はArduinoを使用したバイク用燃料噴射コントローラです。このプロジェクトは、オープンソースECUプロジェクト『Speeduino』をベースにしています。
PJSC ver1.02
- 排気バルブポジション入力を、排気バルブポジション入力とセカンダリAFセンサー入力のどちらかの選択式に変更
- Tuner StudionのTune Analyze Live!でVEテーブルのオートチューンを行う際、AFセンサー入力をプライマリとセカンダリのどちらを使用するか選択可能にした
- マニュアルの修正:デュアルMOS FETの回路記号を修正(U3 -> U4)
| @@ -6,8 +6,8 @@ | ||
| 6 | 6 | MTversion = 2.25 |
| 7 | 7 | |
| 8 | 8 | queryCommand = "Q" |
| 9 | -;[PJSC v1.01] signature = "speeduino 201902" | |
| 10 | - signature = "speeduino 201902" ;[PJSC v1.02] | |
| 9 | + signature = "speeduino 201902" | |
| 10 | +;[PJSC v1.01] signature = "PJSC v102" ;[PJSC v1.02] | |
| 11 | 11 | versionInfo = "S" ;This info is what is displayed to user |
| 12 | 12 | |
| 13 | 13 | [TunerStudio] |
| @@ -29,15 +29,15 @@ | ||
| 29 | 29 | |
| 30 | 30 | settingGroup = resetcontrol_group, "Reset Control Features" |
| 31 | 31 | settingOption = resetcontrol_standard, "Basic Options Only" |
| 32 | - settingOption = resetcontrol_adv, "Advanced Features (16u2 Firmware Update Required)" | |
| 32 | +;[PJSC v1.02] settingOption = resetcontrol_adv, "Advanced Features (16u2 Firmware Update Required)" | |
| 33 | 33 | |
| 34 | 34 | settingGroup = table4_usage_group, "Selection of table4 usage" ;[PJSC v1.01] For switching 4th table |
| 35 | -;[PJSC v1.01]For debug settingOption = table4_spark, "Spark advance table" ;[PJSC v1.01] For switching 4th table | |
| 35 | +;[PJSC v1.01] For debug settingOption = table4_spark, "Spark advance table" ;[PJSC v1.01] For switching 4th table | |
| 36 | 36 | settingOption = table4_fuel, "VE table4" ;[PJSC v1.01] For switching 4th table |
| 37 | 37 | |
| 38 | - settingGroup = menu_option, "Menu Option" ;[PJSC v1.02] For menu option | |
| 39 | - settingOption = simple_menu, "Simple menu" ;[PJSC v1.02] For menu option | |
| 40 | - settingOption = full_option, "Full option" ;[PJSC v1.02] For menu option | |
| 38 | + settingGroup = menuoption_group, "Tuning menu option" ;[PJSC v1.02] | |
| 39 | + settingOption = full_option, "Full option" ;[PJSC v1.02] | |
| 40 | +;[PJSC v1.02] settingOption = simple_menu, "Simple menu" ;[PJSC v1.02] | |
| 41 | 41 | |
| 42 | 42 | [PcVariables] |
| 43 | 43 | ; valid types: boolean, double, int, list |
| @@ -483,7 +483,7 @@ | ||
| 483 | 483 | TrigEdge = bits, U08, 5,[0:0], "RISING", "FALLING" |
| 484 | 484 | TrigSpeed = bits, U08, 5,[1:1], "Crank Speed", "Cam Speed" |
| 485 | 485 | IgInv = bits, U08, 5,[2:2], "Going Low", "Going High" |
| 486 | - TrigPattern= bits, U08, 5,[3:7], "Missing Tooth", "Basic Distributor", "Dual Wheel", "GM 7X", "4G63 / Miata / 3000GT", "GM 24X", "Jeep 2000", "Audi 135", "Honda D17", "Miata 99-05", "Mazda AU", "Non-360 Dual", "Nissan 360", "Subaru 6/7", "Daihatsu +1", "Harley EVO", "36-2-2-2", "NSR", "KATANA", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" | |
| 486 | + TrigPattern= bits, U08, 5,[3:7], "Missing Tooth", "Basic Distributor", "Dual Wheel", "GM 7X", "4G63 / Miata / 3000GT", "GM 24X", "Jeep 2000", "Audi 135", "Honda D17", "Miata 99-05", "Mazda AU", "Non-360 Dual", "Nissan 360", "Subaru 6/7", "Daihatsu +1", "Harley EVO", "36-2-2-2", "NSR", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID" | |
| 487 | 487 | TrigEdgeSec= bits, U08, 6,[0:0], "RISING", "FALLING" |
| 488 | 488 | fuelPumpPin= bits , U08, 6,[1:6], "Board Default", "INVALID", "INVALID", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15", "INVALID" |
| 489 | 489 | useResync = bits, U08, 6,[7:7], "No", "Yes" |
| @@ -1493,20 +1493,20 @@ | ||
| 1493 | 1493 | menuDialog = main |
| 1494 | 1494 | |
| 1495 | 1495 | menu = "Settings" |
| 1496 | -#if full_option ;[PJSC v1.02] For menu option | |
| 1497 | 1496 | subMenu = engine_constants, "Engine Constants" |
| 1498 | 1497 | ;[PJSC v1.01] subMenu = injChars, "Injector Characteristics" |
| 1499 | 1498 | subMenu = triggerSettings, "Trigger Setup" |
| 1500 | 1499 | ;subMenu = OLED, "OLED Setup" |
| 1501 | -#endif ;[PJSC v1.02] For menu option | |
| 1502 | 1500 | subMenu = airdensity_curve, "IAT Density" |
| 1503 | 1501 | subMenu = barodensity_curve, "Baro Density", { baroCorr } ;[PJSC v1.01] |
| 1504 | - subMenu = reset_control, "Reset Control" | |
| 1505 | 1502 | |
| 1506 | 1503 | subMenu = std_separator ;[PJSC v1.02] |
| 1507 | 1504 | subMenu = gaugeLimits, "Gauge Limits" ; | |
| 1505 | +#if full_option ;[PJSC v1.02] For simple menu | |
| 1508 | 1506 | subMenu = std_separator ; V |
| 1507 | + subMenu = reset_control, "Reset Control" | |
| 1509 | 1508 | subMenu = io_summary, "I/O Summary" ;[PJSC v1.02] |
| 1509 | +#endif ;[PJSC v1.02] For simple menu | |
| 1510 | 1510 | |
| 1511 | 1511 | menu = "&Tuning" |
| 1512 | 1512 | subMenu = std_realtime, "Realtime Display" |
| @@ -1529,11 +1529,11 @@ | ||
| 1529 | 1529 | subMenu = veTable4Dialog, "&VE Table 4", 0, { multiVEmapEnabled } ;[PJSC v1.01] |
| 1530 | 1530 | #endif ;[PJSC v1.01] For switching table4 |
| 1531 | 1531 | subMenu = afrTable1Tbl, "AFR Table", 5 |
| 1532 | +#if full_option ;[PJSC v1.02] For simple menu | |
| 1532 | 1533 | subMenu = std_separator |
| 1533 | -#if full_option ;[PJSC v1.02] For menu option | |
| 1534 | 1534 | ;[PJSC v1.01] subMenu = inj_trimad, "Sequential fuel trim", 9 |
| 1535 | 1535 | subMenu = stagingTableDialog, "Staged Injection", 10, { nCylinders <= 4 } ; Can't do staging on more than 4 cylinder engines |
| 1536 | -#endif ;[PJSC v1.02] For menu option | |
| 1536 | +#endif ;[PJSC v1.02] For simple menu | |
| 1537 | 1537 | |
| 1538 | 1538 | #if table4_spark ;[PJSC v1.01] For switching table4 |
| 1539 | 1539 | menu = "&Spark" |
| @@ -1549,7 +1549,6 @@ | ||
| 1549 | 1549 | menu = "&Starting/Idle" |
| 1550 | 1550 | subMenu = crankPW, "Cranking Settings" |
| 1551 | 1551 | subMenu = warmup, "Warmup Enrichment" |
| 1552 | -#if full_option ;[PJSC v1.02] For menu option | |
| 1553 | 1552 | subMenu = std_separator |
| 1554 | 1553 | ;[PJSC v1.01] subMenu = idleSettings, "Idle Control" |
| 1555 | 1554 | ;[PJSC v1.01] subMenu = iacClosedLoop_curve, "Idle - Closed loop targets", 7, { iacAlgorithm == 3 || iacAlgorithm == 5 } |
| @@ -1563,7 +1562,6 @@ | ||
| 1563 | 1562 | subMenu = iacClosedLoop_curve, "Idle - Closed loop targets", 7, { (iacAlgorithm == 3 || iacAlgorithm == 5) && (muxout1selection == 1 || muxout2selection == 1) } ; | |
| 1564 | 1563 | subMenu = iacPwm_curve, "Idle - PWM Duty Cycle", 7, { iacAlgorithm == 2 && (muxout1selection == 1 || muxout2selection == 1) } ; V |
| 1565 | 1564 | subMenu = iacPwmCrank_curve, "Idle - PWM Cranking Duty Cycle", 7, { iacAlgorithm == 2 && (muxout1selection == 1 || muxout2selection == 1) } ;[PJSC v1.01] For MUX selection |
| 1566 | -#endif ;[PJSC v1.02] For menu option | |
| 1567 | 1565 | |
| 1568 | 1566 | menu = "&Accessories" |
| 1569 | 1567 | subMenu = muxoutSetting, "MUX Output Port Setting" ;[PJSC v1.01] |
| @@ -1593,7 +1591,6 @@ | ||
| 1593 | 1591 | subMenu = std_separator ; V |
| 1594 | 1592 | subMenu = tacho, "Tacho Output", { muxout1selection == 7 || muxout2selection == 7 } ;[PJSC v1.01] For MUX selection |
| 1595 | 1593 | |
| 1596 | -#if full_option ;[PJSC v1.02] For menu option | |
| 1597 | 1594 | subMenu = std_separator ;[PJSC] |
| 1598 | 1595 | subMenu = inputPortSetting, "Input Port Setting" ;[PJSC] |
| 1599 | 1596 |
| @@ -1612,7 +1609,6 @@ | ||
| 1612 | 1609 | subMenu = Canin_config, "External Auxillary Input Channel Configuration", {enable_secondarySerial || (enable_intcan && intcan_available)} |
| 1613 | 1610 | subMenu = Auxin_config, "Local Auxillary Input Channel Configuration" |
| 1614 | 1611 | #endif |
| 1615 | -#endif ;[PJSC v1.02] For menu option | |
| 1616 | 1612 | |
| 1617 | 1613 | menuDialog = main |
| 1618 | 1614 | menu = "Tools" |
| @@ -1903,7 +1899,9 @@ | ||
| 1903 | 1899 | |
| 1904 | 1900 | dialog = engine_constants_west, "" |
| 1905 | 1901 | panel = std_injection, North |
| 1902 | +#if full_option ;[PJSC v1.02] For simple menu | |
| 1906 | 1903 | panel = engine_constants_southwest |
| 1904 | +#endif ;[PJSC v1.02] For simple menu | |
| 1907 | 1905 | |
| 1908 | 1906 | dialog = engine_constants_northeast, "Oddfire Angles" |
| 1909 | 1907 | field = "Channel 2 angle", oddfire2, { engineType == 1 } |
| @@ -1919,7 +1917,9 @@ | ||
| 1919 | 1917 | |
| 1920 | 1918 | dialog = engine_constants, "", border |
| 1921 | 1919 | panel = engine_constants_west, West |
| 1920 | +#if full_option ;[PJSC v1.02] For simple menu | |
| 1922 | 1921 | panel = engine_constants_east, East |
| 1922 | +#endif ;[PJSC v1.02] For simple menu | |
| 1923 | 1923 | |
| 1924 | 1924 | dialog = muxWarningMessage, "" ;[PJSC v1.01] |
| 1925 | 1925 | field = "Don't select the same function for MUX out1 and MUX out2!" ; | |
| @@ -2337,6 +2337,7 @@ | ||
| 2337 | 2337 | field = "Trigger Angle ", TrigAng |
| 2338 | 2338 | field = "This number represents the angle ATDC when " |
| 2339 | 2339 | field = "tooth #1 passes the primary sensor." |
| 2340 | +#if full_option ;[PJSC v1.02] For simple menu | |
| 2340 | 2341 | field = "" |
| 2341 | 2342 | field = "Skip Revolutions", SkipCycles |
| 2342 | 2343 | field = "Note: This is the number of revolutions that will be skipped during" |
| @@ -2347,6 +2348,7 @@ | ||
| 2347 | 2348 | field = "Trigger Filter", TrigFilter, { TrigPattern != 13 } |
| 2348 | 2349 | field = "Trigger Filter during cranking", crankingFilter, { TrigPattern != 13 } ;[PJSC v1.02] |
| 2349 | 2350 | field = "Re-sync every cycle", useResync, { TrigPattern == 2 || TrigPattern == 4 || TrigPattern == 7 || TrigPattern == 12 || TrigPattern == 9 || TrigPattern == 13 } ;Dual wheel, 4G63, Audi 135, Nissan 360, Miata 99-05 |
| 2351 | +#endif ;[PJSC v1.02] For simple menu | |
| 2350 | 2352 | |
| 2351 | 2353 | #if table4_spark ;[PJSC v1.01] For switching table4 |
| 2352 | 2354 | dialog = sparkSettings,"Spark Settings",4 |
| @@ -3778,10 +3780,8 @@ | ||
| 3778 | 3780 | batCorrectGauge = batCorrection, "Voltage Correction", "%", 0, 200, 130, 140, 140, 150, 0, 0 |
| 3779 | 3781 | iatCorrectGauge = airCorrection, "IAT Correction", "%", 0, 200, 130, 140, 140, 150, 0, 0 |
| 3780 | 3782 | flexEnrich, = flexFuelCor, "Flex Correction", "%", 0, 200, 130, 140, 140, 150, 0, 0 |
| 3781 | -#if table4_spark ;[PJSC v1.02] | |
| 3782 | 3783 | advanceGauge = advance, "Spark Advance", "deg BTDC", 50, -10, 0, 0, 35, 45, 0, 0 |
| 3783 | 3784 | dwellGauge = dwell, "Ign Dwell", "mSec", 0, 35.0, 1.0, 1.2, 20, 25, 3, 3 |
| 3784 | -#endif ;[PJSC v1.02] | |
| 3785 | 3785 | boostTargetGauge = boostTarget, "Target Boost", "kPa", 0, {maphigh}, 0, 20, {mapwarn}, {mapdang}, 0, 0 ;[PJSC v1.02] |
| 3786 | 3786 | boostDutyGauge = boostDuty, "Boost Duty Cycle", "%", 0, 100, -1, -1, 101, 110, 1, 1 ;[PJSC v1.02] |
| 3787 | 3787 | afrTargetGauge = afrTarget, "Target AFR", "", 7, 25, 12, 13, 15, 16, 2, 2 ;[PJSC v1.02] |
| @@ -3791,6 +3791,7 @@ | ||
| 3791 | 3791 | mapGauge_psi = map_psi, "Engine MAP (PSI)", "PSI", -15, 100, 0, 20, 200, 245, 0, 0 |
| 3792 | 3792 | mapGauge_bar = map_bar, "Engine MAP (BAR)", "Bar", -1, 3, -1, -1, 5, 5, 2, 2 |
| 3793 | 3793 | mapGauge_vacBoost = map_vacboost, "Engine MAP (in-Hg/PSI)", "in-Hg/PSI", -30, 30, -30, -30, 30, 30, 1, 1 |
| 3794 | + baroGauge = baro, "Baro Pressure", "kPa", 0,{maphigh}, 0, 20,{mapwarn},{mapdang}, 0, 0 ;[PJSC v1.02] | |
| 3794 | 3795 | batteryVoltage = batteryVoltage,"Battery Voltage", "volts", 0, 25, 8, 9, 15, 16, 2, 2 |
| 3795 | 3796 | |
| 3796 | 3797 | tpsADCGauge = tpsADC, "TPS ADC", "", 0, 255, -1, -1, 256, 256, 0, 0 |
| @@ -3806,13 +3807,14 @@ | ||
| 3806 | 3807 | dutyRatioGauge = dutyRatio, "Duty Ratio", "%", 0, 100, 5, 10, 90, 95, 0, 0 ;[PJSC]For capturing duty pulse |
| 3807 | 3808 | dutyFreqGauge2 = dutyFreq2, "Duty Pulse Frequency 2", "Hz", 0, 100, 5, 10, 90, 95, 0, 0 ;[PJSC]For capturing duty pulse |
| 3808 | 3809 | dutyRatioGauge2 = dutyRatio2, "Duty Ratio 2", "%", 0, 100, 5, 10, 90, 95, 0, 0 ;[PJSC]For capturing duty pulse |
| 3809 | - baroGauge = baro, "Baro Pressure", "kPa", 0,{maphigh}, 20, 60,{mapwarn},{mapdang}, 1, 0 ;[PJSC v1.02] | |
| 3810 | + baroGauge = baro, "Barometric Pressure", "kPa", 0, 200, 20, 60, 140, 180, 1, 0 ;[PJSC]Add the gage for barometric sensor | |
| 3810 | 3811 | injcountGauge = testCnt, "Injection Count", "pulses", 0, 1000, 65535, 65535,65535, 65535,0, 0 ;[PJSC v1.01] For test mode |
| 3811 | 3812 | afrAnalyzeGauge1 = afr_analyze1, "Air:Fuel Ratio for VE1", "", 7, 25, 12, 13, 15, 16, 2, 2 ;[PJSC v1.02] For AFR sensor selection |
| 3812 | 3813 | afrAnalyzeGauge2 = afr_analyze2, "Air:Fuel Ratio for VE2", "", 7, 25, 12, 13, 15, 16, 2, 2 ;[PJSC v1.02] For AFR sensor selection |
| 3813 | 3814 | afrAnalyzeGauge3 = afr_analyze3, "Air:Fuel Ratio for VE3", "", 7, 25, 12, 13, 15, 16, 2, 2 ;[PJSC v1.02] For AFR sensor selection |
| 3814 | 3815 | afrAnalyzeGauge4 = afr_analyze4, "Air:Fuel Ratio for VE4", "", 7, 25, 12, 13, 15, 16, 2, 2 ;[PJSC v1.02] For AFR sensor selection |
| 3815 | - | |
| 3816 | + syncLossGauge = syncLossCounter, "Sync Loss Count", "", 0, 120, -1, -1, 999, 999, 0, 0 ;[PJSC v1.02] | |
| 3817 | + | |
| 3816 | 3818 | #if CELSIUS |
| 3817 | 3819 | cltGauge = coolant, "Coolant Temp", "TEMP", -40, 215, -15, 0, 95, 105, 0, 0 |
| 3818 | 3820 | iatGauge = iat, "Inlet Air Temp", "TEMP", -40, 215, -15, 0, 95, 100, 0, 0 |
| @@ -4121,10 +4123,8 @@ | ||
| 4121 | 4123 | entry = dutyCycle, "DutyCycle1", float, "%.1f" |
| 4122 | 4124 | entry = dutyCycle, "DutyCycle2", float, "%.1f" |
| 4123 | 4125 | entry = TPSdot, "TPS DOT", int, "%d" |
| 4124 | -#if table4_spark ;[PJSC v1.02] | |
| 4125 | 4126 | entry = advance, "Advance", int, "%d" |
| 4126 | 4127 | entry = dwell, "Dwell", float, "%.1f" |
| 4127 | -#endif ;[PJSC v1.02] | |
| 4128 | 4128 | entry = batteryVoltage, "Battery V", float, "%.1f" |
| 4129 | 4129 | entry = rpmDOT, "rpm/s", int, "%d" |
| 4130 | 4130 | entry = flex, "Eth %", int, "%d", { flexEnabled } |
| @@ -157,12 +157,19 @@ | ||
| 157 | 157 | int getCrankAngle_KATANA(); //[PJSC ver1.02] For supporting KATANA trigger |
| 158 | 158 | void triggerSetEndTeeth_KATANA(); //[PJSC ver1.02] For supporting KATANA trigger |
| 159 | 159 | |
| 160 | -void captureExtTrigger(); //[PJSC] For External Trigger | |
| 161 | -void captureDutyPulseONtime(); //[PJSC] For capturing duty pulse | |
| 162 | -void captureDutyPulseOFFtime(); //[PJSC] For capturing duty pulse | |
| 163 | -void captureDutyPulseONtime2(); //[PJSC] For capturing duty pulse | |
| 164 | -void captureDutyPulseOFFtime2(); //[PJSC] For capturing duty pulse | |
| 160 | +void triggerSetup_KATANA2(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 161 | +void triggerPri_KATANA2(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 162 | +void triggerSec_KATANA2(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 163 | +uint16_t getRPM_KATANA2(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 164 | +int getCrankAngle_KATANA2(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 165 | +void triggerSetEndTeeth_KATANA2(); //[PJSC ver1.02] For supporting KATANA trigger | |
| 165 | 166 | |
| 167 | +void captureExtTrigger(); //[PJSC] For External Trigger | |
| 168 | +void captureDutyPulseONtime(); //[PJSC] For capturing duty pulse | |
| 169 | +void captureDutyPulseOFFtime(); //[PJSC] For capturing duty pulse | |
| 170 | +void captureDutyPulseONtime2(); //[PJSC] For capturing duty pulse | |
| 171 | +void captureDutyPulseOFFtime2(); //[PJSC] For capturing duty pulse | |
| 172 | + | |
| 166 | 173 | unsigned long MAX_STALL_TIME = 500000UL; //The maximum time (in uS) that the system will continue to function before the engine is considered stalled/stopped. This is unique to each decoder, depending on the number of teeth etc. 500000 (half a second) is used as the default value, most decoders will be much less. |
| 167 | 174 | |
| 168 | 175 | volatile unsigned long curTime; |
| @@ -172,6 +179,7 @@ | ||
| 172 | 179 | volatile unsigned long lastGap; |
| 173 | 180 | volatile unsigned long targetGap; |
| 174 | 181 | volatile unsigned long compositeLastToothTime; |
| 182 | +volatile unsigned long flipGap; //[PJSC v1.02] | |
| 175 | 183 | |
| 176 | 184 | volatile int toothCurrentCount = 0; //The current number of teeth (Onec sync has been achieved, this can never actually be 0 |
| 177 | 185 | volatile byte toothSystemCount = 0; //Used for decoders such as Audi 135 where not every tooth is used for calculating crank angle. This variable stores the actual number of teeth, not the number being used to calculate crank angle |
| @@ -194,6 +202,7 @@ | ||
| 194 | 202 | volatile int triggerActualTeeth; |
| 195 | 203 | volatile unsigned long triggerFilterTime; // The shortest time (in uS) that pulses will be accepted (Used for debounce filtering) |
| 196 | 204 | volatile unsigned long triggerSecFilterTime; // The shortest time (in uS) that pulses will be accepted (Used for debounce filtering) for the secondary input |
| 205 | +volatile unsigned long trigger12FilterTime; //[PJSC v1.02] | |
| 197 | 206 | volatile bool validTrigger; //Is set true when the last trigger (Primary or secondary) was valid (ie passed filters) |
| 198 | 207 | unsigned int triggerSecFilterTime_duration; // The shortest valid time (in uS) pulse DURATION |
| 199 | 208 | volatile uint16_t triggerToothAngle; //The number of crank degrees that elapse per tooth |