Keyboard Shortcuts
Likes
Search
MACH3 and Spindle PWM output
开云体育I may have to pull out the scope but I'm having trouble with the PWM output from MACH3 to a USB Smooth Stepper. ? I have the Spindle set in Motor Outputs to pin 14 Port 1 and Direction set to Pin 16 Port 1. Under the Spindle Setup I have Use Spindle Motor Output and Use PWM control.? I have the Motor Spindle Relays disabled. ? The USB Smooth Stepper is plugged into a PMDX-125 BoB.? There is an LED on pin 14 and pin 16.? When I have the Spindle configured to use relays and switch on the spindle the Pin14 LED comes on.? If I have the spindle configured to not use relays and instead do the PWM at 100% PWM or full speed I should see the LED pretty well full on. ? And here's the issue I think I'm having.? How does the system know what full speed is?? Which parameter is that? Ie.? If I do a Gcode S1000 M5 I see the spindle activity button blink and I see 1000 RPM in the speed set info on the main screen.? But no LED ON at pin 14. ? So how does MACH3 know that 100% is the same as say 1000 RPM? Thanks John |
开云体育Yes.? I did that.? I have Pulley #1 set to 3000 RPM? (ratio is 1).? In the Settings (ALT6) screen I have Pulley #1 selected. So theoretically if I ask for S3000 M3 I should see 100% PWM out to pin 14 and at 100% PWM theoretically that pin should be continuously high which should light the LED.? Especially with only 5kHz PWM. ? It's not. ? I guess it's scope time.? ?Unless there are some other suggestions.? I get the feeling it's going to be a really dumb mistake. ? From: [email protected] [mailto:[email protected]] On Behalf Of Steve Stallings
Sent: March-17-23 4:43 PM To: [email protected] Subject: Re: [MachCNC] MACH3 and Spindle PWM output ? In Mach3 go to: |
If you are using a PMDX-107 with your PMDX-126, then it sounds like you have the signals on the wrong pins.
The PMDX-107 expects the PWM signal on Pin 16 and the Direction signal on Pin 14. Optionally the PMDX-107 can also monitor the Pin 17 "Charge Pump" as a safety measure. When using the PMDX-107 you do not need a "Motor ON" signal, the PMDX-107 monitors the PWM and turns the motor on when the PWM is pulsing. There is one quirk that can happen. If the S command asks for exactly the maximum for a pulley, Mach3 will generate a solid signal that never pulses if using the parallel port driver. In this case the PMDX-107 does not see any pulses and does not turn on. Not sure is this is also true for a SmoothStepper. Work around for this is to make your max for the pulley be 1 more RPM that the highest S command that you issue, i.e. for a 24000 RPM router spindle set the pulley max range to 24001. |
开云体育I set up an older PC that had MACH2 since it has a parallel port.? Installed MACH3 on it and just got things rolling.? Need to bring the scope over.? With the meter it looks like it's all working correctly but hard to tell. ? Have to run out for a while but I'll report back with the details. ? And no, not using the PMDX-107.? An external PWM to 10V module. ? Thanks for the feedback. John ? From: [email protected] [mailto:[email protected]] On Behalf Of Steve Stallings
Sent: March-17-23 5:14 PM To: [email protected] Subject: Re: [MachCNC] MACH3 and Spindle PWM output ? If you are using a PMDX-107 with your PMDX-126, then it sounds like you have the signals on the wrong pins. |
开云体育Ah.? Got it.? I've attached the updated drawing of the MACH3 Break Out Board from China.? My apologies to anyone who might have been confused by the schematic. ? The error is that I thought the P1 pin was driving the opto rather than what it really is doing is sinking current.? To make that work with MACH3 as the PWM, the Output Step line, which is P1, has to be inverted. ? So parameters are:? Spindle Step pulse P1, Spindle Direction P17 (which drives the relay on the board), Spindle Step pulse is inverted. On the spindle setup screen the Use Spindle Output is checked along with PWM Control. ? Now when the P1 signal is logic high the opto output is off and a resistor pulls the input to the FET high which then turns on the FET which pulls the input to the opto buffer low and the PWM output is low. ? At 3000 RPM (Pulley #1 max speed) there's barely a pulse and the P1 is virtually low all the time pulling current through the opto input, turning on the opto output which pulls the FET drive low which turns off the FET.? The R17 resistor pulls the signal high and this into the op amp buffer results in 10V out the PWM pin. ? And in between we get a varying voltage now. ? Updated schematic attached. ? John ? ? ? From: [email protected] [mailto:[email protected]] On Behalf Of John Dammeyer
Sent: March-17-23 6:40 PM To: [email protected] Subject: Re: [MachCNC] MACH3 and Spindle PWM output ? I set up an older PC that had MACH2 since it has a parallel port.? Installed MACH3 on it and just got things rolling.? Need to bring the scope over.? With the meter it looks like it's all working correctly but hard to tell. ? Have to run out for a while but I'll report back with the details. |
开云体育And in case anyone is wondering what the schematic is of, ?I've attached a photo captured off the AliExpress site.? This one is listed at $3.86 Cdn.? The biggest design flaw is the USB connector for the 5V is the wrong type. ?But there are terminals to apply 5V from a power supply so it's not a big deal. ? From: [email protected] [mailto:[email protected]] On Behalf Of John Dammeyer
Sent: March-17-23 10:13 PM To: [email protected] Subject: Re: [MachCNC] MACH3 and Spindle PWM output ? Ah.? Got it.? I've attached the updated drawing of the MACH3 Break Out Board from China.? My apologies to anyone who might have been confused by the schematic. ? The error is that I thought the P1 pin was driving the opto rather than what it really is doing is sinking current.? To make that work with MACH3 as the PWM, the Output Step line, which is P1, has to be inverted. ? So parameters are:? Spindle Step pulse P1, Spindle Direction P17 (which drives the relay on the board), Spindle Step pulse is inverted. On the spindle setup screen the Use Spindle Output is checked along with PWM Control. ? Now when the P1 signal is logic high the opto output is off and a resistor pulls the input to the FET high which then turns on the FET which pulls the input to the opto buffer low and the PWM output is low. ? At 3000 RPM (Pulley #1 max speed) there's barely a pulse and the P1 is virtually low all the time pulling current through the opto input, turning on the opto output which pulls the FET drive low which turns off the FET.? The R17 resistor pulls the signal high and this into the op amp buffer results in 10V out the PWM pin. ? And in between we get a varying voltage now. ? Updated schematic attached. ? John ? ? ? From: [email protected] [mailto:[email protected]] On Behalf Of John Dammeyer ? I set up an older PC that had MACH2 since it has a parallel port.? Installed MACH3 on it and just got things rolling.? Need to bring the scope over.? With the meter it looks like it's all working correctly but hard to tell. ? Have to run out for a while but I'll report back with the details. |