MDrive Plus motor control with Arduino Mega

Hello,

I am trying to understand how I could control a MDrive plus (Datasheet,). The advantage of this motor is that the driver is included so I would be able to directly interface it with the Arduino mega without additional device.

I have found some examples on internet to control a NEMA 34 motor but only with external driver.

So I don't know how to begin. There is two connectors and so I think two ways to communicate with the driver, with SPI and with I/O wires.

Which method would be the best one?

Thank you in advance,
Pm

I believe you need something to convert the Arduino TTL serial signals to RS485.

Then you need to get and read the manual that explains what data you need to send to the driver.

...R

I believe you need something to convert the Arduino TTL serial signals to RS485.

I guess your comment is right if I would use the SPI connector?

I am sceptic because the motor is already connected to NI acquisition board (with the 4 wires blue, white,red, brown) and I don't think it uses RS485 protocol ::slight_smile:

Thank you,
Pm

powergravity:
I don't think it uses RS485 protocol ::slight_smile:

I am only going on what I saw in the link you posted. I would not be at all surprised if you know more about it.

I have no idea how you see a link between RS485 and SPI. it would be like trying to mate a trout and a small dog.

...R

Hi,

Sorry if I do some mistakes, don't forget that I am not experienced like you!

I mean that it seems to be two possible connectors to interface the motor:
Connector:

It's clear that P2 uses RS 422/485 protocol but what about P1 (I/O & Power)?

Have a good day,
Pm

powergravity:
It's clear that P2 uses RS 422/485 protocol but what about P1 (I/O & Power)?

I had seen that and I have no idea what it requires. You need to ask the manufacturers - or maybe there is more info in another datasheet.

...R

Is there someone experienced with this kind of motor?

Thank you in advance,
Pm

Hi,

Finally I found someone who have ever managed a project with the same motor. Hence it's possible to control it with the I/O and I think it's the easiest way.

The motor is connected to the arduino as it follows:

  • orange to digital input <-step
  • blue to digital input <- direction
  • brown to GND
  • withe to 5V

With the sketch from this post it works.

Now I am looking for a library to control this motor.

Any suggestion?

Thank you,
Pm

Now that we know it takes step and direction inputs you can use the AccelStepper library. Use the DRIVER option.

Or you could write your own code. This Simple Stepper Code should work for testing and give you some ideas.

...R