Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Bidirectional isolator for three-wire serial bus?

  1. Mar 3, 2008 #1
    Hello All,

    I have a circuit that uses a microcontroller to communicate via a three-wire serial line (SPI) to a DDS chip to send and receive commands and status information. My question is that if the DDS IC happens to be on a different board and I want to galvanically isolate them from each other, how do I transfer data between the two ICs using the same three-wire serial line? I am thinking some kind of opto-isolators but I have yet to see any that allow bi-directional transfer of information on the same data line. How is this done in other applications where you have half or bidirectional communications taking place on the same data lines?

    Thanks,
    Jason O
     
  2. jcsd
  3. Mar 3, 2008 #2

    berkeman

    User Avatar

    Staff: Mentor

    By "3-wire" do you mean 3-wire plus ground (MOSI, MISO, SCLK, GND), or do you really mean 3 wires total (BiDir Data, SCLK, GND)?

    If you have a Bidir data wire, then yeah, it will be hard to optically isolate it. Can you change to 3-wire +GND? Then the optoisolation is more straightforward, and you mostly have to worry about using fast enough optos (and watch the asymmetry of the output waveforms....).
     
  4. Mar 3, 2008 #3
    Actually, the three wires are the Serial Data (SD), Chip Select (CS), and Serial Clock (SCLK). With the SPI bus, you use the chip select line to flag the IC that you want to send data to, then you clock the data in or out on the rising edge of SCLK.

    The CS and SCLK lines are both unidirectional but the SD line must be bidirectional. What do I do in this case?

    - Jason O
     
  5. Mar 4, 2008 #4

    berkeman

    User Avatar

    Staff: Mentor

    Yes, you're right. When there is more than one slave device on the SPI bus, chip select lines are used to select which slave is being addressed. Is there any way you can break the SD line into the two traditional uni-directional SPI data lines, MOSI and MISO? Does the slave device that you are using really only support 1-wire data? Is there an alternate device you can use for the slave that supports the full 2-wire SPI interface? Your master supports 2-wire data, right?

    If not, I have seen bidirectional opto transfer designs before, but was not very impressed with them. I'll look back in my notes to see if I have a copy of the circuit. I think it was for a bidir I2C bus design though, which would be at lower speeds than SPI, and has the inactive-high shared line characteristic that SPI does not.
     
  6. Mar 4, 2008 #5
    Hi Berkeman,

    Yes you're right about having two SPI lines. If I cannot find an alternative way to use the same wire for both lines, then I will have to just add a separate, dedicated line for both directions. I may just go ahead and do this. But I would still be very interested in seeing that bidirectional opto transfer design that you were referring to. Since I am using a BASIC Stamp to do the IO, the transfer rates would be pretty slow (50 kHz max).

    Thanks,
    Jason O
     
  7. Dec 4, 2009 #6
    Did you finally find a bidirectional isolator circuit scheme?

    You can email me if you like at: << e-mail address deleted by berkeman >>

    (I don't visit this board very often and you may need to email me to contact me.)
     
    Last edited by a moderator: Dec 4, 2009
  8. Dec 4, 2009 #7

    berkeman

    User Avatar

    Staff: Mentor

    Just ask him to PM you, and turn on your e-mail notification for PMs in your Control Panel. We discourage posting e-mail addresses in the open forums, as it invites spam.

    Oh, and this thread you posted in is over a year old... But welome anyway!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Bidirectional isolator for three-wire serial bus?
  1. Serial communication (Replies: 12)

Loading...