Friday, August 8, 2014

Practice Project with Mindstorms


It turns out I prefer busy summers to boring summers, but I also tend to go a little overboard. So if this poor blog seems abandoned, that's because it is! But it's time to fix that.



This project was supposed to be a  sort of automated set of drawers. A grid would sit over them, holding the drawers. The two motors could move to a certain "coordinate" to let the third lift the drawer. Overall, I was able to make it work well in concept. But I'm abandoning the project in its current form for now, just because the limitations of the Mindstorms kits and my own time and resources have made it difficult to complete.

I've noticed that the Mindstorms kits are optimized for compact robots. The pieces fit together with a fair amount of wiggle room, but if you aren't wedging anything inside that would allow them to move, you're fine. However, if you want to build a machine with a longer arm protruding from it, the leverage can cause connections to bend or even snap open. This made my plan of having one motor moving a bar holding the others difficult. As you can see in the video, the bar twists the motor holding and makes accurate movements difficult. 



Another difficulty I had was with the Mindstorms software. What I was looking for was a way to input a command from my computer that would trigger a method in the robot. While there is a Bluetooth connection option for the brick, it doesn't let me contact the brick with a command while the program is running, as there's no text input function. In the end I settled for inputting a "code" through the pressure sensor, so the robot would move to a position dependent on the number of times I pushed the button. This worked fairly well. This is the code I wrote that does just that.



The awesome people on the Google + Makers forum suggested I use MIT App Inventor, which lets any android device communicate with the brick through Bluetooth. This is a great idea! BUT, I regrettably have no android device on which to test this capability. I'll have to cross my fingers for my birthday. 

The video shows the last test I did of the robot. The design is... Not great, because I had to keep dropping and coming back to the project, and every time I would get halfway through fixing a problem, and have to stop for the next camp or class.
The robot did better in earlier tests, before the bars started rubbing the nubs away on the Legos holding them together! Great. And now that I'm trapped between eschool, drivers ed, and another super secret  project (coming soon!) that requires lots of time commitment, I decided to give this project a break. I'd like to come back to it at some point later, probably using an arduino and an upright set of drawers. I've got a few ideas written down. But for now, I'll just consider this project a good exercise in programming and design, and 
move on.
Up next: an upgrade to an old robot, a super secret project, and a book review to finish up the summer.