how to make animation like this prepertual motion machine rotating because of the unbalanced weight not motor is applied

i'v been trying to model that motion without success, so please i would love to know how to do that, print screens are appreciated !