There has been some discussion about the need for a way to “know where you are” with the Openflex scanning stage. It was suggested that a home switch, indicating when the stage was at its center of motion, or close to it, would be better than a limit switch, indicating that the stage was at one extreme of its travel. I decided to try to develop such a thing. The general idea I’m showing would work for either an end-stop or a mid-scale home, but what I describe here is the latter.
I had been made aware, from work on another project, of the availability of cheap Hall-effect magnetic switches, which gave a binary output depending on the magnetic field around it (https://www.digikey.com/en/products/detail/diodes-incorporated/AH3377-SA-7/6124928). I also was aware of the existence of tiny rare-earth magnets; the ones I chose were 1/16” diameter x 1/32 thick (~1.6mm x 0.8mm) (MAGCRAFT® NSN0591 - Rare-Earth Disc Magnets). As part of this other project, I had designed a small PCB to hold the Hall sensor and a couple of passive components and some connectors. It seemed that could be the basis of some experiments with the idea.
The magnet is very hard to handle. I lost it several times. Scanning the floor with a strong refrigerator magnet always found it! You can see that the PCB is mainly full of connector pads. The actual electronics is only a few mm^2 in the center. I was able to remove most of the upper part of the board without breaking the connections to the chip, so that it could fit onto the microscope base (see later).
I first made a setup using some micrometer-driven translation stages, so I could assess the behaviour of the switch under the same conditions it would encounter on the microscope, i.e. with the magnet moving in the plane of the sensor, rather than perpendicular to it as it is intended to be used. The setup
is shown below. I connected the sensor output to an LED, so it would light up when the switch was activated. That way I could focus on the micrometer readings without having to look at a meter to know when the switch activated.
With this setup I could control the vertical and horizontal relative positions between the magnet and sensor, and also the spacing between the sensor and the magnet. The magnet and sensor are both glued to wooden blocks, to be sure there was no interference with the magnetic fields from the translation
stage components. The separation in the photo is about 0.5mm, which I felt was optimum, giving consistent actuation positions when translating the magnet.
Having established that the scheme could work, the first decision was where to put the switch. The easiest place is on the actuator, because that only moves in one dimension, whereas the rest of the stage moves in two, making life very difficult for a switch. The actuator arm is hidden from view normally, so I first had to expose it. This is easily done by cutting through the plastic, which I did (carefully!) with a bandsaw.
Mounting the magnet was a two step job. In order to bring the magnet and sensor to the correct separation, since I couldn’t easily recess the sensor PCB, I had to pack up the magnet by about 1.5 mm. I used a small piece of aluminium sheet, and glued the magnet to that first. That made handling the magnet much easier. Before gluing the magnet, I had to make sure it was facing the right way since the sensor is only sensitive to fields in one direction. I established which way was correct by powering up the sensor and offering it up to the magnet, then flipping over the magnet until the switch activated. I
then marked that face of the magnet with a black marker for future reference. It was easy to glue the aluminium/magnet piece to the actuator in roughly the right position. A final design would make proper provision for holding the magnet in the actuator.
I then glued the chopped-down PCB to the actuator housing. Once I was satisfied that the switch operated correctly, I attached a step motor so I could record the axis position at the point of operation in a more precise way. Driving the motor using the Arduino commands in the terminal monitor proved convenient. I made several sets of measurements of actuation position. The positions varied by around +/- 50 steps, and had a hysteresis of around 2000 steps. I don’t know how much of the hysteresis is electronic and how much is mechanical. I always removed backlash by backing off a few thousand steps and then measuring the on-off transition in the direction which pushed the actuator against the O-ring spring; in my experience that is more reliable than relying on the spring tension to restore the actuator position, and should give more reproducible results.
If I understand the motor gearing correctly, 100 steps is around 6 microns at the actuator, 12 microns at the sample position. I believe that is adequate for this application.
If the community is interested in this setup then it could be easily “civilized”, by designing a custom PCB, and redesigning the actuator foot to hold the magnet, and the microscope body to accommodate the PCB in a well-defined position. I am happy to make the PCB, but I don’t know the CAD software
which everything is drawn in so I would need help getting that done. I would be happy to print such a redesigned instrument and check it out.
As I mentioned, a similar setup could work as an end-of-motion limit switch. The magnet could be embedded in the bottom of the actuator, and the PCB in the microscope foot. Is there interest in that version?