I was wondering if something like the Adafruit 16-Channel 12-bit PWM with I2C interface, could also drive dc motors (3-6V)? and perhaps control their speed?
This way I can save some pins on arduino and just use I2C.
If it's possible, can it do servos and dc motors at the same time?
Not without a h-bridge for the motors. The Adafruit board could be used to control the enable pin of a h-bridge and probably the direction pins on the h-bridge but the board can't drive the motors directly.
DuaneDegn:
Not without a h-bridge for the motors. The Adafruit board could be used to control the enable pin of a h-bridge and probably the direction pins on the h-bridge but the board can't drive the motors directly.
Cool, that's still not bad. Being able to control the enable pins with this board will save me 2 pwm pins on arduino.
Are there dc motor drivers that work with I2C? I couldn't find one. Edit: Nevemind, found some!
Dagu has a bunch of boards which can be programmed with I2C slave firmware. Once programmed these boards act as an I2C controlled motor driver.
Dagu's Mini Driver. I know a lot of people really like this board. I think it can control two small motors.
Dagu's ComMotion Shield. This can control up to four DC motors and had firmware which will uses feedback from encoders. This is the only board listed here I own.
Dagu's TRex. SparkFun no long sells this board but I believe it's still being made by Dagu.
I believe all the Dagu boards can be used without an additional microcontroller or they can be used as an I2C slave. I believe there is also firmware which allows many (maybe all) of these boards to be used with a serial connection to give commands.
I think just about any Arduino or clone could be used as a slave motor controller. You would just need to use the appropriate firmware. You would also need appropriate h-bridges for the motors you plan to use.