More PWM Questions

Machine: Scratch Built Custom Design

Board: Cohesion3D LaserBoard

Firmware: Probably Smoothieware Clustered version

Problem/ Question: Just need a bit more clarity on the whole PWM control side of things.

First off this is a new build, my first laser and I’m diving in at the deep end. :slight_smile: I’ve ordered the majority of what I need bar the mechanical side of things that I’m still designing out. So in the meantime while I wait for delivery I’ve been doing a lot of reading and the control of the laser power seems to be an interesting topic! (I have read the PWM Control Pot vs. Digital thread.)

In my ignorance I assumed that the Active High or Active Low connections on the LPSU were binary and simply used to enable the laser, and its power during operation was controlled by the IN connection by a PWM signal. However it seems that the LaserBoard PWMs the Active Low connection, and it is intended that the IN connection is used to set maximum power.

  1. Have I got this correct? (Specifically that the LaserBoard PWMs the Laser Fire pin, which is an active low signal and connects to the Active Low on the LPSU.)

  2. Out of curiosity what period/frequency is this PWM signal?

  3. What’s considered 100% power for a RECI W2 tube that’s rated at 90W with a peak value of 100W?

  4. What controls the Alternate PWM pins on the LaserBoard?

I also read on the PWM Pot. vs Digital thread the suggestion of setting the max power via the Pot to be the maximum that the job at hand requires, which will then give more resolution for varying power requirements when engraving. Sounds like good reasoning to me bar one detail that’s niggling at me. Say you have an engraving job on a given material at 2mm thick that requires engraving and then cutting. You set the maximum power to be whatever is required to cut the material and then the engraving portion is done at a percentage of that value. What if you need to run the same job later on the same material but now 5mm thick? You have to up your maximum power which then screws up your engraving power levels. Or am I just over thinking this and getting way ahead of myself? :smiley:

Please bear in mind that my only experience with lasers up to this point is annoying the cat with a laser pointer, so I know I have much to learn!

Having a pot and milliammeter is a must. Without it, you can only guess what current is going to your tube. Having said that, the stock K40 pot is a single turn and has by no means the ability to adjust the current accurately. Get a 10 turn pot and a panel mount milliammeter and you will not be sorry. Another benefit is when you are in the forums, milliamps is a common language among all laser tubes of a given wattage whereas %power is subjective and does not really relate to anything physical property wise. I am trying to figure out also how to add a digital ma meter in addition to the analog so I can record testing setting accurately. Struggling with Gray scale at the moment.(not a disease, lol)

About your power question for different materials. If you are running lightburn, the layer power is what controls the percentage of the milliammeter power so you can dial back your pot power only for the job you need. All the layer power differentials will all adjust accordingly. Nice feature.

Just a follow up to this. Would really like to know the answers to these questions:

  1. What’s the resolution of the PWM signal on the Alternate PWM pin? 8-bit, 10, bit, something else?
  2. Can it be configured with a specific period in the config file like the laser fire pin is?
  3. What MCU pin is connected to the Alternate PWM pin so that I can set it up in the config file?
  1. Skimming the datasheet for the LPC1769 it looks like the hardware PWM generator is 12-bit resolution.

  2. The period is configured with the same laser_module_pwm_period config directive. The hardware PWM generator period is a global setting and affects all pins configured for hardware PWM output.

  3. It’s triggered from the same pin (2.5 - see laser_module_pin). It’s not a separate output - it’s the same output, just instead of being optoisolated and driven to be a contact closure as on the screw terminals/4-pin block, it’s broken out in case someone wants to use the output to e.g. drive a diode laser module that’s expecting PWM pulses at logic level instead of a contact closure.

1 Like

A few quick additions:

I think the firmware might operate at 10 bit though. Not sure.

This may help: PWM tuning for Smoothie Firmware

As loather says, it is all the same mcu pin so you don’t touch that in the config file and just pick the laser output mechanism that works for your application, preferably the way that puts a pot in play and the board triggers L on the LPSU, as we recommend fairly constantly.

Thanks for the info guys. Just exploring my options. I’ll definitely be using a pot and an ammeter, so no worries there.

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