![Building Smart LEGO MINDSTORMS EV3 Robots](https://wfqqreader-1252317822.image.myqcloud.com/cover/33/36700033/b_36700033.jpg)
Rotation
The tank also needs to be able to aim at the beacon. The entire turret assembly is mounted on a turntable, which allows it to rotate to the right and left. The turntable is powered by an EV3 medium motor, which is plugged into port D:
![](https://epubservercos.yuewen.com/3D99B5/19470395308895206/epubprivate/OEBPS/Images/0a51692e-4f48-4399-89d1-6cd73e6492e9.png?sign=1738890549-aKjhufyZtxgRkHBTBIYYeuD76aoMHv7E-0-1341acfc03c260d432c0a8f6423e2c1b)
This motor is located in the back of the robot to the right side. It sends its power through a 90-degree gear connection, which is very similar to the one used with the cannons. However, there is another set of gears in this mechanism: a 24-tooth gear drives the gear on the turntable mechanism. The overall gear ratio between the motor and the turntable is 4.17:1, meaning the motor must make 4.17 rotations to get the turret to rotate a full 360 degrees. This is a much slower gear ratio than the one we saw on the cannon. Slowing down the rotation of the turret makes its motion more accurate and easier to control:
![](https://epubservercos.yuewen.com/3D99B5/19470395308895206/epubprivate/OEBPS/Images/f56046ee-38a6-4aa9-8cb3-4c1739a3c030.jpg?sign=1738890549-dx47y34RkJUWBfjp6KYH5qQvMLJQH83F-0-ebaaad85e429137b58bdeeb3add7a7f0)