Whats the best way for the Raspberry pi to output PWM?
Whats the best way for the Raspberry pi to output PWM?
Joey, you can use the RPI for controlling servos but because the updates will not be perfectly timed and the servos will jitter because of the Linux interrupts are not perfectly regular it would be much easier to attach a micro controller such as an Arduino or some such and get the RPI communicate to this your servo positions then have the controller generate the servo PWM perfectly accurately.
Also make sure you use another power supply to power the Servos as the motor noise is likely to crash the PI/Controller.
https://www.adafruit.com/products/2348
And, if you really want to go wild, there are CNC machine controllers driven by an Arduino and controlled by a Raspberry Pi.
Thanks Guys, I've used a few arduinos to control servos and love the hardware based PWM. So along the same lines which I feel is the same subject,whats the best way to connect to the arduino that controls the servos?
Check out the following product
http://land-boards.com/content/index.php/rpi-mdi
I have one and it works great!
You have a choice of SPI, I2C or simple Serial (TX/RX), if your going to have many arduinos atached then I would suggest the I2C, each slave can have its own address and it all connects over just two wires
Regards
Peter