Electronics > Beginners

Communication bus for off the pcb sensors

(1/3) > >>

ZeroResistance:
A variety of sensors like temperature, pressure etc. are available in SPI, I2C today.
I have a requirement where I need to locate these sensors slightly away from the main board (the board where the microcontroller reside
The distance could be as low as 1 foot to as long as 5 feet.

1. Are SPI / I2C capable of handling such distances?
2. If so would I need additional buffering at the transmitter and at the sensor end.?
3. I see that daisy chaining is possible in SPI, this reduces the number of lines that have to go out from the main board to just a common clock, and a common chip select, the SDO / SDI pins are daisy chained.
4. Are there any other buses out there that are meant to handle these kinds of distances. I guess SPI / I2C is quite ubiquitous in the sensor domain and RS485 / RS422 seems to be too overkill to provide for each sensor?

Thanks in advance!

rstofer:
I don't know about SPI but there are I2C extenders that will go out to a mile but the data rate falls off

http://electro8051.free.fr/buslong/AN452.pdf

Google is your friend!  Here is a TI app note on extending the SPI bus but it doesn't look simple.  The problem is timing, you need to get the data from the far end into the shift register before the next clock.

http://www.ti.com/lit/an/slyt441/slyt441.pdf


For SPI, you need a common Clk, MISO and MOSI plus one SS' per device.

At 5 feet, I might just try it without extenders.  I might bring along Vcc and Gnd and do a little termination resistor thing on the far end.  You would be doing this anyway for SPI I2C because it is an open-collector bus.

ETA:  Fixed bus type - typo...

ZeroResistance:

--- Quote from: rstofer on September 12, 2018, 06:05:37 pm ---I don't know about SPI but there are I2C extenders that will go out to a mile but the data rate falls off

http://electro8051.free.fr/buslong/AN452.pdf

Google is your friend!  Here is a TI app note on extending the SPI bus but it doesn't look simple.  The problem is timing, you need to get the data from the far end into the shift register before the next clock.


http://www.ti.com/lit/an/slyt441/slyt441.pdf

--- End quote ---

Thanks  for the info.



--- Quote ---For SPI, you need a common Clk, MISO and MOSI plus one SS' per device.

--- End quote ---

Yes that's the typical way of wiring it up however I also found some info on daisy chaining devicies for SPI.


--- Quote ---At 5 feet, I might just try it without extenders.  I might bring along Vcc and Gnd and do a little termination resistor thing on the far end.  You would be doing this anyway for SPI because it is an open-collector bus.

--- End quote ---
So as far as the open colllector think you are referring to here is I2C?
And for termination which lines would I need to terminate?

max_torque:
The big question you haven't mentioned is what exactly is between the sensor and the pcb?

If the "5 foot" distance is inside a known enclosure, with no user access (let alone say a lightning strike, ESD discharge or similar!), then sure, one of the low voltage digital serial streams may well work, but if the "real world" is between the sensor and the pcb, then data architectures like RS485, CAN or LIN have been invented for very good reasons!

Also, is the sensor architecture fixed or extensable?  Serial data networks like CAN are easy to use for user configerable systems where you might want to add extra sensors, or remove them etc.  Something like SPi is no use (really) in that case, as in effect your hardware is fixed.

ZeroResistance:

--- Quote ---The big question you haven't mentioned is what exactly is between the sensor and the pcb?

If the "5 foot" distance is inside a known enclosure, with no user access (let alone say a lightning strike, ESD discharge or similar!), then sure, one of the low voltage digital serial streams may well work, but if the "real world" is between the sensor and the pcb, then data architectures like RS485, CAN or LIN have been invented for very good reasons!
--- End quote ---
Yes there would be an enclosure in somecases but in other cases there might not  be as in if the sensor is mounted on a motor, the motor may or may not be inside an enclosure. There is a very rare possibility that it would be out in the open though (I mean  the case of a lightening strike).


--- Quote ---Also, is the sensor architecture fixed or extensable?  Serial data networks like CAN are easy to use for user configerable systems where you might want to add extra sensors, or remove them etc.  Something like SPi is no use (really) in that case, as in effect your hardware is fixed.

--- End quote ---
[/quote]
i understand your point but isn't SPI / I2C also extensible like you can add multible sensors on the same bus for both of them.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod