Note: I'm a firmware developer experienced with sensors and networks, but not much with motors.

I am trying to build a small hobby robot, like a cat-sized spider. I am thinking of using servo motors with position control, so I don't have to use encoders to know where the motor is. Assuming six legs (I know, spiders have eight), with each leg being able to move up-down and left-right, that already translates to 12 motors. If you want to bend a knee, that gets the number to 18.

18 motors on such a small robot is overkill, isn't it?

I have thought of a couple of ideas, but not having a strong mechanical background, I cannot tell whether they are doable/sane.

One of my ideas is to use a magnet on the end of the limb (the end inside the chassis) and a small permanent magnet above it. The magnets attract each other and this keeps the limb firm under the weight of the robot. A stronger controllable magnet (a coil) would attract the limb even more and let it lift in the air. The following drawing may help:

magnet to control limb motion

This would allow the up-down movement of the leg, and a servo would control its left-right movement. However, I fear that such a system would not be strong enough to hold under the weight of the robot, or whether a reasonable coil would be compact enough.

In short, my question is, how can I control six legs each with two or three degrees of freedom with a reasonable number of motors? Is having one motor per degree of freedom the only possibility?

  • $\begingroup$ You have invented a solenoid (well, almost), congrats :) Anyway, you can use one. And in your case instead of perm magnet you can use a spring. But i think THIS would be an overkill, since these guys require much power. Use servos. Or some mechanical trick (like lifting the leg when in certain position). $\endgroup$
    – Eugene Sh.
    Commented Feb 17, 2015 at 16:05
  • $\begingroup$ I have a kitten-sized hexapod that uses 18 small hobby servos. I have a cat-sized hexapod that uses 18 Dynamixel servos. There is somebody who built a slightly larger one with 4 DoF legs using 24 servos total $\endgroup$
    – NomadMaker
    Commented Jul 23, 2018 at 18:11

2 Answers 2


I do not believe that an actual spider has the degrees of freedom you are considering. Yes, each leg can respond to a stimulus but in the case of ambulatory motion, there is some repetitive motion of the legs. Your example of solenoids, or what I call half-axis may be a solution. Another solution may be to incorporate cams or slow responsive joints. With the slow responsive joints, one can see how the speed of motor motion could cause different leg response... And still another possible solution would have a single motor drive a pair of legs or more... And still even another possible solution is to run two servo motors coupled where the pair can run multiple joints but if the motors are out of "phase" different motions can occur allowing you to mimic more axis motion.

  • $\begingroup$ I had thought about having pair of legs controlled by the same motor, and it makes perfect sense. Can you expand a bit on the out-of-phase-motors solution? I have a feeling it should be really interesting, but I cannot think of a way myself. $\endgroup$
    – Shahbaz
    Commented Feb 22, 2015 at 10:18
  • $\begingroup$ Think of the pedestrian design where 4 alternate legs are rotated by one motor and the other set by another. The legs can act as wheels. Now take a set of 4 legs and use two motors where one motor is on one corner and the other motor on an opposite corner. Now if one uses flexible linkage one could move maximum motion about each leg and get a third axis behavior. I am sure that more proficient examples could be presented. $\endgroup$
    – Doug
    Commented Feb 23, 2015 at 13:36
  • $\begingroup$ although I can't say I really understood your comment either, I'm accepting the answer as I decided to go with pairing legs. $\endgroup$
    – Shahbaz
    Commented Mar 10, 2015 at 11:54

Is having one motor per degree of freedom the only possibility?

There are many ways to use each motor for multiple purposes. My answer to a previous question has photos of gear trains that perform one function when a motor rotates one way and another when it rotates the other. You can also use clutches and/or shifters to control what function a motor drives. It may be possible to use one drive motor and one selector motor for any operation that is done for only one leg at once.

However, for a one-off construction, unless you have machine-shop skills and mechanical-design ability, it seems likely that using many copies of a cheap component (RC servos) will cost you less and be more reliable than trying to use motors for multiple purposes. The necessary mechanical parts (eg solenoids, cams, gear and belt systems) are likely to be low-volume and expensive by comparison, and might save weight but not save money.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.