Loading ...
Sorry, an error occurred while loading the content.

Re: Tri-state switch to DIO

Expand Messages
  • Kerim F
    ... I am just curious why you didn t like my simple solution I mentioned earlier ;)
    Message 1 of 12 , Mar 5 1:23 PM
    • 0 Attachment
      --- In Electronics_101@yahoogroups.com, "Yan Seiner" <yan@...> wrote:
      >
      >
      > On Tue, February 26, 2013 6:01 pm, Yan Seiner wrote:
      > > rtstofer wrote:
      > >>
      > >>
      > >>
      > >>
      > >> --- In Electronics_101@yahoogroups.com
      > >> <mailto:Electronics_101%40yahoogroups.com>, Yan Seiner wrote:
      > >> >
      > >> > I have a board with logic-level (3.3V ) DIO. I need to figure out some
      > >> > way to get it to sense a tri-state switch. The switch has a power lead
      > >> > and one wire out of it that works like this:
      > >> >
      > >> > State 1: 12V nominal
      > >> > State 2: floating (not connected)
      > >> > State 3: ground
      > >> >
      > >> > How do I translate this into 2 (or 3, I have inputs to spare) binary
      > >> > bits at 3.3V? I have 3.3V available from the board.
      > >> >
      > >> > Thanks.
      > >> >
      > >>
      > >> I'm not a big fan of bringing higher voltages anywhere near a uC so I
      > >> would first look at opto-isolators.
      > >>
      > >> If you have a solid +12V and solid Gnd reference available along with
      > >> the signal, this could be pretty simple.
      > >>
      > >> Arrange one opto-isolator to turn on when the signal is +12V relative
      > >> to the reference ground. Turn the other opto-isolator on when the
      > >> signal is Gnd relative to the solid +12V reference.
      > >>
      > >> Then connect the isolated side of the opto-isolators to 2 input pins.
      > >> One pin will go to '0' when the signal is 0V, the other pin will go to
      > >> '0' when the signal is +12V and both pins will be '1' when the signal
      > >> is floating. You will need to use either the internal pin pull-up
      > >> resistors or some external resistors from the pins to 3.3V
      > >>
      > >> Dual opto-isolators are available in a single 8 pin DIP:
      > >> http://www.nteinc.com/specs/3000to3099/pdf/nte3086.pdf
      > >>
      > >> Richard
      > >>
      > > I think this is the best suggestion yet, and (incidentally) one that
      > > takes the fewest discreet pieces. :)
      > >
      > > I'll have to measure the voltage that I'm calling +12V wrt to my supply
      > > voltage (12V nominal) to make sure it will work.
      > >
      > >
      >
      > I have to regroup on this. Turns out opto-isolators are power hungry. I
      > am running on battery power and the 10ma draw of a typical optoisolator
      > represents about 10% of my total power drain. EEEEK!
      >
      > I have not been able to find a through-hole optoisolator that draws less
      > than 10 ma; most recommend 16ma.
      >
      > So I'm looking for a solution that ideally draws no power when the switch
      > is set in the free-float position.
      >

      I am just curious why you didn't like my simple solution I mentioned earlier ;)
    • Cpt. Dondo
      ... That s what I will end up doing. I like optos; I just never had to use them when trying to keep power usage to a minimum.
      Message 2 of 12 , Mar 6 5:37 AM
      • 0 Attachment
        --- In Electronics_101@yahoogroups.com, "Kerim F"
        >
        > I am just curious why you didn't like my simple solution I mentioned earlier ;)
        >

        That's what I will end up doing. I like optos; I just never had to use them when trying to keep power usage to a minimum.
      • Michael
        Hello, you could also try galvanic isolators. They have much lower power requirements than opto s. NVE have some. Mike.
        Message 3 of 12 , Mar 6 3:42 PM
        • 0 Attachment
          Hello,
          you could also try galvanic isolators. They have much lower power requirements than opto's. NVE have some.
          Mike.





          --- In Electronics_101@yahoogroups.com, "Cpt. Dondo" <yan@...> wrote:
          >
          >
          >
          > --- In Electronics_101@yahoogroups.com, "Kerim F"
          > >
          > > I am just curious why you didn't like my simple solution I mentioned earlier ;)
          > >
          >
          > That's what I will end up doing. I like optos; I just never had to use them when trying to keep power usage to a minimum.
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.