The present application relates to the technical field of battery swapping, and provides a
locking mechanism, a battery
assembly, an electrical device, and a locking apparatus. The
locking mechanism comprises a sleeve, a locking member, an adjusting member, and a fastening
assembly. The locking member is movably provided on the sleeve, the locking member has a locked state and an unlocked state, and the locking member is configured to be engaged with a locking base in the locked state and disengaged with the locking base in the unlocked state, so that the
locking mechanism is engaged with the locking base in a first direction or the locking mechanism is allowed to be separated from the locking base in the first direction. The adjusting member is rotatably connected into the sleeve around the axis extending in the first direction, the adjusting member is threadedly connected to the locking member, and the adjusting member is configured to, when the adjusting member rotates relative to the sleeve, drive the locking member to move relative to the sleeve, so that the locking member is switched between the locked state and the unlocked state. The fastening
assembly is configured to, when the locking member is in the locked state, prevent the locking member from moving relative to the adjusting member along a direction in which the adjusting member points to the locking base in the first direction.