Connect with us

Custom I2C bus concept, would it work?

Discussion in 'Microcontrollers, Programming and IoT' started by Reactor89, Jan 5, 2013.

Scroll to continue with content
  1. Reactor89

    Reactor89

    4
    0
    Jan 5, 2013
    In lieu of creating a mixed voltage bus (I.E. 5v to 12v to 5v) I'm considering an Open-Collector bus topology of higher current. Sinking higher current with transistors instead of chips allows the bus distance to be extended past standard distance.

    Not a perfect method for a longer distance bus but seemingly possible.

    Here is my design in theory:

    [​IMG]

    The idealize transmission line in the center does have some resemblance to my application.

    The PNP transistors sink most of the bus current while still passing a signal to devices and the zener diodes provide signal clamping.

    Using some idealized simulations of these transistors and transmission line I have determined some details.

    During the high to low transitions there is a ~50mA current spike through a PNP transistor with a fall time of around 150ns (~5V to 0V) but 500ns to settle at ~930mV given the simulated transmission line.

    The low to high rise time is around 400ns (~930mV to 3.6V) with the same transmission line.

    These rise and fall times are well within spec for the NXP PCA9634D IC I’m looking to use.

    My question is, am I crazy? Do I have a valid theory? Are there any issues I'm overlooking?

    I have minimum practical experience with serial transmission lines like this, especially one like this that doesn't follow I2C Spec.

    Thanks for reading,

    Reactor89
     
  2. Harald Kapp

    Harald Kapp Moderator Moderator

    10,767
    2,424
    Nov 17, 2011
    Developing a working and reliable bus concept is not something you can do off-the-cuff. May I ask in return, what makes your requirements so special that you can't use a standard I²C bus? It certainly shouldn't be the 100kHz bus frequency, as this can easily be handled by standard components. To extend the distance, consider using shielded cable.

    The interconnect between the two ends should be considered as a transmission line only if the wave nature of the signal must be taken into account. That happens when the wavelength of the signal becomes comparable to the length of the cable. At 100kHz the wavelength is ~3km. Should you consider to bridge that distance, you should also consider alternative methods, but not I²C, not even a modded version.

    Harald
     
  3. Reactor89

    Reactor89

    4
    0
    Jan 5, 2013
    Of course.

    I want to make an I2C bus of 18 devices on a 20ft long bus cable without a repeaters or bridges. (using repeaters is a last resort)

    Capacitive load will be higher then the standard maximum (400pF). It's hard to say exactly how high but less than 1000pF.

    I don't think shielded cable solves my issues. Such a large single bus is highly capacitive and is likely to first fail do to rise and fall time issues before noise.

    To drive such a high capacitive load means running higher bus current to maintain the standard 100kHz I2C clock speed or maintaining standard current levels and customize I2C code to run the bus at a far lower clock frequency.

    In either case I would be using a somewhat modified I2C standard to drive the extra long bus and I'm in uncharted territory.

    If I was to use something other then I2C I would need to find a replacement to my NXP PCA9634 chip.

    Reactor89
     
    Last edited: Jan 5, 2013
  4. Harald Kapp

    Harald Kapp Moderator Moderator

    10,767
    2,424
    Nov 17, 2011
    I see your point. Your circuit certainly seems to achieve that goal. However, due to the additional Vbe from the PNP transistors, your low level will be higher than without this transistor, as you have already noted (930mV). This will reduce your noise margin and you'll have to trade off noise immunity for higher bus current.

    I'd say you build a prototype and test it physically.

    Harald
     
  5. Reactor89

    Reactor89

    4
    0
    Jan 5, 2013
    Thank you voicing concern about the noise and how the higher current methods make a bus far more susceptible to noise. This didn't quite occur to me when designing this method.

    With this in mind and considering the mobile nature of my application, expanding the device footprint and adding I2C repeaters is the responsible design choice.

    With a chain of repeaters (per the NXP PCA9507 documention) I can cut my large bus into smaller chunks and make the system much more resistance to noise.

    Space is expensive but I will trade it for system robustness at this point.

    Thanks for the input,

    Reactor89
     
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    10,767
    2,424
    Nov 17, 2011
    Don't give up that easily. I didn't mean to disencourage you. My only intention was to make you aware of this issue.
    It is not the higher current that reduces the noise margin, it is the way this current is forced by the BJTs (due to the additional Vbe).

    Anyway, even at Low=0.9V the bus may still operate reliable since most modern CMOS chips have an input threshold near Vcc/2, which would be 2.5V at Vcc=5V. Therefore you still have some noise margin. Besides, the idea of using a higher bus current was to reduce susceptibility of the bus to interference from external disturbances. The low bus impedance (high current) may more than offset the reduced noise margin.
    The circuit isn't that complex. I suggest you build a quick prototype on veroboard or similar and make some tests. Chances are you won't need the special repeater chips.

    Harald
     
  7. Reactor89

    Reactor89

    4
    0
    Jan 5, 2013
    Well fine then. :D Never back down.

    Yet the reason why I'm nervous is every I2C "Low Level Input Voltage" I've seen is 0.3 *VCC (TTL standard) including the chips I want to network.

    That is low level is 1.5v max with 5v.

    Giving the design a once over again and optimizing the resistors the low level for the circuit will be 830mV - 730mV depending on resistor layout. Again the Vbe at work.

    [​IMG]

    So now the all important question is; is ~700mV margin for noise enough given I want to use standard ribbon cable on a mobile application?

    I guess a I will need to prototype like you say and consider the results on an oscilloscope.

    I will update later,

    Reactor89
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-