Motor connection problems

Hi all!!
We are a group of university students and we are trying to build an openflexure sangastage microscope.

We have connected everything according to the diagram on the openflexure website. We are using an arduino nano every and instead of a sangaboard we wired up the motors ourselves on a breadboard.

The problem we face is that even though the lights of the motors light up and sound comes out of the motors they do not appear to be moving. Has this happened to anyone else or have any idea what is wrong?

Hi @Maasscopy2.0. The Nano Every has the same pinout but a different microcontroller from the standard Arduino Nano. It may be that the firmware does not behave as expected on the different processor.

By the motor lights, I assume that you mean four LEDs on the ULN2003 motor driver boards. The best way to test this is to use the microscope software to move each motor position by one step at a time. If we call the four LEDs of one motor A,B,C and D then the sequence should cycle through A, then A and B, then B, B&C, C, C&D, D, D&A, A etc (and reverse through the sequence for the other direction). If the sequence is correct, then have you altered the wiring of the motors? In the diagram the motor wires appear to be twisted, but the supplied order of wires in the motor plug will be correct. Have you got sufficient power to the motor boards? If the sequence is wrong, or LEDs change on more than one motor board, then that could also be a power problem with the microcontroller repeatedly restarting itself. If the sequence is wrong and the power is fine then the wiring from the microprocessor to the driver boards is wrong, or it is a problem with the combination of the firmware and the Every.

Can you post any pictures? They can be very helpful to understand the issues.

Hey William thanks for the reply!

Yes by LED we meant the motor driver boards. I have attached some pictures below, I hope that they are helpful! We do not see the LEDs to cycle they just remain on forever. We have altered the wiring to the motors and we use an external power supply for the motors. I do not know if the problem is the firmware but we have uploaded the newest libraries to the Arduino Nano every.

(I will send the rest images in a new post as I am not allowed to share more than 1 picture at a time)

Thank you, the pictures do help. The wiring looks OK as far as I can see. If you have the motors like that and not connected to the microscope, you will need to move a lot of steps to see the movement. There are ~4000 steps in the software for one revolution. In the move box that you show in position 0,1000,0 type in 4000,1000,0 and you should see one of the motors move a full turn. With large movements they are often multiples of 8, so the final lit LEDs are the same as at the start. Try also 0,5000,0 and 0,1000,4000. Also try the single steps, 1,1000,0 ; 2,1000,0; etc and 0,1001,0 ; 0,1002,0; etc. Press move each time you have altered the numbers.

Hi William, thanks for the help so far! After a busy period we finally had the time to try out your instructions, but unfortunately they did not work. Do you have any other ideas on what we could do?

What exactly happens?
When you first power up the Pi and Nano, (the Nano will need to be awake when the Pi goes through its start up of the software, so that it can be found) there will I think be none of the four motor LEDs lit on the motor boards. In your photos some are lit, when does that happen? It should, I think, be when you first try to move each motor, which indicates something is working. If the LEDs do become lit, do they change when you make a move if 1 step? For multiple 1 strp moves, what is the sequence?

Indeed, upon connection the motors don’t light up yet. This only happens after inserting a coordinate.
When we try a movement with coordinates (0,0,4000), the second motor (middle one in the pictures) lights up fully alongside the first motor (the upper motor in the pictures) which lights 2 bulbs slightly. Immediately after, the first motor’s lights turn off whilst the second motor only shows the second bulb (see picture 1 and 2).
We also tried 0,10000,4000, which made the same phenomenon happen (see picture 3 and 4).
pictures incoming…

So the Arduino code is responding to commands from the microscope, but not correctly. When many LEDs are lit, is that when it is trying to move, or after a couple of seconds? There should only ever be either one LED or two LEDs lit. During a move the LEDs will change rapidly so it will seem that all four are lit but dimmer, and 1000 steps takes a second. In your photos it looks as though there are three lit on the middle motor which is not right for moving or for stationary. Then on the top motor it goes to none lit at the end which is also not right.

This seems to be more than a wiring issue - you would still see one or two LEDs lit, just in the wrong sequence. Have you tried reloading the firmware? After that I would try a different Arduino if I had one.