A box a box, my kingdom for a box

Thinking about the OpenFlexure Microscope as a slide scanner, once running the sample needs to remain dust free but the operator needs no access. We have talked a lot in the past about and enclosure, materials that can be disinfected, manufacturing processes for enclosures. Etc, etc.

I was thinking it is probably worth separating the problem into a few distinct problems to solve:

  1. Functionally what should it do (protect microscope structure, stop dust, decouple from vibrations)
  2. What should it be made of
  3. What should it look like
  4. How should do we make something that meets the above criteria

Rapid prototyping a functional enclosure

Taking only point 1. I have just done a simple 3D printable mock up… not because I think we want to 3D print the final enclosure, but because 3D printing is a great tool for rapid prototyping.

I came up with this as something that meets the key functionality of structure protection and preventing dust. (Yes I know it is ugly!)

It consists of a main enclosure. A top plate screwed to that, and a lid.

The lid is hinged:

Looking at a cut away. It is designed to be pretty closely integrated:

This first prototype has the microscope sitting on 4 legs

For vibrational isolation I think shorter legs could sit on a heavy plate that is coupled to the base through rubber to create some vibrational decoupling between the microscope and the case. There should be space to implement this, but I have not done so yet.

What next?

I plan to print this, and I will make a draft MR for others to print if anyone is interested.

As the code is never likely to make it into the main repo it is currently super ugly and ad-hoc, it is more a test bed to do some hands-on iteration on to get and idea of what we want from a case.

Once it feels functional we can move on to thinking about appropriate materials for an enclosure, then about how we make something functionally similar with those materials. And also about how we make it look less ugly.

Thoughts welcome.


Merge Request


scanner_case_lid.stl (43.6 KB)
scanner_case_top.stl (62.6 KB)
scanner_case.stl (74.9 KB)

1 Like

Are we talking about what a slide scanner should achieve, or a box / mount for an existing OFM to be used to scan (parts of) a slide?

I think a true OpenFlexure slide scanner should have a range of motion of at least 26 mm in each of x and y. This would let it cover the width of a standard microscope slide, cover standard cytology smears, and would need a maximum of three separate scans to cover an entire standard slide

If it can also nicely mount a sample in a way that it won’t fall off if the area of interest is close to the edge of a slide, that would help with scanning archived slides

Slide scanner benchmarks for speed normally talk about the time for a 15 mm x 15 mm area, generally comfortably under 5 minutes. I’m not suggesting a design that could achieve that, but with focus mapping / stage motion characterising replacing autofocus at every site, using a 20x objective we could get well below an hour. For extra speed, maybe we look into NEMA motors?

more range of motion, faster, ability to hold a slide in any position

Thanks @JohemianKnapsody that is a really useful distinction that I hadn’t grasped.

This is a box to enclose the current OpenFlexure Microscope during use when manual access to the slide is not needed. Such as automatic scanning.

This is not a full slide scanner.

Sorry to derail your thread then! For the record, in healthcare I think calling the OFM a “microscope” has led to some confusion. Might make a new thread sometime about that if people would find it valuable?

Regarding a case for the OFM, I think the things me and @dgrosen took from Rwanda was the need for safe transport, battery power / a UPS and somewhere to mount an Allen key + screwdriver when traveling (less likely for TSA to confiscate it in hand luggage apparently). The space above the electronics could be good for this?

Hiding the mechanics, covering the sample and inbuilt vibration isolation are really nice features here. Since we’d no longer be constrained by the electronics fitting in the standard base, I’d also pitch for some extra clearance around the boards to make attaching the camera a bit easier, we lost two Pi’s at a recent workshop because the camera clip was snapped

Hi Julian. this is a nice concept! From this render, would the the stage hit the top plate limiting the range of motion?

mmm… can I ask for something else? The o rings are pretty much the only consumable you have the periodically replace. Would it be possible to make it more easily accessible without the need to disassemble the whole microscope? For example, flipping the XYZ towers so the feet are on top? or using a different type of attachment (magnets?) between the body and the stand?

The plan was that it shouldn’t limit the range of travel, but should be close to the edge so that it minimises space for things to get dropped down. To be honest I just winged it in this mock up so it may well be a bit tight.

I think that major changes to the microscope is something we want to avoid as the design is so well tested. I also have a big distrust of non-mechanical fixings, I think the risk of damaging the microscope when the case is moved outweighs the time saved in regular maintenance.

My thought is that the band replacement procedure is:

  1. Remove 4 screws in top plate
  2. Remove condenser from dovetail with thumbscrew
  3. Carefully lift plate over condenser, and loosely return the condenser to the dovetail
  4. Remove motor connections
  5. Remove 4 screws from the tall stand-offs
  6. Carefully lift microscope and disconnect camera ribbon cable from camera
  7. Replace o-rings as previously done
  8. Do the opposite of steps 6 to 1 to return the microscope.

I don’t think this is much more work than on the current design. We could merge the two cut-outs so that the condenser does not need to be removed.

1 Like

Do you have a photo of what happened? As the camera is on the same side as the micro-HDMI and other connectors any extra space between the board and the wall is going to make it hard to get the cables in, unless you just expose the whole side of the pi which is I think a retrograde step.

Perhaps it is an instruction issue. What I always do is to remove the cable is:

  1. Open the free side of the camera port with my index fingernail
  2. Use the ball-end the 2.5mm Allen Key to lift the camera cable tab that is closest to the wall
  3. Remove cable

To put the cable in:

  1. Insert cable
  2. Push down in the centre of the tab with my index fingernail.

I don’t see many ways around the camera connector being right up against the wall, except actually having the side panel of the case screw on after the pi is in place. This will add to complexity when it comes when it comes to assembly.

It may also be possible to have the actual ports for the pi on the wall of the stand itself. However as the ports protrude of the board it would probably be hard to get this perfect as you would probably need to put the drawer in at an angle and then swing it into place. This would risk people breaking the ports when removing the pi drawer which I think is even more likely than the camera ribbon connector breaking.

I don’t have a picture, but the tab or slot nearest the wall snapped off

I remove / insert the cable the same way as you, and in the workshop that’s how I showed them to do it. Even an extra couple of mm might allow a bit better access, without making the external cables harder to fit in. From an FMEA perspective, it lowers the risk of expensive damage and only makes it slightly more awkward to use?

That’s clear.

I think if you can get 2mm of extra room and still get the connectors in reliably then I think it is a no brainier.

My thought is that probably if we give it an extra 2mm of space, we will never get the cables in reliably. In the current design the wall is thinned on the inside to about the minimum thickness the we can reliably print to give extra space. On the outside the micro HDMI connector is flush with the case. I see no way we can get any more room right there.

It is worth adding these sort of things into an FMEA process. But from an medical device perspective, if it happens only when the Pi is being mounted this failure wouldn’t happen during use, it would happen during manufacture or major maintenance and would be very obvious if it happens. So the risk to of this happening in use is effectively zero. The likely mitigation is training of those doing assembly.

Having cables which are not mounted properly is more likely to cause problems if they come loose in the field. So from an FMEA perspective I would say that we either would need to find a very clever way to make sure the micro-HDMIs still mount well. OR block off that side entirely and say that the microscope never has an external screen.

Either way I think this is off topic for this enclosure as the existing base is set by the drawer size, if we increased the drawer dimensions by 2mm the base would also increase slightly to fit.

First print

I present to you the OpenFlexure Beige Box

Inside is a microscope from a while back which is semi complete, but very colourful:



  • Heavier with a lower centre of gravity. Feels more robust. Would be even better with rubberised feet, and something heavy under the microscope for vibrational isolation.
  • Hinge works well for access, sits easily in both positions, gives plenty of space
  • I prefer putting the slide in and out as you are resting your hands on the solid case (this may be personal, I have fairly shaky hands)
  • Doesn’t feel too big, even if it takes up a bit more space than the current design


  • Ugly
  • Significantly harder to reach the screws to mount the microscope. I didn’t actually try wiring it as I don’t have a Sangaboard here.
  • Hinge is a little wobbly and doesn’t click closed in a nice reassuring way. I think this is probably not actually important, but would make it feel considerably more professional
  • Not a good design for printing - It was never meant to be though


These are less design cons, and more things I messed up in this first iteration

  • Using self tapping screws rather than nut-traps for mounting the microscope feels less secure, and with the 6mm long screws they barely bite, so would strip easily.
  • No nut trap for the block that the drawer fits to… I knew I had missed this, but I decided just to do a first print.
  • Weird holes in rim caused by the nut trap code for the diagonally opposite corner

Where next

  • While this isn’t good for 3D printing, it would probably be interesting for others to print is and give their thoughts.
  • Add OpenFlexure stickers to the box & lid
  • Create a design for the vibrational isolation
  • Consider how to design a box that isn’t significantly bigger, but makes assembly easier - For example maybe we want to also screw in the side walls. This may also make it less likely we damage the camera @JohemianKnapsody?

PS: An obvious idea

Just after posting this I had and idea that was probably obvious to many after I said that it was hard to assemble. It is hard to assemble because the lid is flat and we are trying to reach into a box to do the assembly.

The solution is probably either to:

  • Have a flat base, and then have a lid with walls that goes over the top.
  • To have have a walled box that comes to about the height of the base of the microscope. The lid to then has the top half of the walls.

Isolation idea

Further to this I am starting to flesh out vibrational isolation.

I think it should probably be a C shaped metal block (Damper plate) which is attached to lugs in the case. with screws. Above and below the metal we can use o-rings so that the plate is isolated from the case:

The damper plate with have tapped holes for the microscope to attach to. Probably the microscope will also be isolated from the damper plate with another pair of O-rings above and below each lug.

Main concern

The main concern for this is that the O-rings will be quite stiff so the natural frequency of the system will be fairly high. Any frequencies below the natural frequency are not damped, anything at the natural frequency will be amplified. (Though not much as the Q will be very low).

By making the damper plate much heavier than the microscope will separate the two natural frequencies so there should be no overall gain. The concern is how low can we get the natural frequency of the system while making it stiff enough that it doesn’t wobble all over the place when you try to put in a slide.

Of course the actual frequency of the damper will depends on how tight the screws are tightened. This probably isn’t important for general use, for quality managed manufacturing we probably want to test and optimise this torque and specify it in the instructions.