PComp Labs Week 4

This is my blog post for working on week 4's assignment, which is to complete Project 1!

This is the first week where I didn't have a significant setup change. My egg carton parts holder from last week continues to work well. đź‘Ś

Project 1: Walker

The prompt:

Come up with a simple application using digital and/or analog input and output to a microcontroller.

The Idea

My inspiration for this project came from the last exercise of last week's lab. After wiring up a variable pressure sensor to a servo and turning the power on, the servo twitched and pushed itself slightly off the table, as if it the plastic cross attached was a leg.

I wonder if that's how Galvani felt seeing his frog legs come to life…

From www.researchgate.net

For this project, I will making Walker, a small walking robot based on this circuit and code, turning this wanna-be leg into something more functional.

The Legs

"How should I build legs and attach them to the servo," I thought as I sipped some boba…

Yum!

Hmm…

Aha!

And that's the story of how Walker got legs.

Just doing some stretches.

The Feet

For some reason, I thought that after I put legs on Walker, Walker would magically walk. That did not happen.

To make feet, I needed something so that Walker wouldn't fall over even though Walker is top-heavy. The solution? Really big feet.

The feet also needed to be attached to the legs very sturdily. For this job, I still didn't have to look past my boba cup. I cut feet from the cup rim, and left a T-shaped part of the cup attached as "ankles" for attaching to the legs. I curled up the ankles and inserted them into the straw feet. Finally Walker could stand… but not for long.

Cup feet.

I changed the program slightly such that the leg would only move 30° instead of 180°.

-   int servoAngle = map(analogValue, 0, 1023, 0, 179);
+   int servoAngle = map(analogValue, 0, 1023, 0, 30);

The result was significantly more stable, but now Walker was just kind of shuffling around without going anywhere. His feet were too smooth, even against a porous surface like cardboard.

One more attempt, one more cry of exasperation…

I continued tweaking the legs iteratively, each time taking variations on the leg designs that worked best in the previous rounds.

Final Feet

My artificial evolution and selection process finally yielded feet that worked:

Side view.

Top view.

Success! A few more shots:

How do you do?

Glam shot.

An astute reader might observe that Walker is moving not forward or sideways, but diagonally. Given that that is how some crabs walk, I will call this gait a feature rather than a bug.

The Housing

I almost forgot that Walker needed some clothes! I used some pieces of styrofoam padding to cover up the ugly bits.

All covered up.

Lessons learned:

  • Making things walk is hard.
  • Making things walk is fun.
  • Let boba inspire you.

Thanks, Walker!