<div dir="ltr"><div>Here's another idea which uses 7400/4011. Keep in mind that outputs are inverted.</div><div><br></div><img src="cid:ii_1536b16fce9198ce" alt="Inline image 1" width="562" height="371"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Mar 12, 2016 at 8:42 AM, Robert Gasiorowski <span dir="ltr"><<a href="mailto:rgresume@gmail.com" target="_blank">rgresume@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Below is a better drawing of my circuit.<div><br></div><div>If you want to get fancy, you could use configurable gate, like 74LVC1G58 (you would need one for each channel.)</div><div>Use A as input, B permanently high, C opposite input.</div><div><br></div><div><br><div><br></div><div><img src="cid:ii_1536afab66cf76a9" alt="Inline image 1" width="527" height="562"><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 11, 2016 at 10:16 PM, Pete Soper via TriEmbed <span dir="ltr"><<a href="mailto:triembed@triembed.org" target="_blank">triembed@triembed.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    Hi Brian,<br>
    <br>
    (Here's your <a href="http://mail.triembed.org/pipermail/triembed_triembed.org/2016-February/002402.html" target="_blank">original
      msg</a> for others to catch up on if they're interested. I should
    also point out that folks can set their mail to "digest mode" and
    get a single msg a day if this spurt of traffic gets too bad. One
    person unsubscribed yesterday.)<br>
      <br>
      As one relative beginner to another, let me ask what's between the
    level translator and your relays? You sort of imply below you might
    be expecting the level translator to deliver a ton of current
    despite it going through the 470 ohm resistor (limit with 5v source
    is about 10ma). It's hard to picture the level translator operating
    even the most puny relay.<br>
      But Robert's circuit is predicated on the MOSFET gate needing very
    little current (i.e. with 5v out of the level translator about
    10ma). The other transistor has to be able to yank the gate on the
    other side of one of these resistors to ground, so making them too
    small defeats the either/or aspect.<br>
      But it really needs resistors in the path from each level
    translator to the transistor base Rob accidently connected it
    directly to. Without those it's a survival duel between too high
    current through the level translator or the transistor base to
    emitter path and one or both parts may be destroyed instantly or at
    some random, inconvenient time. The base resistors could be a few k
    ohms and even the crummiest transistors would sink the 10ma to
    prevent the MOSFET connected to its collector from switching on (the
    470 ohm resistor is kind of like a bus pullup in this situation).<br>
      Now that we're up to two transistors and four resistors, a single
    74LV04 (Mouser part 771-LV04N112<span style="color:rgb(51,51,51);font-family:Arial,Helvetica,sans-serif;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:17.1429px;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none;background-color:rgb(255,255,255)">) </span>seems
    attractive.  One of it's inverters could feed a complement of a
    single MCP23008 line to one relay(driver?) and the original signal
    would drive the other one.  But this LV chip is wimpy. For more
    drive the 74AHC04 would work as below. Or you could use the LV04 in
    between the MCP and the level shifter (i.e. sticking with something
    you know is working now).  <br>
    <br>
    -Pete<img src="cid:part2.01050406.06070700@soper.us" alt=""><div><div><br>
      <br>
    <div>On 03/11/2016 02:24 PM, Grawburg via
      TriEmbed wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div>
      <div dir="LTR" style="font-family:Times New Roman,Times,Serif;font-size:16px">I've tried this and it
        doesn't work.  I did change the resistors to 220 just to see if
        that made a difference.<br>
        My actual set-up does not use MOSFETs as I originally asked
        about but instead uses two DPDT relays.<br>
        The input voltage goes through a level shifter since I
        determined that the 3V3 through the resistor was too close to<br>
        the 2V5 that produces an unknown state in the relay modules. So
        the output from the shifter is 5V which does work fine. I still
        need to<br>
        be able to make sure a bad code doesn't allow both relays to
        activate.  <br>
        <br>
        <br>
        Brian Grawburg<br>
        <br>
        <blockquote dir="LTR" style="border-left:2px solid blue;margin-left:1em;padding-left:1em;font-size:13px;font-family:tahoma,helvetica,sans-serif">
          <hr size="1">-----Original Message-----<br>
          From: "Robert Gasiorowski" <a href="mailto:rgresume@gmail.com" target="_blank"><rgresume@gmail.com></a><br>
          To: "Grawburg" <a href="mailto:grawburg@myglnc.com" target="_blank"><grawburg@myglnc.com></a><br>
          Cc: "Triangle Embedded Devices" <a href="mailto:TriEmbed@triembed.org" target="_blank"><TriEmbed@triembed.org></a><br>
          Date: 02/24/16 05:34 PM<br>
          Subject: Re: [TriEmbed] Protection from Dual 12V inputs<br>
          <br>
          
          <div dir="ltr">Ooops, forgot to add base resistors.</div>
          <div class="gmail_extra"> <br>
            <div class="gmail_quote">On Wed, Feb 24, 2016 at 5:23 PM,
              Robert Gasiorowski <span dir="ltr"><<a href="mailto:rgresume@gmail.com" target="_blank">rgresume@gmail.com</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                <div dir="ltr">How about something simple like this:
                  <div><br>
                  </div>
                  <div>
                    <img src="cid:part4.00020501.02070304@soper.us" alt="Inline image 1" height="368" width="455"><br>
                     </div>
                   </div>
                <br>
              </blockquote>
            </div>
          </div>
        </blockquote>
        <br>
        <br>
        <div>-- </div>
        <font size="3"><b><font color="#CC0000"><i>[This was sent from a
                PC running Debian 7, 64-bit Linux. No Microsoft products
                were used.]</i></font><br>
          </b></font></div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
Triangle, NC Embedded Computing mailing list
<a href="mailto:TriEmbed@triembed.org" target="_blank">TriEmbed@triembed.org</a>
<a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a>
TriEmbed web site: <a href="http://TriEmbed.org" target="_blank">http://TriEmbed.org</a>
</pre>
    </blockquote>
    <br>
  </div>

<br>_______________________________________________<br>
Triangle, NC Embedded Computing mailing list<br>
<a href="mailto:TriEmbed@triembed.org" target="_blank">TriEmbed@triembed.org</a><br>
<a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" rel="noreferrer" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br>
TriEmbed web site: <a href="http://TriEmbed.org" rel="noreferrer" target="_blank">http://TriEmbed.org</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>