编辑: jingluoshutong | 2018-11-16 |
7 While the WiShield provides the ability to communicate with the Arduino remotely, it has no bearing on the mechanical control of the SMARTMOUNT. In order to incorporate this aspect, another shield is required. 4.1.2: Motor Control To control the mechanical aspects of the SMARTMOUNT, the Adafruit Motor Control shield was incorporated into the design: Adafruit Motor Control Shield The Adafruit Motor Control shield has the ability to control multiple mechanical devices including hobby servos, DC motors, and stepper motors. Based on the controlled device, it utilizes a different part of the shield. To control the two inputs for hobby servos, a 3-pin implementation for each servo (controlled by digital pins
9 and 10) is incorporated, deriving both voltage (regulated 5V) and the input signal from the Arduino board. Both DC motors and stepper motors are controlled by the two sets of
5 terminal blocks which implement a set of
4 H-Bridges (utilizing digital pins 4, 7,
8 and 12), allowing the motors to be controlled bi-directionally. The Motor Control shield also has the ability to derive its power from an external source through the EXT_PWR block, in case the regulated 5V from the Arduino board is insufficient. As detailed, the SMARTMOUNT system utilizes a set of
2 servo motors along with an actuator device (with a DC motor inside). In order to implement these devices into the developed control scheme, it was first apparent to resolve an existing pin conflict between the two shields. When referencing the pin schematics of both devices (as detailed in the Appendices section), it is apparent that a servo control pin (digital pin 10) and DC motor control pins (digital pins
7 and 12) were already being used by the WiShield SPI. In order to implement these devices, digital pins 14, 15, and 19, a set of unused pins, were utilized. For the servo motors, Servo A used pin
9 8 (deriving the necessary power and signal without need for change) while Servo B used pin
19 as the signal pin and derived power from the EXT_PWR block. To incorporate the actuator, pins
14 and
15 were used, applied signals of opposite polarity in order to control the extension and retraction of the actuator. When referencing the developed sketch (as detailed in the Appendices section), the mechanical control can be defined by the two distinct components that compose the mount, the servos and the actuator. The servos were........