About this Blog

This blog is an engineering log book; for me to record the progress on my many projects and hopefully to inspire you.

Some projects do not get off the ground, they remain as interesting thoughts, a select few get some work done on them, even fewer get close to completion, and none get completed because unfortunately I subscribe to the theory: "If something ain't broke then it doesn't have enough features". If you'd like to collaborate on some work to get something to a useable state then send me some communications.

Being a blog, posts are listed in chronological order. However I usually have multiple projects on the go and will try to post some of my earlier work. With this in mind I'll try to add labels to each post so all posts relevant to one project can be easily extracted.

Enjoy and happy hacking.

Wednesday, August 20, 2008

Truly Digital Servo Project

So I have these servos that I've used for a couple of projects. They are labeled "Tower Pro MG995". They are high torque (~15 kg/cm) servos with ball bearings and metal gears - perfect for robotics. Best of all they are cheap, I've seen them on ebay for < 10 USD, shipped from Hong Kong. They are also often re-branded by RC hobby-shops, a typical example is from rcnz.com here in Christchurch, NZ.

The control of RC servos in robotics projects is an often discussed problem, and it is fairly easy to provide the pulse width control signal from a microcontroller. There are plenty of websites discussing this. One thing that they don't tell you is that often they can be updated at more than the standard 50Hz, I have successfully run the MG995 servos at 60Hz (to match the 30 fps frame rate of a webcam).

However this PWM control is a bit of a drag. What if I want:
  • lots of servos in my system - requires lots of control signals.
  • feedback of where the servo actually is - have to add an extra wire to the internal potentiometer and read with an ADC.
  • control over the velocity profile of the servo's stroke.
The solution is to hack the internal control of the servo. Have a look at the openservo.com project where they have developed completly new electronic internals for standard servos. They seem to have done a very nice job but the 37 USD is a little steep for me. I may try and leverage some of their code though.

So what do I want?
  1. A bidirectional serial communication protocol - using a single wire, preferably on a bus system.
  2. A better control system - able to be given not only a position set-point but a velocity set-point. So looking at a state-space control system, with progammable gains to allow the control to be matched to the dynamics of the system it is connected to. Maybe even with some system identification or machine learning thrown in.
  3. Use a minimum of extra-parts. Because I am cheap and being in NZ makes anything but the simplest of parts difficut to obtain without a $50 shipping charge.

No comments: