Machine Control Design
If you haven’t already, check out my other webpage to help you understand more about VEX robotics: http://alexanderrt.weebly.com/basic-programming.html
For this project, we were given a list of machines to build out of VEX Robotics pieces, motors, and sensors. Our group decided to build an AGV. An AGV is an Automated Guided Vehicle, which means that it drives itself and performs a specific job.
Our AGV was supposed to be used as a transport vehicle. Supplies would be dropped on and offloaded from the vehicle after it would drive back and forth. The vehicle must also travel back and forth on a closed-loop system (requires feedback).
When we brainstormed for ideas, we wanted this vehicle to be as simple as possible. We believed that it needed to include a “safety light” so that you can tell it was moving, and so that you can back away from it. The vehicle also needed a start button and an emergency kill-switch. You can see our brainstorming ideas below.
1. Our options for the light colors were green and red. We decided that red would be better for a safety light because green doesn’t seem to indicate any danger.
2. For the motors, we decided that having just two motors would be sufficient for our vehicle. Having four motors would make the vehicle go faster with more force, and we wanted the vehicle to go slower.
3. We had the choice between big or small wheels, and we decided that if we had small wheels the motors would be dragging on the floor. The big wheels would be more efficient because they give the vehicle enough height to not hit the floor.
4. We could’ve either put a sonar senor or a bump switch in the front of the vehicle. We decided to put the bump switch on the front and back for the convenience of cost.
For this project, we were given a list of machines to build out of VEX Robotics pieces, motors, and sensors. Our group decided to build an AGV. An AGV is an Automated Guided Vehicle, which means that it drives itself and performs a specific job.
Our AGV was supposed to be used as a transport vehicle. Supplies would be dropped on and offloaded from the vehicle after it would drive back and forth. The vehicle must also travel back and forth on a closed-loop system (requires feedback).
When we brainstormed for ideas, we wanted this vehicle to be as simple as possible. We believed that it needed to include a “safety light” so that you can tell it was moving, and so that you can back away from it. The vehicle also needed a start button and an emergency kill-switch. You can see our brainstorming ideas below.
1. Our options for the light colors were green and red. We decided that red would be better for a safety light because green doesn’t seem to indicate any danger.
2. For the motors, we decided that having just two motors would be sufficient for our vehicle. Having four motors would make the vehicle go faster with more force, and we wanted the vehicle to go slower.
3. We had the choice between big or small wheels, and we decided that if we had small wheels the motors would be dragging on the floor. The big wheels would be more efficient because they give the vehicle enough height to not hit the floor.
4. We could’ve either put a sonar senor or a bump switch in the front of the vehicle. We decided to put the bump switch on the front and back for the convenience of cost.
We didn’t want our design to be too big, but we believed that it needed bigger wheels to support the supplies. Our original design consisted of four wheels, two motors, and four buttons. We decided that having two sonar sensors would be more expensive than having two buttons, so we decided that the front and back buttons would be better to have in our design. If the vehicle was smashing into the wall, the speed could be slowed by decreasing the rotations of the wheels or the speed of the motors.
We looked for things that could be the body for our AGV. We decided that the body should be a base plate because everything else could easily be placed onto it and a bucket of supplies can also fit onto it. A body that is less wide than a base plate wouldn’t work with our design because we would have problems placing the two buttons and cortex onto it. We wanted two other buttons on the front and back of the vehicle. We placed four wheels on the sides and we decided that having two motors would be sufficient for our vehicle. We placed four metal plates on the side of the vehicle to increase the height because we didn’t want the motors touching the floor. We also installed two buttons on the top of the body, along with our VEX Cortex and red VEX LED light. Here are some pictures of our AGV:
We looked for things that could be the body for our AGV. We decided that the body should be a base plate because everything else could easily be placed onto it and a bucket of supplies can also fit onto it. A body that is less wide than a base plate wouldn’t work with our design because we would have problems placing the two buttons and cortex onto it. We wanted two other buttons on the front and back of the vehicle. We placed four wheels on the sides and we decided that having two motors would be sufficient for our vehicle. We placed four metal plates on the side of the vehicle to increase the height because we didn’t want the motors touching the floor. We also installed two buttons on the top of the body, along with our VEX Cortex and red VEX LED light. Here are some pictures of our AGV:
Here is the Pseudocode for our AGV:
Start Program
When the 'Start' button is pressed
Start Front motors (drive forwards) and
Turn the Safety Light On Until the
'Front' Button is pressed then
Stop the Front motors and
Turn Safety Light Off and
Wait 5 seconds for supplies to be dropped off onto vehicle
Start Front Motors (drive backwards) and
Turn Safety Light On again Until the
'Back' button is pressed then
Stop the Front motors and
Turn the Safety Light Off (supplies will now be off loaded)
If the kill switch is ever pressed,
Stop all tasks
We needed a kill-switch. What we did was created a background task, which is another function. The “task background();” after the #pragm and before the task main was a reference for the “startTask(background)” command. After our code, we simply inserted a background task that says when the emergency button is pressed, all tasks stop.
So now that we had our design and code, we now tested the AGV. Here are three videos of our AGV. The first and second video includes the AGV working with the kill-switch, and the third video includes the AGV working without the kill-switch.
Start Program
When the 'Start' button is pressed
Start Front motors (drive forwards) and
Turn the Safety Light On Until the
'Front' Button is pressed then
Stop the Front motors and
Turn Safety Light Off and
Wait 5 seconds for supplies to be dropped off onto vehicle
Start Front Motors (drive backwards) and
Turn Safety Light On again Until the
'Back' button is pressed then
Stop the Front motors and
Turn the Safety Light Off (supplies will now be off loaded)
If the kill switch is ever pressed,
Stop all tasks
We needed a kill-switch. What we did was created a background task, which is another function. The “task background();” after the #pragm and before the task main was a reference for the “startTask(background)” command. After our code, we simply inserted a background task that says when the emergency button is pressed, all tasks stop.
So now that we had our design and code, we now tested the AGV. Here are three videos of our AGV. The first and second video includes the AGV working with the kill-switch, and the third video includes the AGV working without the kill-switch.
Above are the two videos with the kill switch.
Here is the video without the kill-switch.
In the end, our design was a success. I can't think of anything that would've improved our design to accomplish the job that we accomplished. Our design worked because it was simple, and a simple design is always the best design.
This project demonstrated that the need for robots is increasing, and the more engineers understand them, the more our world will improve.
This project demonstrated that the need for robots is increasing, and the more engineers understand them, the more our world will improve.