Wednesday, May 18, 2011

Final Project--Final thoughts

Our creep did a great job at the exhibition, and overall we were very happy with his performance!

If given more time, however, these are the changes I would have made:

1.  In order for the scissor mechanism to successfully pop, its gear needed to start at a particular point.  If at the beginning of a cycle, the gear was not in the correct rotational position, the pop would not occur.  Here is an example:


We had programmed the motor so that it would rotate 180 degrees, pause for 5 seconds, and then rotate another 180 degrees.  Although we included a derivative controller, the creep often overshot its initial 180 degree goal because there was so much weight and pressure on the gear.  Consequently, the next 180 degree rotation brought the gear slightly past its starting point.  After about 4 cycles, the overshoot added up, and our creep stopped popping in phase two.  To fix this problem, we had to shut down the program and manually reposition the motor.  A potential solution for this problem would be to have the phase two motor initialize to a specific rotation at the beginning of a creep cycle, much in the way the phase one motor initializes with the touch sensor.  As the program is now, the rotation of the phase two motor is read at the beginning of a cycle .  A potential improvement could be that instead of just reading the rotation, the motor could rotate itself to the correct starting point.  This way, at the beginning of a cycle, both the elevator and the phase two motor would be poised and ready to go.

2.  There was a LOT of pressure on the gears responsible for phase two, so if given more time I think we could have created a gear train to lessen the pressure on them.

3.  With more time (and the gear train from above) it would have been nice to make a lid for our box so the creep would have been more of a surprise.  The way he is now, we weren’t sure about his continued ability to be able to be strong enough to lift the lid.  Also, (very aesthetically) it would be fun to add a decorative, non-functional crank, to complete the box's jack-in-the-box image.

4.  I took our robot to the mini-maker fair, where I was able to confirm what I had been suspecting--our robot was not at all an outdoor robot.  We had not designed it to be an outdoor robot, so this was not necessary a problem, but the creep's dislike of the outdoors became very apparent to me when he was exposed to the conditions.  With duct tape, Lyn and I were able to fashion cones for the light sensors, to block out natural light so that they would be able to lower their value by more than 20 when a laser was triggered.  Without the cones, there was too much ambient light for the light sensor to register a big enough drop.
Ambient light reduction cone
Path to the sensor!
There was also a great deal of wind, causing our light sensor posts to shift slightly, and throwing off the readings.  Our creep did perform successfully quite a few times at the mini-maker fair, but he required a lot of laser adjustments.  If given much more time, perhaps we could have remedied this problem by building some sort of floor boards that could flank the path to the creep, with slots built into them for our light sensors, laser, and mirror.  If this were possible, it would drastically reduce the creep's setup time and, if cones were attached to the light sensors, make our creep much more prepared to endure the conditions.

In general, I was very happy with the way our creep turned out.  I feel like I really learned a lot during the various iteration processes that Clara and I went though (like the exact dimensions of a Lego!).  After this project,  I feel much more comfortable with SolidWorks and the laser printer, as well as with problem solving in general.  I am very happy that every time we faced a creep-setback, Clara and I were able to brainstorm and figure out how to solve our problems in new and different ways.  All in all, I had a great time working on this project, and am so proud of our creep!


He's still creepin'

Ah!

Final Project--Exhibition!

Finally, the much anticipated exhibition had arrived!  Our creep had a slew of visitors, from random passerby to classmates to peer-pressured friends.  Everybody seemed to enjoy interacting with him, and I think I might have seen some real fear in people's eyes when the creep did his thing....

Lyn posing with/as a creepy puppet!
Here are some videos of people's reactions:

So much fear:


Our best surprised reaction! (Don't mind my maniacal laughter in the background...)






I took the camera for a walk, to see the creep creepin' firsthand:


The exhibition was a lot of fun!  It was great to get the creep out of the classroom and see the way different people interacted with him.

Tuesday, May 17, 2011

Final Project--A creep is born!

After hours of work on our creep, the physical structure and the coding were finally complete!  However, the creep was still headless and box-less (severely reducing its creepiness) which meant... it was time for crafties!  Clara and I had been looking forward to crafting since the beginning of the project, so we were very excited.

After searching in vain for a festive box, we decided to go with the second best option: cardboard (of course plucked straight from the trash heap outside).  Since the murky brown color of cardboard clearly would not suit our creep, we decided to decorate with COLORED FOAM!  Clara had the brilliant idea that our creep should wear a tux.  The moment those words left her lips, we both knew our creep could be clad in nothing else.

The gorgeous tux:


Still very much lacking was the all important creep head! To create it, one night in the science center I relived the paper mache unit from my 5th grade art class .  Here is a photo journal of the creep coming to life:

Ready to go
The process begins
Newspaper ball!
Printer paper primer
Marie was kind enough to lend me some of her puppet's leftover face paint...

Modeled a nose out of clay!
Handlebar mustache! (by popular opinion)
THE CREEP

Chillin' in his inner box
Kickin' in his outer box

Successfully creeping somebody out for the first time

Trying on his outfit

At last, our creep was all gussied up and ready to put on his show!

Final Project--Programming!

While I had been endlessly laser printing, press-fitting, and SolidWork-ing, Clara had been working on our creep's code.  She also devised a brilliant laser plan for our motion detector.  Earlier in the project, we had experimented with other possible motion sensors.  We tried using an ultrasound sensor, but it only detected movement up to 1 or 2 feet away, which was not far enough for us.  We thought about using a video camera, and somehow programming it so that it could sense how far away a person was by the amount of space they took up in the image.

Very messy (as usual) sketch--we thought we might be able to make a program so that different stages of our creep would be activated based on how many boxes a person took up (i.e. how much of the video camera's screen they took up)
This idea also didn't seem like it would work--we had no way of predicting which direction or from exactly what distance people would enter our image.

The lasers seems like just the ticket though!  We only had one laser, so Clara rigged a system using a 50/50 refractor lense and a mirror that let us split the beam so it reached both light sensors.

First laser setup
With this laser system, walking through the first beam would trigger stage one, walking through beam two would have no effect, and walking through beam 3 would trigger stage two.  This required a program that would need to ignore signals from the second beam.

Chris suggested we move the 50/50 refractor lense to the format below, which was much better since it gave us only 2 laser beams to deal with.

Second laser setup
For both of these setups, the 50/50 refractor lense must be at a 45 degree angle in front of the laser.  We at first had it set up on the same type of stand that was holding the light sensors, but decided to build a piece of delrin that could sit in front of the laser with a lense-sized hole at a 45 degree angle.

Solidworks model
Actual piece
Now onto the program itself:

The pictures below are of our final program.  One of the changes made along the way was the switch in laser formation.  Before the switch, walking through beam one triggered stage one, and walking through beam two twice triggered phase two.  After switching the laser formation, we switched the program so that phase two was activated the first time one walks through laser two.

Additionally, before we started programming, we had decided to install a touch sensor on the box's base, so that the elevator would always know when to stop.

Touch sensor peeping up! (Our entire Delrin structure sits on top of this base)

Our faux base was balanced on these Lego blocks

As you can see from the picture, we installed a faux base into our box so that the touch sensor would have space beneath it.

Earlier versions of the program did not reset the elevator at the beginning of the program.  We added this feature after we had tested out our entire creep and saw that it was VERY difficult to reset the elevator manually if the program for some reason left it in the middle of its cycle.  After we added the automatic reset to the beginning of our program, we no longer had this problem.

We used two NXTs for our program.  The boss was located in the creep's box, and communicated via bluetooth to the NXT connected to the light sensors.  In the boss, port A was connected to the elevator's motor (stage one), port B was connected to the scissor mechanism's motor (stage two), and port 1 was connected to the touch sensor. 
In the other  NXT, hereafter referred to as the laser NXT, the light sensor that triggers phase one was plugged into port 2, and the light sensor that triggers phase two was plugged into port 1. 

The next four pictures show the boss's programs:

After initializing by making sure the elevator is pressing the touch sensor, the program waits for somebody to cross the first laser line.  When this happens, the receiving NXT sends the boss a signal to enter "stage1."  In stage1, the motor attached to the gear trains turns backward for 3 seconds at a power of 40, thus elevating itself on the linear gear track (and causing our creep to creep).


Stage 1
If no laser is tripped for 15 seconds, the program times out and the laser NXT sends the command 'DONE,' which makes the creep descend until it reaches the touch sensor.

Move
If the second laser is tripped, the laser NXT sends a 'move' command to the boss.  This causes the program to run 'creepmove180' two times, with a 5 second interval in between.  This causes the motor connected to the scissor mechanism to rotate 180 degrees (popping the creep), wait 5 seconds (theoretically holding him in the popped position), and then rotate another 180 degrees (lowering him back down).
Creep move 18
After phase two is complete, the laser NXT will send the command 'DONE,' which causes the creep to descend until it reaches the touch sensor in it's box's faux base.  After this stage is complete, the program once again waits for somebody to cross the first laser, and thus triggering 'stage1' and repeating the process.
Done

The picture below shows the laser NXT's program:

Laser NXT's program
The program starts by initializing the two light sensors.  In order for a laser to be tripped, its light sensor reading must drop by a value greater than 20.  When the first laser is tripped (port 2), the laser NXT sends 'stage1' to the boss, causing stage one to occur.  After stage1 has occured, the program enters a loop with two possible conditions--true (the second laser is tripped) and false (the second laser is not tripped).  If the true condition is satisfied, the laser NXT sends the 'move' command to the boss, followed by 'done.'  If the true condition is not satisfied after the time-out period (15 seconds), the laser NXT sends just the 'done' command, causing the elevator to descent to its initial position.  The timeout timer begins after stage one is complete, when the program is about to enter the true/false loop.

Also: While testing the creep today, Lyn noticed that all four gears on the end of the gear trains were almost at the edge of their linear gear columns, setting them up for potential issues with getting off-track.  I had noticed this problem before and not known how to remedy it, but Lyn came up with a great quick fix--doubling the gear!

Two round gears instead of one!
As you can see, switching from one gear to two made a huge difference stability-wise!

Final Project--Building the Frame!

Although the inner box itself was complete, there was still the pressing question of how to stabilize the linear gear columns it would be ascending.  Initially, we were going to attach the columns directly to our outer box, and stuff tiny pieces of styrofoam between the columns and the sides of the box if necessary to ensure a tight fit.  Although this plan allowed for a small amount of error, the box still had to be sized very precisely.  We decided to build our box out of wood on the laser printer, and attach the sides to each other with sliding groves.

Columns attached directly to box
Here is a preliminary sketch of the box:


The idea having to size the box so precisely was very worrying, and I began doubting whether it was a plausible solution.  But then Amon came to our rescue by suggesting that instead of the box, we make a frame to hold the columns in place.  By doing so, the entire structure would be self-contained, and the outer box could become purely aesthetic.  I was very happy with this plan, because it seemed like it would be far more successful than the wooden box, and would also allow much easier access to all of our mechanisms.

We decided that the frame, like the rest of the box, would be press-fit together.  The press-fit dimensions we had used for the large stabilization arch could be reused for the frame, since it too required a very tight press-fit.  (I had made the press-fit that held the inner box together slightly looser, in case it needed to be taken apart.)  I wasn't sure how to securely attach the individual linear gear posts to the press-fit frame, but Lyn discovered that the way our gear posts had been built was very conducive to attaching to the frame (perhaps we had built them like that subconciously).

Room for Lego rod in the middle hole!
 Lyn pointed out that we could slip a Lego rod though both the post's center hole and a hole in the Delrin frame, and attach it with little Lego stabilizers on either side.

The press-fit aspect of the frame was already dimensioned, but the length of the pieces and the placement of the holes was slightly difficult to measure.  Lengthwise, the columns had to be spaced so that the gear trains would just fit--if they were just slightly too far apart, the round gears would not have enough grip on the linear gears to be able to climb.  It took 3 Delrin iterations to get the size exactly right--in the first iteration, the holes were slightly too far apart. I also realized that the press fit protrusions/holes were backwards--since all of the pressure would be pushing out toward the shorter pieces, it would be better for them to have the protrusions, and the long side pieces have the holes.  In the second iteration, the length of the long pieces was still slightly too long.  The width of the frame was too long as well--the gears did not fit on their tracks.

Here is the process:

Press fit dimensions


2nd iteration--holes in the wrong place and slightly too long

Success!


Close up of success

We decided to print out a second frame, since just one didn't give us the support we needed.  Throughout the iterations for the first frame, the laser printer had been giving us some trouble.  Because some of the pieces were so long, there were some problems with warping that resulted in some of the press-fit dimensions being off.  We had been forced to reprint some of the frame pieces because of this problem.  Lyn suggested that instead of printing out multiple pieces at the same time, I print out just one at a time, and refocus the laser in between.  This trick, along with some heavy tools to reduce warping, worked like a charm.

Slightly ghetto laser printing

Two frames

Fully assembled frame!

We also created a platform to fit between the two scissor mechanisms, for the creep's head to rest on.  The top scissor pieces had to be able to open and close slightly, so we needed to create a top that would allow them to do so.  Lyn gave us another great idea for this piece, and after some press-fit and delrin magic, this is what we produced:

Platform

The first iteration was slightly too thin, we made the bottom piece thicker for the final iteration.


Assembly! (Before the second frame had been attached)

We added a spring to the platform, to give our future creep head a little more oomph.


Here are the final pieces of the frame in SolidWorks:

Long piece first iteration


Long piece second iteration

Long piece

Short Piece

Final Project--From Lego to Delrin!

Now that we had a full Lego prototype of the physical aspect of our project, it was time to turn everything into Delrin!

Well, not quite everything.  We decided to use Lego gears since I had learned from my experiences with the Gearbird that it is very difficult to use SolidWorks to make a gear the exact size you want it to be, since you can't select the diameter.

Since we were using Lego gears, everything had to be built EXACTLY to Lego scale.  This meant a lot of time spent figuring out the exact dimensions of various Lego parts. As a result, we really learned to love the FLU (fundamental Lego unit, not the illness).

Also, quick side note: We decided to give up on the initial stage one of our creep in the box, the wolf whistle.  We felt as if we had enough on our plates with what we were already doing, and it seemed that the only way we would have been able to project a wolf whistle would have been by hooking our robot up to a computer, which seemed rather inconvenient.

Anyway, back to Delrin!

What needed to be done:

Construct a delrin box that would move up and down the linear gear track using its gear trains (which would protrude slightly from the sides).  The box structure would also be responsible for stabilizing the scissor mechanism (i.e. stage two), which would rest on top of it.

The box would consist of 4 pieces: top, bottom, and two sides

(Very) General Plan

Measurement-wise the sides of the box were the most complex, so I began with them.  After close examination of our Lego prototype, it seemed that the sides needed to:

1. Have eight correctly spaced holes (4.8mm for Lego rods) for the gear trains
2. Have one hole (.25mm for a Delrin rod) each to stabilize the base of the scissor mechanism
3. Have two holes (.25mm for a Delrin rod) each, raised above the general structure, to help support the stage two motor
4. Connect via press fit to the top and bottom of the box

Constructing the side on SolidWorks was a long process--it began with step 1 (figuring out the gear dimensions), then continued to steps 2 and 3 (finding exact measurements for stabilization rods), and finally step 4 (figuring out press fit dimensions).

To figure out the spacing of the gear holes, I built this visual aid:


The wonders of the internet gave me all of the information I needed to know about Lego dimensions: 4.8mm holes, 3.2mm between holes, 5.5mm between the last hole and the end, and 9.6mm height.  With these dimensions, I was ready!

Below is the process of making the side of the inner box, and the final SolidWorks version:


Some press-fit trial and error took place on small, sample pieces of Delrin so that the press-fit dimensions on the much larger box pieces would be correct.
Press fit trial and error

SolidWorks side part with added press fit protrusions
If you look back at the general plan:
 The press fit protrusions were on the top and bottom of the box, and the holes were in the sides.  I reversed the placement of the protrusions and holes so that the top and bottom of the box could lift on and off if necessary, instead of being forced to pull the sides apart, which would be covered with gears.

Clara and I decided to wait until slightly later to design and print out the top of our box, since we wanted to use press fit pieces to help stabilize stage 2.  In the meantime, we printed out the two sides and the base.

Sketch of one side and bottom

Miraculously, the sides were dimensioned correctly and fit the gears on the first try!!
SUCCESS!
The inside of the inner box

Since all of the gears are connected to one motor, they will be turning at the same speed as their mirror image gear on the other side of the box.  The rods between the gears in the picture above are for added stabilization.  It turned out that these rods alone did not provide enough stabilization, and at a later stage in our building I added some more:

Stabilized!
All the measurements were based exactly on the Lego model, which is how I was able to figure out how to place the non-gear holes in the box's side.  The one measurement we did change was the width of the box, since we wanted a bigger base for our creep.

In the meantime, Clara had been building a delrin version of the scissor mechanism.  This involved printing many Delrin donuts and scissor pieces (almost all identical, with two shorter pieces), and attaching them with small pieces of Delrin rod. She too had used exact Lego measurements, so that the scissor mechanism would line up exactly with its stabilization holes in the box's sides.

Laser cutting pieces
Scissor gear, before the donuts had been converted to delrin (these donuts were far too heavy for our mechanism)
In the process of converting
Again, miraculously, this stage 2 mechanism lined up exactly with the holes!  Clara and I realized that we clearly had a previously undiscovered talent for measuring things.

Here is a sketch and SolidWorks drawing of the top:



The small holes are for tiny press fit arch supports to keep the forward-motion part of the scissor mechanism moving forward.  Without the small arches, the pieces popped up a little bit, reducing the strength of our pop.

 
Press-fit test for arch

Arch size check--the piece needed to be able to freely slide back and forth


Top in place! (If you look closely, you can see the tiny arch holes)
Full box!


Now that all of the pieces had been printed, we were finally able to assemble our mechanism for the first time!
Everything fit!


Popping!
We were very excited to see that everything fit.  We did see however, that the motor still desperately needed to be stabilized.  We remedied this in two ways:

1. The Lego rods were very flimsy.  Additionally, rather than being at the same height, one of the bars should have been slightly lower in order to hold the motor at the right angle.  We didn't want to completely reprint both sides, which would also entail reassembling all of the gears, so we found an alternate solution: steel rods!

The steel rod was of course much stronger than the Lego rod, but we could only put in one since steel doesn't bend like Lego does, and our second support rod needed to bend because its hole placement was slightly off.  It turned out though that the second support rod was not even necessary--the steel was so strong that it did the job by itself!


 


2.  The motor still slid from side to side, so we decided to print a larger version of the tiny stabilization arch to go over the motor and hold it in place.  This required re-printing a new top with added holes for the additional arch.  The motor was under a lot of strain, so to ensure the arch support did not pop out of the top, we decided to connect it like this, instead of just with the traditional press-fit:


Solidworks drawing

The piece goes all the way through the top, where it can be secured from below with a Lego rod.

We printed the arch and a new base.  Once again, everything fit, which made us very excited.  The arch did a great job of holding down the motor.


New arch!


Just one arch was necessary!
New Solidworks top!


Solidworks Drawing