Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Electronics:

Elegoo UNO R3 Microcontroller

Greartisan DC 12V 120RPM Gear Motor 

L298N Motor Driver

12 V Power Supply

12 V 1A DC Adapter

Adafruit LIS3DH Triple-Axis Accelerometer


To create this mechanism, we needed a motor, a motor driver, an arduino, and two IMU’s. The motor is needed to turn the links. The motor driver is used to help drive the motor. The arduino holds the code needed to determine how fast and when to change the direction of the motor. The IMU’s are attached to the third link and give back the acceleration of the links in x, y, and z directions. The original idea to control this motor was to collect the x and y acceleration data from the IMU. Using these values, we would use inverse tangent to find the angle of the link 3 and slow the motors down once we reached the desired orientation. However, this only works when the links are stationary. If the links are moving, then the x and y accelerations would change due to the angular velocity of the links. Therefore, if we do the inverse tangent of the x and y accelerations, we would get faulty orientations. Therefore, we switched to only measuring the x acceleration of link 3. If the x acceleration of link 3 is equal to gravity, this means that link 3 is vertical. If the acceleration is 0, it means that the link is horizontal. If the acceleration is negative, it means that the link is in the pouring stage. Using these metrics, we tried to control the motor so that when link 3 is vertical, we would increase the speed to help the cup fight against gravity. We would then slow down the cup when the x acceleration started to approach 0 because the cups no longer need extra power to fight gravity as much. When the acceleration reached 0, we would reverse direction because at this point the inertia of the cups would result in the links slamming into the backboar. However, the motors need a certain speed to fight against both stiction and gravity of the links, so by the time the arduino calculated and sent the instructions to slow down the motor, the links and cups would already slam against the backboard of the mechanism. Therefore, our final code resulted in us detecting when the link 3 reaches the pouring phase, and then switching directions. We no longer considered slowing the motor down. The final code is in Appendix F

  • No labels