← All work

Scope gantry

A soldering microscope that hangs under the shelf above my bench and slides to wherever the board is. Two linear rails, three lengths of aluminum extrusion and a handful of printed parts. A ring light on the lens and a Raspberry Pi on the back of the screen put the view, and every control, on a web page.

Year
2026
Made with
An Andonstar AD246S-M microscope, MGN12 linear rails, 2020 aluminum extrusion, OpenSCAD, PLA, one size of screw, a Raspberry Pi 3 B, a 12-LED ring, Python and MediaMTX
I did
The measuring, drilling, printing, wiring and assembly. The design, CAD and control page came out of a long back-and-forth with Claude
Links
Printed parts and source · Control page source
A 3D model of a workbench with a shelf above it. A rail runs along the shelf's front edge, a short boom reaches back under the shelf, and a microscope with its screen flipped up hangs from the boom over a cutting mat
—lens from the back of the bench
—lens to the board
—where the head is
The model the parts were drawn from. Drag to orbit, scroll to zoom. Amber is everything that came off the printer. Cable chain shows it from behind.
Why

I inspect boards under a cheap digital microscope on a stand. I wanted it to reach any spot on the bench and to be out of the way the rest of the time.

The bottom shelf over the bench has 14.5 inches of air under it. So the scope hangs there, on a gantry that covers the bench left to right and most of it front to back, and the bench stays clear.

Looking up at the underside of a grey steel shelf. A linear rail runs along its front edge, a black boom with a second rail reaches back under the shelf to a plain rail and a cable chain, and the microscope hangs from the boom on its silver rod with its screen flipped up, a Raspberry Pi on the back of the screen and a lit ring of LEDs on the end of the lens
Finished, seen from below. Front rail at the top, back rail and chain at the right.
How it works

One precision rail runs along the front lip of the shelf. A second, plain rail runs along the back, between the uprights. A short boom bridges the two and slides left and right. A rail under the boom carries the microscope front to back.

Rail on the shelf lip→Boom→Rail under the boom→Rod clamp→Microscope

The front rail does all the guiding. The back one only holds the boom's far end at the right height, on two strips of slippery tape, with three millimeters of play front to back. Two precision rails a meter and a half long would have to be parallel to a fraction of a millimeter. One rail and one slider don't.

The numbers it had to fit

Under the shelf14.5 in, bench top to the bottom of the shelf's lip
Shelf57 in wide, 12 in deep, set back over a bench 25 in deep
Side to sideAbout 53 in of travel on a 1450 mm rail, between two printed stops
Front to backThe lens reaches from about 8 to 21 in from the back of the bench
Lens to boardAbout 177 mm parked, 147 mm with the head wound down
Tightest clearance2.5 mm, between the top of the screen and the bracket it passes under

Borrowed from the microscope

The scope's stand came with a 20 mm rod with a flat on one side, a block that rides it, and a fine height adjust with 30 mm of travel. All three moved to the gantry. The rod slides through a printed clamp for extra reach, and the height adjust is the whole Z axis.

The screen flips up and sits beside the lens, which is the only way the head fits under the shelf with room left to focus.

Lights and a web page

The scope's own lights sit in the head, a long way from the board once it hangs under a shelf. So a ring of twelve LEDs rides on the end of the lens, in a printed sleeve held by the two thumbscrews that already hold the lens on.

A Raspberry Pi 3 B lives on the back of the screen. It powers the scope over USB, drives the ring, and serves one page with the live view and every control on it. The page is a single Python file with nothing to install but the LED library. MediaMTX carries the video.

The control page: a live microscope view of surface-mount resistors on a blue circuit board, beside a panel with a microscope on/off button, ring light brightness, how many LEDs are lit, a dial showing six LEDs lit on one side, color buttons, Save a frame, a 180 degree button and a line reading Power OK, 52 degrees, Wi-Fi minus 49 dBm
The page the Pi serves. The dial shows which LEDs are lit.
Ring lightBrightness, how many LEDs are lit, all round or from one side, which side, and warm, cool or any color
MicroscopeOn and off, by switching the Pi's USB power. A Pi 3 B switches all four ports together
Save a frameStops the live view, takes a 1920 × 1080 still straight from the scope, and starts the view again
Turned 180°The scope hangs upside down from where its screen expects to be, so the page and the stills turn to match
Health lineSupply voltage, Pi temperature and Wi-Fi signal, in amber when one is off
A hand holding a black ring-shaped circuit board marked WS2812 Ring x12, with three jumper wires clipped to its power, ground and data pads
Twelve LEDs and three wires. It did nothing until it was told to.
The LED ring glowing under the microscope's lens on its original stand, wrapped on with blue painter's tape, with a Raspberry Pi in a clear case in the foreground
First light, held on with painter's tape
The microscope's screen, mounted upside down so its buttons and logo are inverted, showing two surface-mount resistors marked 102 lit by the ring
The scope's own screen, upside down. Hence the 180° button.
The back of the microscope's screen with a Raspberry Pi mounted on end on a black printed plate with white nylon standoffs, power wires soldered to its header and zip-tied down the lens barrel
The Pi on the back of the screen. Power goes straight to the header.

A small live view and big stills

The scope sends about 6 megabits of video a second at 1080p, and the same at 720p. That was more than the Pi's 2.4 GHz radio could carry here. The picture froze, and every command waited seconds behind it. At 640 × 480 the scope sends about half that, the freezes stop, and a command lands in about 15 milliseconds.

So the live view is small. I position by the scope's own screen anyway, and the page is there to show the lighting change. Stills don't go through the stream at all.

A dim, close microscope view of the gull-wing legs of a chip soldered to a dark circuit board, with white silkscreen at the left
The first frame the page saved: a chip's legs, before the ring was on the lens
The design
Parts laid out on a green cutting mat: black printed brackets and clamps, the microscope lying on its side with its rod and height adjust, a length of black extrusion, a box of heat-set inserts and screws, a bag of T-nuts, a coiled USB cable, a roll of UHMW tape and a bagged cable chain
Everything but the rails, laid out while they were in the mail

Clamps, then bolts

The first plan held the front rail on with seven printed clamps hooked around the shelf's lip, so nothing got drilled. They would have worked. They also hung 7.5 mm below the lip, sat under tension forever, and put plastic between the shelf and the one rail that has to stay straight.

Eight small holes through the lip replaced all seven. The extrusion bolts straight to the steel, and the holes are hidden behind it.

The back rail went where the bolts were

Each end of the shelf hangs from its upright on two bolts. The back rail is tapped at both ends and held by the top bolt on each side, so the shelf's own hardware carries it. That decided the rail's height, which decided where the boom had to stop, which changed the slider. A printed collar at each end keeps the rail from turning on its single bolt.

One size of screw

Everything printed is drawn around an M3 × 10 socket head screw: wall thicknesses, counterbores and how far each screw reaches into a T-nut. The two exceptions are the quarter-inch bolts that hold the back rail, because those were the taps I had.

The microscope hanging off its own rod, which is held to the underside of a grey shelf with two yellow spring clamps, its screen flipped up beside the lens over a cluttered bench
The mock-up: the scope's own rod, two spring clamps, full reach.
A black printed slider on the end of an extrusion, with four brass heat-set inserts in its walls and two grey strips of tape along its floor, a soldering iron tip above it and needle-nose pliers beside it on a cutting mat
Heat-set inserts going into the back slider. The grey strips are the tape it rides on.

The chain hides behind the shelf

The power lead has to follow the head across 55 inches. A cable chain does that, and the first two layouts put it on top of the shelf. The shelf's back edge turns up 45 mm, and behind that lip is dead space. The chain lies on its side there. One end hangs on a printed clip on the lip and the other bolts to an arm on the back slider.

The clip hooks over the lip and pinches it with a screw, so nothing new got drilled. Four more clips were meant to sit under the chain as rests. Once everything moved they got in the gantry's way, so they came off. The drawing also had left and right swapped until the printed parts said otherwise.

A black plastic cable chain folded back on itself into a tight U, draped over a knee
The chain's U-turn, 60 mm across. That number set where everything else went.

The boom that jammed

With the rails on, the boom would swing out of square as it slid, then stop dead. Two things were wrong. The bracket at the front held the boom with two screws in a line, which is a hinge. And the slider at the back fit its rail closely enough to wedge corner to corner once the boom swung.

The new bracket wraps the boom on three sides with six screws. The new slider is loose: it hangs on the rail by two strips of tape and touches nothing else. Now the front holds the boom square and the back only holds it up.

The boom on a green cutting mat: a short black extrusion with a steel rail along one side and a carriage with a printed block on it, a printed bracket wrapped around one end and a printed slider with two square bumpers around the other
The boom on the bench. The wrap-around bracket is on the left, the loose slider and its bumpers on the right.

Something to run into

A linear carriage that runs off the end of its rail can drop its bearing balls. The long rail got a printed stop clamped in the extrusion's slot at each end. On the short rail the bracket is the front stop, and two bumpers under the back slider are the rear one.

Four homes for the Pi

The Pi was drawn clipped across the screen, hung under the rod clamp, standing on edge off the hinge, and bolted to the screen's own case screws. The last one needed 20 mm M2 screws the hardware store didn't have. It ended up on a printed plate with the nylon bolts from its old case, stuck to the back of the screen with Velcro.

A hand holding a bare Raspberry Pi edge-on against the back of the microscope's screen, beside the silver height adjust and its black knob
Home number three, standing on edge off the hinge. It blocked a thumbscrew.
What it taught me
  1. 1

    Ask where the top ends up

    How tall the head is matters less than where its top edge lands once it's in focus.

  2. 2

    Let the existing holes decide

    The shelf's own bolts turned out to be the best place to hang the back rail.

  3. 3

    If you can drill it, bolt it

    Seven clever clamps lost to eight plain holes.

  4. 4

    Print the gauge before the part

    A ten-minute ring with three bores picked the fit for the rod clamp.

  5. 5

    One joint rigid, the other loose

    The boom jammed while both ends half-held it. It ran once the front held everything and the back held nothing but weight.

  6. 6

    Measure the volts at the far end

    Twice, a laggy page turned out to be thin wires starving the Pi, not the network.

Printed parts
Carriage bracketJoins the front carriage to the boom by going under the shelf's lip, and wraps the boom's end on three sides. STL OpenSCAD
Back sliderHangs on the back rail and grips the boom's far end. Two bumpers underneath stop the second carriage. The chain cap closes it. STL OpenSCAD
Rod clampA D-shaped bore and a lock screw, bolted under the second carriage, with a ledge for zip ties. STL OpenSCAD
Rail collarsLeft and right. They stop the back rail turning on its bolts. STL OpenSCAD
Lip spacersEight flat ones, so a 10 mm screw doesn't bottom out in the extrusion. STL OpenSCAD
Chain capThe back slider's lid. Its arm carries the moving end of the cable chain. STL OpenSCAD
Lip clipThe anchor for the chain's fixed end, hooked over the shelf's back lip. The file also has four rests, which I took back off. STL OpenSCAD
Rail stopsTwo, clamped in the top slot of the front extrusion with one screw each. STL OpenSCAD
Tie mountsThree zip-tie anchors for a T-slot, one screw each. STL OpenSCAD
Ring light sleeveSlides over the lens and holds the LED ring, with an optional diffuser cap. Sleeve Cap OpenSCAD
Pi plateA flat back for a Raspberry Pi 3 B, with the bolt heads sunk so Velcro sits flat. STL OpenSCAD
Control pageOne Python file for the Pi: the page, the ring, the USB switch and the stills. scope_ui.py
Rod fit gaugeThree bores, three clearances. Print this first. STL OpenSCAD

Heads up: these are the files the finished build runs on, and they're sized to my shelf and my microscope. The dimensions are variables at the top of each OpenSCAD file. The control page expects MediaMTX serving the scope at a path called scope, and it has to run as root to drive the LEDs.

Parts
Andonstar AD246S-MThe microscope, with its rod, block and height adjust. Lens L, which focuses from 90 to 300 mm
MGN12H linear rails1450 mm along the shelf, 300 mm under the boom, one carriage each
2020 T-slot extrusionThree pieces: behind the front rail, the back rail, and a 279 mm boom
M3 × 10 screws, T-nuts, heat-set insertsFor everything printed, plus eight through the shelf's lip
Two 1/4-20 boltsThrough the uprights into the tapped ends of the back rail
Raspberry Pi 3 BOn the back of the screen. Powers the scope, drives the ring and serves the page
12-LED RGB ring37 mm across, on the end of the lens, driven from one GPIO pin
Cable chain10 × 15 mm, one meter, on its side behind the shelf's back lip
5 V, 2.5 A supplySpliced onto a heavier lead and soldered to the Pi's header
UHMW tape10 mil, cut into strips for the back slider to ride on