Author Topic: SPI Digital Isolation and Driving  (Read 3990 times)

0 Members and 1 Guest are viewing this topic.

Offline aep9690Topic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
SPI Digital Isolation and Driving
« on: February 15, 2014, 12:28:51 am »
I am working on a BMS that uses SPI to communicate.  I am designing the boards to flexible so that they can be connected together to large stacks of batteries.  I want to isolate the BMS stuff from the microcontroller stuff, to this end I am using the ISO7421 by TI.

The other issue is that I am not sure that the boards will be very close together.  I anticipate that the communication lines will need to travel up to 1ft between boards.  To mitigate this I want to use the SN74AHCT125 Bus Buffer to drive the SPI lines before the communication lines go off board.

Here is my issue, I need a way to connect the buses together after the bus buffer and the optoisolators (see the picture).  The SPI_OUT lines are the lines to the next board up, the SPI_IN lines are from the next board down, and the SDI, SDO, CSBI and SCLK lines are for the BMS chip on the current board.  I don't think I can just connect the two outputs together the way I have it because the MISO line idles high, I would need something between them so that they don't short when there is a different signal.  The solution that occurs to me is to use an AND gate.  That way when one of the two MISO line idles high and the other one goes low there won't be a problem, but I am worried that this will slow down the system and cause problems.

What are peoples thoughts on this?  Am I making this too complicated or is this a legitimate problem?  If it is a problem will my solution work or is there a better way?


Thanks
 

Offline aep9690Topic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: SPI Digital Isolation and Driving
« Reply #1 on: February 15, 2014, 01:18:26 am »
I should clarify that the SPI bus in this application is kind of special because instead of each chip having its own CS pin, the ICs each ahve their own address.  So the CS pin is pulled low and then the devices address is sent out followed by a command.  Its like a weird combination of I2C and SPI.
 

Offline fcb

  • Super Contributor
  • ***
  • Posts: 2174
  • Country: gb
  • Test instrument designer/G1YWC
    • Electron Plus
Re: SPI Digital Isolation and Driving
« Reply #2 on: February 15, 2014, 01:29:41 am »
What CLK speed are you planning on using? What is your largest chain length? Can you chain the MISO/MOSI with you chip or does each need it's own CS line?

If you can keep the speed down, then I would use low cost opto-couplers (4N25/VOM617 etc...).
https://electron.plus Power Analysers, VI Signature Testers, Voltage References, Picoammeters, Curve Tracers.
 

Offline aep9690Topic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: SPI Digital Isolation and Driving
« Reply #3 on: February 15, 2014, 01:34:12 am »
The clock speed is only 250kbps.  The largest chain length possible is about 16 boards, but realistically it won't get over 13.  There is only 1 CS line total, the slave selection is done by sending a device address.
 

Offline kony

  • Regular Contributor
  • *
  • Posts: 242
  • Country: cz
Re: SPI Digital Isolation and Driving
« Reply #4 on: February 15, 2014, 02:04:00 am »
Use schmitt buffers on input of each board for noise immunity, little logic is sutiable for that - small, cheap, much easier layout.
Having logic level defined by pull-up/down, when external board is disconected is good idea too.
No decoupling on that isolator and buffers ?
Also, I strongly discourage you from using SDI/SCL/SDO net names in shematics - I have seen too many people got burned by that (re-spinning PCBs, or modifying cable harnesses is not what you want, really).
 

Offline casinada

  • Frequent Contributor
  • **
  • Posts: 600
  • Country: us
Re: SPI Digital Isolation and Driving
« Reply #5 on: February 15, 2014, 04:24:25 am »
As suggested you can use the TI solutions or the Analog Devices solutions: http://www.analog.com/en/interface-isolation/digital-isolators/products/index.html , or regular optocouplers but in the last case, you have to make sure you have good signal integrity at those speeds probably using optocouplers with Schmitt trigger outputs.
If you use isolation, how do you power both sides? they should be isolated from each other as well. you can power the isolated side from the tested batteries, a separate battery or an isolated DC to DC converter. :)
 

Offline aep9690Topic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: SPI Digital Isolation and Driving
« Reply #6 on: February 15, 2014, 06:02:09 am »
I am going to include an isolated 5V power supply on each board powered from the battery. 

So I should replace the buffer I am using with schmitt buffer like this:  http://www.diodes.com/datasheets/74AHC125.pdf?  Or should I use the optocoupler with the output being fed into the schmitt buffer?  Or both?

And how do I combine the two MISO lines?  As I said before they idle high so I can't use a resistive or method.  From what is suggested I should use the method I attached.
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: SPI Digital Isolation and Driving
« Reply #7 on: February 15, 2014, 07:32:29 am »
Max. 16 boards, max. 1 ft between boards? I would look for another bus system
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline aep9690Topic starter

  • Regular Contributor
  • *
  • Posts: 67
  • Country: us
Re: SPI Digital Isolation and Driving
« Reply #8 on: February 15, 2014, 08:17:49 am »
Can't the BMS chip uses SPI.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->