587,207 active members*
3,026 visitors online*
Register for free
Login
Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2005
    Posts
    41

    Mach 3 interface to stepper motor driver

    Hi all,

    First post in CNCzone. I have aquired an old, but quality looking machine. It originally had an rs232 interface but the original software is missing and I believe it did not use g codes anyway. I am retaining a lot of the electronics, incuding the octal relays, xyz stepper drivers and power supplies. I have purchased Mach3 to drive from my pc lpt port. I am building an interface board from the lpt port to the L297 stepper driver/translators. My interface will include an AVR to detect the charge pump signals and to drive the L207s etc.
    To the point, at last.
    I would like to use optocouplers to isolate the lpt port from the machine electronics, but am worried about the source capabilities of the lpt port. The led in the optocoupler will take about 15ma and I read that 1284 level 2 ports will source 14ma. I should be able to compromise there, but the original lpt ports were only specified for 1.5ma or thereabouts. If I buy an off the shelf pci board is it likely to be 1284 level 2? Are all modern pcs built to the new standard? If so, how far back can I safely go? Do the commercial breakout boards have optical isolation?

    Anyone done this?

    Regards


    Dave

  2. #2
    Join Date
    Oct 2005
    Posts
    41
    6n137 optocouplers do the job.

  3. #3
    Join Date
    Jan 2009
    Posts
    7
    can u please inform more details about the interface board between the parallel port and the drive board of the steppers?

  4. #4
    Join Date
    Oct 2005
    Posts
    41

    Smile

    Blimey!

    We're going back a bit here.

    When I get home I'll dig out my schematics and any other information and post them here.


    Dave

  5. #5
    Join Date
    Oct 2005
    Posts
    41
    OK,

    Here are pictures of my pcb, top side red and bottom, mirrored, blue.
    Looking at the top, the lead to the parallel plug is top right and the limit switches etc are bottom right. Two relays top left switch the spindle motor and something I can't remember. The power to the steppers are bottom left. The two multi pinned connectors at the bottom are signals to the three stepper drivers. A bit overkill, but I used the original two driver boards and salvaged the connectors from the original interface board.
    There may have been a few modifications, for instance I prefer to operate the spindle manually.

    Dave
    Attached Thumbnails Attached Thumbnails pcb-106414016bc.bmp   pcb-106414016tc.bmp  

  6. #6
    Join Date
    Jun 2003
    Posts
    3312
    Quote Originally Posted by dhookings View Post
    Hi all,

    First post in CNCzone. I have aquired an old, but quality looking machine. It originally had an rs232 interface but the original software is missing and I believe it did not use g codes anyway. I am retaining a lot of the electronics, incuding the octal relays, xyz stepper drivers and power supplies. I have purchased Mach3 to drive from my pc lpt port. I am building an interface board from the lpt port to the L297 stepper driver/translators. My interface will include an AVR to detect the charge pump signals and to drive the L207s etc.
    To the point, at last.
    I would like to use optocouplers to isolate the lpt port from the machine electronics, but am worried about the source capabilities of the lpt port. The led in the optocoupler will take about 15ma and I read that 1284 level 2 ports will source 14ma. I should be able to compromise there, but the original lpt ports were only specified for 1.5ma or thereabouts. If I buy an off the shelf pci board is it likely to be 1284 level 2? Are all modern pcs built to the new standard? If so, how far back can I safely go? Do the commercial breakout boards have optical isolation?

    Anyone done this?

    Regards


    Dave
    You can sink 20ma on all the output pins. Odd's are that a PC that will run mach3 will source 20ma on pins 2 through 9, but it's not a guarantee. For mach3 you need a fast optocoupler, HPCL263x or HPCL 253x or those series P/N's. If you need a reference design take a look at one of mine: http://pminmo.com/4axisopto/4axisDIYopto.htm
    Phil, Still too many interests, too many projects, and not enough time!!!!!!!!
    Vist my websites - http://pminmo.com & http://millpcbs.com

  7. #7
    Join Date
    Oct 2005
    Posts
    41
    Quote Originally Posted by pminmo View Post
    You can sink 20ma on all the output pins. Odd's are that a PC that will run mach3 will source 20ma on pins 2 through 9, but it's not a guarantee. For mach3 you need a fast optocoupler, HPCL263x or HPCL 253x or those series P/N's. If you need a reference design take a look at one of mine: http://pminmo.com/4axisopto/4axisDIYopto.htm
    We are a bit out of step here. I've actually had this machine running for quite some time. However, version 2 may be a consideration. Time permitting I will do some more research on my drivers, with a view to getting faster rapid movement.

    Regards

    Dave

  8. #8
    Join Date
    Feb 2014
    Posts
    5

    Re: Mach 3 interface to stepper motor driver

    hello , i am an student at qena engineering faculty in south valley university in Egypt , my final project is CNC router machine , i have built stepper motro driver for it the same as you , i used AVR to receive input signal from mach3 and send output signal to switch power transistors which can hold large current for coils , but my problem was that AVR reads high signal from mach3 (5 volt) , so it switched the power transistor to pass the current through coils to actuate the motor , but AVR don't read signal low from mach3 , one of my friends advised me to measure the output signal from mach3 which enter AVR by oscilloscope to see the change in the signal to overcome my problem by using interrupt function in AVR , briefley the motor cannot be stopped because AVR reads the signal high constantly . is that true , i wait your answers and responses .

  9. #9
    Join Date
    Oct 2005
    Posts
    41

    Re: Mach 3 interface to stepper motor driver

    The AVR will read whatever is put on its pin. The parallel port will be either 5v or 0v depending on what Mach3 outputs and depending whether you have correctly configured the ports in Mach3. You can either feed this directly to your AVR through a resistor or put an isolating opto coupler in line. Incidentally I never found it necessary to use interrupts in the AVR. It is easily fast enough to poll all its inputs to react to Mach3.

    Regards
    Dave

Similar Threads

  1. Replies: 0
    Last Post: 02-26-2013, 08:37 AM
  2. Setting up Mach 3 with a 3 Axis TB6560 Stepper Motor Driver
    By Try&TryAGAIN in forum CNC Machine Related Electronics
    Replies: 7
    Last Post: 07-17-2012, 11:48 AM
  3. 4 Axis CNC Stepper Motor TA8435H Driver Board Mach 2 3 question
    By s_sus in forum Stepper Motors / Drives
    Replies: 242
    Last Post: 04-29-2012, 06:36 PM
  4. 5-Axis CNC Stepper Motor TA8435H Driver Board Mach 2 3 question
    By aashijanani in forum Stepper Motors / Drives
    Replies: 2
    Last Post: 03-19-2010, 06:39 PM
  5. Preferred Stepper Driver Electrical Interface
    By JeremyLee in forum Polls
    Replies: 4
    Last Post: 02-26-2006, 10:08 PM

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
  •