The Xiaomi Yi camera has its lens fixed to one focal length, which according to reviewers, was set up for hand-held selfie distances. For my use, this set focus was slightly too far, but for most reviewers it was too close as distance action shots were not in focus. Consequently, there was a plethora of sites explaining how to unfix the focus length by popping off the front facia and removing the three glue spots that held the lens in its pre-set focus. I wanted to be able to manually change the focus for different shots, so I also needed to remove the bezel around the lens so that I could continue to adjust the focus once the front facia was back in place.
To calculate which the lens position for a range of different focal lengths I first connected the camera to my TV with a HDMI lead and noted the lens position and distance at which the image was in focus (notes at top of notebook page below). This showed that there was an exponential relationship between focal distance and lens position, and that the further way the focal point the smaller the increments of lens rotation.
However, this was not precise enough and so I took a series of high resolution photographs with the camera, which included markers noting the lens position (in 45 degree increments) and the distance between the front of the camera body and the subject.
Once the most in-focus distance was established a paper focus ring was fixed to the camera noting the distances at the 45 degree positions, and a small dot of nail polish was added to the register position of the lens.