Attacking Strategy
Since the navigation of the robot would handle the aiming, our launcher just needed to be able to hold the (6) wildfire balls and launch them at a high enough velocity to knock over all of the targets. To load all the balls quickly, we opted for an exposed circular loader with slots cut out that allowed us to easily drop the balls in. With a flywheel launcher design, we were able to manipulate flywheel speeds to adjust the launch speed and angle of the ball, allowing us to fine tune targeting each tower which were at variable distances. This complemented our design because the robot would always launch from a predetermined distance away from the north wall while only adjusting the lateral directions to align against the opposing towers.
The sequence for our launcher and loader mechanism after the microcontroller sends a signal to attack:
The sequence for our launcher and loader mechanism after the microcontroller sends a signal to attack:
- Teensy LC is positioned to fire and goes into attacking state.
- Flywheel launcher speeds up.
- Stepper motor turns revolves 1/6 of a rotation to drop a ball into the ramp.
- Repeat step 2 until a full rotation has occurred.
- Stepper motor revolves back to the original position to ensure the same rotation is repeatable from the same starting position.
- Flywheel launcher slows down.
- Teensy LC goes into reloading state.
Launcher and Loader Mechanical Design
Mechanical Structure:
Our loader/launcher system consists of two layers. The loader layer is comprised of a stationary platform with a mounted stepper motor and a hole leading to the launcher system. The stepper motor turns a Duron plate with 7 holes laser cut into. We cut 7 holes to maximize the amount of wildfire the robot could hold without one wildfire being pre-fed into the launcher system. The wildfire sits in these holes and, when one of them aligns with the hole in the stationary platform, the wildfire falls through and is guided by a PVC pipe pipe to the launcher system. The top plate was positioned low enough such that the wildfire would not compress or get stuck under it, causing more strain on the stepper motor.
Motors
The stepper motor for the loader system was chosen using the calculations shown on the left.
All of the stepper motors fit the torque requirement, so our largest constraint was the size of the motor i the z direction. The stepper motor was mounted below the loader support plate and a concern was that, if the motor was too tall, it would block the wildfire from entering the chute leading to the flywheel. We allowed ourselves 2” - 2.5” for the entire loader assembly to allow for the required clearance. Without the stepper motor, the loader assembly was 1.07” from bottom of bottom plate to top of top plate.
We decided on the Sinotech 42BY48H07 stepper motor because, although it was not the smallest motor, it performed the most reliable in prototype testing and we could run it off of the DRV8825 stepper motor driver using a similar circuit to our previous circuit lab. In prototype testing, this motor was small enough to reliable let wildfire pass into the launcher assembly.
Motor Drivers
The launcher utilizes a DS3658 motor driver to drive the DC motor at 12 V. The loader utilizes a DRV8825 stepper motor driver to drive the Sinotech 42BY48H07 stepper motor. Although no official datasheet had been published for this stepper motor, we found electrical specifications published online at https://www.sinotech.com/full-motor-catalog/42mm-24-phase-7-5-steps/. This motor is rated at 24 V, but we powered it at 12 V.
Our loader/launcher system consists of two layers. The loader layer is comprised of a stationary platform with a mounted stepper motor and a hole leading to the launcher system. The stepper motor turns a Duron plate with 7 holes laser cut into. We cut 7 holes to maximize the amount of wildfire the robot could hold without one wildfire being pre-fed into the launcher system. The wildfire sits in these holes and, when one of them aligns with the hole in the stationary platform, the wildfire falls through and is guided by a PVC pipe pipe to the launcher system. The top plate was positioned low enough such that the wildfire would not compress or get stuck under it, causing more strain on the stepper motor.
Motors
The stepper motor for the loader system was chosen using the calculations shown on the left.
All of the stepper motors fit the torque requirement, so our largest constraint was the size of the motor i the z direction. The stepper motor was mounted below the loader support plate and a concern was that, if the motor was too tall, it would block the wildfire from entering the chute leading to the flywheel. We allowed ourselves 2” - 2.5” for the entire loader assembly to allow for the required clearance. Without the stepper motor, the loader assembly was 1.07” from bottom of bottom plate to top of top plate.
We decided on the Sinotech 42BY48H07 stepper motor because, although it was not the smallest motor, it performed the most reliable in prototype testing and we could run it off of the DRV8825 stepper motor driver using a similar circuit to our previous circuit lab. In prototype testing, this motor was small enough to reliable let wildfire pass into the launcher assembly.
Motor Drivers
The launcher utilizes a DS3658 motor driver to drive the DC motor at 12 V. The loader utilizes a DRV8825 stepper motor driver to drive the Sinotech 42BY48H07 stepper motor. Although no official datasheet had been published for this stepper motor, we found electrical specifications published online at https://www.sinotech.com/full-motor-catalog/42mm-24-phase-7-5-steps/. This motor is rated at 24 V, but we powered it at 12 V.
Launcher and Loader Software
The loader uses the AccelStepper library from Arduino to rotate the stepper motor. The motor is attached to the two plates shown in our CAD files such that when it rotates, the top plate (containing seven holes) moves in relation to the bottom plate (containing one hole positioned above the opening to the flywheel launcher PVC pipe), which remains stationary. The balls are constrained within each of these upper holes and rest on the bottom plate. Eventually, each ball will become positioned above the hole in the bottom plate and will drop into the opening of the flywheel launcher to be propelled forward by the flywheel.
Since the Sinotech 42BY48H07 stepper motor has a rotation of 48 steps per revolution, we coded it to move 8 steps per rotation (48 steps / 6 balls = 8 steps). The initial launcher position consists of an empty hole in the upper plate positioned directly above the open hole in the bottom plate. Since the hole in the bottom plate was larger than the holes in the top plate, positional offsets accumulated across successive rotations. For this reason, we returned the loader to its initial absolute position after it had launched all six balls. This reset the loader position for the next reloading and launching scheme.
Since the Sinotech 42BY48H07 stepper motor has a rotation of 48 steps per revolution, we coded it to move 8 steps per rotation (48 steps / 6 balls = 8 steps). The initial launcher position consists of an empty hole in the upper plate positioned directly above the open hole in the bottom plate. Since the hole in the bottom plate was larger than the holes in the top plate, positional offsets accumulated across successive rotations. For this reason, we returned the loader to its initial absolute position after it had launched all six balls. This reset the loader position for the next reloading and launching scheme.
We use MetroTimers to control the time between individual 8-step rotations of the stepper motor, as well as to set a brief interval during which the flywheel accelerates from an off state to its assigned duty cycle prior to the first rotation of the stepper motor. This acceleration interval permits the flywheel to launch the first ball at its assigned duty cycle, rather than at a slower speed.
Tower Strategy
- King’s Landing:
- After launching the first four balls at King’s Landing using a PWM with a 100% duty cycle, the flywheel motor gets slowed to a 40% duty cycle to launch the remaining two balls. This slower speed alters the ball trajectory to ensure that if the robot had overshot the first few balls, the next few balls will hit the tower.
- All six balls get launched at King's Landing prior to reloading.
- Casterly Rock and Dragonstone
- The duty cycle is set to 100% for the entire tower to provide enough force to knock each of these towers over.
- All six balls are launched at Casterly Rock and at Dragonstone.
The circuit implements a physical switch, which is used in the code via the BoardChange() and SetBoard() functions to toggle between two sets of ultrasonic sensor thresholds for triggering state changes. We incorporated this switch because we found that, due to differences in the game board wall heights of approximately 0.125”, the thresholds varied slightly between game boards. Incorporating the switch enabled us to encode separate sensor threshold values for each of the two game boards used during the competition. On the night of the competition, we simply toggled the switch on our bread board to match our board assignment.