Problem Statement:
A cookie factory needs your team to design a device that will put a chocolate drop on top of their peanut butter cookies. The machine must position a cookie on a separate device that will then move it into position for a dropper to descend and dispense the chocolate drop. The cookie with the chocolate drop should then move to another position where it will be placed with other finished cookies to await inspection and packaging.
Constraints:
- Made using VEX components
- Position a cookie on a separate device
- Lower a dropper
- Dispense a chocolate chip
- Raise the dropper
- Move the cookie elsewhere
- Continue to loop program
Brainstorming:
- A VEX tank tread serves as the assembly line.
- A limit switch is placed near enough so that when the cookie passes by it on the conveyor belt, it is activated and stops the conveyor belt while triggering the dropper.
- A servo motor turns two gears in order to create a clamp. This clamp holds the Hershey’s kiss in place and sets it on the cookie.
- A crane arm holds the cookie and then stops at the desired location to allow a second robot arm to place a chocolate kiss on top of the cookie
- A spatula scoops up the cookie and is transported to the desired location via a track system attached to the base plate.
- Stoppers in the tank tread space the cookies out in equal distances.
- Chocolates are on their own track/ conveyor belt system and pushed off when activated.
Calculations:
Using a decision matrix, my team decided to create a machine with a tank tread with spacers in it serves as the means of moving the cookie under the dropper. A limit switch is then placed close enough to the conveyor belt that when the cookie passes by it, it activates. This in turn stops the conveyor belt and activates the dropper.
Program Pseudo Code:
1.BumpSwitch activates the program
2.Motor1 and motor2 turn on. This starts the conveyor belt.
3.The limitSwitch is activated by the cookie
4.Motor1 turns off
5.Motor2 turns off
6.Motor3 turns on
7.Wait time 1
8.Motor3 turns on in reverse
9.Wait time 2
10.Motor1 and motor2 turn on
11.Loop continuously16. //conveyor belt motor starts
1.BumpSwitch activates the program
2.Motor1 and motor2 turn on. This starts the conveyor belt.
3.The limitSwitch is activated by the cookie
4.Motor1 turns off
5.Motor2 turns off
6.Motor3 turns on
7.Wait time 1
8.Motor3 turns on in reverse
9.Wait time 2
10.Motor1 and motor2 turn on
11.Loop continuously16. //conveyor belt motor starts
Program Draft 1:
1. task main () 2. { 3. untilBump(dgtl2); 4. while(1==1); 5. { 6. startMotor(port2, 25); 7. untilTouch(dgtl1); 8. wait(1); 9. StopMotor(port2); 10. startMotor(port3, -30); 11. wait(2); 12. stopMotor(port3); 13. wait(1); 14. startMotor(port3, 40); 15. wait(1); 16. stopMotor(port3); 17. startMotor(port2, 25); 18. } 19. } Program Draft 1 Pseudo Code:
1. //main task 2. //Curly brace :start of task main() 3. //bumpSwitch is bump 4. //loop infinitely 5. //curly brace: star t of while loop 6. //conveyor belt motor starts 7. //until the limitSwitch is touched 8. //wait 1 second 9. //conveyor belt motor stops 10. //dropper motor starts 11. // wait 2 seconds 12. //dropper motor stops 13. //wait 1 second 14. //dropper motor starts 15. //wait 1 second 16. //dropper motor 17. //conveyor belt motor starts 18. //curly brace: end of while loop 19. //curly brace: end of task main() |
Program Draft 2:
1. task CKTPControl () 2. { 3. while(1==1); 4. { 5. startMotor(port2, 25); 6. untilTouch(dgtl1); 7. wait(1); 8. stopMotor(port2); 9. startMotor(port3, -30); 10. wait(2); 11 stopMotor(port3); 12. wait(1); 13. startMotor(port3, 40); 14. wait(1); 15. stopMotor(port3); 16. startmotor(port2, 25) 17. } 18. } 19. task main () 20. { 21. while(1==1); 22. { 23. untilTouch(dgtl2); 24. startTask(CKTPControl); 25. wait(1); 26. untilTouch(dglt2); 27. stopTask(CKTPControl); 28. } 29. } Program Draft 2 Pseudo Code:
1. //task CKTPControl () 2. //curly brace: start of task CKTPControl() 3. //loop infinitely 4. //curly brace: start of while loop 5. //conveyor belt motor starts 6. //until touch sensor (dgtl1) is activated 7. //wait 1 second 8. //conveyor belt motor stops 9. //dropper motor starts 10. //wait 2 seconds 11. //dropper motor stops 12. //wait 1 second 13. //dropper motor starts 14. //wait 1 second 15. //dropper motor stops 16. //conveyor belt motor starts 17. //curly brace: end of while loop 18. //curly brace: end of task CKTPControl 19. //space 20. //task main () 21. //curly brace: start of task main 22. //loop infinitely 23. //curly brace: star of while loop 24. //until touch sensor (dgtl2) is activated 25. //start of task CKTPControl () 26. //wait 1 second 27. //until touch sensor (dgtl2) is activated 28. //stop task CKTPControl () |
Final Design:
Program Final:
1.task main()
2.{ //Program begins, insert code within curly brace
3.untilTouch (dgtl2); //On Switch
4.while (1==1) //This makes it an infinite loop
5. {
6. startmotor(port2, 25); // Turn on Conveyor Belt
7. untilBump(dgtl1); // Cookie triggers Limit Switch
8. wait(.5); // Wait to align cookie
9. stopMotor(port2); // Stop Conveyor Belt
10. startMotor(port3, -30); //Start Drop Motor
11. wait(.75); // Drop time
12. stopMotor(port3); //Stop Drop Motor
13. wait(1); // Wait
14. startMotor(port3, 40); // Reverse Drop Motor
15. wait(.75); // Lift Time
16. stopMotor(port3); //Stop Drop motor
17. }
18.} // End of Main
1.task main()
2.{ //Program begins, insert code within curly brace
3.untilTouch (dgtl2); //On Switch
4.while (1==1) //This makes it an infinite loop
5. {
6. startmotor(port2, 25); // Turn on Conveyor Belt
7. untilBump(dgtl1); // Cookie triggers Limit Switch
8. wait(.5); // Wait to align cookie
9. stopMotor(port2); // Stop Conveyor Belt
10. startMotor(port3, -30); //Start Drop Motor
11. wait(.75); // Drop time
12. stopMotor(port3); //Stop Drop Motor
13. wait(1); // Wait
14. startMotor(port3, 40); // Reverse Drop Motor
15. wait(.75); // Lift Time
16. stopMotor(port3); //Stop Drop motor
17. }
18.} // End of Main
Reflection:
If this project were to be done again, I would have used different VEX components to create the rack-&-pinion portion of the dropper. I didn't realize that there were more suitable parts until after the machine was already constructed. It still worked efficiently and effectively, but it would have been better with the other parts.
Create a free website with
Weebly