Printing Robots

To get to know my 3D printer I decided to embark on a redesign of Felix, a small quadruped robot.

I settle on the following set of constrains for this project:

  • It should be a bolt/screw free assembly
  • The actuators should be housed on the body, not on the legs
  • It should be possible to print it on an entry level printer with a relative small printing area – like mine =)

Screen Shot 2016-03-09 at 17.40.36
My first iteration was based on a previous parallelogram design.

But I wanted the robot to be able to crouch and lay down, and this kind of lever system restrict the range of possible movements. Besides early versions have pinched my fingers more than once, so I wanted to try some sort of enclosed mechanical transmission.

 

Screen Shot 2016-03-09 at 17.28.31

I start experimenting with other means of transmission. First, an elastic tension belt. But the belt slipped under weight. Increasing the tension on the belt provided more traction but gave the servos a hard time controlling the leg.

Next, I try a timing belt printed with Ninja Semiflex. It kind of worked but not reliably enough. Though playing with Semiflex was a great learning experience. Changing the timing belt with a peg/hole belt system didn’t help much either.

Screen Shot 2016-03-09 at 17.35.56Screen Shot 2016-03-09 at 17.36.44

 

Then I tried gears. I found a public OnShape project with a parametrised and well documented Gear generator by Brett Sutton (https://cad.onshape.com/documents/b768ab9bbb5c47e881285b7e/w/abab17d3a48c4dc989fd19d6/e/363c6baca1cb4ab8848b2c54).  To avoid complicating the gait controller I kept all ratios equal. I use tree gears to control the shin and two gears to manage the femur.

IMG_0516

To hold the leg on to the chassis I manage to print a usable threaded collar.
To make the collar I followed one of the tutorials from the OnShape learning guide:  https://www.onshape.com/cad-blog/tech-tip-creating-a-thread.

IMG_0542Screen Shot 2016-03-13 at 22.07.54

IMG_0549

Complete hind legs assembly with servo casing

 

When the femur servo moves the shin angle changes accordingly. The software controlling the leg has to take that into account and manage the position of the shin by adding a delta calculated from the existing femur angle.

Having the possibility to print and test parts allows me to try subsets of a given design or a mechanical concept. I can go through several iterations at a quick pace and learn about tolerances of the material, and how part orientation affects structural integrity and print quality.

IMG_0538

Multiple design iterations side by side

IMG_0541

Prototyping the transmission for the shin through the femur

 

3D Printing

Last year I finally bought a 3D printer. In retrospect I should have done this a long time ago.
I used to believe that you needed a high-end machine to create usable parts,
and that anything less was a waste of time. There where toys only capable of churning out useless trinkets.

Boy I was wrong. Anybody interested in mechanical engineering or industrial design should get one immediately.

I got a Printrbot metal simple kit. My appreciation for 3D technology is colored by my personal experience with this particular machine, that turned out be an amazing piece of equipment.
Sturdy, reliable, elegant and honest in its design, the simple metal has performed well beyond my expectations.

One of the reasons I was holding back my purchase, was that I was afraid that after a couple of week of tinkering, the machine will be collecting dust on a corner. But to the chagrin of the rest of my family, the Printrbot is constantly churning out parts.

Currently, I’m even considering getting a Ultimaker or a Lulzbot Taz, not to replace my Printrbot but to extend my build size and printing capacity.

Setup

At the same time last year I start evaluating OnShape a cloud based professional CAD solution. I have used Autodesk Fusion 360 on and off for some time, but the chemistry wasn’t there. I do think Fusion is an amazing piece of software and I still use their CAM and rendering features, but modeling on OnShape just “clicked” with me from day one.
My current workflow looks like this:
I’ll do my modeling on OnShape, export the part to STL, slice the part in Simplify3D and sent the G-code to Octoprint.

On a side note, before upgrading your hardware get Simplify3D!

Design

Having a 3D printer at hand allows you to develop your designs skills at a fast pace.
You can iterate over small aspects of your design until you get them right.
Say, two parts need a snap-click assembly. You can isolate the snap-click features and print only the relevant sections, until you get the tolerances and amount of material right. Then you add those sections to your main parts.
You will learn a lot about designing within the constrains of a production method.
In 3D printing, orientation plays a crucial role.
Orientation impacts the level of precision you can achieve on a given surface.
Because parts consists of layers, the forces they can withstand vary depending on the direction applied.
In order to get the ideal orientation for a critical aspect of your design, you will sometimes need to split a part into discrete components.
The filament (type of material) and the chosen extrusion settings can have an impact in tolerances.
For mechanical parts where you need a higher level of precision, you are better of with slower speeds and low heat.

When you get orientation right, the (usually unwelcome) striation,
suddenly became an esthetic asset that reinforce the structural ideas behind your design.

Holding such a piece in your hand with the original digital model still on-screen is remarkably satisfying.
It’s and idea materializing out of thin air, and it feels like magic.
If you already have or want to buy a 3D printer, don’t forget that it’s not about the technology, but about what you can imagine.

Resources

Hardware
I own a Simple metal, but have I played with, and can recommend the Ultimaker and the Taz.

– Printrbot Simple Metal

Assembled Printrbot Simple

For Europeans I can recommend ordering from RoboSavy
https://robosavvy.com/store/assembled-printrbot-simple.html

– Ultimaker 2+
https://ultimaker.com/en/products/ultimaker-2-plus

– Lulzbot Taz 5
https://www.lulzbot.com/store/printers/lulzbot-taz-5

Filament
Don’t be cheap on the filament. You are not going to use that much, and quality shows. Recommended brands are Colorfabb & Monsterfil.

First layer adhesion
I start using blue tape (3M ScotchBlue 2090 Painter’s tape from Amazon or from Adafruit ) with mixed results. Printing larger flat surfaces without warping was a challenge, until I start heating the printer bed with a heat gun.
Because the bed on the Printrbot is solid metal, it could accumulate enough heat to get me a solid foundation. But applying the tape quickly became annoying.

Then I got the Zebra Plate from PRINTinZ! I can not recommend this enough. No preheating, or taping or warping.
The only problem is that sometimes parts can be difficult to pray of the board.
If you can wait you can put the plate on the freezer for some minutes.

One trick for the first layer is to add small pieces of paper under the bed. If the first layer is too squashy you can take them out while the brim is still printing.
It not squashy enough you can remove the center clip. This will give you enough wiggle room to compensate for small z calibration issues.

CAD Software
OnShape
Fusion360
Meshmixer

Slicers
Cura
Simplyfy3D
– Even if you don’t use Simplify3D check their quality guide.
This is a great resource to understand how to improve your prints.

Print servers
Astrobox
Simple UI, to get you started but you’ll be long for more control pretty soon.
Adafruit starter package.

Octoprint
Full feature solution with lots of plugins
Adafruit starter package.

YouTube Channels
There are a lot of 3D printing channels on YouTube. My favourites:
Makers Muse
Thomas Sanladerer
Noah & Pedro Ruiz (from Adafruit)

Web sites and 3D repositories
Pinshape
Thingiverse
YouMagine

Robotic Simulations

IMG_0248There are a number of Robotic Simulation Systems out there covering a range of use cases, Smashingrobotics.com has a nice overview at http://www.smashingrobotics.com/most-advanced-and-used-robotics-simulation-software/.

But I want a simple tool to create and manage gaits and animations for legged NodeBot critters.
So I start working on a small browser-based simulation system, mostly as an excuse to explore some web technologies currently missing in my toolbox.
The system will consist of an editor to define the geometry of the NodeBot, and a timeline to control its motion.

The most common method for describing the geometry of a robot, is URDF (http://wiki.ros.org/urdf). URDF stands for Unified Robot Description Format and it is the standard ROS (http://www.ros.org) XML representation of a robot model.

IMG_0246Almost any robot can be described as a kinematic chain of links attach to each other by joints. The least amount of information we need in our system is the length of the links and the type and orientation of the joints. URDF is overkill for this project, so the internal format will be a simple JSON structure.

The editor will be able to save, edit and load geometries. It will also provide tools to customize the visual representation of links and upload STL files to replace the default boxes and cylinders.

 

The timeline will allow motion control at a higher level than single joint positioning.
It should be able to control the position of a chain’s end-effector using inverse kinematics, to calculate the rotation of the individual joints. The calculation will be perform by Tharp (https://github.com/dtex/tharp), an Inverse Kinematics solver, develop by Donovan Buck (@dtex).

IMG_0245I’ll be using Three.js (http://threejs.org) for the 3D viewer and React (https://facebook.github.io/react/) to render the UI.

CAD Mashups

In the “old days”, if you wanted to display video on a web page you have to upload it to a server
and hope that people had the right media plugin to handle your video format. YouTube changed that by not only hosting and encoding the files, but also by allowing you to embed their viewer into your website. By “playing ball” with the rest of the web YouTube became an integral part of it (cats may have played a role as well).

Something similar happened with maps. By allowing third-party websites to embed their maps (and by providing a formal API) Google Maps evolved from a novel web-version of a classical desktop-app to a structural part of the web.

Currently I’m intrigued by the future of OnShape, a web & cloud base 3D CAD system.
They are openly developing the product at a furious pace (https://www.onshape.com/cad-blog).
At this rate they could soon reach feature parity with their nearest competitors.

But what’s really interesting is that the system doesn’t doesn’t depend on a plugin. It’s all in the browser, pushing the envelope. It is entirely possible for OnShape to allow other sites to use their tech as an integrated service. And they seem to be open to the idea: https://forum.onshape.com/discussion/comment/6562#Comment_6562

Recently I ran into a relevant scenario.  “Enabling the future” is a global network of volunteers that donate 3D print time to create prosthetics for amputees. They have created a great web app, the “Hand-o-matic“. The app let you customise the design of a prosthetic hand and will mail you the generated STL documents based on the supplied parameters.
They use OpenSCAD (an open source CAD modeller) in command line mode to generate still-images of the parts (and to generate STL files).

Screen Shot 2015-08-17 at 17.23.18

And embedable CAD system could power a much richer experience for this and many other sites where there is a need for visualising and editing parametric 3D designs.

OnShape has the potential to enable a new kind of web application hybrids (Mashups), that take CAD and the Web to new places.

OLED Eyes

The update rate of my OLED screen via IC2 is to slow to do proper animation. Redrawing the eyes on a new position every 12 times a seconds was out of the question.

Luckily the oled-js library supports a scroll method. So I went with that and implement the movement of the eyes by controlling the scroll direction and timing the start-stop sequence with temporal. Because the entire screen buffer is pushed around by the hardware, the eyes don’t need to be so simplistic as I initially made them. They could as well be a bitmap with a set of mesmerising cat eyes, but for now this will do.

Electronic Etch A Sketch with Johnny-Five tutorial

I purchased an OLED screen to add eyes to Felix. To talk to the display I start playing with Suz Hinton’s (@noopkat) Oled library. I couldn’t find any project on the web using it, so I decided to make a quick tutorial to test the display. The result is a how-to build an electronic Etch-A-Sketch gizmo.
You can find the tutorial on Github:
https://github.com/Traverso/EtchASketchJ5Tutorial

It’s a repo, so you are welcome to contribute if you stumble upon any issues.

Heads-up

Sus Hinton (@noopkat) released a couple of months ago a library to control OLED screens from Johnny-five:  https://www.npmjs.com/package/oled-js, so I ordered a SSD1305 from Adafruit.

I will like to add a screen to Felix to eventually give some status feedback, but mostly to display/animate eyes. Sort of the way Baxter from Rethink Robotics does it.robot05-1347552663347

To mount the screen I designed two head pieces and cut them with on the laser-cutter.

Face3

The head is controlled by two HXT900 servos. One servo rotate the head from left to right and the other to tilts the head. The rotation is to allow the two SHARP 2Y0A21 proximity sensors to scan the room. The tilt is just cute.

Besides the screen and sensors I also added a small piezo speaker.

I’m happy with the result, now time to do the wiring.

FaceA

FaceB