Nano motor carrier stepper motor

Hi All,

I would like to connect a 4 wire stepper motor to an arduino nano carrier, the final goal being to use it with matlab. I found many inputs using external stepper drivers but nothing concerning stpper motor + arduino nano carrier.

Would be great if someone would have some experience with that!

Kind Regards

Sebastien

What is one of these?

Which motor?

Hi Jhaine,

First, thanks for the fast reaction!

I don't see your attachments btw.

The carrier:

Nano Motor Carrier | Arduino Documentation | Arduino Documentation

I don't have much information on the stepper, since it's built in a syringe pump. It's a 12V very likely not needing much current, and I want anyhow.

Kind Regards

Sebastien

I would like to attach a picture, but cannot find how :smiley:

Thanks for the link which wasn't in your initial email, and I'm afraid I'm not familiar with all the Arduino products. I didn't actually attach anything!

Without knowing more about the stepper it's hard to comment, but the drivers on the carrier are just H bridges so a lot of the sequencing needed to drive a stepper would have to be done either in the on-board microcontroller or your Nano. Are software libraries available for the on-board micro?

Dedicated driver chips are available for steppers, such as the DRV8825 or **34, which make life much easier.

OK!

So the motor is not exactly this one, but I think it is a very similar one.

My biggest issue now is to connect the 4 wires to the nano carrier. For the Adafruit Motor Shield V2, there are plenty infos, but I cannot (or don't want to risk) to improvise.
(Overview | Adafruit Motor Shield V2 | Adafruit Learning System)

After that, I think, I'll manage with IDE or Matlab to get it running.

If not, I will just invest in further stepper drivers, for which there is a very accurate description, e.g.:
How To Control Stepper Motor with A4988 Driver and Arduino (howtomechatronics.com)

BR

Sebastien

STEPPERONLINE Schrittmotor Nema 17 45Ncm 1.5A 12V 39mm 4-Draht 1.8 Deg Stepper Motor mit 1M Draht für 3D Drucker : Amazon.de: Gewerbe, Industrie & Wissenschaft

The CNC shield v4 makes it very convenient to control up to 3 steppers with an on-board Nano. It also has provision for limit switches and other control signals. Add stepper drivers like the A4988 or DRV8825 (I prefer DRV8825).

Make sure to adjust the driver coil current limit before using the motors. See UPDATE: Current adjustment for motor drivers (DRV8825 / A4988)

1 Like

Thanks a lot! The point is that I want to use matlab to drive everything, so that's why I would like to use the nano motor carrier.

Kind Regards

Sebastien

Sorry, I did not read far enough.

The CNC shield V4 is for the classic Nano, not the one of the new Nano 33 IOT.

No problems, I appreciate any help! Since it is not the main point for my project at the moment, I will have time to try to figure out a solution: as it is stated, that the nano motor carrier board can run 2 stepper motors, there is surely a way :slight_smile:

Where?
I see only common H-bridges (MP6522) on that Nano shield.
Good for brushed DC motors, but a poor/impossible choice for most modern stepper motors.
It definately can't drive the 2.3ohm/1.5A stepper you linked to.
That motor needs a current controlled driver that can comfortably handle 1.5A coil currents.
Leo..

Hi Leo

On this page, it is stated, that 2 stepper motors can be connected on the nano motor carrier: Engineering Kit! (arduino.cc)

Tech specs

The summary of features is shown below:

Feature Description
Microcontroller ATSAMD11 ( Arm Cortex-M0+ @48 Mhz)
Max Input voltage (power terminals) 4V (1S Li-Ion Battery)
Max output current per motor driver 1 Amp
Motor driver output voltage 12V
Over Temperature shutdown protection (for DC motor drivers) Yes
Battery type Li-ion battery (1S)
Battery charging Yes
Max battery charging current 500mA (configurable)
Power terminals (connectors) XT-30 and 2POS terminal block
Interface Terminal block and 3 pin/4 pin header connector
Servo connector 4 terminals
Stepper connector 2 terminal
Encoder inputs 2 ports
DC motor control 4 ports
3V digital/analog sensor input/output 4 ports
IMU BNO055 9axis Accelerometer / Gyroscope/ Magnetometer

My goal would be to be able to use stepper motors in the matlab environment as described here:
[Connection to stepper motor on Adafruit Motor Shield V2 for Arduino - MATLAB - MathWorks Schweiz]

(Connection to stepper motor on Adafruit Motor Shield V2 for Arduino - MATLAB - MathWorks Switzerland)

I supposed that there is a way to use 2 DC motors connections to control 1 stepper (independantly of the power for this particular case, just for the sake of understanding the possibilities of hardwares).

This tutorial is close to what I want: Stepper Motor Control using MATLAB and Arduino (circuitdigest.com)

But it seems, that it might not be so trivial:
Stepper motor programming on arduino using drv8825 on MATLAB - MATLAB Answers - MATLAB Central (mathworks.com)

The final goal is to drive syringe pumps with very few "microsteps".

Have a nice Day!

Sebastien

That Adafruit V2 motor shield is also not suited for modern low-impedance steppers.
The Nano and Adafruit shields can only drive high impedance stepper motors.

Common H-bridges with high-impedance steppers might be ok for what you're doing, Just don't expect torque at high speed. For that you need a low-impedance stepper and a current controled driver.
Leo..

I have used both drv8825 and drv8834 in projects and it's relatively trivial to write code directly to drive them. Why do you particularly want to use MATLAB, and what is the issue with microsteps?

Hi Jhaine,

I want to use Matlab since I need some advanced functions to determine what is the next step to perform (in my case, which mixture to realize through the activation of 2 syring pumps controlled by the stepper motors).

Another possibility would be for me to send the commands from matlab to arduino (eg.: "do 10 revolutions clockwise", but I'm not fit enough now to perform that.

At the moment, I have no particular issue, since nothing is connected :smiley:

I ordered following, to give some trials:

Single Stepper Control Board A4988
Creality 42-40 Stepper Motor Nema 17

I plan to realize something like that:
In-Depth: Control Stepper Motor with A4988 Driver Module & Arduino (lastminuteengineers.com)

Kind Regards

Sebastien

Hi Leo

Thanks for the indications! I will give some tries with:

Single Stepper Control Board A4988
Creality 42-40 Stepper Motor Nema 17

I need torque but not speed for the syringes anyhow (few RPM are the goal, and for a short time).

Kind Regards

Sebastien

Would you be operating two pumps simultaneously at different speeds to get a given proportion or first one then the other? The first is tricky as you have to generate two simultaneous pulse trains at different rates, in effect coordinated movement.

This is what I intend to do, though the coordination doesn't need to be perfect, since I plan to measure the result of the mixture before using.

The syringe pump I'm using has a driver box, and in the worst case, after having setup the speed I would like to, I could control with a relay like ON/OFF. But it would be of course not as nice as doing it directly with the arduino :wink:

The application in which there is a need to coordinate different pulse trains at different speeds is CNC control, where for example if you go from a given point in 3D-space to another one at a given speed along the path, the X Y and Z speeds all have to be different, yet all the pulse trains have to end at the same moment. To complicate it further, controlled yet coordinated acceleration and deceleration is needed.

There is existing code for Arduino to do this called GRBL. Though designed for CNC it can be pressed into service for many other applications. In your case you could regard one pump as the X axis and the other as the Y axis, and if you define a "speed" to do your dispensing in a given time just use some simple trig to work out the X and Y equivalent movements needed. All that could be done in Matlab and it would send a simple string of "G code" with format like "G01 X1 Y2 F10" to make GRBL drive the steppers as needed. A little bit of control code also needed to send config parameters to the Arduino.