2.5 DOF Motion
Objective
The objective of this final project is to create a 2.5 DOF (Degree of Freedom) robot/machine that uses 8020-1010 bars, pulleys and NEMA 17 stepper motors. The choice of the functionalities of the machine are up to the team. We chose to create a robot that plays battleship against a real player (on the same paper-table). The objective is, of course, to destroy as many ships as possible.
Mechanical Design
First of all we created the main frame of the machine using 4x 8020-1010 bars, connecting them using 1/4-20 fasteners. On 2 of the bars we drilled 2 holes, which align with the top holes of the other 2 complementary bars. For the connecting and sliding parts we used 3D printed parts in PLA.
For the x and y axes we implemented a sliding mechanisms for the moving parts. These are inserted in the central standard slot of the bars. For both x and y axes we used a system of pulleys that drive belts moving perpendicularly to the floor. These belts are then fixed to the moving part thanks to holders that have very precise slots of the same dimensions of the belt. In this way the belt does not have to be glued and can be easily replaceable.
On the base 4 corners have been created, each of them with 2 fasteners attached to the plywood base; 2 of them have 2 motors, allowing a fast and homogeneous movement along the y-axis, while the other 2 have supports with pulleys that rotate thanks to built-in bearings. These supports have a 1-side design, designed to decrease material waste, cost, and 3D printing time.
The upper bar (x-axis) has only 1 motor positioned on one side, with a slightly smaller support in comparison to the 2 on the base.
The last remaining part is the mechanism for the z-axis, the one that allows the pen to go down on the paper, write, and then come up again. We opted for a mechanism that transforms rotational movement into linear, thank to vertical metal guides.
Render.
Software
Usually in the battleship game there are 2 players, each of them with a board. In our case we just had 1 available, which would have led to the impossibility to play for 2 physical people. We decided to make the machine playing against you. Because of this we came up with a solution to mark the moves during the game. Once you choose the coordinate, the code knows if you hit or not, if you did the machine is going to write an X, otherwise a / (slash). After your turn, the machine plays (randomly generated coordinate), if it hits a ship, then it will mark a triangle, otherwise a square. The game continues until all the board is full of marks, who hit the most ships, wins.
As interface we are using a computer that runs MATLAB and takes your choices as input. The code asks you for a coordinate, checks if that square corresponds to a ship, and acts accordingly. After, it does the same with random generated move for the machine. Ships are positioned through an array before the game starts. The MATLAB script sends a G-CODE serial command to a Makerbase Buddy Control Board specifically made for this purpose to control the output for the motors.
Results
Overall I am satisfied with the result of this project. After we received all the 3D printed parts, we saw that the z-axis mechanics was not working as expected due to a bigger tolerance for the 2 metal guides. Because of this the part that was holding the pen started to rotate, making impossible to properly write on the paper. The 3D printing queue was long so we came up with a solution with the parts remained that we didn’t use; a gear was driving the pen that had a belt piece attached to it, allowing the vertical motion. We successfully learned that it is always a good thing to prepare the project for the worst case scenario, just to be prepared, even if the possibilities for some parts to be wrong, are really low.