Let's Make Robots!

Serial vs I2C Motor Driver

Hi  everyone,

I was ready to get this serial motor driver from Sparkfun but then came across this I2C motor driver from Seedstudio. I would like to hear if you guys have a preference. I am new to serial communication with arduino but here is what I am thinking so far

Serial

Pros
- looks easier to code

Cons
- larger delay to recieve data?

I2C

Pros
- 2 wire bus communication
- expandable, able to add other slaves on the same 2 wire bus

Cons
- may be more complicated to program?

Also if you have any recommended reading on the subject that would be appreciated too!

Thanks

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I think you need to look up the difference between SPI and serial. Serial use 2 pins TX/RX, SPI is a different beast and uses MOSI, MISO, CS and CLK. I2C uses 2 pins, SDA and SCL. Both boards are based on the L298 chip, which I don't like. Have a good look at the datasheet of the L298. They state that it can do 2A per channel. But that is bullshit, when you are pulling 2A from a L298 channel the voltage the chip outputs drops several volts. Up to 3-4V when the chip runs hot, and it really needs a big ass heatsink to keep the temperature at acceptable levels. You can find boards based on the L298 chip for less then 10$ on Ebay. These don't use serial or I2C but you interface the MCU directly to the mcu. I have one, it's good for a low voltage motor that draws less then 1A. For bigger motors I would buy a board based on a FET based H bridge. Just my 2 eurocents...

Thank you. You are right this is serial not SPI I had mixed that up. I know you can get cheaper drivers to interface straight to the arduino but I would like to learn more about this subject as my goal is to build a "modular" robot with each sensor array or whatnot being its own independant system.

When you use the Arduino Libraries, TWI / I2C is pretty easy bacause it takes care of the (mid?) dirty protocol work. If you don't want to use a library and do it all by yourself.. it can be hard :) The TWI hardware inside the ATmega328 takes care of the plain shifting out of bits and sending start and stop bits, taking care of the acknowledge bits etc. but you still have to code up quite some stuff.