587,974 active members*
4,541 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > Stepper Motors / Drives > Convert Step/direction to phase drive
Results 1 to 19 of 19
  1. #1
    Join Date
    Aug 2004
    Posts
    421

    Convert Step/direction to phase drive

    Does anyone know how I can convert a step/direction signal to phase drive?
    Mach 2 uses step/direction and I want to control a BP boss which uses phase drive. Quadrature I think its called, it looks like this:
    L L
    H L
    H H
    L H

    Their is bound to be a way to do this with transistors or something. I don't completely understand what step\direction looks like, nor do I understand how 4 steps (defined above) can control a stepper when their are many more than 4 steps per revolution.

  2. #2
    Join Date
    Dec 2003
    Posts
    24220
    There is only four basic methods for drive command, step and direction, +- analogue, digital and Two phase sinusoidal. It looks like the latter maybe the one you are looking for?
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  3. #3
    Join Date
    Aug 2004
    Posts
    421
    I think I know what I am trying to do now, I just don't know how to do it. The pc output signal would look like this:
    Direction: 1 (cw) or 0(ccw)
    Step: pulses on and off for each step

    Every time the step signal pulses I need to somehow shift my output from 0 to 1 or from 1 to zero, ultimately looking like above
    00 Step 1
    10 Step 2
    11 Step 3
    01 Step 4

    a low direction signal will reverse steps from 4 to 1
    Question is what electrical gadget will take a momentary input and convert its output from high to low (or low to high) for each input pulse.
    I should have paid more attention in circuits class!

  4. #4
    Join Date
    Aug 2003
    Posts
    114
    Hi,

    A basic circuit to this is uses 2 flipflops (74hc74) and 2 exclusive OR gates (74hc86).
    See pic.

    John
    Attached Thumbnails Attached Thumbnails wave.gif  

  5. #5
    Join Date
    Aug 2004
    Posts
    421
    Thanks John!
    Do you know of any online references for this kind of stuff? Something that tells you what specific components do, like what a flip flop does?

  6. #6
    Join Date
    Aug 2003
    Posts
    114
    Hmm, I think this circuit comes from a internet tutorial : "jones on stepper motors" or something like that.. Just do a google search. I believe there was also a PCB layout in this tutorial.

    John

  7. #7
    Join Date
    Aug 2004
    Posts
    2849
    How is that any different from Direction / Step??

  8. #8
    Join Date
    Aug 2004
    Posts
    421
    I stopped by the local radio shack to see if I could find a flipflop, no luck, but I did find a counter it is 8-bit though. It seems that if I had a 2-bit binary counter it would be a piece of cake. Problem is I can't find anyone that makes them! The lowest I can find is 4-bit. So now i'm thinking can I convert 8 bit to two bit?
    What would be nice is a program (kinda like CAD for electronics) for designing circuits and testing them. Someone is bound to know of one?

  9. #9
    Join Date
    Dec 2004
    Posts
    411
    Could somebody please explain the application for this?

    I cannot understand the bigger context of the problem.

    I thought computer speaks to driver which drives stepper which controls router. Is this somewhere within the driver stage and is therefore a non issue for anyone taking the gecko path?

    Thanks

    Andy

  10. #10
    Use a CD4013 for the dual D-Flop and a CD4030 for the quad XOR gate. Tie all unused inputs to ground. See www.digikey.com or other for these parts.

    Mariss

  11. #11
    Join Date
    Aug 2004
    Posts
    421
    andy, the original drive system is already intact and I don't want to spend the big bucks to replace it just yet. The old Bridgeport computer is not up to par so I want to replace it with a pc running mach2. I can use the original drive system if I can output the phase signal. It would be a piece of cake if the program would output the proper signal.

  12. #12
    Join Date
    Aug 2003
    Posts
    114

    Exclamation warning: error in first diagram

    Guys,

    I just noticed I had swapped the Q en Q_not outputs in the diagram... I redrew this from a PDF file. I now have replaced the schematic diagram in my initial post to be sure there is no false version on the site. Sorry about that. Now I've double-double checked it.

    jderou,

    A 2 bit counter can't be used directly. It produces

    00
    01
    10
    11

    wheras you need

    00
    10
    11
    01

    You could use some logic to convert one in the other but its probably easyer to try if you can get the components Mariss suggested. they should work fine.

    John

  13. #13
    Join Date
    Sep 2003
    Posts
    552
    If you use Mach3 with the MaxNC CL setting it will output phase signals. I have used this setup with the original BP stepper drives and it works great!

    I have always been a big fan of phase drive, it basically cuts the frequency of the step signal in half and makes the other signal line share the load (Which is normally either on or off.).

    Darek

    http://www.cnczone.com/forums/showthread.php?t=7943

  14. #14
    Join Date
    Aug 2004
    Posts
    421
    Your kidding! For some reason I thought the software didn't have that option! Wow that made things terribly simple.

    John, that is one of the things I was a little fuzzy about. I'm guessing thats the difference between true binary and grey logic?

  15. #15
    Join Date
    Aug 2004
    Posts
    421
    Darek, couple of questions if you don't mind.

    I started designing my isolating board for the BP retrofit. Should the common parallel port lines be tied to the -5v from the power supply? If not then where do they go? The +- 5v will come from the pc power supply.

    Also, are you using the z axis decel and the limit? I haven't figured out how to handle the decel using Mach3. It seems like their should be some input in Mach that can override the feedrate.

    Thanks

    Joe
    Attached Thumbnails Attached Thumbnails boss.JPG  

  16. #16
    Join Date
    Sep 2003
    Posts
    552
    If the +5v and common ( not -5v) comes from the PC then you do not have to connect pins 18-25 of the LPT to common, It should allready be at the same potential. The reason I choose not to was to return the IC power on the power wires and not the LPT pins (ground loop.). If an external +5v supply was used its common would have to be connected in.

    Z axis only has a limit switch in the - direction. Z+ has the decel then home switch. I
    used the probe input with a G code program to home Z. Something like this.

    G92 Z0 'Set Z to zero
    G31 Z5 F20 'Move fast to decel switch
    G31 Z5 F2 'Move slow to home switch
    G92Y0.0 'Set Z zero
    M30 'End

    Looks good Darek
    Attached Thumbnails Attached Thumbnails ZHome.jpg  

  17. #17
    Join Date
    Aug 2004
    Posts
    421
    What is the reason for using MCT271 for some outputs and TIL128 for others? I am a little fuzzy on this circuit in a few areas, I can't get myself to build something that I don't understand. What is the 7407 for?

  18. #18
    Join Date
    Sep 2003
    Posts
    552
    These circuits are identical to the original BP interface. you use the 7407 to buffer the signal, some LPT ports will not drive the opto coupler.

    Darek

  19. #19
    Join Date
    Sep 2003
    Posts
    552
    When using Mach 3 with the MaxNC CL setting, spindle on & off is on pin #14 and the spindle speed PWM signal is on pin #1. I see from your drawing you allready have the axis signals, pins #4 & 5 for Y, pins #6 & 7 for X and pins #8 & 9 for Z.

    Darek

Posting Permissions

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