4th motor integration

Hi all,

hope everyone is doing good :slight_smile:

I was wondering what would be the simplest way to introduce a 4th stepper motor into the OpenFlexure in order to control additional optomechanics components? For instance the rotation of a filter… What I am thinking of is something that would then also be integrated into the existing software - in order to control everything from one place.

Thanks a lot!


If you use arduino + sangaboard firmware, I would propably just extend the firmware for an a, b,… axis. Afaik with an arduino nano there are still enough IO pins available after connecting all drivers for x, y and z.

1 Like

The Sangaboard implementation as V0.3 (sangaboard_v0.3 on Kitspace) has some of the spare Arduino i/o routed/labelled as Aux and End Stops. I have not looked at what functions are actually made available in the firmware.
I think it possibly makes more sense to have a second instance of a Sangaboard (or Arduino) for extra motors. You would need to make sure that the right parts of the software were talking to the right board, but that should be possible. That way it makes it possible to keep with Sangaboard firmware as a standard, rather than having versions with different uses of the extra Arduino i/o ports.

1 Like

Hey, i can help you writing an extension that moves a new motor that is hooked up on e.g. another USB port. This can then be used either from the GUI or from the swagger/REST configuration :slight_smile:


Hi @B.Diederich that would be great, thank you! My idea is to integrate the rotating filter set-up you developed in the UC2 framework on the OpenFlexure illumination-side to accurately control the rotation of a polariser. Maybe we could chat about it sometimes to make a plan and then of course make everything open-source and available? :slight_smile:


Nothing stops you using two Sangaboards, but you’d need to take care of which one was which - maybe adding something to the firmware to allow it to uniquely identify itself. The Darlington pair ICs we used have 7 pairs each = 14 powered outputs, so not enough for 4 motors. You might find enough spare pins on the Arduino though, so if you’re using separate driver boards, go for it :slight_smile: If I remember correctly, most of the motor-related stuff should be easy enough to extend to 4, though it’s not documented anywhere how to do it. Happy to try to add some comments if that would help. OTOH, @B.Diederich probably has a driver board solution ready to go, so you’re almost certainly better off with that!

Hi Richard,
thanks for the suggestions - I currently have the Arduino + motor drivers configuration - so If there is an easy path this way I’d be happy to try :slight_smile:

I’m not super familiar with the Sangaboard unfortunately, but what you could do is for example get one more I2C motor driver (e.g. this here that connects to the ins on the Raspberry PI and can be controlled through a seperate extension, or you get an extra Arduino + e.g. CNC Shield connected to yet another USB that drives the Stepper Motor (e.g. here). The latter is more robust I’d say and works with NEMA motors out of the box. (Not sure if you want to go for the 28byi or the NEMA11-driven rotator :wink:

Let me know what you’re up for. Developing an extension for either of the solution should be easy :slight_smile:

1 Like

We could try the more robust approach with the extra Arduino + CNC shield, and the NEMA motor if you think it’s better. Unfortunately I am away next week and won’t have access to the lab - so I will be available to try the week after next - but I am really looking forward to it.
Thanks for offering help with developing the extension, it will be needed :slight_smile: