Mechanical Design

Launcher

2 x 775 Pro motor

3.75:1 Gear Ratio

4" Wheels

1/2" Compression 40 degree launch angle

Possible improvements

-Position Hood that uses pneumatic controls to change launch angle.

-Electric Motor that swivels Hood.

-Stationary Hood that uses Motor speed to determine height.



Ideas from other FRC Teams

-Direct Geared Hood

This Hood design is operational but may put more strain on the motor driving it, I was unable to see in the video but I would assume that the motor is not directly connected to the hood gear.

-Chain Driven Hood

This Hood is good and is also very close to the same idea of what we are putting in our robot. It is a hood controlled with a chain so as to not put direct strain on the motor and is also able to be controlled accurately.

-Pneumatic Driven Hood

This hood is perfectly operational and looks like it is well constructed. The only problem with using Pneumatic to control their hood is that they only have two different modes. Up or Down. They can't control their hood to the degree that we can.



775pro VEXpro Motor Curve Data

Progression of Motor Mount

The first version of the motor mount was more conceptual and less measurement based. This model had many weak spots and unneeded features such as the hex hole where a nut could fit. The second model fixed these issues and was printed out. The second model was stronger than the first but had problems with sizing. There was not enough room to fit a nut and would have to have pieces redesigned. The third model is the combination of the two first and tries to address these problems.

Before and After of Side Plate

The Second model of the side plate adds holes for the Talon SRX and also a spot for the Motor Mount to mount onto. I also removed the holes for the original motor mount to cut down CNC times.

Hood Assembly

We realized that the hood all together would be unable to fit on the 3D printer bay, so to fix this we split the hood into three parts, then assembled them with bolts post print.

Code

This snippet of code creates a class called Launcher, part of the sub-systems. The class creates a few objects mandatory for the methods to run then creates the first method: Launcher().

Launcher() is a method that sets both motors to do the same thing, sets up the encoder sensor and assigns pins on the TalonSRX.

tuneLauncher(): When called, lets us tune the launcher speed using joystick

spinLauncher() Method: When called, lets us set launcher motor speed.

setLauncherSpeed() Method: When called, lets us set launcher speed when in velocity mode.

getLauncherSpeed() Method: When called, prints the speed of the launcher motors.

launcherIsAtSpeed() Method: When called, returns true or false whether the motors are at set speed determined by the encoder. 

This snippet of code is from the SmartLaunch.java file. It first creates a class SmartLaunch. It then creates a constructor method with two parameters; launcher and elevator. It calls methods from the Launch.java file that sets motorspeed, waits for them to spin up to speed, drives the elevator, waits for balls to move into position, stops the elevator, then lastly stops the launcher motors. 

New Code for Pivoting Launcher Hood Coded by Paolo Cao

This section of code allows us to set a position for the hood to go. The key parts of code here is the execute constructor, which first runs setPivotingHoodPosition(to a value). This moves the hood to whatever position we set using PID motor control. After that the isFinished() constructor waits until the hood is at the position we set, then returns a Boolean value (true or false), so the robot knows whether to go on or not.

This section of code is used for tuning the hood motor. It uses two three main constructors. First initilize() and execute() will run the tunePivotingHood() command which lives in the Launcher class. This is a script that allows us to control the motor directly and not to a set position using the joystick on the controller. Then, the isFinished() constructor will always return false, to essentially force this code to run all the time until we are done setting the motor and can manually reset the code.

Encoder Design/Assembly

The last thing we needed to implement was an encoder. An encoder uses a magnet at the end of the driving shaft to tell our computer how fast the motor is spinning. It uses this information and PID control to move the hood to a designated position. 

In order to meet the requirements for the encoder, our encoder mount had to be very precise and account for 3D Print error, error when drilling the bore in the shaft, and pieces of the robot that were not together exactly as tight as they were in the 3D model. Luckily, we did our math correct and everything worked smoothly the first time. We got a green light which meant that the magnet was about 0.45 inches from the housing dent. 

Finished Encoder Mount