Controlling servos with Pi/python, I2C? (mechanical hand)
Posted: Mon Mar 18, 2013 4:02 pm
Hi! I need some help with this project I'm planning. I have already found out about some stuff, so I may be answering to myself here... It would be great though if someone would comment on the project, if there's anything in particular I need focus my attention to.
So, I've decided to entertain and educate myself with a fun electronics/mechanics/coding project. I have a 256MB model B Raspberry Pi and a basic understandment of DC electronics and python. My goal is to make a servo-controlled mechanical hand (and possibly a full arm later). The servos would be controlled via the Raspberry Pi, perhaps with an Xbox 360 controller. With my current hand-plan, I would need at least 7 (maybe 8) servos to make five flexing/extending fingers and some wrist movement (flexion, extension, pronation and supination). The arm-plans would require at least 4 more servos (elbow flexion/extension; shoulder flexion/extension, abduction/adduction and medial/lateral rotation). The Pi has only one PWM pin, so something else is needed as well.
I did some googling and found out about this nifty I2C interface thingy that should allow the Pi to control a servo controller, such as this: http://www.robot-electronics.co.uk/htm/sd21tech.htm
There's also a code example, in C though: http://www.robot-electronics.co.uk/htm/ ... amples.htm
Even though I don't know C, controlling the servo looks quite simple and I2C should be accessible with python as well, as far as I know.
Is that it? I still need to make the Xbox 360 controller to work with python but it should be possible with Pygame.
Some questions:
-Is the I2C the way to go or are there perhaps better alternatives?
-What about the servo controller board, are there better (or cheaper) boards than the SD21? (It costs about 30€ here in Finland.)
-Do you know any good tutorials concerning the technical stuff I need to overcome during this project? (mainly I2C with python/raspi)
So, I've decided to entertain and educate myself with a fun electronics/mechanics/coding project. I have a 256MB model B Raspberry Pi and a basic understandment of DC electronics and python. My goal is to make a servo-controlled mechanical hand (and possibly a full arm later). The servos would be controlled via the Raspberry Pi, perhaps with an Xbox 360 controller. With my current hand-plan, I would need at least 7 (maybe 8) servos to make five flexing/extending fingers and some wrist movement (flexion, extension, pronation and supination). The arm-plans would require at least 4 more servos (elbow flexion/extension; shoulder flexion/extension, abduction/adduction and medial/lateral rotation). The Pi has only one PWM pin, so something else is needed as well.
I did some googling and found out about this nifty I2C interface thingy that should allow the Pi to control a servo controller, such as this: http://www.robot-electronics.co.uk/htm/sd21tech.htm
There's also a code example, in C though: http://www.robot-electronics.co.uk/htm/ ... amples.htm
Even though I don't know C, controlling the servo looks quite simple and I2C should be accessible with python as well, as far as I know.
Is that it? I still need to make the Xbox 360 controller to work with python but it should be possible with Pygame.
Some questions:
-Is the I2C the way to go or are there perhaps better alternatives?
-What about the servo controller board, are there better (or cheaper) boards than the SD21? (It costs about 30€ here in Finland.)
-Do you know any good tutorials concerning the technical stuff I need to overcome during this project? (mainly I2C with python/raspi)