Wednesday, April 23, 2008

How to solve it

My apologies to George Pólya for quoting the title of his jewel of a book, but "How to solve it" made an indelible impression on me when I read it decades ago. I wish I had had him as my math teacher instead of the monster that expelled me from his class for having the nerve to record his "lectures" (which I did not understand) in what must have been one of the earliest portable recorders (the size of a worker's box lunch) that my dad, a very forward thinking man gave me as a present so I could use technology to help me in my studies. This wicked teacher foamed (he became redder than he was and I remember his veins bulging in his neck) that my intent was to make money with his awful expositions, when my only intention was to listen to it again at home and review the parts that were unintelligible to me. Remember it was the time (1960's) of slide rulers and solving logarithms, square roots etc. with pen and paper! and teachers which threw solid wooden rulers at students if they failed to pay attention.

In any case, this is how I went about it:

The two control strings for the head (1 and 4) allow it to not only turn left and right, but as I said before to tilt sideways and bow as well. In a traditional marionette these strings are played like an instrument, varying the tension, twisting and plucking.

When the marionette needs to kneel or jump etc. you are not really concerned with this since the entire body, head and all is balanced by your hand, which uses your own personal embedded experience as a subject of gravity to effect movements which prove extremely hard to program convincingly. Imagine for example that you want the character to tilt his head slightly in an inquisitive way while bowing and kneeling at the same time. If you try to break that into individual movements performed by individual muscles of your hand, fingers and arm you will picture the complexity of the apparent simplicity. Don't forget that I said tilt his head in an inquisitive way!

So, in my dream I must have followed some of the principles Pólya suggests to poor souls in distress, like for example:
  • Look for a pattern
  • Draw a picture
  • Solve a simpler problem
  • Use a model
  • Work backward
  • Use a formula
  • Be ingenious
The 'head' strings reach the horn which would turn the head left and right and you would think that is where the strings should end. Then I visualized (and this is what comes from the dream) that the strings at that point corresponded to my left hand fingers twisting them while my right hand controlled the other movements in unison.

So I let the strings continue on to the other 'hand' which would pull or let go to let the gravity do its thing. The combination of these elements (including the most important, gravity) give you a very rich and expressive palette of head "language". This of course I cannot convey simply by pictures, but I will eventually post a video of the movements.

The 'other hand'

I continued raiding my wife's sewing supplies and used this perfect and beautiful spool, which I epoxied to the servo horn (you can still see behind the spool the gray irregular shape of the rock hard Apoxie that I used. Need to refine that.)

There was another problem, which because of its apparent simplicity tends to be forgotten until it is too late. Remember the analogy with a string instrument. So it is that you must tune the strings of your marionette to the perfect tension which allows precise control while at the same time giving gravity and inertia room to infuse the movement with the illusion of life.

Easier said than done. First of all the strings are very thin and usually waxed or Teflon coated to prevent fraying. That makes tying and untying knots practically impossible. Then consider the awkward and tight places where the strings are connected. Finally, size. Things that are very easy at a human scale become wickedly difficult in Lilliput.

Bowl of Sushi by Hiroshige (Edo Period)

My love of sushi came to the rescue. Chopsticks! the bamboo sticks have the right diameter, are pleasant to touch and sight (and taste) and its transversal structure provides the friction necessary to prevent the 80 lb. Teflon string from sliding. This was my prototype but although it stopped that string diameter from sliding, my preferred string is .006" Fireline, which is a braided bead thread very strong and resistant to abrasion (it is used to weave the smallest glass beads). This string just went through my tensioner like a water snake.


So I refined my prototype incorporating an opposing path that effectively holds it in place. And what is more important and the reason for this exercise, it is easy to adjust as needed, to tune the strings of the instrument.


Tension is good when needed

Monday, April 21, 2008

Sense and sensibility and the Oneironaut

Visualizing the user interface for servo control

The nervous system is the current step (by step). Working on the sensors and on the beacons has given me a clearer understanding that there is nothing I know. Still very very far from The Docta Ignorantia.


Here is our microprocessor stack composed of two Make boards which were our final choice. The boards are highly integrated, very easy to interface and simply well designed. The only drawback was the limitation of 4 servo ports per board. I decided early on that 8 motors were as many as I wanted to use, both for practical and symbolic reasons. Four is the symbol of man generated by the trilogy which comes from the duality contained in the unity (bear with me, it is a stream of thought). 8 represents the power of the king in chess, and the queen in all her potency and (coming down to earth), I could only afford two Make controllers anyway! So, there. I had to do it with only 8 motors, period.

Then came the IR beacon circuit. That was a lot of fun to build although it took a lot of trial and error to do it with kitchen stuff. DYI instructions stipulate in no uncertain terms that you should use glossy inkjet paper and ONLY print with a laser printer, then iron transfer into the copper plate. Well, after many frustrating trials, botched plates and burnt fingers we (Philip and I) decided to try swhat you are not supposed to do. Went to our local print shop and had the circuit printed on their glossiest color laser paper with their fancy color printers. That worked beautifully. It transfered absolutely perfect the first time around. The entire coating of the paper stuck to the plate, and I am sure more than one has though that was wrong, but after soaking it in warm water the paper peeled off like a decal and left an impecable mask.

So here is Philip, which was the instigator of the whole DYI circuit idea cooking up the circuit with a coctel of muriatic acid mixed with hydrogen peroxide. In a few minutes our circuit was done. As usual he is multitasking with his totally hacked IPhone.




Guess where Philip is from...



Philip in my studio dremelin the circuit holes while Castro look approvingly at our socialist methodology.

He got a kick out of my retro-futuristic glasses. You look awful in them, but they have a variable focus that allows you to magnify minute stuff or read a newspaper across the room.



This section needs proofing and revising...tomorrow, after I give my class and deal with insane bureaucracy.

After dealing with the obvious and easy choices, like the arms (4 motors there) I realized the problem. My monster servo would lower the body, yes. But what about the head?, the shoulder strings? (they allow the marionette to turn the upper part of the body to face in another direction). They had to be lowered at the same time! otherwise I would need many more motors and complex programming to synchronize all these elements.

So the idea of the elevator was born, with all its ancillary problems, weight, friction, balance, stability, randomness, etc. At first I built tracks to guide the (square!) rods up and down. These rods (quads?) support a platform that houses the 3 remaining servos. The problem is that the head has more than one degree of freedom of course. It not only has to turn left and right, it also has to tilt sideways and bow as well. Or pitch, yaw and roll if you will.

All these simple motions are trivial (if difficult to master) in a marionette. Then I had the shoulder controls to turn the body around; how to do all that with 3 servos and control the wanted nuances?

After about two weeks (which is the time I have not posted!) I stumbled upon the solution, where but in a dream!. It is pretty obvious that we work as hard in our oneiric universe as we do in our waking world.

Next morning I skeptically went to examine the contraption with the suspicion that, like many other "great ideas" conceived in la-la land it would turn to be impractical, impossible or just plain turdy. It actually took me a while to connect my ideas with the reality of the mechanics, something was missing which I had apparently forgotten. Then, all of a sudden I saw it! make one of the servos perform double duty.

I cannot even explain how I visualized it. It was so obvious, simple, and yes, elegant. The only bummer is that I feel it did not come from me but from the collective unconscious debris. I just picked up the pieces.

I will post some pictures to explain how it works.

Monday, April 07, 2008

The Exoskeleton

I have been literally immersed in a virtual reality. Working at a small scale forces you to adjust your senses and perception of self. Then you suddenly realize that somehow your fingers are too big, your body too clumsy, your eyesight not good enough to deal with a Lilliputian world. Fortunately our cyborgian self comes to the rescue and we make use of the many attachments and extensions that makes us makers of things, creators of our own destiny. (I might believe that someday...)

All the mechanics are functioning, at least by hand and in individual servo tests. It has been very hard to deal with some problems, most of which have to do with balance and friction, not of the marionette which is very fine, thank you, but of the mechanical elevator that raises and lowers most of the machinery so that the head can turn, the body express and the arms move while at the same time the Creator changes its position , kneel, stand up etc.

This problem is not so evident at first, specially if you are used to manipulate a puppet or marionette. Since your hand has a mind of its own it is hard to consciously realize tha amount of intelligence that it has to deal with all these complicated maneuvers. As you move the "plane" controller, pull the strings etc, you hand raises and lowers automatically and compensates this movement by tilting, rolling or yawing the controller.


Arm control assembly

Potentiometer as high precision encoder

However, when you have a fixed structure that supports the controllers it becomes evident that you need more than one motor to actuate on any given movement, because each movement influences the rest. Of course, as Dwiggins taught us, you should let gravity do most of the work, since she knows all about the laws of physics, but then there is the issue of correspondance, economy, efficiency and why not, elegance of design. Simpler is better. The complexity of simplicity.

Detail of the servo with its sturdy mounting plate

Assembled arm control with lead counterweight

Lead counterweight and potentiometer encoder


Give me a big enough lever...


The real servos finally arrived! here is the Hi-Tech HS-805BB Mega Giant Scale Servo being tested. I simply attached one of the many great horns and plates that it comes with to my fish-line spool, using its own screw and voilà! 19.8 / 24.7 kg*cm (4.8V/6V) of torque! It is temporarily held in place with straps as you can see because as you can imagine the square holes of the Vex plates don't line up with anything but their own stuff (I promised I would stop bitching about it!)

For the rest of the controls I am using the
HS-645MG UltraTorque Metal Gear Servos that have 7.7 / 9.6 kg*cm (4.8V/6V) of torque, very much on the safe side.

On the left of the picture you see Vex's red optical encoder which I planned to use to determine the position of the continuous rotation motors that lift the arms, but again, not even the extremely versatile Make controller could recognize the simple signal. I am sure it can be done but why waste time. I ordered a set of high-res 10 turn potentiometers that are not only more precise but can "hold" the last position even when the power is turned off.

Divide and conquer?

That seems to be the design philosophy of the VEX guys. I promise (well, a weak promise) that I won't waste more time bitching about their horrible "close source" design decisions. But someone has to say something. Of course I used their stuff to prototype my project since I had bought 5 or 6 kits with the hope of actually using them for the final project. Now, to be fair, their nuts and screws are first rate and I have no complaints, as well as their cute chain transports if you use their square shafts of course, but the rest...


It was obvious pretty soon that the electronic/hardware side would not work due to their very flimsy nature and weak linkage (or lack of it). Take their servo for example. Not only is it far from standard, so that you cannot mix with any other brand, but it lacks fundamental elements like a horn or attachment plate of some sort so that you can drive something more than their absurd square shafts. Guess what, you cannot even screw anything to it, you can only use their "clutch" (the small cylinder with a short square stub) to attach another square shaft to drive any square holed device! BTW the clutch and therefore anything attached to it, will simply fall off if you turn it upside down. Am I missing a screw here?

You cannot see it in this next picture, but those arms or extensions that I need to drive the limbs of the marionette with have as much strength and stability as an apple stuck on the tip of a drinking straw and balanced on the edge of a glass, can you picture that? perhaps David Copperfield could use such a trick. The main reason being that as I explained, the servos connect to anything else through the wimpy clutch mechanism that cannot stand any side pressure, only direct transmission to a wheel at the most.


To be fair, after a great deal of literally hacking away with a saw, drilling and cutting and bending, I was able to put together a somewhat functional scaffolding for the stage. If I had the money I would simply make everything from scratch out of aluminum and some steel pieces. And, yes, chuck those servos away. I opened one to convert it, I was so shocked by the poor craftsmanship inside, probably built on a Chinese sweatshop (badly soldered by hand), that I just closed it and proceeded to order a set of excellent Hi-Tech servos.

Snap to grid

Serious construction begins. This has to be, want it or not, the last stretch of the building process for the Creator stage.

But before I begin this section I want to share a tip that I take for granted, but friends that see it are always amused by it. You know that when you work on a project involving dozens or hundreds of small pieces, screws, washers and what not, things like to go amiss. Lost socks pale in comparison, specially when you lose a servo screw that you won't find in any hardware store (unless you live in the Bay Area, how I miss that!). And ordering a screw or two online just does not cut it.

So, I use a big magnet block (which I don't remember where I got) and simply and literally throw all those little pieces at it, even from quite a distance and it just snaps them as they try to go by. Sometimes I am working on an odd position, (upside down ?) and as I disassemble something, which happens more and more often as I try to refine my design, I start collecting all these little pieces in my hand and mouth that are eager to disappear in the cracks of the floor or my stomach. Well, just toss'em up like a chef flipping pancakes towards the magnetic field and , snap! they are not going anywhere.

Now, mind you that this is not a very powerful magnet, like those neodymium or ceramic magnets that you find in hard drives otherwise getting a washer back would probably be impossible, but it is strong enough to hold quite a bit of stuff. Sometimes you cannot even see the magnet anymore, just a weird nut screwy sculpture. I'll add a pic like that so you can see it.

Sunday, March 23, 2008

Starman

. ________________ Sir Arthur___ (AP photo files.)

Linkage represents power, status, success of one sort or another. Of course this has always been the case, particularly in the animal world, but I suspect in the uni-verse at large as well.

That is how our brain becomes conscious, how memories evolve and how life flows in the eternal dance of chaos and order, the breathing that holds the secret of our own existence.

When I think about the present state of technology, in this world of social networking, global communication, interplanetary travel, WWW,VR, SL and all these some basic, some quite indispensable parts of the life on planet earth, I remember, from the billions of people, one, whose influence and vision, some would say aura, inspired the creation of so many things that now we take for granted.

A person that inspired, through his writings, a Tim Berners-Lee to invent the World Wide Web in 1989. Who in 1945, proposed the idea of communications satellites that could be based in geostationary orbits around our planet, an idea laughed about by the official science of the time. After all he was only a writer.

A writer for whom spacecraft, asteroids and even a dinosaur has been named. A writer whose ideas, that is, the ones that have not been realized yet, are still considered far fetched even today, the stuff of dreams or sci-fi.

His hundreds of books and thousands of short stories constitute a cloud, a cluster or galaxy of links, of neuronal connections, of firing synapses that influence the world and will continue to do so for perhaps millenia, since his ideas travel as we blog, beyond our solar system into the universe he so lucidly dreamed about.

Who is this great human, whose passing through has barely been noticed in obscure obituaries as if we had nothing lost ?

Perhaps we have not, since he gave us more than we can take in generations to come. Besides, as he himself, quoting Rudyard Kipling said:

If I have given you delight
By aught that I have done,
Let me lie quiet in that night
Which shall be yours anon:


And for that little, little span
The dead are borne in mind
Seek not to question other than
The books I leave behind.

._______________________ From The Appeal

Thank you Sir Arthur, the world can or could be a better place because of you.

Wednesday, March 12, 2008

Command and Control

The recent integration of the Make controller with Flash, its scripting language and image processing capabilities, solves many of the problems I was dealing with, from the choice of microcontroller to the controlling software.

The program currently reads the position of the performer on stage and even the distance from head to ground, all with only one cheap webcam as an input device. There is so much information that can be acquired through image analysis that effectively eliminates the need for a variety of sensors that I had planned to use.

The only limitation is the amount of servo ports in the controller. I will have to daisy-chain at least two, to handle all the servos I think I need.

The servo that supports the weight of the marionette most of the time needs much higher torque than the ones I have. I have not calculated the minimum torque yet, but need to do that ASAP to order it and start testing the software that Philip and I are designing. I am very excited and happy with the progress so far. At first I had my doubts that the solution he proposed would work, but now I see it can, and in a very simple and elegant way.

The two sizes of spools we currently use (5 and 8 cm diameter) happen to be just perfect to provide most of the travel that I need without using continuous rotation motors instead of standard servos. This simplifies programing. We found out by testing a variety of "identical" modified servo motors that the speed of rotation, given equal parameters, is quite different, which implies writing routines to address each one of them to synchronize, a royal pain!

The fish-line spools with their bushings in place

The only continuous rotation motors I need are for the arms since they travel a much greater distance.

What was I thinking...


Just to finish the pulley rant, I created a template to drill the round wood pieces that I bought (99c/bag) at the local craft store. They seemed perfectly round in the bag...



Much to my surprise (am I new? or what!) they were far from round, I found out when I tried to fit them in my template. To make it short, I sanded them enough to fit, drilled and glued them together. As I was venting my frustration for not finding proper pulleys, my wife who works next to me in the studio, asked why I did not use the spools that she uses for her beading or the ones that I use for stringing (fish line) the marionette.

DUH!

I must be very tired, been sleeping 4 hours max for months now. why didn't I think of the spools which were in front of me? So, here, I have a steady supply of the perfect size/weight spools.


I only needed to create bushings to adapt to the servos, real servos that is, not the modified ones by Vex which of course have a "proprietary" square shaft that only fits their kit stuff, I still cannot get over their lack of foresight and integration with the rest of the world. So much for Open Anything! Dean Kamen, you know much better than that!

I created the bushings with an aluminum rod that happened to have the right diameter.
I drilled the shaft hole to attach the Hi-Tech servos I will probably use, notched them to hold the adhesive better and epoxied them to the spools.

Saturday, March 08, 2008

patterns in the weather

A nonsense name for a nonsense week. I feel like I am under my own non-disclosure agreement since for my own protection I must keep quiet about a change in the weather. Can't see a safe haven yet...

So as it is true with all our daily activities, some things take precedence at the expense of our own life. And that to me is very expensive indeed.

On the banal but also symptomatic stage of the general deterioration of ethics and quality in our world and in particular where I live, I received a large package on the mail that I had no clue as to the contents, since I did not remember ordering anything as large...

Since I don't have a lathe or access to one at the moment I thought it would be easy to find the small pulleys that I urgently need for my project. As it happens, one of the most difficult things to find have been the pulleys or sheaves needed to raise and lower the marionette's articulations.

Why this is I don't understand. No robotic store or company, specially at the "hobby" or craft level carries such a useful and logic device. Can someone explain?

After much searching I finally found a place that purportedly had what I needed. Based on their description I bought 6 little sheaves to test. Here is what I got!

A ridiculously large box with 6 little pieces of crappy malformed plastic. Supposedly this place, whose motto is "Leaders in Education" wants to lead students, in step with the current government mandate to the lemmings paradise.

I imagine, they consider children or students simple ignorant people who do not deserve to touch anything decently made that might, just might teach them something. That way they learn to accept as a fact of life the terribly poor quality of life that education (with few exceptions) in this country provides to the millions, ground and trained through the system to accept mediocrity as the norm.

After all mediocrity and ignorance make good cannon fodder.


I ship the crafts I or my wife make all over the US and the rest of the world. One pound, Priority Mail costs $US 4.80 ...the shipping of these few ounces of bad plastic which cost US$ 1.50/each, cost US$ 7.oo for a total of US$ 16.00 I guess the huge box accounts for the "handling" fees.

I understand this post is a waste of everyone's time. But it is also part of the project. SO back to a more positive track I decided to build my own pulleys with wood. I will have to shape them with a sander given the lack of a lathe, but that will be OK.

Friday, February 22, 2008

Stage Hands

Assembling the motion section and adjusting the elements so they fit.

I love that time when you have to finally begin working on the stage for a play. It means the performance is imminent (unless the producer pulls out!). It is also time to listen carefully to the director, designer, performers, lighting and sound people and stage hands and riggers to make sure all points of view are represented and taken into consideration. (if only it was like that in real life...)

Since the hole pattern in the VeX system is not really well designed (unless someone proves the contrary) I had to notch and cut lots of pieces so that they overlapped correctly in the configuration I needed. As I said before, I think the engineer/s who designed the system probably did it with a preset number of projects in their mind.

I would go back to the drawing board. It seems strange to me that in this age of CAD and relational tools, they could not test at least a few thousand combinations and optimize the design for that. So anyway, the metal is soft enough that it doesn't take that long to adjust.

The Vex control modules, servos and power supply.

Except for Lorena, who is the human performer, choreographer and costume designer for the project and who makes sure her needs and demands are met:-), the rest of the crew is me with occasional help from my friends, like Philip who is working on a Flash interface to control the microprocessors and sensors. I have my doubts about the speed of the image processing functions in the new Flash, but it is worth a try.

For now I am using VeX to build the stage support and to prototype the motion and control system. Ideally I would like to use a faster microprocessor, perhaps Propeller by Parallax which is a multi processor where each one of the 8 processors can operate simultaneously giving you the ability to respond in real time to performer actions, which is what I need to do.

Easier said than done, since programming is not my forte, but my friend Philip, who is in his final year in Architecture, loves coding and we have done great work together. I need to complete the prototype so that we can start programming and optimizing. Everything simpler, easier, faster. Like Ars Electronica 2006 theme said, SIMPLICITY - the art of complexity.

The Creator's new feet

I am also getting so much more familiar with the marionette I've created, since while you are whittling away at blocks of wood and dealing with joints, balance and many other issues, it is difficult to meet the creature on its own terms. Although it is not awake yet I can already see a bit of its character. This is an experience which every puppeteer, or for that matter any artist goes through as it transitions from production to contemplation or analysis and finally to understanding or appreciation.

This process is not so familiar to the engineering folks, since for them, in the majority of cases, everything must be defined or though in toto in advance and there is usually little room for improvisation

Monday, February 18, 2008

Gimme Shelter


Time to create the scaffolding for the Creator's shelter. It will hopefully be as functional and form(ally) beautiful as it can be. In trying to find the right tools and materials I bought some Vex kits when Radio Shack decided to chuck them. So in a way I got a good deal. From a tinkerer's perspective though I wish I had my (very) old Meccano, which from an engineering point of view was a lot more versatile I believe.

The problem with the Vex "system" is that it is not really integrated. It seems to have been designed, not as an optimal modular construction set, but rather limited to some preconceived ideas as to what you should do with it rather than let you decide, as the Meccano system allowed.


I find it very limiting for free form design. Take this example. To construct the very simple structure I needed required me to use ALL 5 kits! and I am not even close to be done.

When you think of which is the most useful and common structural element in construction, I am sure that the majority of "architects" or engineers would agree that it is the humble angle, strong, simple and functional. Well, guess what, the entire Vex kit comes with a whooping 3 angles! yes, that is 1,2,3! But what were they thinking?

This forced me to construct the main columns with rails (of which there are quite a few) which prevented me to attach the rest of the support elements in a simple way.

The kit does come with lots of elements that might have some use in some specific project but it is the least useful grouping of parts in any construction kit that I have found. There must be a reason behind this, and it is probably very sound, like ka-ching! Almost any project will require you to buy extra hardware, at a very steep price, and you can bet (and would win) that the "dedicated" hardware kits bring a completely unbalanced set of elements as well, so that you do keep on buying. Bear in mind that I am not building anything exotic as you can see from the pics.


The structure is 80 cm. tall and 33cm wide, making it a harmonic rectangle area. Of course it is not exact, since it never occurred to the designers that anybody migh need , want or know about such things as harmonic proportions.

Wednesday, February 06, 2008

String Instrument

.

Here is the Creator waiting to have his nervous system installed. The secret to a balanced marionette lies mostly in the stringing that controls it both internally and externally.

The strings that hold the different parts of the body from the inside act as ligaments as well as nerves, that stabilize and enable the parts to move in relationship to each other. By transferring forces and movement information through the spinal string, which is the case with our body, it keeps us balanced and acts as a conduit through which our brain controls our movement.

In the case of a traditional marionette, that brain or intelligence comes from the learned hand of the player of the strings, the puppeteer.

In this case it will be the computer or rather the microprocessor, together with the sensorial system that feeds it information about its environment, that will make the equivalent of conscious decisions as to what to do and when.

The other part, the involuntary movements, the character, arise from the structure that has evolved from interacting with the laws and forces that constitute the semiotic "liquid" in which the creature evolves.



This evolution has produced the structural support (skeleton) and the relationship between the systems that allow both us and a marionette designed under those principles to act and respond accordingly, with or without consciousness or awareness of that which ultimately controls us.

This sequence was produced simply by lowering
the spinal control until it no longer supports the body.

Hip Gnosis

Do and learn. The hip and waist proved to be not only very heavy but also out of proportion. Looking back, this happened because I scaled the entire original schematic to simply make it taller without really thinking through the proportion of the individual body parts.


So, here I go again. I redesigned both hip and waist and decided to use pine wood instead cutting the overall weight considerably by almost 300 g. My servos will thank me!


Since I was going to start from a wood block this time, I was able to drill the holes in a more controlled fashion, sort of, because some of them traversed the block at extreme angles. But overall this fact alone made the parts fit better. Molding the parts with Apoxy was fun and quite easy and fast, but not the right solution in this case.


Here you can see the difference in size and weight, of the old and new hip-waist combo. Of course the scale change rippled through the entire puppet since I had to also modify the torso and the legs. I know I must do the same with the arms, which I am putting on hold for now because the wood is so amazingly hard. But it will happen.