Wire configuration in Arduino replacement of Sangaboard

I’ve just finished assembling a Low-Cost v7 microscope.

Why are two of the wires from the motor drivers to the motors switched in the wiring for the replacement of the Sangaboard with an Arduino Nano (see image below)?
Is this a change that could be made by modifying the code uploaded to the Arduino instead of switching the wires around?

On a related note, why is an external power supply used instead of supplying power directly from the Arduino? I’m trying to get by without using a RaspberryPi, with the Arduino Nano and camera module connected directly to my computer and I only have two USB ports. Supplying the power directly from the Arduino Nano to the motors and the LED would allow me to only need those two connections.

Screenshot 2023-04-09 131836

Hi @Lovekin, the wires are twisted on the diagram, but you don’t need to move any wires on the motors, they will plug straight in.

The recommendation to have a separate power supply for the motors is because they draw a fair bit of current. It can be too much for the connector and circuit on a Pi or a Nano. It may be too much for you computer USB port. In normal use you may find it is OK, but there are a number of ways things could go wrong that would draw too much current which could damage your computer.

Which camera module are you using to connect to a computer on USB?

Which camera module are you using to connect to a computer on USB?

I’m using a Raspberry Pi Camera Module 2 connected to an Arducam CSI-USB adapter board as suggested by tkircher here: Raspberry pi alternative - #2 by WilliamW

…the wires are twisted on the diagram, but you don’t need to move any wires on the motors, they will plug straight in.

Just to be clear, the twist in the diagram is already incorporated into the wiring?
Why is it included in the diagram?

Yes.

The diagram is like that because in a unipolar stepper like these the centre wire (red in most of these) is the +5V power and that is the end connection on the connector.

However the diagram is still a little confusing if you look in detail, because often the colours are in that order on the motor, but at the plug the red is just brought across to the end connection in the plug (blue, pink, yellow, orange, red). In the diagram yellow and orange are the other way round.

The diagram was made in Fritzing quite some time ago - and for whatever reason the order of the wires coming out of the motor didn’t match the order of the wires in the connector, hence the funny looking twist. It may be that if you look carefully at the motors, you will see the twist is, in fact, present (but it’s not so obvious, because usually you have 5 individual wires rather than a neat ribbon as drawn).

If we wanted to eliminate that, we’d need to modify the Fritzing “part” for the motor to swap the wires around (or just arrange for them to go into the connector in the wrong order and hope nobody notices) and I have not yet found time to do that. If anybody wants to contribute an updated image I’d be delighted to include it in the instructions. Unfortunately my computer crashed shortly after I saved that image, and I did not manage to save the original Fritzing file - so the diagram would need to be re-drawn from scratch.

1 Like