Getting gaps at corners and/or whenever the laser changes directions

Very telling test. Things are looking better but there’s likely something wrong in the power modulation. The fact that you get no engraving at 30% or lower is odd. And it’s interesting that speed makes very little variation at speeds 1400 mm/min and up. You may want to try even higher speeds to see if you can get more variation.

Focus doesn’t seem to be a problem in the pics. Or at least not the main factor.

Are you thinking there is something physically wrong with the laser, the laser control board or the GRBL control board? Trying higher speeds would seem to cause, not only, the 10% to 30% power to not burn but might cause the 40% or higher to not burn. I’ll give it a try. I’ll have to run the test that James Dean shows for “Tuning GRBL Settings” to see how fast the steppers will go before they stall. I just glanced at that video and thought it pertained more to the Router Set Up more than the Laser Set Up. Thank you once more for your help. Especially on a Sunday.

I tuned my cnc3018 up by his work. Really ripped. It would walk all over the table and made all kinds of noises from the violent movement.

I’ve got three cnc3018 types, all have their spindles back on them. I used to run the original with a 30watt Neje with lightburn… that got me hooked and I moved to a co2… Rarely use the led, need to pick one and set it back up.

It’s a great exercise to understand the machine and the settings.

In the end I re-loaded the original numbers back, to keep it in one piece.

I’d really like to give you my speed results, but like an idiot, I formatted that disk by accident and it missed the backup, also my fault… I think you will be surprised at how fast it will run.

Good luck

:smile_cat:

Wait, do you have a separate laser control board separate from the laser module? Or were you just differentiating the control board part of the module vs the diode? My guess would be the board on the laser module but uncertain. There’s a chance it could be your power supply struggling at low currents. I don’t think it’s your GRBL controller since you’re obviously getting some control. Just seems like it’s not it’s not getting interpreted as I’d expect. Seems odd that it would be barely visible less than 30% power and then jump to pretty strong engravings at 40%.

I have the GRBL Control Board, The laser module, a laser control board and a separate power supply for the laser. All items were purchased from SainSmart.

I will be following James Dean’s video on Tuning GRBL Settings. I watched it today but didn’t get a chance to do it. Thanks, Bob

I’ve read through the manual listed on that page and noticed a few things:

  1. Are you using the included power adapter and plugging that into the control adapter? If so, I assume you have the 2 prong connector from your controller to the adapter?
  2. The manual indicates that you should have the bottom of the laser head module 60 mm from the target material. Did you do this before focusing?
  3. There is mention of power levels of between 10 and 20% for focusing so it’s possible that you just need it that high for a light to be visible.
  4. Do you have a meter or scope that you could use to test voltages into and out of control adapter? You should get a linear increase in voltage from 0-5V for 0 to 100% power.

Yes

I’ll give that a try but this is also their recommendation.

I didn’t see that but even at 20%, I have to have the room completely dark or I change the S Value Max to 1000 and use the “Fire” button. Then I put the S Value Max back to 255.

Yes I do. I’ll check that out as well.
I like the comment in the description of the laser module kit. “Easy to use, no instructions needed, just plug it to the laser port of the driver board and then it works”. I bet you can guess what I am thinking now.

Isn’t the setting for the S value max 1000 for GRBL whether it’s an 8bit board or a 32bit board?
It used to be 256 for 8bit boards and 1000 for 32bit boards. In either case both the GRBL setting and LightBurn setting must match.

This is from the Lightburn Grbl setup instructions. If they don’t match, it will be an issue.


You might need to adjust your spindle max RPM value ($30) to match the LightBurn default (1000) or vice versa. The value in LightBurn is called “S-Value Max”, in the Device Settings.


I would think your LED would be working at 1%…

Just curious…?

:smile_cat:

1 Like

Interesting… They must have either changed the documentation or I’m looking at a different variation.

Is that because LightBurn caps the value at 20%? You could potentially create a macro to create your own fire button although it wouldn’t work for framing.

F51 is 20% power when $30=255.

M3 F51 G1 

To disable

M5

Arduino compatible boards all use 255 as value for $30. Discussed here with @JohnJohn:

In either case as you say it’s important that the value agrees with S Value Max.

Here’s the relevant portion in GRBL cpu_map.h file that shows this:

    // Variable spindle configuration below. Do not change unless you know what you are doing.
    // NOTE: Only used when variable spindle is enabled.
    #define SPINDLE_PWM_MAX_VALUE     255 // Don't change. 328p fast PWM mode fixes top value as 255.
    #ifndef SPINDLE_PWM_MIN_VALUE
      #define SPINDLE_PWM_MIN_VALUE   1   // Must be greater than zero.
    #endif
    #define SPINDLE_PWM_OFF_VALUE     0
    #define SPINDLE_PWM_RANGE         (SPINDLE_PWM_MAX_VALUE-SPINDLE_PWM_MIN_VALUE)
    #define SPINDLE_TCCRA_REGISTER    TCCR2A
    #define SPINDLE_TCCRB_REGISTER    TCCR2B
    #define SPINDLE_OCR_REGISTER      OCR2A
    #define SPINDLE_COMB_BIT          COM2A1

Even the manual for @capt835’s laser refers to S100 and S200 values when assuming S1000 max. But from what I can tell this is for different controllers than what @capt835 has. That would put it in the 10-20% power category. This seems extremely high but hard to say without having familiarity with this specific module.

  1. Yes, I’m using the included power adapter and plugging that into the control adapter.
  2. I tried both focusing methods at 60 mm and 50 mm. They both work equally.
  3. Can you tell me where you saw the mention of power levels between 10 and 20 % for focusing.
  4. I first checked the power outfeed to the laser. This is where things got weird:
    I set up a straight line about 5 inches long on the X axis and had it double back. I set the F/P at 400/50
  • Power Adapter unplugged - 0 output voltage
  • Power Adapter plugged in - 0 output voltage
  • Start the run - 12 VDC
  • End the run - 12 VDC
  • Power Adapter unplugged - 0.5 VDC

I repeated that a few times and got the same results. I even changed the F/P settings and while it was running the line, I increased the power by 10% in 5 steps and down 10% in 5 steps. So 50% up and 50% down. There was no change in the 12 VDC.

So I checked the input voltage going from the GRBL control card to the laser control adapter. There is where I got the 0 to 5 VDC and it varied as I bumped it in 10% steps up and down. Which functioned normally I’m supposing. I don’t get the 12 VDC to the laser.

I did write SainSmart and they said this setup I have should be set at S Value Max 1000 and $30=1000. No change.

After I checked the voltages, I ran some simple tests and again 10 to 30% I have laser on but no burn even at a slow feed rate of about 100 mm/min. I do get a light burn at 37.5% power. So that tells me somehow the control adapter is modulating the power to some extent.

I’m lost. Thanks, Bob

I inferred it from the examples they gave. They had a Mach3 example where they set power to S200 I think with an assumed max of S1000. There was another example in GRBL with S100 with assumed max of S1000 for the Prover. I assume that’s for a different controller than yours but the percentage should hold true for your laser since it’s the laser module that’s being driven at those duty ratios.

I just rechecked the control board and laser and I think I misunderstood the relationship between the board and laser. I think the control board contains all the logic and power management and the laser module is really not a module at all, and just the diode, heatsink, and fan. Other laser modules I’m familiar with directly take PWM/TTL between 0-5V. In those setups control adapters are really there to offer different methods of providing that signal and power.

However I realized that your laser module only takes 2 wires. Which means it’s receiving the 12V power line voltage. That means that the control board is processing the PWM and adapting it for the laser. In that case I would have assumed that it would simply be converting the input 5V TTL/PWM to 12V TTL/PWM but your testing indicates that it’s getting a full 12V the whole time. I would have expected it to be 6 V (50% of 12 V).

I’m curious how laser power is being modulated then. I’m guessing that it’s current controlled but I’m not sure. Are you able to test the amperage at various power levels? This may be a little tricky as you may need to get some extra leads and assuming you’d need to have the laser firing as this happens.

Did you check laser side voltage at <30% power setting?

Well I guess that’s settled. I don’t know why the controller shipped at 255 and don’t know why they have deviated from default for Atmega328.

Don’t know if this is much help, but my Woodpecker grbl board has an output for two wire laser.

Screenshot from 2022-03-02 21-24-30

This drives the laser/spindle via the pwm. I’d assume the mach3 is similar.

:smile_cat:

I searched on “What is PWM in Arduino”. It appears the frequency, not the cycles, of the applied 12VDC is adjusted based on the 0 to 5 vdc signal from the GRBL Control board. Here is an image they show.
image
So I’m guessing I would need a scope to look at that. However, I was able to see the laser intensity change by having the laser run a square at 50 mm/min and using the “Move” window to increase the power in 10% steps.

So at this point, I’m guessing my GAP problem was resolved by adjusting the $120 and $121 Acceleration speeds so the laser fires faster when it changes direction. Now I just guess I have to tweak the feeds and speeds so as to get the graduations to show more of a change in the Power Speed and Grayscale tests. Thanks for all your input and if you have any other comments to make regarding this, I’m all ears or eyes in the case of reading these threads. jkwilborn Thank you also Jack. DougL Thank you Doug. Also, thank you all if I missed anyone.

1 Like

To see the actual PWM yes. However, a meter will show an “averaged-out” voltage in proportion to the duty cycle. So 50% duty cycle on a 0-5V TTL signal will show as 2.5V on a meter.

Keep in mind this is all going to be on the controller side of the control board. Apparently the laser side of the control board isn’t PWM.

It was likely addressed by going faster but I would characterize the mechanism a little differently. What caused the gaps is that the laser intensity is reduced to prevent burning as during the deceleration caused by the direction change. However, because of the “deadband” or drop-off point of your laser it reduced intensity to the point that it wasn’t strong enough to burn at all. Going faster overall probably kept the speed at a high enough level as to not call on a power level where the cutoff occurs.

The two wire lasers, like came with my cnc3018, just switches the power on and off to the laser. There were no electronics on my supplied 500mw module. It was a heat sink with the led laser on it.

I think both refer to the frequency…

Whey they ‘speak’ pwm, it’s ‘pulse width modulation’ based on time (or better ‘period’)

Is the ‘time’ scale for your graphic in minutes, seconds, days or years?

The earth spins under the sun which produces a pwm sun period that varies from winter to summer. It just has a slower rise/fall time and a 24 hour period. ‘On’ more in the summer, than off… In the end it’s all time relative

My Ruida is 20kHz, which I can change via Lightburn. The Arduino, which is in my cnc3018 is about 1kHz and you have to recompile the firmware to change it. The step rate of the Arduino is up 255 steps from 0 as it’s only an 8 bit register…

As you acknowledge, you can see the ‘power control’ of a laser is on or off. We only see an ‘apparent’ power change because of the ‘average’ time the laser is on. Our only real control is speed… :wink:

Good luck

:smile_cat:

How was power modulated on that unit? Also, did it take 12/24V from power supply voltage? I’m curious about @capt835’s laser as voltage showed steady 12V irrespective of power setting meaning it’s likely not PWM. This to me means there’s either no power modulation or it’s modulated some other way. Since we can clearly see that there is some level of power modulation it’s not the former. I assume current-controlled but not sure. I haven’t worked with a laser like this.

The machine needs it’s 12v for the motors to operate. The controller runs off the usb supply.

The connector used the 12v and the ‘pwm’ completes the ground through the IRF540 mosfet… it’s only 500mw laser.

The mosfet is good to 33A…with a proper heat sink.


Lasers are on or off. The pwm in this instance just turns the power on and off. Co2 turns the high voltage on and off controlled by the pwm. There is no 50% lase.


I blew the output of one channel in one of them and keep the board around to generate pwm when I need it. I plug it into the laser output.

:smile_cat:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.