Hi. I'm trying to figure out how to wire a 4 axis china nema 23 setup to make it work with LinuxCNC. It seems that there are different ways to wire them. The two most common I've found are shown in the attachments. It's about the wiring of the drivers. One connects pul+ & dir+ to the BOB (pul-,dir-,enbl- bridged) and the other uses pul- & dir- (pul+,dir+,enbl+ bridged). So what scheme should I use and what are the differences? The set contains: 4 Nema23 425oz-in 4 DQ542MA Driver 2 Power Supplies 1 DB25-1205 Breakoutboard Hope someone can help me with this.
Have a look at these two threads: http://www.cnczone.com/forums/steppe...97366-cnc.html http://www.cnczone.com/forums/steppe...56712-cnc.html
I think most common is All + connections bridged. For the driver there is no difference as the inputs are all opto coupler inputs with a build in resistor to work at 5 Volts between - and + connection.
So if you connect the + Pul to + 5 volts, and pull the - Pul down to ground has the same effect as when you ground the -Pul and raise the +pul to 5 volt. The output of the breakout board can do both.
If the circuit I have reverse engineered from photos of the BOB is correct
it will be better to wire the common connection to the DQ542MA inputs to to the BOB's +5V (pul+,dir+,enbl+ commoned to +5V )
as the BOB's NPN outputs can sink more current to 0V / ground
than the 1K pull up resistors can provide if you wire the stepper driver inputs to a common ground
if you connect the commons to GND like this
the current through the stepper drivers input opto-isolator LED's will be limited by the 270 ohm resistor inside of the stepper driver and the 1K pullup resistors on the breakout board
this will reduce the LED current to about 2.3mA
( instead of 10mA when the DQ542MA inputs are connected to a common +5V)
note -
other breakout boards that have the outputs of IC's like the 74245 connected directly to the stepper driver inputs
are able to work equally well with both ways of wiring the BOB to the stepper driver
the 74245 IC's can source about 35mA from the +5V supply or sink about 35mA to 0V / ground
Hi. Thanks for the replies. Helped a lot but now there are other problems:
I've wired it like recommended:
pul- & dir- to the BOBs P2, P3, P4 etc.
Pul+, Dir+, ENBL+ brigded and connected to 5v Power Supply
ENBL- from all drivers connected to P1
After turning the power on, the motors seems to work ( strong holding torque ) but I was not able to test the motors from within LinuxCNC. No matter how I configured it.
Disconnecting all ENBL- or all ENBL+&- doesn't changed anything.
I tried to set the inverse flag in stepconf, set P1 as Enable etc. No sign of movement. The Parallel Port was set to 0 and to the real address ( 0xSOMETHING ).
Hi. The port adress was not the problem. I just couldn't remember it while writing.
As said. Disconnecting ENBL+ & ENBL-. does not change anything. The motors seem to be active ( could not move the shaft ) but they don't react to LinuxCNC.
You mention that the motors lock up when power is switched on. To me this means that the enable is ok, leave it as it is ( even disconnected ) for this moment.
You connected the + input for dir and step to + 5Volt. and the - input to the signal from the breakout board. this also looks fine
If you have a voltmeter, you could check the direction pin to switch high to low or low to high when you change direction. ( low should be between 0 and 0.5 volt and high above 3.5 volt )
Start checking on one axis. If jog shows a change of coordinates, the software is providing pulses to move the motor.
If there are no LEDS on your breakout board, you can disconnect the driver and connect a LED with a resistor of 1 Kohm in series between the signal pin and + 5Volt.
If there are LEDs on the board for the outputs, you can look at them.
For the direction, you should be able to switch the LED on and of by changing direction on the jogging.
For the step, you should see the LED light up or dim when you command to move with the jogging.
Ok.. No matter what wiring scheme ( active low or active high ) the steppers won't move and I downloaded the LinuxCNC parallel port tester which doesn't seem to produce any errors.
If launched with "halrun -I -f ptest.hal" like documented here:
The small screen with the pins shows up. Input 10-15 is green and all outputs off. It is possible to press the outputs and they switch color to green.
I tried connecting an estop button ( PIN10&GND). Pressing this button doesn't turn the color from PIN10.
Now... Somewhere must be a problem. Why are all inputs active if nothing is connected to them? Adding a button and trigger it doesn't change the state of the pin.
I don't have an voltage meter to meassure the PINs. But I guess the problem isn't the wiring but the board.
Is there a way to test the driver without the BOB?
Last edited by millhouse_; 03-06-2018 at 06:03 AM.
Yes a Voltmeter is useful. However if you have a LED and a resistor with a value about 1 K ohm you can test the outputs of the parallel port and the outputs of the BOB.
The longer leg of the LED is the Anode which should be connected tot the positive ( test point ) connect the resistor to the shorter LED leg and the other end of the resistor to ground ( negative )
check the direction output. You should be able to switch the LED on and of by changing the direction in your software.
You know if the software accepts your commands by checking the shown coordinates
If this works, check the step output with the LED. no movement should keep the LED ON or OFF, while a movement should dim the LED ( pulses )
Yes, this looks like 2 parallel ports.
The one on the motherboard doesn't have a connector on the outside but might have a internal connector to which you can connect a flat cable to a external connector.
I expect the one at 0x378 is the one on the motherboard. So select the other one in the software and try again.