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.
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.
To mount the screen I designed two head pieces and cut them with on the laser-cutter.
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.
Mini Felix is a noisy and jittery fellow. Walking is ok, but doing animations with it is quite annoying. Instead I decided to assemble a new chassis using the latest design and use it to test the animation tool. At the same time I wanted to document the assembly so I can write a step-by-step tutorial. Putting it all together took about 4 hours and there are a couple of things I can do to improve the design to ease this process. Today I did the soldering and connected the servos and was able to start playing with the animation editor. More on that later.
This week I got a bunch of 9G servos and some PMW motor shields from my local Adafruit pusher m.nu. I want to use them in a smaller (more affordable) version of Felix.
The redesigned chassis is just a scaled down version of the current geometry, but I have to work on the casing for the electronics. There is not much space available for a Uno, a shield and a battery pack. If I lay the electronics down flat, Felix looses it’s slender figure and looks more like a turtle. Currently I’m working on a vertical arrangement, which gives him a unflattering hump, but he seems to prefer that.
Before I settle/refine the design, I have to test how it affects Felix balance during the gait.
I’ve been working today on the design for Felix, trying to tidy up the space for the electronics. The new body template is designed to fit an Arduino Uno board and an Adafruit 16×12 servo shield.
I’m trying to get up to speed with Autodesk Fusion 360. It’s great software, but to do this sort of stuff I keep coming back to OpenSCAD.
In order to get some “Fusion time”, I exported the template from OpenSCAD to STL format and uploaded it to Fusion 360. I also downloaded 3D models of an Arduino and a HiTech Servo from GrabCAD.com. Then I spend some time playing with the render:
You can grab the OpenSCAD files from the repo:
and the DXF and SVG templates as well:
I still need to add a license file to the repo, but it’s a regular MIT license.
And speaking of CAD, I recently wrote a post for Makezine: http://makezine.com/2015/04/20/understand-1700-mechanical-linkages-helpful-animations/. It’s a short highlight of Mr. Đức thắng Nguyễn’s YouTube Channel. The channel is an amazing collection of complex animated mechanism he has documented with Autodesk Inventor over the last 10 years.
You can see a clip of Felix and the dashboard here:
The code is now on GitHub: https://github.com/Traverso/JSFelix
I will add the template files for the design to the repository as well.
Yesterday I spend sometime at my local #fablab #fablabnordvest learning to know their Chinese Laser cutter. I used 4mm. white acrylic.
The design was made with #iDraw and exported to SVG (You can download the SVG here Body.svg). But my Chinese friend only speaks DXF or AI. After importing the converted AI file, I realised that I needed to do some cleanup of the path. Some of the patterns appeared twice(?).
Anyhow, it’s always mesmerising to watch a machine do it’s work.
After playing with the assembly, I want to redesign the way the lid is attached and I will like to make a smaller version for 9g servos. Probably the easiest way to do this is to use OpenSCAD to create a parametric model with the size of the servos as a dynamic variable, and then create a projection which I can export to DXF.