Stereo Ninja

A DIY digital stereo-microscope. Low cost. Open source software and hardware. For electronics inspection, soldering work and more.

Public Chat
Similar projects worth following
If you ever soldered SMT components or looked for issues on one of those tiny PCBs, you know that using a good microscope helps a lot, especially if it is a stereo microscope. But a good stereo microscope comes with a hefty price tag, so it's not for everyone. A cheap alternative is using a "usb microscope", but then of course you do not have stereo vision.
Our idea is to combine best of both worlds. Having proper stereoscopic view on your work piece and using relatively cheap digital components for archiving that. If you already have a 3D capable monitor, you only need a pair of cameras with suitable optics and some electronics for combining the two video streams into a single one that your monitor understands. We are using a Raspberry Pi for that (what else? ;-)).

Stereo Ninja is a dual camera setup for stereoscopic microscopy. The heart of the project is a Raspberry Pi. To be precise, you need a Raspberry Pi 3 or 4 Compute Module and a breakout board that gives you access to both MIPI CSI camera input ports the chip set offers, but is not available at the standard Raspberry Pi 3 or 4 versions. Then of course, you need 2 RaspberryPi-compatble cameras with suitable lenses. Our microscope setup is meant for electronics work, so we chose lenses that do not give you that much of a magnification, but permits an adequate lens-object distance for conveniently working under it. Then of course, you need a 3D monitor for displaying the stereoscopic view on your workpiece. We chose a fast 3D-capable gaming monitor with shutter goggles. Finally, a nice stand for you camera is needed.

All these components allow a selection from a variety of choices. We'll try to come up with a good recommendation on what you would want to get, but it is also possible to mix and match these parts (makes sense e.g. when you already own e.g. a 3d monitor). We'll try to list many of these combinations and document how to get them working. If you try a new lens/camera/board/monitor, let us know how it worked for you!

Here's Uli giving you a quick demo of the Stereo Ninja:


  • Proof-of-Concept: StereoPi + Raspi3 Compute Module: real-time video stream to 3d monitor; done
  • Selecting suitable lenses; done (but will look at more later)
  • Dual-camera mount; done (3d printed version later)
  • Integrate lighting into camera mount (we use an IKEA JANSJÖ for now, which works nicely)
  • Tests with CM4 (Raspi4 Compute Module), work-in-progress
  • latency optimization: test different software setups, measure latency
  • software: digital zoom
  • software: enable streaming/recording

Future feature ideas:

  • software: enable video overlay (display PCB info like BOM directly on screen)
  • Kicad integration 
  • AR mode (e.g. for part placement on PCBs, highlighting tracks, etc)

SteroNinja Stand v6.step

CAD model of the Stereo Ninja stand

step - 413.80 kB - 06/14/2021 at 11:07


  • 1 × StereoPi regular The StereoPi will connect both our cameras to the Raspberry Pi Camera
  • 1 × Raspberry Pi 3 Compute Module This will plug into the StereoPi and be the main processor for Stereo Ninja: Dual camera in, 3D HDMI out
  • 2 × Suitable Raspberry Pi cameras While using the standard Raspberry Pi modules works to some extent, you really want a higher quality module. Using the really expensive ~50€ ones doesn't give you that much benefit, but you should prefer to use a ~10-20€ camera instead of a 3€ camera. In any case, choose two identical ones with identical optics!. We went for a Waveshare RPi Camera (Type F) with the 5 megapixel OV5647 sensor. This camera allows to change the lens to any other with a M12x0.5 thread. We replace the standard lenses with ones with a focal length of 12 mm.
  • 1 × ASUS VG248QE Buy a 3D monitor, but be careful: It MUST support SBS or TB HDMI mode, i.e. both of the 2d pictures are placed "side-by-side" (SBS) or "top-bottom" (TB)"
  • 1 × Shutter glasses suitable for the 3D monitor Depending on the monitor you use, you need to use a compatible set of 3D shutter glasses. We use NVidia ones but choose whichever brand you trust most.

View all 7 components

  • Details on the camera stand

    Andreas Kahler14 hours ago 0 comments

    We've modelled the camera stand in CAD (see files section for STEP file), so it is easier to build for you.

    We will add build instructions as well. Here are some detail shots for the meantime:

  • Watch our video showcasing our affordable stereo microscope !

    Uli Köhlera day ago 0 comments

  • First light with our new custom-built stereo camera stand

    Uli Köhler2 days ago 0 comments

    Team Stereo Ninja just achieved first light with our new, custom stereo camera stand:

    It's an awesome experience being able to adjust the cameras easily and being able to watch a proper stereo experience for the first time.

    Note that, just like before, you won't be able to see the Stereo Effect, since the images posted here are just 2D images. Contact us if you want to join us in testing and refining Stereo Ninja - we are looking for early adopters.

  • Meet our Stereo Ninja mascot

    FabLab München2 days ago 0 comments

    OK, we do not really know why the project is called Stereo Ninja. Andreas came up with the idea and lacking a better name, we stuck with it. But then of course our logo/mascot has to match that theme, so let us present...

    ... the 3D googles wearing ninja panda, showing his favorites weapons, soldering iron and multimeter test leads.

    Hope you like it ;-)

  • Stereo Ninja with CM4 board?

    Andreas Kahler3 days ago 0 comments

    While the StereoPi2 (which takes a RaspberryPi 4 Compute Module) is not yet available, there are other CM4 boards with 2 MIPI CSI connectors which we could use for Stereo Ninja. One of them is the official CM4 Eval Board. I now have another one in my hands (thanks Tim for borrowing!), which looks perfect: the Waveshare CM4 IO Base Board. It has the needed 2 connectors, is very compact and only costs 20$. 

    While the Raspberry3 (and StereoPi) doesn't support FullHD in Side-By-Side Mode, the CM4 should be able to do that, as it even supports 4K output. So we definitely have to look into this!

  • How to achieve multi-user support in stereo microscopy

    Uli Köhler3 days ago 0 comments

    In many companies working on electronics, standard stereo microscopes (either the standard binocular-style type or the "eyes free" Mantis-style type) has become the norm in order to increase the efficiency when working with small (typically 50 micrometers to 10 millimeters) objects like SMD components.

    But what is often neglected is the ability to let multiple users view the stereoscopic image simultaneously. This is not only important for teaching reasons, but you can image how much a "pair programming" like approach for electronics could boost productivity.

    Sure, there are solutions for letting someone take a peek into. Some higher-end stereo microscope (especially the classical "binocular" type) offer a third eyepiece, sometimes called a "pupil's eyepiece". Also, many microscopy setups use an additional microscope path with a camera, so you can use a standard monitor in order to display the image while the main user is looking directly through the optics.

    But all of those solutions have two things in common: Not only are they expensive (a good camera setup for an existing microscope can cost many hundreds up to thousands of €) but everyone except the main user will only see a plain old 2D image .

    Enter Stereo Ninja, the low-budget stereo microscope. Due to its unique concept of using a 3D monitor combined with dual cameras, it basically supports an arbitrary number of viewers.

    Let's suppose you're using a shutter-based 3D monitor like the Asus VG248QE. "Shutter" means that everyone who wants to view the 3D image will have to wear shutter glasses. But that means that everyone who wears shutter glasses and is able to look at the monitor will be able to view the full 3D image - and everyone will be able to experience the same quality of stereoscopic image

    In other words, with Stereo Ninja, you can easily have 5 to 10 concurrent users, and even more if you use additional hardware like active HDMI splitters to split the image to multiple monitors.

    And there's one added gadget for you: Stereo Ninja supports 2D and 3D live streaming over the network thanks to StereoPi's awesome streaming support. But you'll have to wait a couple of days, since we'll cover this feature in a future project log :-)

  • A custom stereo camera stand

    Uli Köhler4 days ago 1 comment

    Enjoy the new adjustable stereo camera stand Team Stereo Ninja has made in order to support stereo microscopy for the masses ! Best of all, it's so simple and cheap to build that everyone can build it within a couple of hours.

    It's designed so you can adjust the camera position and angle while still being able to fix them in place.

    Coming up: First light with the new adjustable camera stand.

  • Wearing glasses while using Stereo Ninja

    Andreas Kahler6 days ago 0 comments

    Just realized that Stereo Ninja has another advantage over conventional stereo microscopes in case you are wearing glasses (like me).

    When I do SMT soldering with the stereo microscope at the FabLab München, I take my glasses off. This way it's easier to get a good view through the eye pieces. But every now and then you want to look at your PCB (or the soldering station or some other tool) without microscope. For me (badly short-sighted) this means that I put on and off my glasses all the time. Not the ideal solution....

    But with Stereo Ninja I do not have to do this! I'm wearing shutter goggles (over my regular glasses which works surprisingly well, at least with our model) so I get the 3D effect while looking at the monitor, but they still let me inspect my PCB directly perfectly fine! Much smoother workflow! :-D

  • Stereo Ninja - Stereo microscopy for the Masses

    Uli Köhler06/08/2021 at 02:12 0 comments

    Did you ever have the chance of looking through one of those 3000€ Mantis microscopes? Let us share a secret with you: Once you did, if you do any type of electronics or even just love to look at them know you need a stereo microscope for yourself.

    But the issue is.... even the cheaper varieties of those stereo microscopes are so expensive that they are simply out of reach for hobbyists and many professionals alike. Or is it?

    Stereo Ninja is a new way of doing stereo microscopy. Instead of using specialized optics in an expensive toolkit, let's use two cameras and a 3D monitor - and a Raspberry Pi.

    But how do you connect two cameras to a Raspberry Pi which only has one camera connector? There are multiple ways in order to do that, but one of the best is to just use the Raspberry Pi Compute Module (which has two separate CSI camera interfaces). Thankfully, the StereoPi project has already done all the electronics works and testing for us. 

    It's pretty simple. Just use two high-quality Raspberry Pi cameras with the StereoPi, display the images in a way compatible with standard 3D monitors and you have a stereo microscope.

    Here is how it looks on the 3D monitor:

    Obviously, you can't see the 3D effect in the photo but the "drunken look" with two similar images being displayed at once looks much more 3D when you've got your shutter glasses on:

View all 9 project logs

  • 1
    Software Setup

    Currently we are assuming you are using a StereoPi (with CM3). The StereoPi comes with a Raspian image ready to be used with StereoPi and 2 cameras. Make sure you have the latest version, there is an update tgz on that wiki page. To get a 3D image (instead of showing 2 images), you have to do some minor modifications:

    in /opt/StereoPi/ replace line

    #tvservice -e "CEA 4"


    tvservice -e "CEA_3D_TB 32 HDMI"

    Additionally in /opt/StereoPi/scripts/ (line 12) replace 

    VMOD_STR="-3d sbs" 


    VMOD_STR="-3d tb"

    This results in a FullHD output on the HDMI port, with the 2 images placed in "top bottom" configuration, effectively giving you half FullHD resolution. We were not able to archive real FullHD 3D resolution with StereoPi/CM3, but we'll look into if this would be possible with a CM4 board.

    You monitor might accept different 3d configurations. To find the correct mode number (32 on the example above) for your monitor use the command 

    tvservice -m CEA 

    and look for a mode with a "3d:.." after it. You want a "TB" (top-bottom) or "SBS" (side-by-side) mode. "FP" (frame-packing) is not natively supported by the raspivid tool, which is used to create the video output.

  • 2
    Camera Setup

    To archive a good stereoscopic effect, the position and alignment of the cameras are very important. We found the following setup to be a good one:

    • distance between cameras and object ca 18-20 cm
    • The cameras should be pointed at a common point located on the object to be viewed (parallel positioning does not work as well)
    • Make sure the cameras are exactly at the same height and have the same "up" vector (no roll or pitch rotation)
    • Place the cameras very close together. A broader base theoretically increase the stereo effect, but tests showed it is not comfortable to look at

    Our custom camera stand is designed to archive this setup easily. It lets you adjust the needed parameters (by loosening some screws) but still hold the cameras at exactly the position you want when pleased with the setup (tightening the screws 😆)

  • 3
    Building the Stand

    We have built a camera stand out of aluminum extrusion and a metal plate as base. This is nice and sturdy and also has some weight, so the cameras do no shake around or come loose.

    The components needed for building one:

    • 1x Base plate. around 40x15cm, 5mm thick
    • 1x 2020 Aluminum extrusion, ~30cm
    • 1x 2020 Aluminum extrusion, ~18cm
    • 1x 2020 Aluminum extrusion, ~15cm
    • 4x 2020 corner brackets 90°. Two of them are used to adjust the camera position and should allow rotation, so use brackets without tabs
    • 4x Slot T-nuts
    • 8x M5x8
    • 4x M5x20 
    • 4x 2020 corner bracket cover
    • 3x 2020 end cover
    • 2x camera blocks

    The camera blocks are the only custom parts. They allow mounting the cameras to the stand. They obviously have to match the camera model you are using. We simply took small aluminum blocks and glued the camera to one side (we made a small depression in the block, so the camera PCB could lie flat on the block). We added a hole with M5 thread on the back so it can easily mounted to the stand with the corner bracket.

    Consider painting/coating the base plate, the metal can short the circuits you want to inspect

    See this project log for detail photos of the stand.

    There is also a STEP file available for the stand.

View all 3 instructions

Enjoy this project?



Andreas Kahler wrote 5 hours ago point

I'm wondering: for many displays you get driver boards on ebay/aliexpress with HDMI input. Are there driver boards with 3D/shutter glasses support? That would be very nice for building a digital 3d microscope with integrated display. A quick search did not give me any good finds unfortunately :-/

  Are you sure? yes | no

MSvB wrote 3 days ago point

The idea of stereo, microscopy, and hacking hardware is a winning combination. The design is quite good as well, and could easily be extended with custom electronics.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates