If you ever need to drive big motors(Nema23, Nema34, Nema42) for your 3Dprinter or CNC you might be a little bit puzzled by the complicated wire connections needed just like I was so I am writing this article to help you build those BIG CNCs or 3D printers easily.
- RAMPS 1.4
- BIG Motor – In my case Double shaft Nema34
- Appropriate driver for the motor above – In my case DQ860MA
- Appropriate power supply – In my case 60 volt 5.85A switching power supply (Yes, that is for a single motor :-D)
- Arduino Mega 2560 for the RAMPS 1.4
- You don’t need any Pololu drivers since we will be using an external driver
In case you have trouble finding big motors and drivers or you are wondering what I have used as parts I have used motor+driver+power supply from Wantai motor and you can find those from Wantmotor from a local warehouse(no customs) here for USA or here for Europe.
Just a side note…I will not gonna cover the driver configuration itself thoroughly. Just select the appropriate driver amps with the switches and select a lower resolution for the tests something like 400 pulses per revolution. This way it will be easier for you to see the motor moving. You will adjust that to a better resolution later.
I am going to use the Repetier firmware since I like it very much and it has all the needed stuff. You can download it from here: https://www.repetier.com/firmware/v092/. Be sure to use firmware which is at least 0.92. Previous version proved to be problematic and will probably not work.I will talk about the issues later on…
As always I encourage you to donate to Repetier if you like their software
Ok, let’s get all that connected together:
Connect the motor to the driver… you can see that in the image below. Wire colors might be different so please refer to your motor manual to understand which wires are A+,A- and B+,B-
- Connect ENBL- to DIR- to PUL- and then all those to 5v on the RAMPS. Yes, that is correct connect all those 3 pins together and then to the +5v on the RAMPS
- Connect ENBL+ to the ENABLE inverted pin on the X axis pinouts. You have two rows of 8 pin female sockets. the correct pin is the first on the right row (again I am reminding that you don’t need drivers on the board, If you have some then remove them)
- Connect the DIR+ pin of the driver to the Direction pin on the RAMPS.That is the last pin for the X axis on the right row
- Connect the PUL+ pin of the driver to the STEP pin for the x axis on the RAMPS. That is the pin before the last one again on the right row
You are done, upload the Repetier firmware and try to run the motor. and if it does not run correctly read on…
If the motor only vibrates and does not spin the axle then you need to reduce the driving speed/accelerations
I am using the following values and the motor is running correctly:
x,y,z axis max feedrate mm/s is 100
x,y,z max acceleration mm/s^2 is 1000
If the motor is running correctly but is not able to change the direction then there are a few possibilities:
1. You are using Repetier firmware prior to 0.92 – please use 0.92 upwards
2. You might need to adjust the direction pulse delay and re flash the firmware. The setting is in Configuration.h of the firmware and is #define DIRECTION_DELAY 0 by default. Increase that a bit and try again until it works. Depending on the driver a good value might range from 10 to 120 us. Please read the driver manual for details or increase the value gradually until it starts working.
If nothing else works In some rare cases you might need to adjust the STEPPER_HIGH_DELAY 0 to a higher value
I hope you can see the connections on the photo below. Please have in mind I have connected the motor on the Y axis on it. Not on the X axis as described above
Enjoy your BIG motors running and go build that enormous machine