Winter Storm Juno: Blizzard Warning! All shipping and UPS service guarantees are suspended due to weather and blizzard conditions.

Arduino master to multiple Arduino slaves via i2c
Moderators: adafruit_support_bill, adafruit

Arduino master to multiple Arduino slaves via i2c

by jamesdevito on Wed Jan 09, 2013 3:54 am

I'm using an arduino uno to communicate to arduino micros (set up as slaves) using i2c and the arduino wire library... i'm only sending 12 bytes of data per transmission, yet when I add more than one to the slave chain, I get very unstable results, usually crashing the i2c bus all together. I have 1.5k pull up resistors on the SDL and SCLK lines. the slaves wait for incoming bytes and drive a 7ft box of RGB LED strips (lpd8806)

master: ... ER_ARDUINO

slave (just change wire address for additional slaves): ... rduino.ino

processing sketch to send data through the master: ... EDTEST_OSC

things i've tried:
-disabling the internal pull-up resistors in twi.c and it doesn't seem to make a difference
-varying the pull up resistance... I looked at it on a scope and got the fastest response with 1.5k
-adding delay between sending commands from the master

again, using one slave on the i2c bus seems to work reliably, but when adding another it doesn't work at all....

trying to get a bunch more boxes like this up and running, and in sync! more lights == better!

any insight would be much appreciated!
Posts: 6
Joined: Tue Sep 27, 2011 8:00 pm

Re: Arduino master to multiple Arduino slaves via i2c

by adafruit_support_mike on Thu Jan 10, 2013 6:08 pm

With that many LEDs PWM-ing away, your VCC and GND lines will probably be really noisy. The problem might not be the extra slave per se, but the additional noise that comes from another panel of LEDs.

Do you get the same problems when it's just the master and a couple of slaves connected by short runs of wiring?
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
Posts: 12233
Joined: Thu Feb 11, 2010 2:51 pm