Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We used 6 mm rods to connect our cup holder to the joints of the links of the 4 bar to allow it to rotate with the mechanism. We used M3 screws and lock nuts to assemble the holder. We used 6mm ID bearings to allow for rotation and reduce friction.

...

We assembled the four-bar by connecting the joints using 3M screws and lock nuts. We also had two rubber bands to help the lifting mechanism operate with limited torque. We press fit bearings into the rotating arm. We cut a special slot into the input link so that our motor shaft can rotate the link. We attempted to use a higher torque motor, but the resulting electrical issues caused us to return to the lower torque, 100 RPM motor, and usage of rubber bands to supplement the decreased torque.

Figure 26: Image of the full final assembly.

...

We utilized the provided motor drivers to control our 12V DC motor. Rather than using a bulky 12V power source, we fed two rechargeable 9V batteries in series through a voltage divider to output 12V to the motor controller. To enable better control of the system, two buttons were used. The red button reversed the polarity outputted by the motor driver, changing the direction of the motor, while the blue button activated the motor to move the mechanism up/down. An ELEGOO UNO R3 was used to control the system.

Software Development

Below is the C++ code uploaded to the Uno.

Image Added

Figure 28: Code running to control the mechanism.

The code itself is quite simple. Initially, we had basic controls implemented to test each component. When we were certain of the functionality of each component, we created this simple code to convert user interaction into mechanism motion. We define first the pins necessary for use. Three are pins which output to the motor controller while two correspond to the button inputs. These buttons are input pullups, as is standard for button integration. An interrupt is used for the motor direction button. This ensures that the direction is changed only when the button is initially pressed, no matter how long it is held. In contrast, the state of the activation button is read every loop such that the mechanism is in motion only when the user desires. Overall, the code is rudimentary and its development simple.