Top Stories

Hedley the Robotic Skull’s Orthognathic Surgery

18 Apr 2018 1:00pm, by

My latest project, Hedley the robotic skull, can pan back and forth using a standard-sized hobby servo. The servo is hooked up to the Arduino brain in the top of his noggin. Data is fed from the JeVois machine vision sensor located in the right eye socket into the Arduino, thereby tracking objects within his field of view. The tracking-panning scheme has been moderately successful and will get better as I gain experience with the artificial intelligence (AI) algorithms built into the vision sensor.

Wouldn’t it be fun if Hedley could move his jaw and talk?

Maybe he could introduce me during my upcoming OSCON tech talk. Or, what if we integrated the Alexa framework, into the skull so he can answer questions? Hedley with an Alexa voice? That would be rich. Could we change the voice to something menacing or manly? Hedley would have a lot more personality if he could turn his head and speak.

Modding the jaw so it pivots (the orthognathic surgery part) and hooking up a servo is a good place to start to get Hedley yacking. This week we’ll go through how I grafted in a jaw pivot, what design decisions were made and look at testing code that exercises the pan and jaw servos.

The Jaw Pivot

In stock form, Hedley’s jaw moved up and down on a couple of 1/8 inch diameter plastic pins that went through holes in the side of the skull. I had no way to drive the plastic pins with the servo, so decided to replace them with a brass pivot tube and a couple of sleeves for bearings. There is a lever-arm on the pivot tube with a connecting rod to move the jaw with the servo arm.

I cut the pivot tube to stick out about 1/2 inch outside the skull, on each side. The final measurement came to about 4-3/8 inch long. I also cut two 1-1/2 inch long sleeves, to act as pivot bearings from slightly larger diameter tubing. The sleeves were then secured by a couple of V-shaped brackets attached to the skull’s internal tubing framework. A piece of 10-gauge solid, bare copper wire worked great for the V-brackets and as additional crossing bracing. To make everything line up, the sleeves were placed on the tubing before I soldered them to the brackets and framework.

V-bracket, pivot tube, connecting rod and bearing sleeve

Here’s a close-up internal view of the V-bracket, sleeves and pivot tube. You can also make out the lever-arm, connecting rod and how it was attached to the servo.

Jaw end bracket

I originally made the lever-arm clamp to the pivot tube with a bolt and nut. I wanted to be able to take the pivot tube assembly apart. Sadly, the jaw required more torque than this particular clamp arrangement could handle, so I ended up soldering the lever to the tube. Sometimes we have to make compromises in design, in the interest of keeping the project moving. A good plan, if we ever go into production would be to modularize the pivot tube, sleeves and V-brackets together, making the whole assembly removable. Or, perhaps a 3-D printed pivot tube bracket would work better. Possibly an idea.

The jaw end brackets were made from 3/16 inch diameter brass tubing along with some 1/8 x 1/4 inch flat stock. They were soldered to the ends of the pivot tube and bolted to the back of the jaw.

Servo and Linkage

I chose a standard-sized hobby servo to actuate the jaw for a couple of reasons, including torque rating and price.

Actually, the decision is pretty easy. Hobby servos are commonly available in two off-the-shelf sizes, standard and micro. The standard size generates more torque than the micro. I needed a servo that would move a plastic jaw through about 15 degrees of rotation, with enough speed to look like it was following a spoken word.

I had used a micro-sized servo to tilt the steampunk eyeball mechanism, in a past project. Back then, the torque requirement was very small because the servo was mounted inside the eye itself and was pretty lightweight. Here are the specs for the E-Flite S60 micro-servo.

E-Flite EFLRS60 - micro
.10 seconds/60 degrees (at 4.8 Volts)
12.5 oz-in (at 4.8 Volts)
.93 x .39 x .74 in.

The torque rating of 12.5 oz-in is pretty low. The speed is good at .10 seconds to move through 60 degrees. These servos are designed for small, lightweight model aircraft. They move small control surfaces and need a quick response.

I used a very common Futaba model S3003 for Hedley’s jaw. This servo has nearly 4 times the torque rating at half the speed of the E-Flite. They are made for RC cars and larger model aircraft. Check out the specs.

Futaba S3003
.23 seconds/60 degrees (at 4.8 Volts)
44.4 oz-in (at 4.8 Volts)
1.6 x .8 x 1.4 in.

Did I measure how much torque the jaw would need? No. While it would be easy to rig up a test stand to find out how much actual torque was needed to pivot the jaw, it really wasn’t necessary. With experience, you’ll develop a feel for what will work and what won’t. For one-off prototypes, you can usually guesstimate. Adjust as needed.

The other reason to use the S3003, was cost. It has plastic gears and plastic bearings so the $16.99 retail price is about average for this kind of servo. The hobby store also had the same sized servo with metal gears and metal bearings for $27. I didn’t think the loads generated warranted the extra $10.

One of the holes on the servo lever arm, had to be enlarged to accommodate the aircraft style connecting rod’s 2 mm diameter attachment screw.

There are also two types of connecting rods. The aircraft types are slender and use small diameter attachment screws. The RC car connecting rods, (aka tie rods) are larger and use bigger screws. You might consider the RC car rods for larger projects.

There was enough room, inside the skull, above the pan servo to mount the jaw servo. A couple of L-brackets made out of 1/16 x 1/4 inch brass flat stock were bent-up and soldered to the internal skull frame to hold the servo.

Here’s a picture of the jaw servo bracket and connecting rod.

Jaw servo bracket (top)

Lastly, I ginned up a quick test program to run the jaw and pan servos through their paces. It is just the stock servo-sweep Arduino example code modded for two servos. The skull pans to one side, the jaw opens and closes twice, then pans back the other way. The cycle then repeats.

The servos are wired to +5 volts and ground on the Arduino. The jaw servo data line goes to PWM pin 4 on the Arduino, while the pan servo data line attaches to PWM pin 3.

/* Sweep
 by BARRAGAN  
 This example code is in the public domain.

 modified 8 Nov 2013
 by Scott Fitzgerald
 http://arduino.cc/en/Tutorial/Sweep
*/ 

#include  
 
Servo servojaw;  // create servo object to control a servo 
Servo servopan;
                // twelve servo objects can be created on most boards
 
int posjaw = 0;    // variable to store the servo position 
int pospan = 0;
 
void setup() 
{ 
  servojaw.attach(4);  // attaches the servo on pin 9 to the servo object
  servopan.attach(3); 
  
} 
 
void loop() 
{ 

// jaw movement -----------
  
  for(posjaw = 124; posjaw>=100; posjaw-=1)     // goes from 180 degrees to 0 degrees  
  {                                  // in steps of 1 degree 
    servojaw.write(posjaw);              // tell servo to go to position in variable 'pos' 
    delay(10);                       // waits 15ms for the servo to reach the position 
  } 
  
  for(posjaw = 100; posjaw =100; posjaw-=1)     // goes from 180 degrees to 0 degrees  
  {                                  // in steps of 1 degree 
    servojaw.write(posjaw);              // tell servo to go to position in variable 'pos' 
    delay(10);                       // waits 15ms for the servo to reach the position 
  } 
  
  for(posjaw = 100; posjaw =50; pospan-=1)     // goes from 180 degrees to 0 degrees  
  {                                  // in steps of 1 degree 
    servopan.write(pospan);              // tell servo to go to position in variable 'pos' 
    delay(10);                       // waits 15ms for the servo to reach the position 
  } 
  delay(1000);
  for(pospan = 50; pospan <= 120; pospan += 1) // goes from 0 degrees to 180 degrees
  {                                
    servopan.write(pospan);              // tell servo to go to position in variable 'pos' 
    delay(5);                       // waits 15ms for the servo to reach the position 
  } 
  delay(500);
} 

Going Further

Building Hedley is a lot of fun. When devices move and “react” to their surroundings, people start to think they have a personality. I want Hedley to have as much personality as cybernetically/humanly possible.

I envision we’ll use some kind of text-to-speech program on the Raspberry Pi, piping the output to a speaker, to give Hedley a voice. How to get the audio to move the jaw is still a bit up in the air. Can we use the sound amplitude (loudness/softness) to drive the servo? Probably. Would it be more realistic to try to keep the jaw servo in sync with various speech frequencies? Good question. That’s something to explore.

Stay tuned for the ongoing developments with Hedley the robotic skull.


A digest of the week’s most important stories & analyses.

View / Add Comments

Please stay on topic and be respectful of others. Review our Terms of Use.