Dr H @ instructables.com build a Raspberry Pi based microscope using a WaveShare B-camera and plexiglass parts. He writes:
Based on the RPI camera and LEGO brick-based microscope I presented earlier ( A-Raspberry-Pi-camera-based-microscope-built-from- LEGO ) I have constructed a similar microscope build from Plexiglas parts. So you may build your microscope even w/o having a LEGO collection. What is missing so far is the adjustment gears of the LEGO version.
The maximum resolution is about 5 µm/pixel. On high resolution only a small area will be in focus and you will see an effect called chromatic abberation.
Below you will find a description of the device and the information required to build one on your own.
ARPM: Another Raspberry Pi Microscope – [Link]