UCCNC M10 Laser not turning off on M10 Q0 Command

If you have a question about the software please ask it here.

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby mayhem2408 » Thu Oct 18, 2018 7:16 am

Robertspark wrote:Mayhem2408, I am not an expert of M10 qxxx use with a laser.

My question was sort of directed at cncdrive to consider.

You've provided more information which is great.

However I suspect there is a difference between gbrl and uccnc regarding the use of pwm and M10 qxxx

Correct. GRBL does not use M10 at all. It simply uses M3 Sxxx to control the PWM and has a laser mode to produce smooth motion between PWM changes.
Robertspark wrote:It sounds like you are trying to fire your laser directly using M10 qxxx, and I'm not sure if that is the purpose of M10 qxxx.

M10 Qxxx have a value between 0 and 255 which equates to 0% and 100% duty cycle. The purpose of M10 Qxxx it to make a PWM duty cycle change without interupting the current motion.
Robertspark wrote:It sounds like you may be better using maybe an axis output.

This is a hack workaround for motion controllers that do not support PWM outputs
Robertspark wrote:Maybe I am not understanding your circuit and what you are trying to do (which is fine, I am sure cncdrive can now use the information you have provided to answer your question)

You talk about using M10 qxxx giving you 100 steps in a uc100 at 10khz. (Again I am no expert and would wait for cncdrive to reply) but I suspect you may not be understanding M10 qxxx.

No. On the UC100 I am only using a 1KHz PWM frequency, when put with a 100KHz Kernel, should give 100 steps. This means that potentially Q0 Q1 and Q2 will all be the same Duty cycle. I don't have a problem with that. A UC400 will sort that out for me.
Robertspark wrote:M10 qxxx is scaled from 0% to 100% as 255 steps (according to the uccnc manual)
I don't think you can scale it from 0-100 unless you are using a macro to rescale the value. Also this is used to vary the pwm signal output from the UC motion controllers

Again don't shoot the messenger, please wait for in drive to reply, but I suspect with using UC motion controllers you are missing a piece of hardware. The reason why I say this is the Arduino board can be programmed to do everything and anything.

If motion controllers do motion, but they can also be programmed to do other things within reason. You mentioned the uc400 running at 400khz giving you 1500khz signal. That I do not believe is possible using just the output of the uc400 motion controller. The maximum pulse output is 400khz, it cannot step more than that.

Pwm is something slightly different.

It can have 255 steps , at 400khz kernel setting, the fastest you can set the pwm carrier wave is 400,000 / 255 = ~ 1568 Hz (i.e 1.5 khz ).... Not 1500khz as your last post

Sorry. A Typo. I ment 1500Hz, not KHz.
mayhem2408
 
Posts: 62
Joined: Tue Sep 11, 2018 12:06 am

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby mayhem2408 » Thu Oct 18, 2018 7:41 am

Robertspark wrote:Mayhem, do you have a link to your laser which shows a wiring schematic.

In one of your earlier posts you mention the laser being able to switch up to 100ns signal.... Which is 10mhz and well beyond the capabilities of UC motion controllers

Correct. My laser driver can react much fast that the UC100 can command it. The should be no lag in the laser drivers ability. I have tested the laser driver at 500Hz, 1KHz and 2KHz via the GRBL-Mega controller and the driver behaves correctly.
Robertspark wrote:10mhz is quite a frequency and not only the hardware in achieving this frequency is very precise, but the wiring between it needs to be very precise to prevent noise, echo, resonance, capacitance etc between signal wires. I think you are missing a bit of hardware that will take a own signal and convert it to a high / adjustable frequency pulse train

The PWM output should be a simply 0-5V TTL shift. 0=No laser power, 5V is Laser Power. What extra hardware are you talking about?
A simple 2N2222 NPN transistor has a switching speed of 250MHz or 4ns and a simple Arduino Microcontroller (ATMega) can switch it's outputs at upto 20MHz. 10MHz is not difficult. And the UC100 PWM carrier is only set to 1KHz. Pretty cruisy for most simple electronics. Unfortunately I do not have the schematics to the controller. But the controller is capable of running a 25KHz carrier and still maintain a duty cycle resolution of about 0.25% Guaranteed by the developer. I will ask them if I can share the test results of the driver. I have the occiliscope outputs showing its switching response and as shown before, works perfectly with a GRBL-Mega controller. Currently I am running a wire directly of Pin 17 on the UC100, through a 200ohm resister to limit the current (Just incase) and straight into the laser driver input. This is exactly the same for the GRBL-Mega controller. The laser driver is not my problem here. I am having problem with the switching response of the UC100 controller.
mayhem2408
 
Posts: 62
Joined: Tue Sep 11, 2018 12:06 am

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby mayhem2408 » Thu Oct 18, 2018 8:37 am

Robertspark wrote:Mayhem, do you have a link to your laser which shows a wiring schematic.

As mentioned I do not have the schematic for the driver, but I can see the main MOSFET is a IRLZ44N which has an on response time of 12ns and an off response time of 44ns. It can turn on and off comfortably in 100ns. It is a powerful Highspeed MOSFET rated at 55V, 49A and 96W. The UC100 has a response time of of 10 microseconds or 10000ns. Not a problem for this MOSFET.
mayhem2408
 
Posts: 62
Joined: Tue Sep 11, 2018 12:06 am

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby Robertspark » Thu Oct 18, 2018 3:02 pm

Mayhem,

Please can you provide a copy of your profile that you are using (the *.pro file) which will be saved in your

c:\Uccnc\Profiles folder.

Thanks (yon may need to rename it to txt in order for it to upload to the forum).
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby mayhem2408 » Thu Oct 18, 2018 7:36 pm

Robertspark wrote:Mayhem,

Please can you provide a copy of your profile that you are using (the *.pro file) which will be saved in your

c:\Uccnc\Profiles folder.

Thanks (yon may need to rename it to txt in order for it to upload to the forum).

This is my profile I am using. I have also tested the laser using a 2017 screenset and the default screenset.
Attachments
SC2-840_Laser_jr.txt
(31.65 KiB) Downloaded 554 times
mayhem2408
 
Posts: 62
Joined: Tue Sep 11, 2018 12:06 am

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby Robertspark » Thu Oct 18, 2018 7:44 pm

Ok, suggestion A to try

Could you go to the configuration >>> spindle screen / tab, and change the pwm spindle from pin 17 to zero.

At the moment you have assigned the same pin to the laser and to the spindle

You have also setup the spindle as pwm.

Can you just please clear that pwm pin 17 and try your test pattern running

M3, followed by
M10 Qxxx
Followed by motion + pattern etc
And changing the laser intensity with M10 Qxxxx
Then
M11 and
M5 at the end of the cycle.

If it does not work or still looks poor I have another suggestion to try
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby mayhem2408 » Thu Oct 18, 2018 8:27 pm

Robertspark wrote:Ok, suggestion A to try

Could you go to the configuration >>> spindle screen / tab, and change the pwm spindle from pin 17 to zero.
............
Can you just please clear that pwm pin 17 and try your test pattern running

It didn't change the output at all.
20181019_072209s.jpg

Pulse Width Test.png
Pulse Width Test.png (293 Bytes) Viewed 8586 times
mayhem2408
 
Posts: 62
Joined: Tue Sep 11, 2018 12:06 am

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby Robertspark » Thu Oct 18, 2018 8:51 pm

Hmm, I suspect that the laser is not able to be directly driven from uccnc, and again you need another piece of hardware that will fire the laser quicker relative to the pwm signal.

The carrier wave from the uc100 if it is set on 100khz kernel loop cannot be any quicker than
100,000 / 255 *2.... So 784 Hz.

Because of the way the uc100 will fill the pwm signal with a 1 or zero on every kernel loop and use the pwm signal to provide 255 steps
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby Robertspark » Thu Oct 18, 2018 8:52 pm

Sorry, I'm out of ideas.... Maybe cncdrive will be able to help you out now as they should have all the info they need
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby beefy » Thu Oct 18, 2018 9:15 pm

Haven't read through all of the thread but has the use of a logic analyser been mentioned for testing.

You can get them on Ebay for not too much.

When I first bought a UC400 several years ago, I did a whole bunch of timing tests with a $10 logic analyser, and found a bug or two with M10, etc. Balazs very quickly got these bugs fixed, and subsequent testing showed M10 output switching in perfect sync with the step pulses. I'd use a very short distance (few cm) and calculate how many step pulses (based on steps/mm setting) I'd expect to happen before the M10 output become active, and likewise when M11 would turn the output off. Then I'd look at the logic analyser results and tediously count the steps, checking exactly where the M10/M11 output was turned on/off. It was bang on the mark every time.

With a logic analyser it's easy to check the input signal to your breakout board and the corresponding output signal and check how much lag between the two.

Even the cheapy $10 logic analysers are supposed to run up to 20Mhz speed.

Keith.
beefy
 
Posts: 449
Joined: Mon Sep 05, 2016 10:34 am

PreviousNext

Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 17 guests