I put together a webcam to image demonstrations in lectures better. The problem with consumer webcams is that they have a wide angle lens and no optical zoom. Professional webcams have full control, but are really expensive. Therefore off to the workshop.
First the result, images from the same position with and without an added lens. As you can see at this distance (35 cm) I have a wide angle, but with the added lens I can trim the field. As you can also see the focus is not so good through the lens, but the result is far better than a digital zoom of this power. The images appear to be different sizes, that is a processing mistake
I bought a Logitech webcam, the business version of a standard consumer one, which means that the software is not included. I am using the B525, the consumer version has a C number and appears to be identical and 1/3 more expensive. I also bought a 5X telephoto attachment that is supposed to go onto smartphones and tablets. Mine came from System S. First peel off the front and then remove the face and the grip/holder thing using a small screwdriver.
The reason to do this is to modify the holder and get the additional lens as close as possible to the lens that is present.
I then had to use a Dremel to remove material from the front plate so that the lens attachment would fit. Otherwise it was wobbly and too far from the existing lens.
Here is an out of focus image of the lens attachment and the reduced size webcam and a small bolt I am using to attach the webcam to a tripod until I think of a better solution.
Here is the finished equipment.