Dreaming of Dancing Hexapods (2.007 Reflection and Learning)

This semester, I’ve been on-off productive in 2.007, where I’ve been working on a hexapod. The original goal was to build a dancing hexapod. I think this was entirely reasonable if I’d been a bit more time-saavy in life, instead of living life from one deadline to the next. Ah well πŸ™‚

(This post is in response to my homework assignment).
Evolution of a Hexapod:

Hexalinkagepod. Mini-hexapod (my “simple-bot” exercise). Two servo linkage-hexapod based off of the Parallax BoeBot Hexapod.
Hexablockapod. First iteration, 18 servo hexapod. Wide body (full sheet of ABS plastic). Doesn’t walk well at all.
Hexablockapod v2. 2nd iteration, 1/3 sheet ABS plastic. Oh, and mini-hexapod for comparison.
Wires hidden with some cloth (4/30/11)
Hexaringapod. Current iteration. ~6” radius body (black ABS plastic). Used vertical bandsaw to add curvature to & reduce weight of outermost segments (tibia). Shortened femurs. (5/6/2011)
0. Hexapod basics
Hexapod — “six-footed”. In this case, a six-legged walking robot; in nature studies, hexapoda = a group of arthropods including the insects. Also refers to a type of robotics platform called the Stewart platform. (this turns up often in google image searches).
There exist a bewildering array of hexapods, from one motor seventy-foot diameter hexapods to three servo one-inch diameter hexapods to wooden wind-powered beach-walking hexapods to eighteen half-foot diameter dancing hexapods. Square hexapods, pyramidal, circular, CNC hexapods (yes, a hexapod that mills things), the variety is amazing. (todo: add links. Jamie’s spider, strandbeest, pololu hexapod, wikipedia hexapod, linkages).
Here, I will focus on 18 servo hexapods at the cost of discussing interesting linkages (Klann, Jensen, etc.). 18-servo hexapods use three servo motors per leg and mimic the insect leg, specifically the coxa, femur, and tibia segments.

There doesn’t appear to be concrete mathematics studying the physics of the insect leg, at least not applied to hexapods. The overuse of servos in 18-servo designs allows for lots of leeway in design, leading to some truly beautiful hexapods. It also allowed me to build one entirely by eye (no CAD), for better or for worse.
this makes me go squeeeeee.
1. Description of the final machine:
My final hexapod has eighteen servos on six legs. It walks, and can accomplish more movements given time to program. The walking gait is a tripod gait, where in theory three legs are on the ground at any given time.
close-up of final machine. Not as objectively squee-worthy as other people’s designs, but I built it all by hand and it’s all my own. <3 
When I started out on the 18-servo hexapod, based on the plethora of designs and a naive belief that my servos could handle anything, I believed that I could “just build” a dancing eighteen-servo hexapod and ignored people’s advice that I CAD my robot before I build it. (Well actually, at first, I had zero belief that I could actually build an 18-servo hexapod nor any idea how to build one. But I really really wanted a dancing hexapod, so it all worked out thanks to the UAs, TAs, professors, shop guys, and the MITERS emailing list. Yay!).
Video of walking (and maybe more?) to come; I took it to Cambridge Mini Maker Faire and a little kid broke one of the servo horns in the first ten minutes, heh (easy to fix). Little kids are epic mechanical design testers.
Yes, little kids should build dancing hexapods too!
2. Some comparisons
I do not know of anyone else in 2.007 who attempted to build a walking robot nor a similar task of dancing. Instead, I will compare my design with some designs from the internet, where I drew my inspiration. I will focus on mechanical design of 18 servo hexapods.
Original inspiration:
Leg design inspiration:
Final body design inspiration:
http://www.youtube.com/watch?v=glNS81Kgk7g
Future gait studies:
Future aesthetic studies:
Future servo torque / weight studies:
This hexapod uses 1.6 kg*cm servos, with longer leg segments, while I’m using 3.2 kg*cm servos with shorter segments, yet this hexapod has no problems moving around.  Possibly a combination of lighter weight (due to using thin wood instead of 1/8” ABS plastic?) and better mechanical design (e.g. better support for the servos) and better programming (not holding the tibia static, as I am right now).
Principles:
  • Support servo on both sides (add second pivot point, opposite of output shaft). See http://www.lynxmotion.net/viewtopic.php?f=17&t=3133 for ideas. I did not do this on my design, since I was opting for KISS due to my inexperience with building my own robots from scratch.
  • Instead of having coxa servo support its own weight in addition to the other two servos (femur and tibia), put it on the body and let it rotate the rest of the leg. See sandwich design:
  • The coxa segment probably needs the least torque (I put my weakest servos on the femur segment)
3. Use of design tools.
Design tools allowed clear images to be found on the internet, which helped me with creating my own design. I made less use of these tools than other people around me, which is acceptable as my next revision of the hexapod will certainly involve Solidworks and Inkscape / Coreldraw.
4. Things I learned: (what I would do differently)
Although I stand by my decision to go ahead and build the robot roughly by eye, since I do not believe that Solidworks would have helped me anticipate issues with servo torque, I definitely intend to use CAD tools in the future.
I think I should have attempted to balance the 2.007 workload better than work on spurts every week or two.
In retrospect, I should have picked the easiest available option for connecting and running all 18 servos and run with it as soon as possible, which would have allowed me to see the problem with the oversize body and weak servos much sooner. I often had issues with decision making, and I am glad that I decided to try cutting the robot in half instead of vacillating for a while.
I had thought that there was no need to consider servo torque since I did not need to decide which servos to buy; however, this was an incorrect philosophy as I could have changed the design.
(I had no intuition at the time for servos and torque, and when I asked around people thought my design seemed reasonable. Next time I will definitely be considering servo torque issues — a bit of research reveals that some dancing hexapods use servos with 2x or 5x the torque of my servos).
Solidworks would probably have helped me with my little hexapod, where the leg lengths where off.
In terms of fabrication, I learned to standardize my nuts and bolts (sticking to only 4-40) and the niceties of working with ABS plastic (fast prototyping changes, such as bandsawing my robot in half and reattaching the legs, could be accomplished painlessly).
Epilogue
In conclusion, I’ve decided to open a business selling dancing hexapod hats.

thanks for the idea, Mr. Finberg!
A build post will come soon (probably after finals in a week).

Hexapod status update: it walks, and it’s no longer blocky

My pet 18 servo hexapod <3

In terms of programming, I’m following the tripod gait (3 legs on the ground at any time, legs in the air move forward while legs on the ground move backward). I’m using the Arduino mini as the microcontroller (brains) (with the 2.007 carrier board to make interfacing with the servos easy). I’m controlling 12 channels (which is the max for the ServoWrite function in the Arduino software library), so twelve of the servos are in pairs (using six Y splitter cables). Thus, if  I named each leg:


front
A   D
B   E
C   F
back

The servos on AC and DF are linked together, while the servos on B and E are controlled independently. Then I only need 12 channels instead of 18: AC (coxa, femur, tibia). DF (coxa, femur, tibia). B  (coxa, femur, tibia). E  (coxa, femur, tibia).

Anyway, in my code, I took 4 “snapshots” (sets of servo positions) of the tripod gait and I’m looping through them. In other words, I’m following http://www.pololu.com/docs/0J42/4. I’m pretending this is a 12 servo hexapod (since this was my KISS code) in that the tibia segments are kept at one position the whole time.

  1. AC, E legs forward. DF, B legs backward.
  2. AC, E legs down. DF, B legs up.
  3. AC, E legs backward. DF, B legs forward.
  4. AC, E legs up. DF, B legs down.

And the actual code I’m using to get it to walk forward:
(also here: https://docs.google.com/document/pub?id=1N9dLEcLXiCvFRI4JRVfJUyylEhZFk4azP8_gsickQv4)

 #include <servo.h>
// Declare constants in degrees for the servos
#define TIBIA 45
#define DELAY 200

// +J, BWD = forward, backward (coxa)
// UP, DOWN = up, down (femur)
#define AC_FWD 105
#define AC_BWD 70
#define AC_UP 92
#define AC_DOWN 125

#define B_FWD 95
#define B_BWD 90

#define DF_FWD 70
#define DF_BWD 105

#define E_FWD 90
#define E_BWD 95

int UP = AC_UP;
int DOWN = AC_DOWN;

Servo E_coxa;
Servo E_femur;
Servo E_tibia;

Servo B_coxa;
Servo B_femur;
Servo B_tibia;

Servo AC_coxa;
Servo AC_femur;
Servo AC_tibia;

Servo DF_coxa;
Servo DF_femur;
Servo DF_tibia;

int pos = 0; // variable to store the servo position

void setup()
{
//Set all pins to output, disable the pullup resistors or something, etc.
digitalWrite(2, OUTPUT);
digitalWrite(3, OUTPUT);
digitalWrite(4, OUTPUT);
digitalWrite(5, OUTPUT);
digitalWrite(6, OUTPUT);
digitalWrite(7, OUTPUT);
digitalWrite(8, OUTPUT);
digitalWrite(9, OUTPUT);
digitalWrite(10, OUTPUT);
digitalWrite(11, OUTPUT);
digitalWrite(12, OUTPUT);
digitalWrite(13, OUTPUT);

pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);

E_coxa.attach(2);
E_femur.attach(3);
E_tibia.attach(4);

B_coxa.attach(5);
B_femur.attach(6);
B_tibia.attach(7);

AC_coxa.attach(11);
AC_femur.attach(12);
AC_tibia.attach(13);

DF_coxa.attach(8);
DF_femur.attach(9);
DF_tibia.attach(10);
}

void loop()
{
tibia();
tri1();
tri2();
tri3();
tri4();
}

void tibia() {
AC_tibia.write(TIBIA);
B_tibia.write(TIBIA);
DF_tibia.write(TIBIA);
E_tibia.write(TIBIA);
}

void tri1() {
// changed: 1,3,5 fwd, other back [COXA]
// [FEMUR] unchanged
AC_coxa.write(AC_FWD);
AC_femur.write(AC_UP);
E_coxa.write(E_FWD);
E_femur.write(UP);

DF_coxa.write(DF_BWD);
DF_femur.write(DOWN);
B_coxa.write(B_BWD);
B_femur.write(DOWN);

delay(DELAY);
};
void tri2() {
// [COXA] unchanged
// changed: 1,3,5 down, other up [FEMUR]
AC_coxa.write(AC_FWD);
AC_femur.write(AC_DOWN);
E_coxa.write(E_FWD);
E_femur.write(DOWN);

DF_coxa.write(DF_BWD);
DF_femur.write(UP);
B_coxa.write(B_BWD);
B_femur.write(UP);

delay(DELAY);
};

void tri3() {
// changed: 1,3,5 down, other up [COXA]
// [FEMUR] 1,3,5 bwd, other fwd [COXA]
AC_coxa.write(AC_BWD);
AC_femur.write(AC_DOWN);
E_coxa.write(E_BWD);
E_femur.write(DOWN);

DF_coxa.write(DF_FWD);
DF_femur.write(UP);
B_coxa.write(B_FWD);
B_femur.write(UP);

delay(DELAY);
};
void tri4() {
// [COXA] unchanged
// changed: 1,3,5 up, other down [FEMUR]
AC_coxa.write(AC_BWD);
AC_femur.write(AC_UP);
E_coxa.write(E_BWD);
E_femur.write(UP);

DF_coxa.write(DF_FWD);
DF_femur.write(DOWN);
B_coxa.write(B_FWD);
B_femur.write(DOWN);

delay(DELAY);
};

glowing bacteria in 5 steps (DIY bio / kitchen biology)

shiny

Or, harvest your own glowing bacteria for <$10 using everyday kitchen ingredients / equipment. This’ll be a post-in-progress. But the gist is this:

  1. Buy a small squid (or some shrimp), as fresh and untouched (not cleaned) as possible.
  2. Put it in a covered container (e.g. a gatorade bottle) with some salt water (leave some surfaces exposed! the bacteria need oxygen apparently) for 24 hours in the dark @ room temperature. (aluminum foil, cardboard, and closets are all useful).
    Covered is key as otherwise it STINKS. Yay rotting seafood.
  3. Check for luminescence after 24 hours.
    (I suggest a camera with adjusted exposure settings, since I missed it first time around when checking by naked eye. After realizing it was there, it was definitely visible, even with low-light coming in from the propped open closet door).
  4. If successful (there are glowing bits), sterilize some petri-dish substitute, make some jello with some other nutrients (agar substitute), pick some colonies (sterile toothpick), and plate them.
  5. Profit.  e.g. If 4. is successful (lots of glowing bits), try putting it in a FLASK
    bwahaha evil mad scientist
    Ehem. Or make art. Wikipedia: BioArt.

Sparse picture-set here:

Acknowledgement~
This idea sparked from a post by Macowell (of DIYbio-boston):
http://www.bioluminopedia.info/apps/blog/show/3050879-culturing-bioluminescent-microbes
with pictures on Flickr:
http://www.flickr.com/photos/macowell/sets/72157623216167176/

However, I found the post sparse on some crucial details and the author unresponsive to email, and the DIYbio-boston group seems to be older-than-undergraduate people. Ah well. Anyway, I’m carrying through, and have run 3 variations so far, one of which produced glowing bacteria! yay.

The variations:

  1. Squid from Chinatown. Stuck in pot, completely submerged in overly salty water, for a week (annoyed hallmates with smell)
  2. With Judy, knowledgeable bio and hallmate, bought cleaned squid (kalamari?) from New Deal Fish Market (which is actually a small corner store). See picture @ top of page for result.
    Successful, but we waited another 24 hours to make plates due to hosage, and the bacteria died before we could plate them
  3. Fresh farm-raised squid, at home in ATL — incubated outside — did not see anything glowing, but I was a bit negligent on checking it.
Links I found useful:
For the DIYbio broth formulation, see:

Cool pictures:
http://www.biology.pl/bakterie_sw/bac_hp_en.html

See how strong the light can be:
http://www.huntercole.org/artgallery/livinglightphotographyvideo/index.html

Oh, and email with any questions, I’m on email all the time and always looking for excuses to punt πŸ™‚ If I don’t respond, email me again! It may have gotten spam-filtered or lost in the sea of MIT email.
p.s. it’s bioluminescence, not fluorescence, so you don’t need UV light or any light for the glowing to occur.
p.p.s. for those wary of having to constantly refresh the medium / feed the bacteria, consider how often you have to plug in electronic devices and feed them electricity πŸ™‚
Wait, that would be cool, a common low-cost fuel source for bacterial devices… hmm… Oh yes, power electronics is awesome and the electricity grid is amazing! Stopping to think about the engineering behind it boggles my mind.

2.007 (aka earn credit for building a robot) – Hexalinkagepod

d’aww, isn’t it cute?

I finished (for small degrees of finish) my simple linkage hexapod robot for 2.007, aka Design and Manufacturing I. This is MIT’s fabled class, from which sprung forth the FIRST Robotics Competition, which is probably the reason I applied to MIT in the first place (go Team 1261!). Building this turned out to be more complicated than I ever imagined. It doesn’t work well, but it’s super cute πŸ˜€ Yay for the first robot I ever built from scratch!



Fairly extensive photos from the build process here on picasaweb:

2.007
https://picasaweb.google.com/nancy.ouyang/2007
 (most of timestamps are 2 to 3 days off, and 12 hours off. camera settings fail)

I also wrote some Arduino documentation for my fellow 2.007 students. See
https://sites.google.com/site/2007arduino/getting-started

Edit 4/3/11: A lot more documentation went up recently, so I wanted to note that the only I wrote above page. The rest is the wonderful work of the 2.007 staff.

New Projects Blog

orange narwhals are awesome! I’ll post my CSS modifications to the Blogger template in a bit, and would like to attribute the orange narwhals I used for my background to the Ubuntu Natty Narwhal backgrounds. I’m in the process of moving worthy posts over from nouyang.blogspot.com, which I’m converting into a documentation blog.

IAP 2011: chopsticks and toy top (blacksmithing and MITERS lathe)

IAP!
Blacksmithing is awesome. I had 2 hours of instruction (safety and demo), 1 hour of hands-on time, and then I made these chopsticks in 1.5 hours today. They’re super easy to make. Hot metal has the consistency of clay, and we used modelling clay (or something similar) to model blacksmithing operations.

So, in conclusion, random blacksmithing is not difficult, all you do is heat up the metal and work it.
It’s (a) the setup can be expensive or time-consuming and (b) getting good at blacksmithing takes infinite time.

Also, to learn / refresh on lathe-work, I made two wooden tops.

[2 Feb 2010: Temporary doublepost from http://nouyang.blogspot.com/2011/01/iap-2011-chopsticks-and-toy-top.html as I sort through my posts.]

IAP 2010 — Trip to Rural Central Mexico (thanks, MIT GPI and PSC)

I haven’t blogged in roughly forever, mostly because I never got around to it. But I hope to start keeping a blog regularly from now on. (Maybe voy a practicar espaΓ±ol y δΈ­ζ–‡ too).

Anyway, I spent IAP, Independent Activities Period, a special time during the month of January for MIT students, in a little town in rural central Mexico called La Vaquita (hur hur that literally means “Little Town”) as part of PSC-GPI (Public Service Center and Global Poverty Initiative) Poverty Action Team. This program was new for this year. I found out about it by attending a GPI General Body Meeting, checked it out on the GPI website, and then submitted a short application. A bit later I had an interview at the PSC, and then right before Thanksgiving Break (1 or 2 months later) I found out I’d gotten in.

Three of us went, Sam (Senior, Environmental Engineering), Sivakami (Junior, Bioengineering / Premed), and I (Frosh, Undecided between courses 2/6/20).

A little photo overview. I think I’ll post some of the funnier pictures in a followup post.

This was the room we stayed in. Yay we had beds!

Carla is part of our host family. We’re taking a short hike just outside of town.
We are always fed super-well. There were no restaurants so all the food is homemade.

  
We built an awesome ecostove! It’s a program of the government. Two holes for food, one hole for the chimney. Made from local materials and a bag of cement. This was done with a mold. 
  
We’re making a stove without a mold in SeΓ±ora’s ovenplace! Sam, Sivakami, and I crawled in to help pound the cement mixture. The other kids did too, child labor ftw.
 7
  
Some home food! Found on one of the rare occasions when we left La Vaquita and went to a neighboring town. It was really spicy for fried rice.
  
Yep, there electricity. Most of the streetlamps are broken though, and it’s not very fun walking at night because there’s lots of working dogs that are trained to bite at cows.
  
Oops, when we get locked out of the house we have to climb onto the roof and into the inner courtyard. This open-to-the-air architecture made our room especially freezing because (a) No heating (b) No door to our room, just a curtain. Think 5Β°C (40Β°F), probably less since we definitely got ice and frost overnight, freezing.
  
Our host mom. She’s pretty amazing and acts like a person twenty years younger.
Next to her are Bobby and Marado (I think that’s his name, it means brown or something).
  
Doing some laundry! Washing machines, but rinse cycle is by hand. The water comes from a well to one spigot for each house. Then take a hose and fill up the barrels (there’s one to the far left). Use buckets to withdraw water as needed throughout the day.
Do this in the afternoon if you don’t want to freeze your hands off. 
 
Hanging up some laundry yo. Don’t want things to fly off into cacti or dirt, and it gets pretty windy some days.
 
 
 Look at us, we’re working! (1) We called a town hall meeting. The paper is for ideas and such. (2) For our last meeting, we split up into groups and then got volunteers to present conclusions. CW from lower left: Sam, Carlos of Zacatecas who came down to help us out, SeΓ±or MartΓ­n, a prominent figure in La Vaquita, Franchesco, a prominent figure from a neighbouring village, and Francisco, a student at ITESM in Zacatecas who works on his parents’ farm on the weekends.

(3) Lindsey, ITESM employee and director of Study Abroad programs, Sivakami, behind her is Don JesΓΊs, comissario of La Vaquita, and then the rest of the town.

 
Some beautiful scenery. You don’t get this at MIT, we’re in concrete city-land here.
  
Helping out with chores! Not really, we are cow milking novices. 
  
There was this sketchy part where the Health Team came to give H1N1 vaccines. The nurse guided us into giving vaccines and I, learning on the job with a questionable grasp of her Spanish, vaccinated maybe 15 people. Including babies. *sadface*
   
Homemade tamales for the win! Delicious, and there was this awesome warm milk (fresh from a cow, no doubt) + cinnamon drink.
Far left is SeΓ±orita MarΓ­a. She’s this awesome lady who gives a grandmotherly schoolmaster aura when she talks. To my right is a guy who, like many of the other guys in the town, will leave for cities to find work to support family. There sure aren’t enough jobs in La Vaquita. To the far right is the Promotor of the Health Team, Javier. He truly believes in his job. Carla is to Sam’s left, and then there’s Sivakami.
  
The doctor of the Health Team. This is the Casa de Salud of a nearby community.
The typewriter is new technology from 2009, before that they wrote documents by hand.
  

Because there were no public trash bins, trash was an issue. It’s really fun picking trash out of cacti… Also, like most rural areas trash was burnt because of lack of pickup programs.
Trash pickup day! Then we burned it all. There was still lots of trash left when we ran out of trash bags (they went fast), but it was a good start.

We spent 1 day sightseeing in Zacatecas, a large city (largest in the state of Zacatecas) about 3 hours away from La Vaquita by car+bus . We’re crazy workaholics or something, I’m not sure what drove us, but we had tons of fun and I wish we could have stayed longer.
  
Our family owned lots of cows. This is right behind our house.
  
At the convive, a picnic for us just before we left to go back to the States.
There’s a slide in progress there.

  
Did I mention the beautiful scenery?

We spent 3.5 weeks there and had an awesome time. Now we’re documenting all the possible future projects for other MIT students, such as biogas digesters, computer classes, solar heating of homes and water, etc.

Ooh, it’s light outside. And all the snow melted πŸ™ So much for a crazy blizzard. Good night!

[2 Feb 2010: Temporary doublepost from http://nouyang.blogspot.com/2010/02/iap-2010-trip-to-mexico.html as I sort out worthy posts]

projects blog (nouyang)