586,096 active members*
3,012 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2) > How to troubleshoot spindle signals (On/Off, PWM) on a pinouts?
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2003
    Posts
    168

    How to troubleshoot spindle signals (On/Off, PWM) on a pinouts?

    [obligatory note: I tried searching for PWM. "No hits." (really?)]

    LinuxCNC v2.7, ubu 12.04LTS, generic 25-pin breakout board

    I have a new Chinese CNC: 3-axis+rotary add-on. It came with a 15-pin proprietary card and NCStudio that won't install in Windows. ("Great! Motivation to 'do the right thing' at the outset.")

    I bought one of those DB25-pin 5-axis breakout boards and (cannot hook it up because I have to wait on a gender-changer so my standard bi-dir cable will fit; however I) found another, very simplistic DB25-pin breakout that gives me easy access to the pins.

    With that, in place, and assigning my pinouts in stepconf to match what the board expected (as best I could so far), I was able to verify with a DC voltmeter during "Tests" of the XYZ axes, that voltages appeared on the proper sets of pins which matched the expected movement commands.

    Now, I'd like to do something similar for the Spindle pins: pin 1 which has been directed to provide "Spindle PWM" and pin 17 which has been directed to have "Spindle ON".

    I notice that I cannot get LinuxCNC (the real version) off of Emerg. Stop (owing I think to its being unable to detect a machine hanging out on the parallel port), but I was able to use the Simulation version to get voltages on the stepper pins.

    When I go into MDI mode and issue an M3 Snnnn, I would expect to read a steady voltage on pin 17 and a variable voltage on pin 1, but I don't see pin 17's voltage go off with an M5. Also pin 1's voltage doesn't seem to vary. (Of course, I'm not sure that the run through stepconf actually informed LinuxCNC to put the signals onto the pins requested.)

    Of course there is the complicating factor of the signal being a steady amplitude, and only varying in pulse width, but I was thinking that my DC meter at least ought to read a different DC "average" as the pulse width varies. In any case, I expect it should read opposite extremes at M3 S0 and M3 S24000.

    I'd like not to purchase an oscilloscope. Mostly because I know there's already one here. Somewhere. Under the flotsam.

    If you can offer pointers, they would be appreciated.

    Thank you for reading, and at least commiserating.
    --
    Cnc Z'ne
    --
    Dan

  2. #2
    Join Date
    Jul 2003
    Posts
    168

    Re: How to troubleshoot spindle signals (On/Off, PWM) on a pinouts?

    On deeplier perusal,
    * I found that lines suggested in http://linuxcnc.org/docs/2.7/html/ex..._spindle_speed
    mostly matched what was already in my own, post-stepconf, .hal file, but the striking difference was that my .hal
    had "type=1" for this recommended line:
    Code:
      loadrt pwmgen output_type=0
    [My brain's knee-jerk reaction to "0" is "off", but, after all, my .hal had "1", and it was still "off" as far as I could detect.]
    * I'm expecting the board to put out a variable 0-10Vdc signal, directly correlated with "pin 1/PWM, In", but
    I'm'a wonder: "Where's it gonna get 10V from?" IEEE-1284 specs "TTL logic levels" (0-5V), but none of
    the pins suppy 5Vdc (which is why the breakout boards often sport an auxiliary USB connector--not to supply
    serial data, but pure, raw, stinkeen POWER--but not 10V... :^(

    So, I haven't provided 12-24Vdc, IN because I thought it was for the stepper motors, which already have
    power. AND, I wanted to save money...

    * Maybe I should try that... (Wonder how many AAAs is 24V?)
    --
    Dan

  3. #3
    Join Date
    Jan 2005
    Posts
    15362

    Re: How to troubleshoot spindle signals (On/Off, PWM) on a pinouts?

    Quote Originally Posted by cnczane View Post
    On deeplier perusal,
    * I found that lines suggested in http://linuxcnc.org/docs/2.7/html/ex..._spindle_speed
    mostly matched what was already in my own, post-stepconf, .hal file, but the striking difference was that my .hal
    had "type=1" for this recommended line:
    Code:
      loadrt pwmgen output_type=0
    [My brain's knee-jerk reaction to "0" is "off", but, after all, my .hal had "1", and it was still "off" as far as I could detect.]
    * I'm expecting the board to put out a variable 0-10Vdc signal, directly correlated with "pin 1/PWM, In", but
    I'm'a wonder: "Where's it gonna get 10V from?" IEEE-1284 specs "TTL logic levels" (0-5V), but none of
    the pins suppy 5Vdc (which is why the breakout boards often sport an auxiliary USB connector--not to supply
    serial data, but pure, raw, stinkeen POWER--but not 10V... :^(

    So, I haven't provided 12-24Vdc, IN because I thought it was for the stepper motors, which already have
    power. AND, I wanted to save money...

    * Maybe I should try that... (Wonder how many AAAs is 24V?)
    Yes you do need to power the Board with either 12v or 24v for any of the outputs to work, it's called isolation so it needs 5v for the front end and 12v-24v for the outputs to work
    Mactec54

  4. #4
    Join Date
    Jul 2003
    Posts
    168

    Re: How to troubleshoot spindle signals (On/Off, PWM) on a pinouts?

    Thanks, Mac!

    I stepped away to dig through a pile of surplus and found (hoo! ray!) a 6-24Vdc power-supply board I rescued from a dumpster!

    At the moment I plugged it in, I had a sudden flash that there was "something" about the boards that made them not, quite, the find I originally thought.

    This was followed quickly by the other flash from the capacitor erupting and disgorging its contents up my nose. I am proud of the fact that there were no flames. I am also proud that I have now confirmed that it belongs in a dumpster...

    Doing my research after the fact (oh, right: like I'm the _only_ one on this forum...), I was reminded that I disliked the fact that two terminals were labeled "AC" when--and I want to emphasize this to power-supply silk-screen designers out there--they SHOULD have been labeled "28V AC--MAX".

    (I wonder if my wife's got anything that's powered by 12-28Vac, or 24Vdc. What's her cellphone charger likely to be?)
    --
    C. Z.
    --
    Dan

  5. #5
    Join Date
    Jul 2003
    Posts
    168

    Re: How to troubleshoot spindle signals (On/Off, PWM) on a pinouts?

    Quote Originally Posted by cnczane View Post
    (I wonder if my wife's got anything that's powered by 12-28Vac, or 24Vdc. What's her cellphone charger likely to be?)
    "There! I fixed it!!"

    Lucky for her--but sad for me as you shall see--I spied a box of surplus wall plugs first. I found a 12Vdc/500mA which measured 20Vdc. I was unable to find out what current the breakout wanted, but--sadly, as you shall see--500mA proved MORE than ample to do the job I had in store.

    I prepared the ends, and then double-and-triple-checked the screw connections, by flipping the board over and back.

    In all that flipping apparently I lost track of left-and-right, top-and-bottom, wright-and-rong. I very carefully secured the 20Vdc to a pair of terminals directly across the board from the location of the terminals marked "12-24V (In)".

    I powered it up and did not see the smoke discharge I have come to rely on to test my understanding of the wiring, so proceeded to test the voltage across the terminals. I noticed immediately that it was not 20V, but 0. I also noticed that it would show 20V for a short time after plug-in, but then drop immediately to 0. [I believe now that the smoke discharged but was invisible.]

    I disconnected it and verified that it really did output 20V.

    And that's when I saw it. (I don't see that well, but I saw, that, well.)

    Turns out they were a pair of output pins from the parallel port. Now one description of the board indicates that the pins are opto-isolated on the breakout, but I went ahead and ordered a new breakout board, and a parallel port daughterboard because there's a good chance I boiled the only parallel port I've got which happens to be on the motherboard.

    The CNC adaptation to LinuxCNC is on hold while I wait for the new victims.

    I plan to use the time wisely by boning up more on "DC" and getting some practice in on my javelin-catching.
    --
    c'czane
    --
    Dan

  6. #6
    Join Date
    Jul 2003
    Posts
    168

    Re: How to troubleshoot spindle signals (On/Off, PWM) on a pinouts?

    Okay. Back. Two PCI parallel port cards arrived this morning, so I worked until 11 pm getting one to talk voltages to a breakout board, and I'm back to where I was before Groundhog Day.

    Things I ran into/to watch out for:
    * set port type to "EPP/ECP" in BIOS (not "Bidirectional")
    * make sure the cable is a full 25-pins, and straight-through/no crossing
    * don't assume LinuxCNC will figure out the parallel port's number (it won't); you have to find it and provide it in stepconf
    * some ways to find the port number: 'cat /proc/ioports', 'hardinfo' (have to install it in linux), 'lshw', 'lspci -v'
    * may have to push (hard) the breakout board to seat it in the port if you don't see voltage when you think you should

    Next I'm going to get a proper 25-pin cable and proceed to try to generate a PWM signal on pin 1 of the parallel port to the breakout board to see if it, really, will create an analog voltage in the 0-10V range.
    --
    Dan

Similar Threads

  1. Troubleshoot spindle start
    By pmsmichelle in forum Spindles / VFD
    Replies: 2
    Last Post: 10-08-2019, 05:27 PM
  2. Larken BX7 pinouts for spindle control
    By Dstamp in forum Viper Servo drives
    Replies: 7
    Last Post: 12-03-2014, 12:02 PM
  3. spindle encoder pinouts- FYI and a question...
    By tc429 in forum Haas Mills
    Replies: 1
    Last Post: 05-29-2014, 04:18 AM
  4. Replies: 3
    Last Post: 01-22-2014, 01:25 AM
  5. TechnoCNC LC controller spindle pinouts?
    By Pplug in forum Commercial CNC Wood Routers
    Replies: 0
    Last Post: 04-12-2009, 06:12 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
  •