Which wiring scheme should I use?


Results 1 to 15 of 15

Thread: Which wiring scheme should I use?

  1. #1

    Default Which wiring scheme should I use?

    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.

    Similar Threads:
    Attached Thumbnails Attached Thumbnails Which wiring scheme should I use?-img_7375-jpg   Which wiring scheme should I use?-hqdefault-jpg  


  2. #2
    Member
    Join Date
    Dec 2012
    Location
    Netherlands
    Posts
    199
    Downloads
    0
    Uploads
    0

    Default Re: Which wiring scheme should I use?

    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.



  3. #3
    Member john-100's Avatar
    Join Date
    Mar 2007
    Location
    uk
    Posts
    2083
    Downloads
    0
    Uploads
    0

    Default Re: Which wiring scheme should I use?

    If the circuit I have reverse engineered from photos of the BOB is correct

    Which wiring scheme should I use?-wantai-bob-circuit-jpg

    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



    Which wiring scheme should I use?-common-5v-jpg

    if you connect the commons to GND like this

    Which wiring scheme should I use?-common-gnd-jpg

    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

    John



  4. #4

    Default Re: Which wiring scheme should I use?

    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 ).

    Any suggestions?



  5. #5
    Member john-100's Avatar
    Join Date
    Mar 2007
    Location
    uk
    Posts
    2083
    Downloads
    0
    Uploads
    0

    Default Re: Which wiring scheme should I use?

    the DQ542MA enable like many stepper drivers is a negative logic input so the drive is enabled with no enable input !!!
    and very often not used

    in your case the drive will be enabled when both the + enable and -enable terminals are at +5V
    (or not connected )

    I have not tried Linux but for mach 3 the printer port address is 0x378 hex if that helps ?

    John



  6. #6

    Default Re: Which wiring scheme should I use?

    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.



  7. #7

    Default Re: Which wiring scheme should I use?

    Is it possible that the 5v Power supply is to weak? I used a simple 5v USB Charger connected to the BOB and the driver.



  8. #8
    Member john-100's Avatar
    Join Date
    Mar 2007
    Location
    uk
    Posts
    2083
    Downloads
    0
    Uploads
    0

    Default Re: Which wiring scheme should I use?

    its possible

    some are not very well regulated and don't supply 5vv

    others limit the current available unless they see the correct feed back on the data lines and increase the current

    john



  9. #9
    Member
    Join Date
    Dec 2012
    Location
    Netherlands
    Posts
    199
    Downloads
    0
    Uploads
    0

    Default Re: Which wiring scheme should I use?

    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.



  10. #10

    Default Re: Which wiring scheme should I use?

    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:

    LinuxCNC Documentation Wiki: Parallel Port Tester

    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.


  11. #11

    Default Re: Which wiring scheme should I use?

    Looks like I need to get a voltmeter. What if there is no signal at the BOBs output pins?



  12. #12
    Member
    Join Date
    Dec 2012
    Location
    Netherlands
    Posts
    199
    Downloads
    0
    Uploads
    0

    Default Re: Which wiring scheme should I use?

    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 )



  13. #13

    Default Re: Which wiring scheme should I use?

    I purchased a voltmeter and checked everything. Looks like the parallel port doesn't send any signals to the BOB.

    This is the card ( this is the output on the main os debian jessie, not from linuxcnc ):

    lspci -v
    03:06.0 Communication controller: MosChip Semiconductor Technology Ltd. PCI 1 port parallel adapter (rev 01)
    Subsystem: LSI Logic / Symbios Logic Device 0010
    Flags: medium devsel, IRQ 21
    I/O ports at ec00 [size=8]
    I/O ports at e880 [size=8]
    I/O ports at e800 [size=8]
    I/O ports at e480 [size=8]
    I/O ports at e400 [size=8]
    I/O ports at e080 [size=16]
    Kernel driver in use: parport_pc

    dmesg | grep 'par'
    [ 32.891008] parport_pc 00:02: reported by Plug and Play ACPI
    [ 32.891063] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
    [ 32.987097] PCI parallel port detected: 9710:9805, I/O at 0xec00(0xe880), IRQ 21
    [ 32.987167] parport1: PC-style at 0xec00 (0xe880), irq 21 [PCSPP,TRISTATE]
    [ 33.567872] ppdev: user-space parallel port driver


    Do I see correct and there is a second parport? The motherboard doesn't have a parallel port???




  14. #14
    Member
    Join Date
    Dec 2012
    Location
    Netherlands
    Posts
    199
    Downloads
    0
    Uploads
    0

    Default Re: Which wiring scheme should I use?

    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.



  15. #15

    Default Re: Which wiring scheme should I use?

    Thanks for all your help. It was the wrong port and now everything is working as expected. 0x378 was the invisible internal parport.



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Which wiring scheme should I use?

Which wiring scheme should I use?