PDA

View Full Version : I2C host controller



csdude
01-14-2010, 12:02 PM
Hi all,

I am looking at some I2C stuff. The Devantech usb-12C host controller can be used with the I2C expension board, right? How many I2C device can I hook up to that host controller?

any suggestions to use something else?

thanks,

Ron

lnxfergy
01-14-2010, 01:50 PM
Hi all,

I am looking at some I2C stuff. The Devantech usb-12C host controller can be used with the I2C expension board, right? How many I2C device can I hook up to that host controller?

any suggestions to use something else?

thanks,

Ron


Most of the Devantech devices (and really, most low-cost hobby I2C stuff) use 7-bit address, so 128 devices is the max on the bus (there is a 10-bit address mode, but it's far less commonly supported). Your actual usage may be less depending on the devices themselves. For instance, the SRF-08/02 sonars have 16 possible addresses, so you can't attach more than 16 of either device.

One issue with I2C to be careful with is bus capacitance. I2C was really intended for multiple devices on a single PCB, not for stringing together all sorts of components inside a robot. You'll want to keep the wire runs as short as possible in most cases. Thus, again, you may not actually be able to toss 128 devices on there before you have too much bus capacitance...

-Fergs

csdude
01-15-2010, 12:11 AM
Most of the Devantech devices (and really, most low-cost hobby I2C stuff) use 7-bit address, so 128 devices is the max on the bus (there is a 10-bit address mode, but it's far less commonly supported). Your actual usage may be less depending on the devices themselves. For instance, the SRF-08/02 sonars have 16 possible addresses, so you can't attach more than 16 of either device.

One issue with I2C to be careful with is bus capacitance. I2C was really intended for multiple devices on a single PCB, not for stringing together all sorts of components inside a robot. You'll want to keep the wire runs as short as possible in most cases. Thus, again, you may not actually be able to toss 128 devices on there before you have too much bus capacitance...

-Fergs

Ah, ok, cool. Thing is .. there are a lot of interesting sensors out there, but a lot of them have an I2C interface. would be cool if you could string a bunch of them together instead of using a host controller for each and every device.

lnxfergy
01-15-2010, 09:02 AM
Ah, ok, cool. Thing is .. there are a lot of interesting sensors out there, but a lot of them have an I2C interface. would be cool if you could string a bunch of them together instead of using a host controller for each and every device.

Yeah, I2C works pretty well, as long as you look out for bus capacitance.

-Mike

csdude
01-15-2010, 10:16 AM
Yeah, I2C works pretty well, as long as you look out for bus capacitance.

-Mike

Ok, I am kinda a rookie with that, how do I avoid that best?

jes1510
01-15-2010, 10:37 AM
Short wires, and if they must be long then be careful with the routing.

Edit: A note about capacitance in regards to wiring. Whenever you place something on a wire to complete a circuit it adds a certain amount of capacitance, resistance, and inductance. The capacitance is parallel to the circuit and the inductance is serial as is the resistance. As those attributes increase, it will affect the circuit to a greater degree. The capacitance and resistance will form and RC time circuit that will affect the slew rate of any data. That may not be a big deal at low frequencies but as the speed increases then it becomes more of a bad thing. The best way to avoid it is to try not to use long wire runs.

csdude
01-15-2010, 11:13 AM
Short wires, and if they must be long then be careful with the routing.
ok, shielded wire would help?

Adrenalynn
01-17-2010, 12:52 PM
Shielded could help with inductance. Heavier gauge will help with resistance. But then your capacitance goes up.

Extremely short, shielded, heavy gauge. That should address everything. ;)

csdude
01-18-2010, 01:51 AM
Shielded could help with inductance. Heavier gauge will help with resistance. But then your capacitance goes up.

Extremely short, shielded, heavy gauge. That should address everything. ;)

Hmmm, I can probably come up with something there....