Hello Guest it is October 14, 2019, 09:57:15 AM

Author Topic: PWM signal not showing correctly  (Read 6141 times)

0 Members and 1 Guest are viewing this topic.

PWM signal not showing correctly
« on: August 29, 2012, 02:55:18 AM »
Hi All

I have been at this problem for weeks now. My laser switches the beam either on 100% or off , there is no control of the laser intensity when i use S10, S100 , S1000.
The signal coming out of the selected pwm pin (1 in my case) , does not show on my scope as a square wave at all. When the signal switches on to fire the laser, it just show the trace on the scope screen to jump up a few notches ...still as a straight line and the amp meter shows 30MA. That is all that happens. I have played with the base frequency and kernel speed, but the same results keep showing. Basically the GCODE only responds to the on/off code (M11p1 & M10p1)...there is no control by using any 'S' command. My question now :

How difficult is it to see a square wave pwm signal on the scope (My scope is capable of signals up to 20 megaherts)  ? I have played with all the knobs trying to see any signal, but nothing, i mean the square wave should show up quite easily  ..?? ???

The other thing that is worth mentioning is that the printer port cable is about 2 metres long running all across the machine to the other side where i have found a nice place for it to sit inside the machine....can this possiblly cause problems with the pwm signal ? ???

I know that i should have a clean pwm signal before i look for the problem down further. Why would the trace on the scope only show a shift in the trace line itself instead of a square wave ?? ??? I have played around with the base frequency from 5 all the way up to 9999999 , in which case mach3 make it 41666 or something like that.

Should i be bothered by the pwm signal not showing correctly, or am i totally on the wrong track here ? ???

Any help would be greatly appreciated as i`m not sure where to go from here.

Andre

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: PWM signal not showing correctly
« Reply #1 on: August 29, 2012, 03:44:21 AM »
Are you commanding a M3 with your S word?
Maybe Tweakie will have more of an idea as he uses the laser quite a bit.
Hood
Re: PWM signal not showing correctly
« Reply #2 on: August 29, 2012, 03:50:46 AM »
Hi

No, i have used the code as described by other laser users. No M3 command , just the M commands followed by a axis movement as described in other threads. ..below is an example :

11 G0X0Y0Z2
21 G1Z-2F100
25 S100
31 M11P1 (laser on)
41 G1X10Y10
51 M10P1 (laser off)
61 G0Z2

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: PWM signal not showing correctly
« Reply #3 on: August 29, 2012, 03:55:36 AM »
well worth a try putting a m3 on the S100 line to see

Hood
Re: PWM signal not showing correctly
« Reply #4 on: August 29, 2012, 04:00:00 AM »
I`m willing to try anything that i have not done before inside the GCode..

THanx will give this a try when i get home..

Andre

Online Tweakie.CNC

*
  • *
  •  7,945 7,945
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: PWM signal not showing correctly
« Reply #5 on: August 29, 2012, 06:13:49 AM »
Hi Andre,

You are possibly looking in the wrong place with your oscilloscope. The PWM signal is on the Spindle Step Pin (as set up in Ports and Pins / Motor Outputs).

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
Re: PWM signal not showing correctly
« Reply #6 on: August 29, 2012, 07:29:05 AM »
Wel, i 1st had pin 16 as the output pwm pin , then changed it to pin 1 to make sure it was not something on that specific pin. When i disconnect the pin, i get no laser output ..or if i make it the wrong pin number, it also stop the laser to work, so it has to be the correct pin. I even removed the wire that goes to the controller unit to make sure it wasnt that, but nothing changed.

I`m really confused.

But i have another plan. I`m going to take one of my radio control esc`s and use a pwm generator unit that they use for testing servos. This will generate a pwm signal on the input of the controller unit. This should show when i run the laser , but obviously it will use the pwm singal of the servo tester. This should work right ?
The servo tester generates a nice pwm signal. I have scoped this before to get an idea of the pwm signal.

But i `m still confused for now  ???

Online Tweakie.CNC

*
  • *
  •  7,945 7,945
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: PWM signal not showing correctly
« Reply #7 on: August 29, 2012, 07:38:37 AM »
Are you now seeing the PWM square wave from Mach3 on your scope ??

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
Re: PWM signal not showing correctly
« Reply #8 on: August 30, 2012, 07:23:56 AM »
No, nothing yet.
Last night i hooked up my scope to a radio control receiver to view the pwm output. I can see the square waveform ,only parcially , which make me believe that the pwm on mach3 might be more difficult to view than i expected. After playing around and taking everything into consideration, i hooked up the servo tester board to try adjusting the pwm signal manually ...basically same as all the other testing circuits i have seen , but adjusting the power level manually. This obviously works, which make me believe that the problem might be at the Homann controller itself.

I was thinking that the controller might be adjusted to high on the output side , so it will output a high power level all the time...not sure, but i have not checked this closely enough yet.

If i fail to get it all working and the problem is not the homann board level adjustment, i will then revert to the next thing that i have though about.

By using  a 3rd stepper motor on the z-axis , i can adjust the trimmer pot manually by building a unit that will turn the trimmer up and down by setting the GCode on the z axis. I have read some comments bout this , but have not actually seen it in the workings.
This works correctly as i have played around with the little controller board , but then i was thinking how on earth would i control the trimmer pot automatically if i have to turn it by hand now.

The z-axis should work fine for this, but the only thing that i wonder about is if the z-axis will turn the pot fast enough to adjust the power level correctly. I cannot remember the amount of trimming required to adjust the level, but i think this is the way to go and i should come up with a very workable solution. Once i have played around with the amount of turning that is required for the different power levels, the idea should work great.

It would be fantastic to hear from someone that has done this already.

Comments anyone ?

Online Tweakie.CNC

*
  • *
  •  7,945 7,945
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: PWM signal not showing correctly
« Reply #9 on: August 30, 2012, 08:11:14 AM »
Hi Andre,

I am pleased to hear that you are making progress.

Just out of curiosity I thought I would take a look at the Mach3 PWM waveform (the setup was with a maximum pulley speed of 100).

The following pics show a 25% PWM as produced with the S25 command and a 75% PWM with the S75 command.

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.