Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SPI and/or I2C and noise sensitivity

Status
Not open for further replies.

CADDevil

Member level 5
Joined
Jun 26, 2001
Messages
80
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
649
i2c noise

Hello,

I have one question. I have a PID motor controller (18F458) which I want to connect to higher level system.
Because I do not have enough serial ports on the higher level system, I would like to connect the motor unit via I2C or SPI.
Which one is less sensitive to noise ?
 

spi noise sensitivity

CADDevil said:
Hello,

I have one question. I have a PID motor controller (18F458) which I want to connect to higher level system.
Because I do not have enough serial ports on the higher level system, I would like to connect the motor unit via I2C or SPI.
Which one is less sensitive to noise ?
Neither is designed for robustness. SPI is usually implemented in on-chip hardware, with shift registers clocked by the clock signal, though, so would be very susceptible to glitches. I2C in harware would have same sensitivity, but if you use s/w I2C, you could make input routines sample multiple times to confirm transitions, and make it a more robust.

I2C doesn't work easily through simple optocouplers or buffers, because they have bidirectional data lines. Can't remember if same for SPI?

You could improve I2C by using differential buffers (two wires per signal) and making the data unidriectional - so have one pair with data from the master and one (multidrop) pair with data from the slaves. Slaves only enable their buffers when transmitting. Terminate the lines properly.

HTH
barny
 

i2c glitch

SPI does not have bidirectional data, so there should not be a problem with optocouplers.
I understand that RS-485 is much better solution, but the interface chips are expensive.
I think that I will try to use SPI and I will see. After all, the lines will be relatively short (50cm or similar), because the robot is small.
 

Re: i2c glitch

SPI does not have bidirectional data, so there should not be a problem with optocouplers.
I understand that RS-485 is much better solution, but the interface chips are expensive.
I think that I will try to use SPI and I will see. After all, the lines will be relatively short (50cm or similar), because the robot is small.


As you know, I2C was developed for very short runs and as such as the limitation of a total bus capacitance of 400 pF. You may be interested in the dual bidirectional bus driver PCA9600 by NPX (see: **broken link removed**) which isolates the I2C bus capacitance and increase the total bus capacitance to 4000pF. This chip also separates the bidirectional signaling of the I2C buss into a unidirectional TX and RX for the clock and data lines. If only two wires (clock and data) are acceptable the TX and RX pins can be connected together according to the chips documentation.

If you are expecting any level of electrical interference you may want to use differential signaling. The guys over at SJT Bits (sjtbits.com) have created a breakout board that takes standard I2C and creates a differential pair.
(**broken link removed**)

Hope this helps.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top