Hi,
First of all, thanks for this great device and community!
I would like to implement structured illumination on an OFM v7.
For this, I want to intergrate a fourth motor (28BYJ-48) on a Sangaboard v0.5.5b (firmware v1.0.3-dev).
Is updating the Sangaboard firmware required to enable the control of a fourth motor?
I see that the n_motors variable is set to 3 in src/modules/stage/stage.cpp
Any idea on where to start?
1 Like
The current sangaboard firmware does support all 4 motors, you can set the number of motors via n_motors 4
command on the serial, but this will likely cause issues further in the current OFM stack (move command will expect 4 coordinates, position will print 4 coordinates), which is why it defaults to 3. A modified pysangaboard module should provide compatibility but it only had minimal testing. You should be able to control the 4th motor with that python module (and set n_motors)
1 Like
Is n_motors
something that can be set and reset? So that a module using the 4th motor can set to 4, then reset to 3 to allow unmodified legacy code. Or does that either take ages to perform or reset the motor step counters?
A very hacky way to do things, but may be a way to get started.
Thanks for your insights!
I think I will try the pysangaboard approach and avoid changing n_motors
if possible
1 Like
I don’t know whether this might have anything useful for you, another team that did some work on structured illumination. Using the Delta Stage I think.
T. Matsui and D. Fujiwara Optical sectioning robotic microscopy for everyone: the structured illumination microscope with the OpenFlexure stages, Opt. Express 30(13), pp. 23208-23216 (2022).
Changing n_motors should be very fast, it just sets the variable.
The modified pysangaboard module still needs to set n_motors 4
to make the firmware use the fourth motor, but it should allow the rest of the OFM stack to work with that set. There are instructions on installing the modified pysangaboard it at the sangaboard extension repo
I think that paper may have been the inspiration for including the 4th motor connection.
1 Like
My setup is indeed inspired by the work of T.Matsui and D.Fujiwara, but customized for the OFM stage.
Also, I got the 4th motor moving following your advice of using the sangaboardv5 version of the pysangaboard module and setting n_motors
to 4. This might well do the trick for me. I’ll see what I can do from there, we’ll see. Thanks again!
2 Likes