Compare commits
5 Commits
c19ea5e393
...
35b1ca5f09
Author | SHA1 | Date |
---|---|---|
Bouletmarc | 35b1ca5f09 | |
Bouletmarc | 89de412e39 | |
Bouletmarc | 0229cb763f | |
Bouletmarc | c448c5ebd1 | |
Bouletmarc | 0b3c2de6f9 |
|
@ -203,7 +203,7 @@
|
|||
<dimension x1="59.66" y1="5.406" x2="59.784" y2="40.386" x3="73.395853125" y3="22.847528125" textsize="1.778" layer="37"/>
|
||||
<dimension x1="5.08" y1="0" x2="8.586" y2="0" x3="6.833" y3="-10.494" textsize="1.778" layer="37"/>
|
||||
<dimension x1="59.466" y1="0" x2="55.968" y2="0" x3="57.717" y3="-9.222" textsize="1.778" layer="37"/>
|
||||
<text x="19.398" y="24.645" size="1.016" layer="122" rot="SMR90" align="center-right">FC1 Pin3</text>
|
||||
<text x="21.942" y="24.645" size="1.016" layer="122" rot="SMR90" align="center-right">FC1 Pin3</text>
|
||||
<wire x1="76.002" y1="19.08" x2="86.019" y2="19.08" width="0.1524" layer="37"/>
|
||||
<wire x1="86.019" y1="19.08" x2="86.019" y2="15.423" width="0.1524" layer="37"/>
|
||||
<wire x1="86.019" y1="15.423" x2="76.002" y2="15.423" width="0.1524" layer="37"/>
|
||||
|
@ -286,8 +286,6 @@
|
|||
<wire x1="37.047" y1="14.787" x2="35.616" y2="14.787" width="0.2032" layer="112"/>
|
||||
<text x="14.628" y="8.904" size="1.016" layer="121" rot="SR90" align="center">1K</text>
|
||||
<text x="17.013" y="8.745" size="1.016" layer="121" rot="SR90" align="center">1K</text>
|
||||
<text x="19.398" y="8.904" size="1.016" layer="121" rot="SR90" align="center">1K</text>
|
||||
<text x="21.783" y="8.904" size="1.016" layer="121" rot="SR90" align="center">1K</text>
|
||||
<wire x1="13.674" y1="6.678" x2="13.674" y2="11.13" width="0.2032" layer="112"/>
|
||||
<wire x1="13.674" y1="11.13" x2="13.992" y2="11.448" width="0.2032" layer="112"/>
|
||||
<wire x1="13.992" y1="11.448" x2="15.264" y2="11.448" width="0.2032" layer="112"/>
|
||||
|
@ -304,23 +302,7 @@
|
|||
<wire x1="17.967" y1="6.519" x2="17.649" y2="6.201" width="0.2032" layer="112"/>
|
||||
<wire x1="17.649" y1="6.201" x2="16.377" y2="6.201" width="0.2032" layer="112"/>
|
||||
<wire x1="16.377" y1="6.201" x2="16.059" y2="6.519" width="0.2032" layer="112"/>
|
||||
<wire x1="18.444" y1="6.678" x2="18.444" y2="11.13" width="0.2032" layer="112"/>
|
||||
<wire x1="18.444" y1="11.13" x2="18.762" y2="11.448" width="0.2032" layer="112"/>
|
||||
<wire x1="18.762" y1="11.448" x2="20.034" y2="11.448" width="0.2032" layer="112"/>
|
||||
<wire x1="20.034" y1="11.448" x2="20.352" y2="11.13" width="0.2032" layer="112"/>
|
||||
<wire x1="20.352" y1="11.13" x2="20.352" y2="6.678" width="0.2032" layer="112"/>
|
||||
<wire x1="20.352" y1="6.678" x2="20.034" y2="6.36" width="0.2032" layer="112"/>
|
||||
<wire x1="20.034" y1="6.36" x2="18.762" y2="6.36" width="0.2032" layer="112"/>
|
||||
<wire x1="18.762" y1="6.36" x2="18.444" y2="6.678" width="0.2032" layer="112"/>
|
||||
<wire x1="20.829" y1="6.678" x2="20.829" y2="11.13" width="0.2032" layer="112"/>
|
||||
<wire x1="20.829" y1="11.13" x2="21.147" y2="11.448" width="0.2032" layer="112"/>
|
||||
<wire x1="21.147" y1="11.448" x2="22.419" y2="11.448" width="0.2032" layer="112"/>
|
||||
<wire x1="22.419" y1="11.448" x2="22.737" y2="11.13" width="0.2032" layer="112"/>
|
||||
<wire x1="22.737" y1="11.13" x2="22.737" y2="6.678" width="0.2032" layer="112"/>
|
||||
<wire x1="22.737" y1="6.678" x2="22.419" y2="6.36" width="0.2032" layer="112"/>
|
||||
<wire x1="22.419" y1="6.36" x2="21.147" y2="6.36" width="0.2032" layer="112"/>
|
||||
<wire x1="21.147" y1="6.36" x2="20.829" y2="6.678" width="0.2032" layer="112"/>
|
||||
<wire x1="23.85" y1="8.109" x2="23.85" y2="7.791" width="0.2032" layer="112"/>
|
||||
<wire x1="30.051" y1="10.812" x2="30.051" y2="10.017" width="0.2032" layer="112"/>
|
||||
<wire x1="30.051" y1="10.017" x2="30.051" y2="9.699" width="0.2032" layer="112"/>
|
||||
<wire x1="30.051" y1="9.699" x2="30.051" y2="6.996" width="0.2032" layer="112"/>
|
||||
|
@ -366,25 +348,25 @@
|
|||
5V D17/K20/K24 Coils</text>
|
||||
<text x="30.369" y="8.904" size="0.8128" layer="122" rot="SMR0" align="center">Prototype Board ONLY(for Developpers)
|
||||
Use at your risk OR use as Keychain!</text>
|
||||
<text x="18.126" y="3.021" size="1.016" layer="121" rot="SR0" align="center">1K</text>
|
||||
<text x="18.126" y="14.946" size="1.016" layer="121" rot="SR180" align="center">1K</text>
|
||||
<wire x1="15.423" y1="14.946" x2="13.833" y2="14.946" width="0.2032" layer="112"/>
|
||||
<text x="15.9" y="3.021" size="1.016" layer="121" rot="SR0" align="center">1K</text>
|
||||
<text x="15.741" y="14.946" size="1.016" layer="121" rot="SR180" align="center">1K</text>
|
||||
<wire x1="14.628" y1="14.946" x2="13.833" y2="14.946" width="0.2032" layer="112"/>
|
||||
<wire x1="13.833" y1="14.946" x2="12.879" y2="13.992" width="0.2032" layer="112"/>
|
||||
<wire x1="12.879" y1="13.992" x2="12.879" y2="3.816" width="0.2032" layer="112"/>
|
||||
<wire x1="12.879" y1="3.816" x2="13.674" y2="3.021" width="0.2032" layer="112"/>
|
||||
<wire x1="13.674" y1="3.021" x2="15.423" y2="3.021" width="0.2032" layer="112"/>
|
||||
<wire x1="20.829" y1="3.021" x2="22.419" y2="3.021" width="0.2032" layer="112"/>
|
||||
<wire x1="22.419" y1="3.021" x2="23.373" y2="3.975" width="0.2032" layer="112"/>
|
||||
<wire x1="23.373" y1="3.975" x2="23.373" y2="13.833" width="0.2032" layer="112"/>
|
||||
<wire x1="23.373" y1="13.833" x2="22.26" y2="14.946" width="0.2032" layer="112"/>
|
||||
<wire x1="22.26" y1="14.946" x2="20.829" y2="14.946" width="0.2032" layer="112"/>
|
||||
<wire x1="13.674" y1="3.021" x2="14.628" y2="3.021" width="0.2032" layer="112"/>
|
||||
<wire x1="17.013" y1="3.021" x2="17.808" y2="3.021" width="0.2032" layer="112"/>
|
||||
<wire x1="17.808" y1="3.021" x2="18.762" y2="3.975" width="0.2032" layer="112"/>
|
||||
<wire x1="18.762" y1="3.975" x2="18.762" y2="13.833" width="0.2032" layer="112"/>
|
||||
<wire x1="18.762" y1="13.833" x2="17.649" y2="14.946" width="0.2032" layer="112"/>
|
||||
<wire x1="17.649" y1="14.946" x2="16.854" y2="14.946" width="0.2032" layer="112"/>
|
||||
<text x="26.553" y="8.904" size="1.016" layer="121" rot="SR90" align="center">2N4148 x4</text>
|
||||
<text x="11.766" y="8.904" size="1.016" layer="121" rot="SR90" align="center">1K Resistor x4</text>
|
||||
<text x="11.766" y="8.904" size="1.016" layer="121" rot="SR90" align="center">1K Resistor x2</text>
|
||||
<text x="11.766" y="24.645" size="1.016" layer="121" rot="SR90" align="center-right">GND</text>
|
||||
<text x="14.31" y="24.645" size="1.016" layer="121" rot="SR90" align="center-right">5V</text>
|
||||
<text x="16.854" y="24.645" size="1.016" layer="121" rot="SR90" align="center-right">RPM OUT</text>
|
||||
<text x="19.398" y="24.645" size="1.016" layer="121" rot="SR90" align="center-right">PULSE1</text>
|
||||
<text x="21.942" y="24.645" size="1.016" layer="121" rot="SR90" align="center-right">PULSE2</text>
|
||||
<text x="21.942" y="24.645" size="1.016" layer="121" rot="SR90" align="center-right">PULSE1</text>
|
||||
<text x="19.398" y="24.645" size="1.016" layer="121" rot="SR90" align="center-right">PULSE2</text>
|
||||
<text x="27.03" y="24.645" size="1.016" layer="121" rot="SR90" align="center-right">COIL3</text>
|
||||
<text x="29.574" y="24.645" size="1.016" layer="121" rot="SR90" align="center-right">COIL2</text>
|
||||
<text x="24.486" y="24.645" size="1.016" layer="121" rot="SR90" align="center-right">COIL4</text>
|
||||
|
@ -393,7 +375,7 @@ Use at your risk OR use as Keychain!</text>
|
|||
<text x="7.155" y="8.904" size="1.016" layer="121" rot="SR270" align="center">Arduino Nano V3 (5v)
|
||||
On Top</text>
|
||||
<text x="11.766" y="24.645" size="1.016" layer="122" rot="SMR90" align="center-right">FC1 Pin1</text>
|
||||
<text x="21.942" y="24.645" size="1.016" layer="122" rot="SMR90" align="center-right">FC1 Pin4</text>
|
||||
<text x="19.398" y="24.645" size="1.016" layer="122" rot="SMR90" align="center-right">ICM (A21)</text>
|
||||
<text x="14.31" y="24.645" size="1.016" layer="122" rot="SMR90" align="center-right">FC1 Pin12</text>
|
||||
<text x="16.854" y="24.645" size="1.016" layer="122" rot="SMR90" align="center-right">Tacho</text>
|
||||
</plain>
|
||||
|
@ -1869,14 +1851,6 @@ Based on the following sources:
|
|||
<attribute name="NAME" x="18.3084" y="11.444" size="0.9906" layer="25" ratio="10" rot="R270"/>
|
||||
<attribute name="VALUE" x="16.5304" y="10.5296" size="0.9906" layer="27" ratio="10" rot="R270"/>
|
||||
</element>
|
||||
<element name="R2" library="resistor" library_urn="urn:adsk.eagle:library:348" package="0204/7" package3d_urn="urn:adsk.eagle:package:23498/2" value="1k" x="19.398" y="8.904" smashed="yes" rot="R270">
|
||||
<attribute name="NAME" x="20.6934" y="11.444" size="0.9906" layer="25" ratio="10" rot="R270"/>
|
||||
<attribute name="VALUE" x="18.9154" y="10.5296" size="0.9906" layer="27" ratio="10" rot="R270"/>
|
||||
</element>
|
||||
<element name="R3" library="resistor" library_urn="urn:adsk.eagle:library:348" package="0204/7" package3d_urn="urn:adsk.eagle:package:23498/2" value="1k" x="21.783" y="8.904" smashed="yes" rot="R270">
|
||||
<attribute name="NAME" x="23.0784" y="11.444" size="0.9906" layer="25" ratio="10" rot="R270"/>
|
||||
<attribute name="VALUE" x="21.3004" y="10.5296" size="0.9906" layer="27" ratio="10" rot="R270"/>
|
||||
</element>
|
||||
<element name="R4" library="resistor" library_urn="urn:adsk.eagle:library:348" package="0204/7" package3d_urn="urn:adsk.eagle:package:23498/2" value="1k" x="14.628" y="8.904" smashed="yes" rot="R270">
|
||||
<attribute name="NAME" x="15.9234" y="11.444" size="0.9906" layer="25" ratio="10" rot="R270"/>
|
||||
<attribute name="VALUE" x="14.1454" y="10.5296" size="0.9906" layer="27" ratio="10" rot="R270"/>
|
||||
|
@ -1940,10 +1914,6 @@ Based on the following sources:
|
|||
<wire x1="36.868" y1="1.284" x2="36.868" y2="2.882" width="0.508" layer="16"/>
|
||||
<wire x1="36.868" y1="2.882" x2="36.729" y2="3.021" width="0.508" layer="16"/>
|
||||
<wire x1="13.992" y1="3.021" x2="36.729" y2="3.021" width="0.508" layer="16"/>
|
||||
<contactref element="R2" pad="1"/>
|
||||
<wire x1="19.398" y1="12.714" x2="19.398" y2="12.084" width="0.508" layer="16"/>
|
||||
<wire x1="17.808" y1="10.494" x2="12.72" y2="10.494" width="0.508" layer="16"/>
|
||||
<wire x1="19.398" y1="12.084" x2="17.808" y2="10.494" width="0.508" layer="16"/>
|
||||
</signal>
|
||||
<signal name="VCC">
|
||||
<contactref element="ARDUINO_NANO1" pad="12"/>
|
||||
|
@ -2036,14 +2006,6 @@ Based on the following sources:
|
|||
<wire x1="32.118" y1="21.147" x2="35.616" y2="17.649" width="0.508" layer="1"/>
|
||||
<wire x1="32.118" y1="26.235" x2="32.118" y2="21.147" width="0.508" layer="1"/>
|
||||
</signal>
|
||||
<signal name="N$14">
|
||||
<contactref element="ARDUINO_NANO1" pad="20"/>
|
||||
<contactref element="R3" pad="2"/>
|
||||
<contactref element="R2" pad="2"/>
|
||||
<wire x1="19.398" y1="5.094" x2="21.783" y2="5.094" width="0.508" layer="1"/>
|
||||
<wire x1="29.248" y1="16.524" x2="21.783" y2="9.059" width="0.508" layer="16"/>
|
||||
<wire x1="21.783" y1="9.059" x2="21.783" y2="5.094" width="0.508" layer="16"/>
|
||||
</signal>
|
||||
<signal name="N$11">
|
||||
<contactref element="ARDUINO_NANO1" pad="21"/>
|
||||
<contactref element="R4" pad="2"/>
|
||||
|
@ -2079,16 +2041,10 @@ Based on the following sources:
|
|||
<wire x1="15.264" y1="17.649" x2="19.398" y2="21.783" width="0.508" layer="1"/>
|
||||
</signal>
|
||||
<signal name="N$29">
|
||||
<contactref element="R3" pad="1"/>
|
||||
<contactref element="JP8" pad="1"/>
|
||||
<wire x1="21.783" y1="12.714" x2="21.783" y2="12.75136875" width="0.508" layer="16"/>
|
||||
<wire x1="21.783" y1="12.75136875" x2="19.890684375" y2="14.643684375" width="0.508" layer="16"/>
|
||||
<wire x1="19.890684375" y1="14.643684375" x2="18.936684375" y2="14.643684375" width="0.508" layer="16"/>
|
||||
<wire x1="18.936684375" y1="14.643684375" x2="18.921" y2="14.628" width="0.508" layer="16"/>
|
||||
<wire x1="21.942" y1="21.624" x2="21.942" y2="26.235" width="0.508" layer="16"/>
|
||||
<wire x1="18.921" y1="14.628" x2="17.808" y2="15.741" width="0.508" layer="16"/>
|
||||
<wire x1="17.808" y1="15.741" x2="17.808" y2="17.49" width="0.508" layer="16"/>
|
||||
<wire x1="17.808" y1="17.49" x2="21.942" y2="21.624" width="0.508" layer="16"/>
|
||||
<contactref element="ARDUINO_NANO1" pad="20"/>
|
||||
<wire x1="29.248" y1="16.524" x2="21.942" y2="23.83" width="0.508" layer="16"/>
|
||||
<wire x1="21.942" y1="23.83" x2="21.942" y2="26.235" width="0.508" layer="16"/>
|
||||
</signal>
|
||||
<signal name="VIN">
|
||||
<contactref element="ARDUINO_NANO1" pad="15"/>
|
||||
|
|
|
@ -7176,8 +7176,6 @@ Each pin can provide or receive a maximum of 40 mA and has an internal pull-up r
|
|||
<part name="P+1" library="SparkFun" deviceset="VCC" device=""/>
|
||||
<part name="JP1" library="pinhead_MOD" deviceset="PINHD-1X1" device="" package3d_urn="urn:adsk.eagle:package:22485/2"/>
|
||||
<part name="R1" library="resistor" library_urn="urn:adsk.eagle:library:348" deviceset="R-EU_" device="0204/7" package3d_urn="urn:adsk.eagle:package:23498/2" value="1k"/>
|
||||
<part name="R2" library="resistor" library_urn="urn:adsk.eagle:library:348" deviceset="R-EU_" device="0204/7" package3d_urn="urn:adsk.eagle:package:23498/2" value="1k"/>
|
||||
<part name="R3" library="resistor" library_urn="urn:adsk.eagle:library:348" deviceset="R-EU_" device="0204/7" package3d_urn="urn:adsk.eagle:package:23498/2" value="1k"/>
|
||||
<part name="R4" library="resistor" library_urn="urn:adsk.eagle:library:348" deviceset="R-EU_" device="0204/7" package3d_urn="urn:adsk.eagle:package:23498/2" value="1k"/>
|
||||
<part name="D1" library="diode" library_urn="urn:adsk.eagle:library:210" deviceset="DIODE-" device="D-7.5" package3d_urn="urn:adsk.eagle:package:43423/1" value="2N4148"/>
|
||||
<part name="D3" library="diode" library_urn="urn:adsk.eagle:library:210" deviceset="DIODE-" device="D-7.5" package3d_urn="urn:adsk.eagle:package:43423/1" value="2N4148 x4"/>
|
||||
|
@ -7189,7 +7187,6 @@ Each pin can provide or receive a maximum of 40 mA and has an internal pull-up r
|
|||
<part name="JP6" library="pinhead_MOD" deviceset="PINHD-1X1" device="" package3d_urn="urn:adsk.eagle:package:22485/2"/>
|
||||
<part name="JP7" library="pinhead_MOD" deviceset="PINHD-1X1" device="" package3d_urn="urn:adsk.eagle:package:22485/2"/>
|
||||
<part name="JP8" library="pinhead_MOD" deviceset="PINHD-1X1" device="" package3d_urn="urn:adsk.eagle:package:22485/2"/>
|
||||
<part name="GND2" library="supply1" deviceset="GND" device=""/>
|
||||
</parts>
|
||||
<sheets>
|
||||
<sheet>
|
||||
|
@ -7248,14 +7245,6 @@ Connect to FC1 Pin1</text>
|
|||
<attribute name="NAME" x="288.0614" y="-3.81" size="1.778" layer="95" rot="R90"/>
|
||||
<attribute name="VALUE" x="292.862" y="-3.81" size="1.778" layer="96" rot="R90"/>
|
||||
</instance>
|
||||
<instance part="R2" gate="G$1" x="271.78" y="0" smashed="yes" rot="R90">
|
||||
<attribute name="NAME" x="270.2814" y="-3.81" size="1.778" layer="95" rot="R90"/>
|
||||
<attribute name="VALUE" x="275.082" y="-3.81" size="1.778" layer="96" rot="R90"/>
|
||||
</instance>
|
||||
<instance part="R3" gate="G$1" x="264.16" y="0" smashed="yes" rot="R90">
|
||||
<attribute name="NAME" x="262.6614" y="-3.81" size="1.778" layer="95" rot="R90"/>
|
||||
<attribute name="VALUE" x="267.462" y="-3.81" size="1.778" layer="96" rot="R90"/>
|
||||
</instance>
|
||||
<instance part="R4" gate="G$1" x="281.94" y="0" smashed="yes" rot="R90">
|
||||
<attribute name="NAME" x="280.4414" y="-3.81" size="1.778" layer="95" rot="R90"/>
|
||||
<attribute name="VALUE" x="285.242" y="-3.81" size="1.778" layer="96" rot="R90"/>
|
||||
|
@ -7300,9 +7289,6 @@ Connect to FC1 Pin1</text>
|
|||
<attribute name="NAME" x="267.335" y="-3.81" size="1.778" layer="95" rot="R270"/>
|
||||
<attribute name="VALUE" x="259.08" y="-3.81" size="1.778" layer="96" rot="R270"/>
|
||||
</instance>
|
||||
<instance part="GND2" gate="1" x="271.78" y="-7.62" smashed="yes">
|
||||
<attribute name="VALUE" x="269.24" y="-10.16" size="1.778" layer="96"/>
|
||||
</instance>
|
||||
</instances>
|
||||
<busses>
|
||||
</busses>
|
||||
|
@ -7336,10 +7322,6 @@ Connect to FC1 Pin1</text>
|
|||
<pinref part="ARDUINO_NANO1" gate="G$1" pin="GND@2"/>
|
||||
<pinref part="GND7" gate="1" pin="GND"/>
|
||||
</segment>
|
||||
<segment>
|
||||
<pinref part="R2" gate="G$1" pin="1"/>
|
||||
<pinref part="GND2" gate="1" pin="GND"/>
|
||||
</segment>
|
||||
</net>
|
||||
<net name="N$1" class="0">
|
||||
<segment>
|
||||
|
@ -7394,17 +7376,6 @@ Connect to FC1 Pin1</text>
|
|||
<pinref part="JP6" gate="G$1" pin="1"/>
|
||||
</segment>
|
||||
</net>
|
||||
<net name="N$14" class="0">
|
||||
<segment>
|
||||
<pinref part="ARDUINO_NANO1" gate="G$1" pin="D2"/>
|
||||
<wire x1="264.16" y1="12.7" x2="246.38" y2="12.7" width="0.1524" layer="91"/>
|
||||
<wire x1="264.16" y1="5.08" x2="264.16" y2="12.7" width="0.1524" layer="91"/>
|
||||
<pinref part="R3" gate="G$1" pin="2"/>
|
||||
<pinref part="R2" gate="G$1" pin="2"/>
|
||||
<wire x1="271.78" y1="5.08" x2="264.16" y2="5.08" width="0.1524" layer="91"/>
|
||||
<junction x="264.16" y="5.08"/>
|
||||
</segment>
|
||||
</net>
|
||||
<net name="N$11" class="0">
|
||||
<segment>
|
||||
<pinref part="ARDUINO_NANO1" gate="G$1" pin="D3"/>
|
||||
|
@ -7439,9 +7410,10 @@ Connect to FC1 Pin1</text>
|
|||
</net>
|
||||
<net name="N$29" class="0">
|
||||
<segment>
|
||||
<wire x1="264.16" y1="-7.62" x2="264.16" y2="-5.08" width="0.1524" layer="91"/>
|
||||
<pinref part="R3" gate="G$1" pin="1"/>
|
||||
<pinref part="JP8" gate="G$1" pin="1"/>
|
||||
<pinref part="ARDUINO_NANO1" gate="G$1" pin="D2"/>
|
||||
<wire x1="264.16" y1="12.7" x2="246.38" y2="12.7" width="0.1524" layer="91"/>
|
||||
<wire x1="264.16" y1="-7.62" x2="264.16" y2="12.7" width="0.1524" layer="91"/>
|
||||
</segment>
|
||||
</net>
|
||||
</nets>
|
||||
|
|
Binary file not shown.
73
BMCop.ino
73
BMCop.ino
|
@ -71,8 +71,11 @@ int SyncCount = 0;
|
|||
int SyncCountICM = 0;
|
||||
int LastSyncCount = 0;
|
||||
int DesyncCount = 0;
|
||||
int SyncMode = 0;
|
||||
const int MaxDesyncTime = 500; //max desync timer in milliseconds
|
||||
|
||||
int LogsyncCount = 0;
|
||||
|
||||
// VARS FOR RPM SERIAL LOGGING
|
||||
//uint8_t SPARKS = 0;
|
||||
//uint16_t RPM = 0;
|
||||
|
@ -115,19 +118,24 @@ void loop() {
|
|||
|
||||
//Calucalute average DWell time with Engine RPM
|
||||
//DWELL_INTERNAL = map(RPM, 0, 11000, MAXDWELL, MINDWELL);
|
||||
|
||||
//Serial.println("SyncCount=" + String(SyncCount) + ", SyncCountICM=" + String(SyncCountICM) + ", LogsyncCount=" + String(LogsyncCount));
|
||||
}
|
||||
|
||||
void CalculateIsSynced() {
|
||||
if (!desynced) {
|
||||
if (LastSyncCount == SyncCount) {
|
||||
//if (!desynced) {
|
||||
if (SyncCount == LastSyncCount) {
|
||||
DesyncCount++;
|
||||
}
|
||||
if (SyncCount != LastSyncCount) {
|
||||
DesyncCount = 0;
|
||||
}
|
||||
if (DesyncCount >= MaxDesyncTime) {
|
||||
SetDecynced();
|
||||
}
|
||||
|
||||
LastSyncCount = SyncCount;
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
void SetDecynced() {
|
||||
|
@ -138,6 +146,7 @@ void SetDecynced() {
|
|||
SyncCountICM = 0;
|
||||
DesyncCount = 0;
|
||||
LastSyncCount = 0;
|
||||
SyncMode = 0;
|
||||
}
|
||||
|
||||
//###############################################################
|
||||
|
@ -206,14 +215,10 @@ void Ignite_Off() {
|
|||
// INTERRUPTS FC1 AND ICM INPUTS
|
||||
//###############################################################
|
||||
void ISR_FC1_Pin3() {
|
||||
if (desynced) {
|
||||
CYLINDER = 0;
|
||||
SyncCount++;
|
||||
}
|
||||
else
|
||||
SyncCount++;
|
||||
|
||||
if (!desynced)
|
||||
{
|
||||
SyncCount++;
|
||||
|
||||
//Increase Cylinder firing on the 5th FC1 pulse, prepare it for when the next ICM pulse will fire.
|
||||
//If the ignition degree are negative, the ICM will pulse slightly before the 6th FC1 pulse, better prepare it in advance on the 5th pulse!
|
||||
if (SyncCount == 5)
|
||||
|
@ -236,29 +241,48 @@ void ISR_ICM_Pin() {
|
|||
//START SYNC SEQUENCE
|
||||
if (desynced)
|
||||
{
|
||||
//AFTER 5-6x FC1 PULSE
|
||||
if (SyncCountICM == 0 && (SyncCount == 5 || SyncCount == 6))
|
||||
//AFTER UNKNOWN FC1 PULSE
|
||||
if (SyncCountICM == 0 && SyncCount > 0)
|
||||
{
|
||||
SyncCountICM++;
|
||||
SyncCount = 0;
|
||||
}
|
||||
//AFTER 11-12x FC1 PULSE
|
||||
if (SyncCountICM == 1 && (SyncCount == 11 || SyncCount == 12))
|
||||
//AFTER 5-6 or 11-12x FC1 PULSE
|
||||
if (SyncCountICM == 1 && (SyncCount == 5 || SyncCount == 6 || SyncCount == 11 || SyncCount == 12))
|
||||
{
|
||||
SyncCountICM++;
|
||||
SyncCount = 0;
|
||||
if (SyncCount == 5 || SyncCount == 6) {
|
||||
SyncMode = 1;
|
||||
}
|
||||
}
|
||||
//AFTER 3-4x FC1 PULSE
|
||||
if (SyncCountICM == 2 && (SyncCount == 3 || SyncCount == 4))
|
||||
{
|
||||
SyncCountICM++;
|
||||
SyncCount = 0;
|
||||
CYLINDER = 1;
|
||||
desynced = false;
|
||||
//AFTER UNKNOWN FC1 PULSE
|
||||
if (SyncMode == 0) {
|
||||
if (SyncCountICM == 2 && SyncCount > 0)
|
||||
{
|
||||
SyncCountICM++;
|
||||
SyncCount = 0;
|
||||
CYLINDER = 1;
|
||||
desynced = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (SyncMode == 1) {
|
||||
if (SyncCountICM <= 4 && (SyncCount == 5 || SyncCount == 6))
|
||||
{
|
||||
SyncCountICM++;
|
||||
SyncCount = 0;
|
||||
}
|
||||
if (SyncCountICM == 5 && SyncCount > 0) {
|
||||
SyncCountICM++;
|
||||
SyncCount = 0;
|
||||
CYLINDER = 1;
|
||||
desynced = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!desynced && CYLINDER > 0) {
|
||||
if(!desynced) {
|
||||
//Fire the specific Cylinder Coil
|
||||
Ignite_ON();
|
||||
|
||||
|
@ -316,8 +340,9 @@ ISR(TIMER1_COMPA_vect) {
|
|||
//Turn off interrupts since we use Serial commands, this also ensure we calculate the RPM when nothing trigger the interrupts (interrupts turned off)
|
||||
noInterrupts();
|
||||
|
||||
GetRPM();
|
||||
Serial.println("RPM: " + String(RPM) + "rpm");
|
||||
//GetRPM();
|
||||
//Serial.println("RPM: " + String(RPM) + "rpm");
|
||||
Serial.println("SyncCount=" + String(SyncCount) + ", SyncCountICM=" + String(SyncCountICM) + ", LogsyncCount=" + String(LogsyncCount));
|
||||
|
||||
//Attach again the interrupts since we finished calculating RPM and possibly sending Serial datas
|
||||
attachInterrupt(digitalPinToInterrupt(FC1_Pin3), ISR_FC1_Pin3, FALLING);
|
||||
|
|
|
@ -22,11 +22,12 @@ The BMCOP need 2x Signal Inputs pins to acheive triggering all the four(4x) Coil
|
|||
|
||||
# Parts required to assembled the Prototype PCB
|
||||
|
||||
- 4x 1K Ohm 1/6W Resistor
|
||||
- 2x 1K Ohm 1/6W Resistor
|
||||
- 4x 2N4148 Diode
|
||||
- 1x Arduino Nano V3 - 5V - 16Mhz
|
||||
|
||||
(required ONLY for the v1.2 and older)
|
||||
- 2x more 1K Ohm 1/6W Resistor
|
||||
- 1x 100nF (0.1uF) Capacitor
|
||||
*If you want to Power the Device with 12V:*
|
||||
- 1x 78M05
|
||||
|
@ -46,7 +47,7 @@ __*If you acheive successfull results*__
|
|||
I'll surely appreciate to get informed of the changes done the the programming codes or the schematic if there is any, and if you would like, you could participate in the developpement of this project by subscribing to Github and yourself 'Push updates request' to this project! I am willing to share Open Source the project I ended up with before selling the only car I could have tested on, please be kindful and let's make this a working Open Source project together.
|
||||
|
||||
# BMCOP V1.3 Schematic/Diagram
|
||||
![alt tag](https://github.com/bouletmarc/BMCOP/blob/main/eagle_1eO5gZZhDL.png)
|
||||
![alt tag](https://github.com/bouletmarc/BMCOP/blob/main/eagle.png)
|
||||
|
||||
# BMCOP V1.2 Schematic/Diagram
|
||||
![alt tag](https://github.com/bouletmarc/BMCOP/blob/main/eagle_2020-12-02_09-09-23.png)
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 31 KiB |
Loading…
Reference in New Issue