Shop OBEX P1 Docs P2 Docs Learn Events
Advice / thoughts about a circuit idea please? — Parallax Forums

Advice / thoughts about a circuit idea please?

RforbesRforbes Posts: 281
edited 2013-12-16 13:25 in General Discussion
Heya folks,

I've been playing around with i2c chips lately and working with NXP 's P82B715 bus extender.

I've gotten steady, error free comms with a couple different sensors out to 100 feet using standard cat 5e cable, running the entire circuit on 3.3V. I've used the standard pull up resistor values given in the "drop in" circuit shown the in manual for the extender, which is 4.7k on the propeller and sensor side and 470 ohm on the bus side.

Since that works pretty well, I decided to run two of the bus extenders in parallel, using only 1 set of device side pull ups on the propeller side (still at 4.7k). Each extender feeds a separate cat 5E cable and corresponding extender at its end, which of course connects to it's own sensor. And each sensor has it's own address, so it ignores stuff that isn't sent to it.

It works just as well as the single circuit. The i2c response from the first branch sensor gets transmitted back to the propeller and also out the other branch, but the sensor on that other branch ignores it. So there are wasted signals, but they don't appear to be causing any problems.

I'd like to run up to 8 parallel circuits in this manner, and I'm pretty sure it can be done without much hassle... but I'd like your opinion or thoughts about anything you see as potentially problematic. I really don't want to go through all the time of wiring these things up on a breadboard, only to have them fizzle and pop when I try it out. :)

The biggest concern I've got is that with 8 of these circuits in parallel, the prop pins will be drawing around 24 ma. That's well below it's limit, but... will this beat up the prop over time?

Thanks in advance!
Robert

Comments

  • T ChapT Chap Posts: 4,223
    edited 2013-12-16 11:04
    I have used a similar version of that chip and it works, fine. For long runs and requirements for multiple devices, I prefer RS485 and use the MAX3430. This will allow up to 128 devices on long cable runs. When you are using the bus extender, the Prop connects to only one extender, so there is no concern for how many devices you are adding to the extender. It is not clear if you are suggesting that you are using 8 of the extender chips, but in my experience I was connecting multiple devices to a single bus extender.
  • RforbesRforbes Posts: 281
    edited 2013-12-16 11:19
    T Chap- I should explain a little better.

    With only 1 extender connected to the prop, the 3000pf +/- limit on the bus side is valid. So, you could have 1 extender on the prop and it's bus is limited to that 3000 pf. But that 3000pf is the TOTAL bus capacity limit for all the stuff connected to that single extender.

    By placing up to 8 extenders on the same two prop clk and data pins, you can have up to 3000 pf on each of the extenders and its bus cable. Any time the prop pins send data out, it goes through each of the 8 extenders, down their own cable to the other extender at the end, and to the device. Then the device with the matching address responds, bring it back to the propeller.

    As long as connecting 8 extenders to the same two prop pins doesn't exceed the 400 pf limit on the propeller side, it should be ok. I think..... ??

    I don't have a diagram of this circuit yet- gotta draw one up for clarity. Sorry!
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2013-12-16 11:24
    Hi Rforbes;
    I have looked at the spec for the P82B715. This circuit buffers the signals on the Prop side. The P82B715 essentially sinks 90% of the pull down current on the external side which leaves the Prop sinking only about 10%. Pretty cool!!!

    470Ω pulls up about 10mA to 5V. So the Prop only needs to sink 1mA.

    If you want to buffer 8 I2C devices with 8 translators, each with 470Ω, that would result in a total sink current of about 8mA to the Prop.

    Sure seems OK to me.

    BTW, the spec appears to allow 30mA of pull up on the external side. (Not the maximum of 60mA). So you could, possibly, cut it down to 3 buffers. However, as you say, you have a lot of capacitance which may not work with 9000pF on the buffer. So you may still need 8 buffers.
    I think you really need to do some experiments to test this out.

    Duane J
  • T ChapT Chap Posts: 4,223
    edited 2013-12-16 11:24
    I haven't used those in a year, but I thought you could run multiple devices off the same extender IC? Are you sure you need to be using 8 IC's?
  • RforbesRforbes Posts: 281
    edited 2013-12-16 11:39
    Duane- Right on. Ok. I think I did my current calc wrong. I came up with 3 ma each, for a total of 24ma. I musta used that funny math. :)

    T Chap - Yep, you're correct. But when you run multiple devices off of 1 extender, you're limited to the 3000pf capacitance limit for the entire bus (or cable if it just connects to one device at the end.) By using multiple extenders as I've described, you can have 3000pf for each bus (up to a total of 8)... the end result being 8 individual cable runs of around 3000pf max on each cable, with 1 device at the end of each cable.

    The practical use for this is to have 1 propeller with 8 cabled sensors such that the cabling encompasses a 200 foot diameter circle (assuming each cable is 100 ft length.) This isn't something I would want to put in a factory, because of noise and such. But for low noise environments it's a fairly cheap way to get a pretty decent distance to some sensors.

    With only 1 extender on the prop, the total length of the 8 cables would have to be such that their combined capacitance is no more than 3000pf. So the cables couldn't be near as long. I hope that makes a little more sense?
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2013-12-16 12:03
    Hi T;
    T Chap wrote: »
    I haven't used those in a year, but I thought you could run multiple devices off the same extender IC? Are you sure you need to be using 8 IC's?
    The I2C, "Inter-Integrated Circuit", concept was to allow efficint connection of multiple devices WITHIN a microcomputer board and closely spaced peripheral boards. Generally, not meant to send signals to the outside world. There are other bus systems designed to do this.

    Now, some have been attempting to go beyond the original concept by using buffered devices such as the P82B715 and others and go off board. While this can be done, careful design and testing is required. Especially if long distances, shielding, and capacitance is encountered. I have done this but I know I am going off spec somewhat.

    One thing you might want to do is modify the driver to slow down the the speed somewhat.

    Duane J
  • T ChapT Chap Posts: 4,223
    edited 2013-12-16 12:27
    Using the Basic I2C driver that is somewhere floating around the forum or OBEX, I have used 3 CAT5 cables connect to the Prop with runs of 35' each for years with no problems with no drivers. I have at least 100 other installations of systems with 2 CAT5's connected to the Prop @ 25' with no drivers. At low speeds it is not a problem. At one point I added the drivers, but I think the net gain was purely a mental feeling only, since the evidence still supports that there is no problems using no drivers on my systems.

    Multiple runs at 100'? That is another issue. If it works, great. Sometimes you have control over the install and the environment so you can test the signals to see what you are really dealing with. I personally like RS485 for multiple devices with zero thought put towards capacitance etc. The drawback is how to run the cat5. But even if you ran two cables to each remote device to allow for daisy chaining, you still have tons of feet to spare before hitting the maximum theoretical cable lengths. I predict that a star config with RS485 on short runs would be fine, even with no termination.
  • RforbesRforbes Posts: 281
    edited 2013-12-16 13:25
    T- I hear you. Thanks! :)

    I'm used to rs-485 layouts, especially with standard industrial control systems. I'm just trying to use the i2c protocol to see what I can do with it. More of a learning experience than a project requirement.

    So far, so good. Still running the driver at 100khz with two separate cable runs of 100 ft. each. If I can get all 8 extenders running, I'll increase to 200' each, and keep at it.
Sign In or Register to comment.