Delta Stage Control using an esp32 Microcontroller

So for my BSc dissertation I have been working on part of the Open 2-Photon project. For this we have been using the Delta Stage as the basis for replacing the expensive kit to determine the area being imaged. We modified some parameters of the model and added some attachments for ThorLabs compatability but the movements aren’t affected.
The other core part I’ve been working on is to replace the typical XYZ controller. For this we wanted to ideally avoid needing much in the way of computer interaction, to allow minimal interference with the typical use of the current 2-Photon setups in use here (at Sussex).
The latest version is still in testing but can be found here. We used the BeeHive Board project to build the prototype but custom boards have been recently designed and ordered for testing, with the aim to reduce the number of steps to assemble (and reducing spaghetti). Currently the features available are: XYZ manual control with rotary encoders, LCD screen reporting stage position, Zeroing location coordinates.
It’s not much, but for a tiny budget this little spaghetti monster makes a functioning standalone unit. :slight_smile:

If anyone is interested, or has useful feature ideas or feedback I’m happy to hear it!

Have a nice day!
Marcus

5 Likes

This is really neat :slight_smile:. I remember some previous discussions about adding a display to the Sangaboard, but it never got as far as reality! The rotary encoders are a nice touch - there have been a couple of joypad-based interfaces in the past, but neither is used that much I think. I know Valerian did manage to connect a SNES controller directly to a version of the Sangaboard, but that never got replicated more widely.

Are you doing the kinematics on the ESP32 as well? I’ve never done that, and I’m a bit curious whether it’s easier to do that on the microcontroller (so the computer only ever deals with XYZ) or to keep the logic in Python, where there are more possibilities of thinking about backlash and so on.

Anyway, nice work! The breakout board for your ESP32 looks way neater than the solution with individual jumper wires - is that the Grove system?

Very nice. You can skip the motor drivers and replace them with darlington arrays. This reduces again the cabling. Have a look on my bearbord how to do it.

I really like the idea to change to the esp32.

Thanks!

The kinematics are running on the ESP32 itself - the idea being to enable it to control the stage without needing to interface with any computer if needed.

I do not know much about backlash, which may come back to bite me. Is it a correction for the distance travelled or is it a feature for imaging while moving…?

The breakout board is a really nice neat project called Beehive. It’s super useful for prototyping projects like this. For this project we have since modified the board to include the drivers for the motors, encoders, and other tidbits for buttons and switches all in a single board.

2 Likes

This is nice! Thanks for your suggestion!

In the end we used a custom board to include drivers for encoders and motors to cut out the cabling (see above post). The messy cabling was just to make sure everything worked before we finalised the board :slight_smile:

Backlash is a mechanical effect, due to sloppiness in the gear train between the motor and the actuating screw - much of which is internal to the motor. This means the stage tends to lag behind the motor - so depending on which direction you approach a point from, you’ll end up in a slightly different place.

With the cartesian stage, it’s relatively simple to correct for backlash - but with the delta stage, the non-orthogonal axes can make it more complicated.

Thank you! I still have reliability testing to do, so I expect this will be an important feature to know of :smiley:

1 Like