<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Good catch Rodney,<br>
    <br>
    Brian, unless you tie the solenoid ground (negative supply terminal)
    and the I/O port expander ground (again, negative supply terminal)
    together, you will have no reliable gate-source current path. As
    such, you won't be controlling the Mosfet.<br>
    <br>
    If you absolutely need isolation between the two, you will need to
    provide  an optoisolator driven from the I/O port expander, PLUS a 5
    volt isolated power supply to turn the Mosfet gate on.<br>
    <br>
    If you measure the voltage between the gate and source of the
    Mosfet, you'll see a voltage, which will explain why the Mosfet is
    turning on.<br>
    <br>
    Is there any reason you don't want to connect the two negative
    supply terminals together?<br>
    <br>
    Regards,<br>
    <br>
    Rick<br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 6/26/2014 7:20 PM, Glen Smith wrote:<br>
    </div>
    <blockquote
cite="mid:CANwtiDW17XNivtw1Ehk6fKmW0khy1pPDKv+U_rSQERThgQKtdw@mail.gmail.com"
      type="cite">
      <p dir="ltr">Is the 12v supply ground and the pi ground tied
        together? If not you can see some wacky results with 2 power
        supplies floating relative to each other. </p>
      <p dir="ltr">- Thumbed one letter at a time on a 2.25 x 1.25 inch
        Galaxy smartphone keyboard, please forgive any errors.</p>
      <div class="gmail_quote">On Jun 26, 2014 5:12 PM, "Grawburg" <<a
          moz-do-not-send="true" href="mailto:grawburg@myglnc.com">grawburg@myglnc.com</a>>
        wrote:<br type="attribution">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div dir="LTR" style="font-family:Times New
            Roman,Times,Serif;font-size:16px">
            <div style="font-family:'Times New Roman',Times,serif"><font>Rodney
                asked for more detail;</font></div>
            <div style="font-family:'Times New
              Roman',Times,serif;font-size:16px">
              <br>
            </div>
            <font style="font-family:'Times New Roman',Times,serif"
              size="3">Attached is the single n-MOSFET circuit (it's
              from the project manual I'm creating).  </font>
            <div><font style="font-family:'Times New Roman',Times,serif"
                size="3">The MCP23017 is an I/O port expander between
                the devices and the Raspberry Pi.</font>
              <div style="font-family:'Times New Roman',Times,serif">
                <font size="3">Each MOSFET connects to a different
                  output port.</font></div>
              <div style="font-family:'Times New Roman',Times,serif"><font
                  size="3">The ground is the ground for the 12VDC, not
                  the Pi.</font></div>
              <div>
                <font size="3" face="Times New Roman, Times, serif">I
                  have not checked the output voltage from the chip; I
                  will try putting a resistor in-line as suggested.</font></div>
              <div style="font-family:'Times New Roman',Times,serif">
                <font size="3"><br>
                </font></div>
              <div style="font-family:'Times New Roman',Times,serif"><font
                  size="3">Brian </font></div>
              <div style="font-family:'Times New Roman',Times,serif"><font
                  size="3"><br>
                </font>
                <div style="font-size:16px">
                  <a moz-do-not-send="true"
                    href="https://en.wikipedia.org/wiki/Arthur_Schopenhauer#cite_note-55"
                    target="_blank"><span><br>
                    </span></a></div>
              </div>
            </div>
          </div>
          <br>
          _______________________________________________<br>
          Triangle, NC Embedded Computing mailing list<br>
          <a moz-do-not-send="true" href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a><br>
          <a moz-do-not-send="true"
            href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org"
            target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
          TriEmbed web site: <a moz-do-not-send="true"
            href="http://TriEmbed.org" target="_blank">http://TriEmbed.org</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Triangle, NC Embedded Computing mailing list
<a class="moz-txt-link-abbreviated" href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a>
<a class="moz-txt-link-freetext" href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a>
TriEmbed web site: <a class="moz-txt-link-freetext" href="http://TriEmbed.org">http://TriEmbed.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>