
This week we worked on prototyping (lots and lots of iteration).
initial prototypes (not all documented) |
the top bar (red) prevents multiple marbles from being released at once |
Top view (where marbles will be loaded) |
Next, we experimented with various different structures for holding and releasing the marble. One of the ideas I experimented with was pieces of lego that stuck out, reducing the force of all of the marbles directly on the rotating track.
Another problem we ran into was that the Arduino and Bricktonics Shield only had two ports for motors, so we had to brainstorm a way to have the top and bottom rotating mechanisms for the marble tubes powered by the same motor. (see solution in the video)
Next, we worked on the arduino code for turning the motors. Let motor 1 be the one powering the releasing mechanism and motor 2 be the one powering the rotating track (that holds the tubes of marbles). In english, the code says: when the light sensor senses there are marbles there, then rotate motor 1. If the light value is higher (meaning no marbles are sensed), then rotate motor 2.
One of the (many) problems we ran into was the that there were still marbles that needed to be released after the light sensor had sensed that there was no more marbles, so we set the code to: after it senses the higher light value, then rotate motor 1 six times (the number of undetected marbles) before rotating motor 2.
Another problem we came across was that there was a difference in the light value that was sensed when there was nothing above the marble tube and when there was the empty tube, so we had to adjust the code to account for that, but still now it is a bit finnicky about when it wants to turn.
In the video: you will see the light sensor sensing no marbles above it, so motor1 turns six times before rotating the bottom and top platform.
A final(ish) video of our semi-working prototype (we found that we needed paper over the legos to smooth and reduce the friction of the bottom of the tubes against them.) The first time we tested this all together, the marble tube that was releasing the marbles (hypothetically) shifted over, but got caught on the ledge. Since the gear chain was held tightly around the gears, it snapped and both the chain and attached tubes fell off (and into my lap!), so in the video, I am holding a paper band around the tubes in hopes of keeping them more balanced for the sake of testing.
Reflection: Overall, the design process (note: we aren't done yet!) has been long and full of bumps, however it really is fun to try and solve new ways around these problems. A lot of engineering has been working at building something until it works. Sometimes it is easier to step away from a problem for a little bit (let it stew in your mind) and then come back at it from a fresh angle. Katrina and I spent about 14 hours in the engineering lab hacking at this project and I am glad it is starting to shape up. Notes for improvement for next time, we need to implement two buttons each with very similar functions 1) press the button how many marbles you want to delay 2) press the button how many times you wish to fast forward. In addition, we know that the marble tube structure isn't all too stable, so we were thinking that raising the rotating mechanism to attach to the middle of the tube might be a more effective way to keep the structure balanced and functioning.
https://www.arduino.cc/en/Tutorial/StateChangeDetection
ReplyDelete