Hi guys, I'm back to my PWM issue and was looking for advice.

Hi guys, I’m back to my PWM issue and was looking for advice. I finally brought an oscope home from work to see what my waveforms looked like and like I thought, no matter what my settings in the software I get a full PWM signal to fire my power supply. Right now I have the PWM out going to the L on the LPS. If I set my power in LW3/4 to 1% or 50% I get 100% output to the laser. Per my understanding, LW3 will vary the power based on the percentage I set and where I set the potentiometer to set a ceiling. Maybe looking at the scope isn’t the answer as I’m not exactly an expert with these things. Would love to know your thoughts or any advice. I’m currently running an MKS SBase board with Smoothie Firmware.
Thanks,
Chuck

On my azsmz I connect L from LPS to negative pole on the bed MOSFET, and that’s it.

I have it in pin 2.6 which is also off a mosfet. I can try the negative pin off the bed and see if that maybe produces a better (variable) signal.

I think the trick is the negative pole

My assumptions are this. Define pin X.X in the smoothie config. Connect said pin to the L input on the LPS. The software would vary the PWM signal hence varying the power supplied to the tube. The pot is in place as a “ceiling” and the software would vary (depending on my settings) between zero and the pot “ceiling”. Am I correct so far?

2.6 isn’t a hardware pwm pin.
2.4 or 2.5 is.

I’ve tried them all ray. Lol. I don’t know how I got my config file to where it’s at but I think i need someone to look at it or maybe just start from scratch. I’m starting to wonder if I’ve simply worked myself into a corner and didn’t realize it. In my config file I have:
Laser module enable true
Laser module pin 2.5
Laser module max power .8
Min is default is .3
Pwm period 60
Then I have this syntax that I can remember where I got it from:
Switch laser fire true
Switch laser output pin 2.5^
Switch laserfire output type digital
Switch laser input on command m3
Switch laser fire input off command m5

Does this look about right to you guys? I know I didn’t type it exactly. Left out all the underscores and separating periods. Thoughts?
Thanks.

Disable switch laser fire - set false.

Also pwm period can need to be anywhere from 200 - 400 for there to be noticeable laser grayscale but you should see pwm output on a scope anyways.

Hey @raykholo , have you come up with a best practice for connecting the mini to a K40 with the digital POT?

Yes, exactly the same as every other way.

does not look good to me. I would start from the default and got from there. Taking in consideration what Ray said above

So switch fire laser false
Change pwm to 200 to 400
And everything else should be fine the way I have it?

I’d second Ariel to grab the stock config file and enable the laser module with 2.5 and the pwm period 200. Done.

Ok. Will do. I’ve stared at this file for so long I can’t remember what anything does. All starts to blur together after a while. I think I had small successes with each change and just kept going. I should post my file as an example of what not to do for other new comers. It’s a commented out mess!!

The most common problem I have seen with people’s config file is forgetting to remove a # which comments out that line in the config file making it have no effect

Hi Chuck,
I too am running a MKS …but just received one of Rays Mini boards. My set-up is going to make some people cringe but here it goes.
I use pin 1.23 going to L pin through a level shifter.
Config is as follows:
laser_module_pwm_pin 1.23^!
I still have pot wired in.
I can honestly say I have no issues with PWM. It has been this way for probably 3-4 months with no issues.

If you’ve replaced the pot and are running the output of that to IN… I have nothing against it to say.

Nice engrave @frank_hernandez:stuck_out_tongue:

Hit that with some 500 grit sand paper lightly… And the whites will pop