I'm designing a robot and I'm looking to use mainly I2C to control different sensors and stuff. I'm now looking into motors, specifically this motor. However all of the ESCs I have seen use a PWM interface. I'm wondering if there are any ESCs which use I2C, or if anyone knows of an easy way I could implement one myself? I've already seen a couple of application notes which provide reference implementations of an ESC on an AVR (AVR444 and AVR493) but they are old and use IAR so id rather not re-impliment them. I'm wondering if anyone has an already functional implementation?
To create one you could use a low power uC like a the msp430. It would be fairly cheap to build. Most of the msp430 value line chips have I2C or SPI built in. you would have to look up how to drive the brushless motor and those 2 links could give you a good start.
Use an MSP430 as an I2C slave. I just used the standard I2C code that you can download on the TI wiki. It doesn't work for MSPGCC though and you need to use a chip that supports I2C, such as an MSP430F2013 (which you can get free samples of). Check out the sample code here or you can download all the samples at http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_(MSP-EXP430G2)?DCMP=launchpad&HQS=Other+OT+launchpadwiki#Download_all_MSP430G2xx_code_examples
Just set the PWM duty to whatever byte you receive from the master.
Hi not to be particular but too many people are stating that any uC can generate PWM signals. That is true but almost all ESCs require PPM signals like what are used to drive servos. There is a big (big enough to damage an ESC) difference.
Another vote for using a low power uC! I would suggest a small PIC - it would be easy to write some software to convert I2C to PWM outputs as these devices have good built peripheral options.
The advantage is you can also implement a local control loop by measuring feedback from the A/D port of actual position or velocity and use the I2C as a setpoint with a small PI or PID control loop. And presto you have a closed loop controller!!
There is a similar question here. This was my answer:
Here is an introduction to electronic speed control systems: http://www.stefanv.com/electronics/escprimer.html
Actual design depends on the type of motor you want to drive. A 300A high-torque gear motor is much different from those tiny featherweight propeller motors. At the heavy-duty end of the scale (300A) is something like this: Open Source Motor Control. All designs are online and there are a few articles explaining what the heck is going on. At the other end of the scale are small prop motors, like those in the MikroKopter.
The motor you chose is sold with an ESC here. This controller is designed for 35A continuous, 190A peak, so dinky designs won't cut it. The OSMC page has several designs that would probably do it as well, but I believe they are all PWM input. Even the smallest and cheapest of microcontrollers should be able to handle I2C to PWM conversion (e.g.: ATtiny family).