<mxfile host="Electron" agent="Claude">
  <diagram id="ritto-twinbus-d1mini" name="Ritto TwinBus D1 mini">
    <mxGraphModel dx="2416" dy="1444" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1700" pageHeight="1780" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="ttl" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=20;fontStyle=1;" value="Ritto TwinBus 7650 → D1 mini (ESP8266)" vertex="1">
          <mxGeometry height="30" width="600" x="40" y="40" as="geometry" />
        </mxCell>
        <mxCell id="barrier" edge="1" parent="1" style="endArrow=none;html=1;dashed=1;strokeWidth=3;strokeColor=#B85450;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="460" y="100" as="sourcePoint" />
            <mxPoint x="460" y="1150" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="blbl1" parent="1" style="text;html=1;align=right;verticalAlign=middle;fontSize=12;fontStyle=1;fontColor=#B85450;" value="◄ RITTO-SEITE" vertex="1">
          <mxGeometry height="20" width="190" x="260" y="76" as="geometry" />
        </mxCell>
        <mxCell id="blbl2" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=12;fontStyle=1;fontColor=#6C8EBF;" value="ESP-SEITE ►" vertex="1">
          <mxGeometry height="20" width="190" x="470" y="76" as="geometry" />
        </mxCell>
        <mxCell id="blbl3" parent="1" style="text;html=1;align=center;verticalAlign=middle;fontSize=11;fontStyle=1;fontColor=#B85450;" value="GALVANISCHE TRENNUNG" vertex="1">
          <mxGeometry height="20" width="200" x="360" y="1174" as="geometry" />
        </mxCell>
        <mxCell id="secA" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=15;fontStyle=1;" value="A · Klingelerkennung" vertex="1">
          <mxGeometry height="25" width="300" x="40" y="112" as="geometry" />
        </mxCell>
        <mxCell id="tA1" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=11;" value="Ritto&#xa;5 V Klingelsignal&#xa;blau (2)" vertex="1">
          <mxGeometry height="44" width="170" x="40" y="168" as="geometry" />
        </mxCell>
        <mxCell id="tA2" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=11;" value="Ritto GND&#xa;Ader schwarz" vertex="1">
          <mxGeometry height="44" width="170" x="40" y="238" as="geometry" />
        </mxCell>
        <mxCell id="R1" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333333;fontSize=11;" value="10 kΩ" vertex="1">
          <mxGeometry height="30" width="70" x="240" y="175" as="geometry" />
        </mxCell>
        <mxCell id="D1" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#999999;dashed=1;fontSize=9;" value="1N4148&#xa;optional" vertex="1">
          <mxGeometry height="40" width="50" x="325" y="205" as="geometry" />
        </mxCell>
        <mxCell id="OK" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333333;fontSize=12;fontStyle=1;verticalAlign=top;spacingTop=4;" value="PC817D" vertex="1">
          <mxGeometry height="140" width="190" x="375" y="150" as="geometry" />
        </mxCell>
        <mxCell id="OKp1" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;" value="1 Anode" vertex="1">
          <mxGeometry height="20" width="78" x="380" y="180" as="geometry" />
        </mxCell>
        <mxCell id="OKp2" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;" value="2 Kathode" vertex="1">
          <mxGeometry height="20" width="78" x="380" y="250" as="geometry" />
        </mxCell>
        <mxCell id="OKp4" parent="1" style="text;html=1;align=right;verticalAlign=middle;fontSize=10;" value="Kollektor 4" vertex="1">
          <mxGeometry height="20" width="74" x="486" y="180" as="geometry" />
        </mxCell>
        <mxCell id="OKp3" parent="1" style="text;html=1;align=right;verticalAlign=middle;fontSize=10;" value="Emitter 3" vertex="1">
          <mxGeometry height="20" width="74" x="486" y="250" as="geometry" />
        </mxCell>
        <mxCell id="MCU" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;fontSize=15;fontStyle=1;verticalAlign=top;spacingTop=10;" value="D1 mini&#xa;(ESP8266)" vertex="1">
          <mxGeometry height="1100" width="200" x="1000" y="100" as="geometry" />
        </mxCell>
        <mxCell id="MCUp1" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=12;fontStyle=1;" value="3V3" vertex="1">
          <mxGeometry height="20" width="140" x="1008" y="115" as="geometry" />
        </mxCell>
        <mxCell id="MCUp2" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=12;fontStyle=1;" value="D6 / GPIO12" vertex="1">
          <mxGeometry height="20" width="140" x="1008" y="180" as="geometry" />
        </mxCell>
        <mxCell id="MCUp3" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=12;fontStyle=1;" value="GND" vertex="1">
          <mxGeometry height="20" width="140" x="1008" y="330" as="geometry" />
        </mxCell>
        <mxCell id="MCUp4" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=12;fontStyle=1;" value="5V" vertex="1">
          <mxGeometry height="20" width="140" x="1008" y="390" as="geometry" />
        </mxCell>
        <mxCell id="MCUp5" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=12;fontStyle=1;" value="D8 / GPIO15" vertex="1">
          <mxGeometry height="20" width="140" x="1008" y="580" as="geometry" />
        </mxCell>
        <mxCell id="MCUp6" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=12;fontStyle=1;" value="GND" vertex="1">
          <mxGeometry height="20" width="140" x="1008" y="690" as="geometry" />
        </mxCell>
        <mxCell id="MCUp7" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=12;fontStyle=1;" value="D7 / GPIO13" vertex="1">
          <mxGeometry height="20" width="140" x="1008" y="810" as="geometry" />
        </mxCell>
        <mxCell id="MCUn1" parent="1" style="text;html=1;align=left;verticalAlign=top;fontSize=10;fontColor=#6C8EBF;" value="5V = gemeinsame Versorgungs-&#xa;schiene, extern eingespeist" vertex="1">
          <mxGeometry height="40" width="185" x="1010" y="425" as="geometry" />
        </mxCell>
        <mxCell id="MCUn2" parent="1" style="text;html=1;align=left;verticalAlign=top;fontSize=10;fontColor=#6C8EBF;" value="Beide GND-Punkte sind&#xa;dasselbe Netz" vertex="1">
          <mxGeometry height="40" width="185" x="1010" y="480" as="geometry" />
        </mxCell>
        <mxCell id="MCUn3" parent="1" style="text;html=1;align=left;verticalAlign=top;fontSize=10;fontColor=#6C8EBF;" value="D3 / D4 nicht belegen&#xa;(Strapping-Pins)&#xa;&#xa;D8 hat einen Onboard-&#xa;Pulldown – als ULN-&#xa;Eingang genau richtig" vertex="1">
          <mxGeometry height="120" width="185" x="1010" y="720" as="geometry" />
        </mxCell>
        <mxCell id="R2" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333333;fontSize=11;" value="47 kΩ" vertex="1">
          <mxGeometry height="30" width="70" x="800" y="125" as="geometry" />
        </mxCell>
        <mxCell id="eA1" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="210" y="190" as="sourcePoint" />
            <mxPoint x="240" y="190" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eA2" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="310" y="190" as="sourcePoint" />
            <mxPoint x="375" y="190" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eA3" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#999999;dashed=1;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="350" y="190" as="sourcePoint" />
            <mxPoint x="350" y="205" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eA4" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#999999;dashed=1;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="350" y="245" as="sourcePoint" />
            <mxPoint x="350" y="260" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eA5" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="210" y="260" as="sourcePoint" />
            <mxPoint x="375" y="260" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eA6" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="1000" y="125" as="sourcePoint" />
            <mxPoint x="835" y="125" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eA7" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="835" y="155" as="sourcePoint" />
            <mxPoint x="835" y="190" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eA8" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="565" y="190" as="sourcePoint" />
            <mxPoint x="835" y="190" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eA9" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="835" y="190" as="sourcePoint" />
            <mxPoint x="1000" y="190" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eA10" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="640" y="260" />
              <mxPoint x="640" y="340" />
            </Array>
            <mxPoint x="565" y="260" as="sourcePoint" />
            <mxPoint x="1000" y="340" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="dA1" parent="1" style="ellipse;html=1;fillColor=#333333;strokeColor=none;" vertex="1">
          <mxGeometry height="8" width="8" x="346" y="186" as="geometry" />
        </mxCell>
        <mxCell id="dA2" parent="1" style="ellipse;html=1;fillColor=#333333;strokeColor=none;" vertex="1">
          <mxGeometry height="8" width="8" x="346" y="256" as="geometry" />
        </mxCell>
        <mxCell id="dA3" parent="1" style="ellipse;html=1;fillColor=#333333;strokeColor=none;" vertex="1">
          <mxGeometry height="8" width="8" x="831" y="186" as="geometry" />
        </mxCell>
        <mxCell id="secB" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=15;fontStyle=1;" value="B · Taster-Ansteuerung" vertex="1">
          <mxGeometry height="25" width="300" x="40" y="440" as="geometry" />
        </mxCell>
        <mxCell id="tB1" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=11;" value="Ritto&#xa;Fahne Türöffner&#xa;blau (1)" vertex="1">
          <mxGeometry height="44" width="200" x="80" y="498" as="geometry" />
        </mxCell>
        <mxCell id="tB2" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=11;" value="Ritto&#xa;gemeinsamer Knoten&#xa;lila" vertex="1">
          <mxGeometry height="44" width="200" x="80" y="650" as="geometry" />
        </mxCell>
        <mxCell id="tB3" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=11;" value="Ritto&#xa;Fahne Stumm&#xa;gelb" vertex="1">
          <mxGeometry height="44" width="200" x="80" y="798" as="geometry" />
        </mxCell>
        <mxCell id="K1" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333333;fontSize=12;fontStyle=1;verticalAlign=top;spacingTop=4;" value="Relais 1 · G5V-1 5 V&#xa;Türöffner" vertex="1">
          <mxGeometry height="140" width="250" x="350" y="480" as="geometry" />
        </mxCell>
        <mxCell id="K1a" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;" value="10 Schließer" vertex="1">
          <mxGeometry height="20" width="100" x="355" y="510" as="geometry" />
        </mxCell>
        <mxCell id="K1b" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;" value="5 Mittelkontakt" vertex="1">
          <mxGeometry height="20" width="100" x="355" y="580" as="geometry" />
        </mxCell>
        <mxCell id="K1c" parent="1" style="text;html=1;align=right;verticalAlign=middle;fontSize=11;" value="Spule Pin 2" vertex="1">
          <mxGeometry height="20" width="75" x="520" y="510" as="geometry" />
        </mxCell>
        <mxCell id="K1d" parent="1" style="text;html=1;align=right;verticalAlign=middle;fontSize=11;" value="Spule Pin 9" vertex="1">
          <mxGeometry height="20" width="75" x="520" y="580" as="geometry" />
        </mxCell>
        <mxCell id="K1e" parent="1" style="text;html=1;align=center;verticalAlign=middle;fontSize=9;fontColor=#999999;" value="Pin 1 Öffner – unbeschaltet" vertex="1">
          <mxGeometry height="18" width="150" x="400" y="545" as="geometry" />
        </mxCell>
        <mxCell id="K2" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333333;fontSize=12;fontStyle=1;verticalAlign=top;spacingTop=4;" value="Relais 2 · G5V-1 5 V&#xa;Stumm" vertex="1">
          <mxGeometry height="140" width="250" x="350" y="710" as="geometry" />
        </mxCell>
        <mxCell id="K2a" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;" value="5 Mittelkontakt" vertex="1">
          <mxGeometry height="20" width="100" x="355" y="740" as="geometry" />
        </mxCell>
        <mxCell id="K2b" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;" value="10 Schließer" vertex="1">
          <mxGeometry height="20" width="100" x="355" y="810" as="geometry" />
        </mxCell>
        <mxCell id="K2c" parent="1" style="text;html=1;align=right;verticalAlign=middle;fontSize=11;" value="Spule Pin 2" vertex="1">
          <mxGeometry height="20" width="75" x="520" y="740" as="geometry" />
        </mxCell>
        <mxCell id="K2d" parent="1" style="text;html=1;align=right;verticalAlign=middle;fontSize=11;" value="Spule Pin 9" vertex="1">
          <mxGeometry height="20" width="75" x="520" y="810" as="geometry" />
        </mxCell>
        <mxCell id="K2e" parent="1" style="text;html=1;align=center;verticalAlign=middle;fontSize=9;fontColor=#999999;" value="Pin 1 Öffner – unbeschaltet" vertex="1">
          <mxGeometry height="18" width="150" x="400" y="775" as="geometry" />
        </mxCell>
        <mxCell id="U1" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333333;fontSize=12;fontStyle=1;verticalAlign=top;spacingTop=4;" value="ULN2003A" vertex="1">
          <mxGeometry height="370" width="200" x="720" y="480" as="geometry" />
        </mxCell>
        <mxCell id="U1a" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;" value="16 Ausgang 1" vertex="1">
          <mxGeometry height="20" width="88" x="725" y="580" as="geometry" />
        </mxCell>
        <mxCell id="U1b" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;fontStyle=1;" value="9 Diodenschiene (COM)" vertex="1">
          <mxGeometry height="20" width="160" x="725" y="660" as="geometry" />
        </mxCell>
        <mxCell id="U1c" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;" value="15 Ausgang 2" vertex="1">
          <mxGeometry height="20" width="88" x="725" y="810" as="geometry" />
        </mxCell>
        <mxCell id="U1d" parent="1" style="text;html=1;align=right;verticalAlign=middle;fontSize=10;" value="Eingang 1 · Pin 1" vertex="1">
          <mxGeometry height="20" width="100" x="815" y="580" as="geometry" />
        </mxCell>
        <mxCell id="U1e" parent="1" style="text;html=1;align=right;verticalAlign=middle;fontSize=10;" value="GND · Pin 8" vertex="1">
          <mxGeometry height="20" width="100" x="815" y="690" as="geometry" />
        </mxCell>
        <mxCell id="U1f" parent="1" style="text;html=1;align=right;verticalAlign=middle;fontSize=10;" value="Eingang 2 · Pin 2" vertex="1">
          <mxGeometry height="20" width="100" x="815" y="810" as="geometry" />
        </mxCell>
        <mxCell id="U1g" parent="1" style="text;html=1;align=center;verticalAlign=middle;fontSize=9;fontColor=#999999;" value="Anordnung schematisch,&#xa;Nummern = DIP-Pins" vertex="1">
          <mxGeometry height="30" width="140" x="750" y="720" as="geometry" />
        </mxCell>
        <mxCell id="tB4" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=13;fontStyle=1;" value="+5 V" vertex="1">
          <mxGeometry height="20" width="90" x="672" y="372" as="geometry" />
        </mxCell>
        <mxCell id="eB1" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="280" y="520" as="sourcePoint" />
            <mxPoint x="350" y="520" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB2" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="280" y="672" as="sourcePoint" />
            <mxPoint x="320" y="672" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB3" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="320" y="590" as="sourcePoint" />
            <mxPoint x="320" y="750" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB4" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="320" y="590" as="sourcePoint" />
            <mxPoint x="350" y="590" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB5" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="320" y="750" as="sourcePoint" />
            <mxPoint x="350" y="750" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB6" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="280" y="820" as="sourcePoint" />
            <mxPoint x="350" y="820" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB7" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="600" y="520" as="sourcePoint" />
            <mxPoint x="660" y="520" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB8" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="600" y="750" as="sourcePoint" />
            <mxPoint x="660" y="750" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB9" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="660" y="400" as="sourcePoint" />
            <mxPoint x="660" y="750" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB16" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="660" y="400" as="sourcePoint" />
            <mxPoint x="1000" y="400" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB10" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;jumpStyle=arc;jumpSize=8;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="600" y="590" as="sourcePoint" />
            <mxPoint x="720" y="590" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB11" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="600" y="820" as="sourcePoint" />
            <mxPoint x="720" y="820" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB12" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="660" y="670" as="sourcePoint" />
            <mxPoint x="720" y="670" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB13" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="920" y="590" as="sourcePoint" />
            <mxPoint x="1000" y="590" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB14" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="920" y="700" as="sourcePoint" />
            <mxPoint x="1000" y="700" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eB15" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="920" y="820" as="sourcePoint" />
            <mxPoint x="1000" y="820" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="dB1" parent="1" style="ellipse;html=1;fillColor=#333333;strokeColor=none;" vertex="1">
          <mxGeometry height="8" width="8" x="316" y="668" as="geometry" />
        </mxCell>
        <mxCell id="dB2" parent="1" style="ellipse;html=1;fillColor=#333333;strokeColor=none;" vertex="1">
          <mxGeometry height="8" width="8" x="656" y="516" as="geometry" />
        </mxCell>
        <mxCell id="dB3" parent="1" style="ellipse;html=1;fillColor=#333333;strokeColor=none;" vertex="1">
          <mxGeometry height="8" width="8" x="656" y="666" as="geometry" />
        </mxCell>
        <mxCell id="notes" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;spacingRight=10;" value="&lt;b&gt;Hinweise&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;1&lt;/b&gt; ESP-GND und Ritto-GND niemals verbinden. Die einzigen Übergänge sind der PC817D und die Relaiskontakte.&lt;br&gt;&lt;br&gt;&lt;b&gt;2&lt;/b&gt; Logik:&lt;br&gt;Klingeleingang D6 – Ruhe HIGH, Klingeln LOW → binary_sensor mit inverted: true&lt;br&gt;Relais D8/D7 – HIGH = angezogen. Der ULN2003 invertiert die Logik nicht.&lt;br&gt;&lt;br&gt;&lt;b&gt;3&lt;/b&gt; ULN2003 Pin 9 (Diodenschiene, COM) muss an +5 V. Dort liegen die internen Freilaufdioden. Nicht mit dem Mittelkontakt des Relais verwechseln – beide heißen COM.&lt;br&gt;&lt;br&gt;&lt;b&gt;4&lt;/b&gt; Relais-Pin 1 (Öffner, NC) unbeschaltet lassen. Sonst ist der Ritto-Taster im Ruhezustand dauerhaft gedrückt.&lt;br&gt;&lt;br&gt;&lt;b&gt;5&lt;/b&gt; Tastendruck 300–500 ms halten (PIC-Matrix). Beide Relais in Software gegeneinander verriegeln – nie gleichzeitig.&lt;br&gt;&lt;br&gt;&lt;b&gt;6&lt;/b&gt; 1N4148 nur nötig, falls das Klingelsignal negative Anteile hat. Erst messen (PC817-LED verträgt nur 6 V Sperrspannung).&lt;br&gt;&lt;br&gt;&lt;b&gt;7&lt;/b&gt; GPIO-Wahl: D6 als Klingeleingang ist frei von Strapping-Funktionen. D8 und D7 treiben die Relais – D8 hat einen Onboard-Pulldown und ist deshalb nur als ULN-Eingang brauchbar, hier also genau richtig. D3/D4 nicht verwenden.&lt;br&gt;&lt;br&gt;&lt;b&gt;8&lt;/b&gt; 10 kΩ ergibt ca. 0,4 mA LED-Strom, nötiger CTR ca. 13 %. Reserve etwa Faktor 5.&lt;br&gt;&lt;br&gt;&lt;b&gt;9&lt;/b&gt; Relaiskontakte nie mit größeren Strömen belasten – die Au-Auflage wäre weg." vertex="1">
          <mxGeometry height="740" width="340" x="1250" y="110" as="geometry" />
        </mxCell>
        <mxCell id="refttl" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=15;fontStyle=1;" value="Physische Pinbelegung (Referenz)" vertex="1">
          <mxGeometry height="25" width="400" x="67" y="1250" as="geometry" />
        </mxCell>
        <mxCell id="ref1" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;" value="&lt;b&gt;ULN2003A – DIP16, Draufsicht&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;font face=&quot;Courier New&quot;&gt;      Kerbe / Punkt&lt;br&gt;  +---------\_/---------+&lt;br&gt; IN1 | 1            16 | OUT1&lt;br&gt; IN2 | 2            15 | OUT2&lt;br&gt; IN3 | 3            14 | OUT3&lt;br&gt; IN4 | 4            13 | OUT4&lt;br&gt; IN5 | 5            12 | OUT5&lt;br&gt; IN6 | 6            11 | OUT6&lt;br&gt; IN7 | 7            10 | OUT7&lt;br&gt; GND | 8             9 | COM&lt;br&gt;  +--------------------+&lt;/font&gt;&lt;br&gt;&lt;br&gt;Eingang n gehört zu Ausgang 17 − n.&lt;br&gt;IN = Eingang, OUT = Ausgang,&lt;br&gt;COM = Diodenschiene, an +5 V." vertex="1">
          <mxGeometry height="300" width="380" x="67" y="1290" as="geometry" />
        </mxCell>
        <mxCell id="ref2" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;" value="&lt;b&gt;G5V-1 – Ansicht von UNTEN&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;font face=&quot;Courier New&quot;&gt;   1    2          5&lt;br&gt;   |    |          |&lt;br&gt; +--------------------+&lt;br&gt; |     G5V-1        |&lt;br&gt; +--------------------+&lt;br&gt;   |    |          |&lt;br&gt;  10    9          6&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;2 + 9&lt;/b&gt;  Spule, 167 Ω, keine Polarität&lt;br&gt;&lt;b&gt;5 + 6&lt;/b&gt;  Mittelkontakt (COM), intern verbunden&lt;br&gt;&lt;b&gt;1&lt;/b&gt;      Öffner (NC) – unbeschaltet lassen&lt;br&gt;&lt;b&gt;10&lt;/b&gt;     Schließer (NO)&lt;br&gt;&lt;br&gt;Pins am Bauteil prüfen: das Paar mit 167 Ω ist die Spule." vertex="1">
          <mxGeometry height="300" width="380" x="477" y="1290" as="geometry" />
        </mxCell>
        <mxCell id="Cled" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f8cecc;strokeColor=#b85450;fontSize=11;" value="Ritto&lt;br&gt;Status-LED Stummschaltung&lt;br&gt;&lt;br&gt;&lt;br&gt;nicht elektrisch abgreifen" vertex="1">
          <mxGeometry height="100" width="190" x="80" y="919" as="geometry" />
        </mxCell>
        <mxCell id="Clight" edge="1" parent="1" source="Cled" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;dashed=1;strokeWidth=2;strokeColor=#B85450;endArrow=block;fontSize=11;fontColor=#B85450;exitX=0.984;exitY=0.59;exitDx=0;exitDy=0;exitPerimeter=0;" value="Licht">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="400" y="979" as="sourcePoint" />
            <mxPoint x="520" y="979" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="Cpt" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333333;fontSize=12;fontStyle=1;" value="SFH320&#xa;Fototransistor" vertex="1">
          <mxGeometry height="100" width="180" x="520" y="929" as="geometry" />
        </mxCell>
        <mxCell id="Cl1" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;" value="Kollektor · rot" vertex="1">
          <mxGeometry height="18" width="68" x="622" y="940" as="geometry" />
        </mxCell>
        <mxCell id="Cl2" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=10;" value="Emitter · weiß" vertex="1">
          <mxGeometry height="18" width="70" x="623" y="998" as="geometry" />
        </mxCell>
        <mxCell id="Cr" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#ffffff;strokeColor=#333333;fontSize=11;" value="100 kΩ" vertex="1">
          <mxGeometry height="30" width="70" x="857" y="1047" as="geometry" />
        </mxCell>
        <mxCell id="eC1" edge="1" parent="1" source="MCU" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=-0.004;exitY=0.771;exitDx=0;exitDy=0;exitPerimeter=0;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="990" y="948.5" as="sourcePoint" />
            <mxPoint x="700" y="948.5000000000002" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eC2" edge="1" parent="1" source="Cpt" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;exitX=1.009;exitY=0.788;exitDx=0;exitDy=0;exitPerimeter=0;">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="892" y="1008" />
            </Array>
            <mxPoint x="848.6200000000003" y="1008.3" as="sourcePoint" />
            <mxPoint x="892" y="1020" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eC3" edge="1" parent="1" source="dC1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;entryX=-0.01;entryY=0.825;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.7;exitY=0.55;exitDx=0;exitDy=0;exitPerimeter=0;" target="MCU">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="823.0284271247463" y="987.7615728752538" as="sourcePoint" />
            <mxPoint x="927" y="989.9900000000001" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eC4" edge="1" parent="1" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="892" y="1007" as="sourcePoint" />
            <mxPoint x="892" y="1047" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="eC5" edge="1" parent="1" source="Cr" style="edgeStyle=orthogonalEdgeStyle;html=1;rounded=0;endArrow=none;strokeWidth=2;strokeColor=#333333;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=-0.006;entryY=0.874;entryDx=0;entryDy=0;entryPerimeter=0;" target="MCU">
          <mxGeometry relative="1" as="geometry">
            <mxPoint x="745" y="1077" as="sourcePoint" />
            <mxPoint x="960" y="1070" as="targetPoint" />
          </mxGeometry>
        </mxCell>
        <mxCell id="dC1" parent="1" style="ellipse;html=1;fillColor=#333333;strokeColor=none;" vertex="1">
          <mxGeometry height="8" width="8" x="888" y="1003" as="geometry" />
        </mxCell>
        <mxCell id="kabel" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;spacingRight=10;" value="&lt;b&gt;Kabelfarben der herausgeführten Adern&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;font face=&quot;Courier New&quot;&gt;lila         gemeinsamer Knoten beider Taster&lt;br&gt;gelb         Stummschalter&lt;br&gt;blau (1)     Türöffnerschalter&lt;br&gt;blau (2)     Klingelsignal 5 V&lt;br&gt;schwarz      Ritto GND&lt;br&gt;rot          Fototransistor Kollektor, an 3V3&lt;br&gt;weiß         Fototransistor Emitter, an A0&lt;br&gt;schwarz/grau freies Ende des 100 kΩ, an GND&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;b&gt;Achtung: blau doppelt belegt.&lt;/b&gt;&lt;br&gt;&lt;br&gt;schwarz gehört zur isolierten Ritto-Seite, schwarz/grau zur ESP-Seite. Eine Verwechslung dieser beiden überbrückt die galvanische Trennung und macht den gesamten Aufbau zunichte.&lt;br&gt;&lt;br&gt;blau (1) ist ein potentialfreier Kontakt, blau (2) führt 5 V gegen schwarz (1). Auch diese beiden nie vertauschen.&lt;br&gt;&lt;br&gt;Beide Doppelfarben vor dem Einbau eindeutig kennzeichnen – Schrumpfschlauch, Ring oder Beschriftung." vertex="1">
          <mxGeometry height="420" width="400" x="920" y="1250" as="geometry" />
        </mxCell>
        <mxCell id="cnote" parent="1" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;fontSize=11;align=left;verticalAlign=top;spacingLeft=10;spacingTop=6;spacingRight=10;" value="&lt;b&gt;Zur Stumm-Erkennung&lt;/b&gt;&lt;br&gt;&lt;br&gt;Zwischen LED und Fototransistor besteht keine elektrische Verbindung. Die galvanische Trennung entsteht hier durch den Luftspalt.&lt;br&gt;&lt;br&gt;Fototransistor gegen Umgebungslicht abschotten, sonst misst er die Flurbeleuchtung.&lt;br&gt;&lt;br&gt;Kontakte nach dem Löten isolieren – im Gehäuse liegen 24-V-Knoten.&lt;br&gt;&lt;br&gt;Schwelle in ESPHome nach dem Ablesen der Rohwerte setzen." vertex="1">
          <mxGeometry height="420" width="270" x="1350" y="1250" as="geometry" />
        </mxCell>
        <mxCell id="WiH9m1cPeIh5xqYVIxrQ-1" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=12;fontStyle=1;" value="3V3" vertex="1">
          <mxGeometry height="20" width="140" x="1010" y="940" as="geometry" />
        </mxCell>
        <mxCell id="WiH9m1cPeIh5xqYVIxrQ-2" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=12;fontStyle=1;" value="GND" vertex="1">
          <mxGeometry height="20" width="140" x="1008" y="1053" as="geometry" />
        </mxCell>
        <mxCell id="WiH9m1cPeIh5xqYVIxrQ-3" parent="1" style="text;html=1;align=left;verticalAlign=middle;fontSize=12;fontStyle=1;" value="A0" vertex="1">
          <mxGeometry height="20" width="140" x="1008" y="998" as="geometry" />
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
