Friday, April 29, 2016

Final Project Week 4

Partner: (the ahhhmazing) Katrina Montales

This week we worked on fixing the belts. The space between the lego chains would change as the belt went around the gear. So we tried attaching smaller pieces of velcro. However, just having one velcro piece attached at the bottom did not provide enough support for moving the marble holders. As an alternative solution, we found some Under Armor headbands. They kept slipping off of the pieces from the inside of the lego wheels, so we tried sewing them to the lego tracks (ps: sewing takes a long time, I spent about 3 hours sewing...). In addition, we tried adding a second track to support the upper half of the marble holders.


Next, we worked on cutting out a Delrin piece to reduce the friction the marble holders have with the platform they sit on. This was pretty simple because of the extensive Solidworks experience I had from the windlass project. The delrin piece for the top has a hole for the marbles to be loaded into, and bottom doesn't have it.


Just like when I tackle a large problem in computer science, break it down into small sub-problems. First I set up the basic circuit to work with the button and the LED. I wrote code so that when the button was pressed, the LED would light up.


Next, I found code online that would count the number of times the button has been pressed (basically by maintaining a variable that we can compare the current state of the button to to see if the state has changed). The result is shown in the serial, a little something like this:










Putting it all together:
I inserted the working parts into our code for the normal functioning of the marble releaser (behavior determined by the reading on the light sensor). We have two buttons each using very similar code and a while loop. For the fast-forward button, I set to run while the number of button pushes is above 0, run the code for releasing one marble, and then decrement the button pushes counter. For the delay button, practically the same code except that we set the motors to speed of 0, and then delay for a single marbles units of time.

Lastly, we worked on fine tuning all of the separate parts so that they work well together (thinks like tweaking the light sensor). In addition, at our meeting with our client, Becky, at the child studies center, she mentioned that our entire contraption was a bit distracting, so we constructed a main board for the children to look at (and only see the tubes and marbles). Here is a video of our contraption working for the most part (we just need to tweak how much motor two rotates to load in the new marbles, right now it is a bit too much, and finalize the attachment of the funnel.) Wish us the best of luck on our presentation!






2 comments:

  1. That's so smart of you guys to have thought to use the Under Armour headbands. Also 3 hours worth of sewing – now that's real dedication...

    ReplyDelete