I'm working on a project that will have several (on the order of 12) Arduino Mini Pro (5V/16MHz) boards measuring orientation data through a 6DOF IMU chip and all connected through a i2c bus; I plan on having a master Arduino (such as a teensy) be the one that collects all the i2c data and sends it through serial to a computer. I'm trying to run the numbers to make sure I'm not running into any bottlenecks, and I was hoping someone could double check my logic. Here goes:
1 - the orientation IMU samples at 100Hz and spits out a 42-byte buffer with the info for each sample ( see lines 120-128 of i2cdevlib/MPU6050_6Axis_MotionApps20.h at master · jrowberg/i2cdevlib · GitHub)
2 - my mini pro processes this 42-byte buffer and sends it down the i2c bus as a 14-byte packet - here i'm assuming it can do it as fast as it's receiving data: 100Hz (so does it make sense that it's sending data down at 14 * 100 = 1.4 kbyte/s?)
3 - my i2c bus is running at an ~ideal 400 kbit/s = 50 kbyte/s
4 - so if I have 12 boards running the IMUs does that mean I'm sending 12 * 1.4 = 16.8 kbyte/s down the bus?
5 - if i'm still correct, does that mean i can send data from the master Arduino to the PC at a baud rate of 16.8 * 8 = ~135baud without causing a bottleneck?
Granted, all of these are ideal conditions, but I'm wondering if the reasoning and calculations are right. Thanks for the help everyone!
Thanks Rob! Your reasoning makes sense and in all actually I think we came up with the same rough values. The only place I went wrong was the last step:
titous:
5 - if i'm still correct, does that mean i can send data from the master Arduino to the PC at a baud rate of 16.8 * 8 = ~135baud without causing a bottleneck?
I dropped the 'kilo' on that calculation; the correct value should have been 135kbps instead of 135bps
I think I'll have to look into feeding the i2c feed directly into the PC & sending a smaller byte package across. Thanks for the help!