Culture / Top Stories / Tutorials /

Off-The-Shelf Hacker: Hedley the Robotic Skull Notices Its Creator

22 Nov 2017 12:00pm, by

Much has happened in the past couple weeks with my current project, building a robot skull. The skull is operational and reliably tracks me as I move around in front of the JeVois vision sensor. Work leading up to this included mounting the skull on a pan pivot, installing the pan servo and hooking up the JeVois sensor to the Arduino. The sensor controls the servo, through the Arduino microcontroller, for basic tracking operations. Later, we’ll integrate the already installed Raspberry Pi with the rest of the system. Previous chapters of the robotic skill project appear here: [1], [2], [3], [4].

Engineering the Pan Pivot

The “giant iron vise.”

Readers may remember the upgraded two-bearing pan pivot assembly in the modded steampunk eyeball project. Two bearings gave a very smooth, low friction panning action, that was very easy to move with a standard full-sized hobby servo. Eliminating friction, throughout the system is the key to fast and precise movements.

This time, I chose to try using a single ball bearing, because the pivot needed a low profile. I had a bunch of left-over in-line skate wheels, with small ball bearings, so I just re-purposed one of those. Using a single bearing simplified the assembly and provided the required ease-of-movement.

Readers should realize that using a one-bearing design does have some slack or “play.” It wobbles slightly in relation to the pivot bolt. It’s still solid and having a slightly spastic robot skull head, that wobbles a little, is a cool feature, not a liability. Replacing the old skate wheel bearing with a new, precision ball bearing probably would remove the slack.

The bearing mounts were made from lengths of 3/4 inch copper pipe cut lengthwise and then flattened in the “giant iron vise.”

The ball bearing was sandwiched between the two copper plates and held in place by four #8-32 x 3/4 inch brass round head machine screws. Half inch holes, drilled in both plates, provided clearance for the central 1/4 inch diameter pivot mounting bolt and nut. Four #4-40 x 1/2 inch brass round head screws secured the internal brass tubing skull frame to top pivot mounting plate. The whole assembly swings on the pivot bolt that attaches to the top bracket of the robot arm.

Pivot bearing close-up

Pivot bolt on the robot arm top bracket

The skull and internal frame take almost no effort to pivot from right to left. I drilled a 1/16 inch diameter hole in the bottom bearing plate, to attach the servo drive rod. Right now I’m using a 16 gauge stainless steel wire for the drive rod, much like what you’d see on RC airplanes. Like the bearing, there’s a little bit of slack using wire and holes drilled in plates, so at some point I’ll convert to a small diameter RC car tie-rod, to tighten up the mechanism.

With the pan pivot and bearing squared away, next on the list, was mounting the pan servo.

Inside or Outside the Skull?

I weighed where to locate the pan servo for quite a while.

Mounting the servo INSIDE the skull would streamline the look of the project. I’d also have to build a coupler to drive the servo arm against the top pivot bolt nut. To prevent binding, the assembly had to be centered and fit tightly together. My steampunk eyeball used this method and was a real pain to get working smoothly. Commercial and 3-D printed pivots typically use a direct drive, so the design is very compact.

Another consideration was how to make Hedley’s jaw move using a servo. There’s limited space inside the skull, and it looked like the pivot and jaw servos would end up in the same place. There’s no way to locate the jaw servo outside the skull. What to do?

Again, I took a different approach, this time. Keeping it simple meant just putting the pan servo, behind and below the back of the skull on a bracket. The servo arm could then push/pull the pan bracket with a drive rod.

It was a fairly easy to just solder a pair of 4-inch long, 3/16 inch diameter brass tubes to the robot arm bracket and use 1/4 x 1/16 inch flat brass stock to mount the servo, between the tubes. I used two “huge looking” #8-32 x 1/2 inch brass screws to attach the servo to the brackets.

Side view of the pivot bearing, bracket and servo

Sure, the servo sort-of hangs out in space, but hey, the steampunk aesthetic encourages such things, so it works great for me.

Hooking up the Arduino

I used a regular old Duemilanove Arduino to get the skull moving. Likely, I’ll replace that board with an unused Arduino Pro Mini I have in the parts box. The big Arduino has a USB connector, so programming was very easy. The Pro Mini needs a Serial-to-USB cable to connect it to the Linux notebook and will take up very little space inside the skull.

On a good note, I didn’t have to write a program to grab data from the JeVois smart vision sensor since the code was already available for a pan/tilt setup on the website. I simply copied and pasted the code into my the Arduino IDE on my Linux notebook then compiled and uploaded the firmware to the Arduino. The wiring hookups and instructions are very comprehensive and cover everything about making a pan/tilt platform work with the JeVois.

Now, that’s what you call off-the-shelf.

It’s Alive!

With everything bolted together I powered up the JeVois by plugging the cable into the Linux notebook. The Arduino was also connected, via USB, to the notebook. A tiny serial cable also went between the JeVois and the Arduino hardware serial pins.

I also opened guvcview on the Linux notebook and switched to 640×300 resolution. This initiates the “saliency” algorithm. Think of saliency as things that attract a human’s attention.

Immediately, the skull started tracking salient things, namely me. It was cool to see the skull following me, as I moved around in front of the sensor.

That wraps it up for this week. Next week I’ll discuss the different algorithms and how they work with the skull. We have a pretty nice selection of programs, that go way beyond the simple color blob recognition, of the Pixy sensor, used in the steampunk eyeball.

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.