during the work on trashbot v1 and rofi, i noticed that robots get seizures when powered up (see the second video in this post for examples). this is obviously because the arduino’s outputs are not in a defined state for a brief time and the servos also get power already leading to outputs sometimes firing until the arduino has loaded its bootloader and executes the user’s code.
here’s my first experiment, simply switching switching one led off and the other on. relays usually switch from one contact to another, meaning that even if the relay coil isn’t powered, there is a default state for both switches (one is on, one is off):
next i wanted to document how actually the servo moves into undefined positions when powered up, so that we see that this is a real problem to solve (yeah, i know that the 2s / 7.4v lipo may be too strong for the mg996r servo, will add a ubec soon):
okay, so finally, we add the two together and use one arduino output to control the relay coil, the relay coil then will switch the power to the servos. i will to this for the whole power rail feeding all the servos of the robot so that i only need one relay and one digital out of the arduino nano. let’s see how it works:
i will add the relay now to trashbot v2’s circuit and see whether there will be any more problems afterwards. i’m not sure whether i need something more (apart from the missing ubec to reduce the voltage for the servos) like diodes (coil loosing power gives it back to the arduino? or not strong enough?) or pull up/down resistors (have to teach myself what that’s all about next). but for now, i’m happy to see it working.
after building the first of trashbot that contained mostly parts that i had floating around, i learned that i want to build more robots entirely made from residuals of other machines.
i found some more parts in my cellar, but actually i realised that one beautiful assembly is a mechanical typewriter from the sixties: the olivetti lettera 32 that i truely adore because of its compact design, the missing floor plate and of course its color.
i actually own three of these, so i thought that sacrificing one of them to live on in various robots is actually a nod to them by bringing them back to life. albeit, a different life.
here you see the german model (i have one spanish and one french model, too), the color is not original anymore as the typewriter seems to have lived a life in the sun…
getting the frame off was not easy as there were some hidden screws:
in the front / lower picture you see some of the springs the bring the key back up when pressed:
and the screws showed some resistance…
getting to the “core assets”: the letters and the keys:
actually hard to dig deeper into it without bending the metalhousing for the keys’ fingers:
but in the end i made it:
one of my learnings was that the keys have different lengths of their arms connecting to the lettersas you have to translate the square formation of the keys to the half-circle of the letters so that they can hammer the tape at the same position:
here’s the letters with the complex “SHIFT” mechanics on the left and right. bastards really to me a while to rip them off.
here they are, looking like creepy little bugs. turns out that they are the first parts to go into trashbot v2:
here’s the clean letter choir (beautiful, isn’t it?):
here’s the paper transport and roll disassemble, in the middle you see the curled spring for transporting back automatically when hitting “return”. in the back / top left you see the the bell for the “ding”:
finally, that’s the mechanic yield!
glad i finally blogged about this. in fact, trashbot v2 is alive already and will follow this weekend, stay tuned!
so, the last couple of days i invested more time into 3d scanning the first version of the trashbot before really going into improving it. turns out that scanning a 3d object using skanect is more complicated than i thought.
i’ll report three different methods here:
build a rotating lego stand for the desktop
walk around the object to scan
build an arduino controlled stepper rotating stand
let’s see first what the scene to scan is:
1) i thought i build a little rotating stand using lego, so i stole some legos from my kids and build something like this:
next, i scanned it, letting the motor run and went into analysis:
2) next, i decided to actually put the robot on a stand that doesn’t move and move the camera around instead, also assuming that different heights may add information and get a more complete picture:
okay, cut the video to not bore you too much with it. i think the result is more interesting:
(yeah, that’s our garden plants in the background, we already had some snow in germany…)
finally, i found this skanect tutorial and thought, that obviously, the rotating stand is finally the way to go:
3) so i built a little step-motor / arduino driven rotating stand so i could control the rotation speed (check out this blog entry on a MUCH better stepper library for arduino) much better than with the lego and isolated the object from nearby objects.
okay and here’s the result (sorry for the audio quality, don’t know what went wrong):
that’s currently my last attempt. i think for now, i got the best results by manually scanning the bot and not using the rotation / stepper.
after the complicated start with ROFI, i decided to build my own biped from scratch but never really found the time and focus to do it. but then i came across “bob the biped” by bajdi over on letsmakerobots and i fell in love. immediately.
this guy has really done a great job designing a simple, working and cure biped that really is charming. the design principles fascinated my from the first second. he just used four servos, to on each side connected by an L upside down. the foot servo is used to shift the center of gravity, the hip servo is used to move to bot forward. the other side is working in a mirrored fashion, preparing the next move, so to speak.
also, the software is really nice as it produces the gait pattern parametrically and he also shared the source code. the gait pattern is actually one of the things that were too complicated with ROFI, esp since the original inventor’s design also included arduino, android and c# software.
so, okay, i decided to build my own interpretation of the core design of bob, of course i don’t have a 3d printer yet, but to me the casing is just icing on the cake, i need to understand the mechanics, gravity implications and dynamics of the gait.
here’s how i started, one foot servo (nice mg996r, metal gear machine) connected to a hard-drive holder from an old pc:
next, i attached an L shaped metal piece i had floating around to the servo horn of the hip:
then, i found some metal pieces that had fortunately the holes drilled in the right distance to actually fit the servos’ holes:
now i coulddo a test connection of legs and hips (in the end you have to decompose the ensemble again to center the servos before finalising the build up):
now i could add the foot servos and voilá we have a standing prototype:
of course the hard plastic of the feet is slippery, so i needed to add more “footage” as well as extend the standing area, so i cut out some feet from polystyrol which is hard enough to support stuff but soft enough to be cut with a knife (or actually sliced and then broken):
and finally attached the feet servos to them with little screws and L shaped metals i had found:
next, it was time to build some electronics. this time, i didn’t want to use the breadboard, i actually roughly know how the layout should look like so, i chose this time circuit boards and connector strips i had found at amazon:
cut them into the right pieces to fit the arduino nano and four triple plugs of the servos plus some lipo connection:
minimal circuit design (the nano can be powered by up to 12v, the lipo has 7.4, so i can power the servos and the nano with the same battery, i left out the bec for the moment):
as you can see the upper part gets power and gnd from the battery (on the lower part), that’s also powering vin and gnd of the arduino nano. here’s the front (top battery in, middle nano, lower right servos):
here’s the final bot from the side (some polystyrol to save the circuit from shorts by the metal hip) and the lipo attached to the front. as you can see, he can stand on one foot, which is the most important feature…
first key learning: long legs imply delicate balancing of the upper part. not very elegant. this is why the “bob” is so elegant, short legs, less risk to fall over…
here’s mr trashbot from the front (electronics and lipo attached with a rubberband, for fast component exchange and re-engineering. we’re learning!):
finally, here’s the little guy walking. not too elegant as the long legs and the heavy metal gear servos make the legs shaking. and some software issues i guess (number of animation frames vs playback duration should be fine tuned, letting him walk faster will let the shakes become stronger in amplitude and let him fall more easily.)
i did a couple of tricks to the original source code. for example, i split the max angles the servos would do between hips and feet. this means that the feet can do larger angles than the hips. furthermore, i also gave the feet different max angles depending on whether they are up (less) or down (more). my feeling was that this way i would get the center of gravity close to the standing foot’s center.
but here’s really room for experimentation.
i think i’ll stiffen the legs next, possibly also add a gyro to the circuit and let the gait pattern adjust dynamically according to the shakes the hardware does so that he’ll move more slowly when the shakes become too strong. let’s see. finally, i may also add bluetooth for visualising the gyro’s recording to learn a bit more.
or add knee servos. in that way, the lifted leg could retract a bit which would pull the center of gravity a bit more inwards. but it would also add weight. hm… decisions, decisions. what would you suggest?
this is the initial modification of my original walker design now with a spine that has twisting the spine between the front and the hind legs so that it change direction. also, i added the power functions IR remote control.
i find it quite problematic that the power function motors and servos are actually all three bits long, they should be four imho. you always have to make the design more complex than necessary.
the spine also has to become more elegant and reduced but at the same time more reliable. it’s also becoming obvious that we need more grip at the feed…
today i was able free up another 20min of my time to work on the quadruped a bit further and prototyped the moving spine. the goal is to add the lego power functions servo so that i can change the direction of the walk by moving the spine’s angle.
the servo’s not on it right now, but it’s a start, still not sure whether it’ll be stable enough when in action, but we’ll see.
i just had to buy the power functions for lego. my sons were not happy that i had to slaughter one RC car to implant a little arduino brain, so i decided to buy the IR remote control two motors and a servo.
the first little thing i had to build was kind of a standard remote controlled car to get the boys started with it.
turns out that the car can actually go quite fast and that the steering servo can quite keep up with it. with the other motor i built a quadruped that i still had in mind from my childhood and wanted to see how the kids react to it. here’s the first working version:
the boys really like it and although there’s no head and tail they clearly perceive it as an animal.
it actually walks really nicely although the legs on each side walk in sync. there’s probably room for improvement. however, i actually want to build the servo into the spine first so that the bot can walk in circles.