+ Post New Thread
Results 1 to 4 of 4
  1. #1
    Member level 5
    Points: 3,237, Level: 13

    Join Date
    Jun 2001
    Posts
    80
    Helped
    1 / 1
    Points
    3,237
    Level
    13

    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 ?

    •   Alt20th January 2003, 17:03

      advertising

        
       

  2. #2
    Member level 1
    Points: 2,328, Level: 11

    Join Date
    Apr 2002
    Posts
    34
    Helped
    0 / 0
    Points
    2,328
    Level
    11

    spi noise sensitivity

    Quote Originally Posted by CADDevil
    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



    •   Alt20th January 2003, 20:14

      advertising

        
       

  3. #3
    Member level 5
    Points: 3,237, Level: 13

    Join Date
    Jun 2001
    Posts
    80
    Helped
    1 / 1
    Points
    3,237
    Level
    13

    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.



    •   Alt20th January 2003, 21:07

      advertising

        
       

  4. #4
    Newbie level 1
    Points: 82, Level: 1

    Join Date
    Jul 2012
    Posts
    1
    Helped
    0 / 0
    Points
    82
    Level
    1

    Re: i2c glitch

    Quote Originally Posted by CADDevil View Post
    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: http://www.nxp.com/documents/data_sheet/PCA9600.pdf) 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.
    (http://sjtbits.com/differential-i2c-shield/)

    Hope this helps.



+ Post New Thread
Please login

LinkBacks (?)