How to I2C enable a device

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
gskluzacek
 
Posts: 1
Joined: Wed Jan 17, 2018 12:18 am

How to I2C enable a device

Post by gskluzacek »

In general, if I have some kind of electronic device that I want to enable with the I2C protocol so that it can be added to an I2C bus, and controlled via a Raspberry Pi 3's I2C pins how would one go about doing that?

Specifically, I have a number of stepper motors (like this one https://www.adafruit.com/product/858) where each stepper motor is paired with 2 limit switches, and I want each package (stepper + 2 limit switches) to be individually addressable/controllable over I2C. The stepper motor/limit switch packages will be spaced about 10 to 15 feet apart and I would like do something like daisy chain them from 1 to another (plus carry power - so I'm thinking like cat 5 cable).

Something like "Adafruit DC & Stepper Motor HAT for Raspberry Pi" (https://www.adafruit.com/product/2348) wouldn't work. With the hat, I'm guessing all steppers have to be in close proximity to the Raspberry Pi, which won't work for me.

Thoughts, web links pointing in the right direction?

I'd like to try and keep the cost down to $10 or less per "node" else I could buy a bunch of Raspberry Pi Zero W's for $10 each. Other thought were Zigbee, but I'm not sure if that would be cost effective, over kill, etc. Plus I wouldn't know where to start there either.

Thanks, for any help or suggestions you give.
--Greg

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: How to I2C enable a device

Post by adafruit_support_mike »

The TCA9548 I2C multiplexer might fit your needs:

https://www.adafruit.com/product/2717

It's basically an I2C-controlled switch that connects a single I2C bus to 8 selectable I2C buses.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: How to I2C enable a device

Post by adafruit_support_bill »

The stepper motor/limit switch packages will be spaced about 10 to 15 feet apart
That may be a problem for i2c. I2c is designed for connecting between ICs on the same board. With care and good cabling, you can get it to go longer distances, but beyond a few feet you may need to slow things down for reliable operation. CAN bus is probably a better choice for what you are trying to do.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”