Saturday, July 28, 2007

Meeting 010 Follow-up

Ron and I had a little bit of free time over lunch today, so we got together and continued the work we started at yesterday's meeting. I've fleshed out the code, so the 'bot now:

  • Goes to the sensor array
  • Takes two readings, one lit and one unlit
  • Figures out the color of the candy based on those readings (well, not really -- more on this in a minute)
  • Goes to the correct bin (ditto)
  • Turns the bucket one full turn, dumping the candy into the bin and resetting the bucket for the next trip to the to-be-created hopper
  • Returns to the starting point

Unfortunately, we've run into a snag. The readings that we get vary widely, even with the same particular piece of candy. The value returned seems to be affected by bucket position (Ron fiddled with that, and we think we have the candy centered right under the sensor now, but we had to add a "bumper" to do it), candy orientation, candy size, and who knows what else.

Naturally, this means the software doesn't work -- it can't tell red from yellow, for instance, and given the extreme variation in readings, it's hard to know how to change the code to compensate. Ron came up with an interesting idea -- putting the sensor at the bottom of the bucket. This would eliminate the size and orientation variables, and make the bucket position moot -- it would just have to be positioned under something that blocks out ambient light.

Sometime next week, or at next week's meeting, we'll need to experiment to see if that would actually work -- information we need before we do a major bucket redesign.

Thursday, July 26, 2007

Meeting 010

We had a very successful time today, although once again work and real life limited the number of participants -- it was only me, Ron, and Kimberly.

Due to the absence of our Fearless Leader, there are no pictures of the session itself, but an updated photo may be taken early next week. The structure itself hasn't changed all that much; I redid the marker track support so that it no longer interferes with the hopper pulley wheel, and Kimberly attached the structure with the buckets to the superstructure; this made calibrating the marker bricks possible, and also helped stabilize the structure overall (the color sensor enclosure was unbalancing the structure somewhat).

I had gotten a start on the software, but hadn't had a chance to try it out with the actual brick and 'bot. Ron and I worked on getting some of the rudimentary functionality working. We learned the difference between tasks (they run concurrently, and can interfere with each other) and subroutines (which are more what we're used to), and once we got that straightened out, things came together nicely.

We had some problems at first with the counting of the markers; either the 'bot would keep going and stop counting, or it would stop in the wrong place. With some fiddling -- and creative thinking from Ron -- we got some functions working.

So now the 'bot will:

  • Start from the soon-to-be-hopper end of the track and move itself into position under the sensor (done via timing, based on an engine power of 5)
  • Count markers until it gets to the one it needs, and then stop (sensing isn't happening yet, so we hard-code the bucket number at this point)
  • Count markers until it reaches the hopper end of the track again

All in all, very cool! It's just a pity work isn't as interesting!

Meeting 009

Today's meeting was a lot of fun, and we accomplished a lot. Once again we had guests (Doug's beautiful wife Nichelle, and his children: Naomi, David, and Isaac (see last meeting's entry for photos)). The kids seemed to have more fun with our two "crash test dummies" (christened by Isaac Buster and Duster), and didn't do too much on the construction.

It was a good thing we had the kids there, though, because everyone but me and Doug cancelled! We’ve never had such a lightly-attended session! Fortunately, we had a great time anyway and made good progress:

  • We enclosed the light sensor and light so that when the sensor tests each candy the ambient light will interfere as little as possible.
  • We used inverted roof bricks to prevent a misalignment of the hopper when it moves underneath the sensor assembly.
  • I put together a first attempt at the “hopper position determiner” (the strip of contrasting tiles that the tram will use to figure out when it’s over a bucket. This will probably be refined next week, but I was very excited to be a) constructing something on my own, and b) using friction connectors. It’s something that’s undoubtedly trivial to those with expertise, but it was new to me and very cool.

During the ensuing week I did a little bit more; I took readings on the "bin marker" track to see if the colors I used (green for the track, yellow for the markers) gave sufficiently different readings that we could use them. It turns out they do:

Color Value in ambient light
Yellow (marker)680
Green (track) 763

I also made a preliminary attempt at creating the program. I had fun with NQC and BrickCC, and I hope to get a chance prior to the next meeting to see if the code is even remotely close to doing what we want -- or doing anything.

One discovery I made is that the lovely track we constructed last week interferes with the pulley for the hopper -- the middle support is just a teensy bit too high. At our next meeting we'll have to see if we can lower it and still get the support for the track that we need.

Thursday, July 12, 2007

Meeting 008

Today we had some special guests for the latter half of the meeting; Naomi (3.5), David (8), and Isaac (12) Wilcox joined us while Mom hit the Whole Foods store nearby.

We are continuing our process of refining the mechanisms we've settled upon. Today we worked on the tram portion of the robot, first trying a worm-gear-based movement that was ultimately unsuccessful. Laura suggested we return to the "Cinderella's coach" design, thinking that big gears would look good.

That led to a discussion and demonstration of gear ratios and speed versus torque. It was noticed that the tiny gears we'd used for the past couple of weeks were not moving smoothly; their radius is just a bit too tight. David suggested the next largest gears, and I included a smaller pulley than we'd tried before. The combination of the new gears and pulleys gives us a faster tram movement than we'd seen, which should be advantageous, as long as it doesn't go too fast for our sensing mechanisms.

Of course, David wasn't always helpful. He also insisted on testing the tram movement via the remote every time I tried to attach a piece to it.

Isaac dug out one of the large Lego figures that was in our box, and decided to "Busterize" him; so now we have our own version of "Buster," the crash test dummy from the Mythbusters TV program.

We expect to use a color contrasting tile and light sensor to determine which hopper the tram stop at. Movement at the extremities will be limited by stops and governed by the belt drive we are using, so we don't have to be particularly precise for those calibrations.

Today I found myself doing much of the building. I need to figure out a way to increase the Lego building experience of the rest of the team. Laura has done quite a bit, but none of it Technic--which was my own case before MindStorms was released. Several team members are talking about purchasing their own robotics sets, too, but no one has gotten past the "talking about" stage.

Friday, July 6, 2007

Meeting 007

Having spent the past number of weeks hammering out the basic operation and structure our candy-sorting robot would use, it was time to start making that structure look a little more professional.

That essentially meant completely disassembling what we'd cobbled together. We also took the time to study some Technic building techniques, addressing the fear of the team that we didn't have enough "regular" Lego pieces to build what we were doing. (Technic pieces are perhaps less intuitive than "regular" Lego bricks, and only a few of our team members have much experience with Lego, so this was a productive, hands-on time for learning.)

Kimberly's suggestion of "chicken feet" turned out to be very useful in designing a way to raise the platform up to a workable height without adding a lot of unnecessary structure. It's fascinating to see our really, really rough mess starting to look very professional, but that's exactly what one would expect with iterative development.

By the end of next week's meeting, we should have the finalized sensor platform and position-tracking sensor (which will read a series of contrasting-color tiles to determine location) in place, and will then need to decide between starting the color-sorting programming, or coming up with the feeder mechanism. We haven't done any of the programming yet, so that might make the most sense. We shall see what the team decides.