CO₂ Laser Tube Current: Analog Bandwidth

As before, with the Ruida KT332N controller’s L-AN analog output connected to the HV power supply IN terminal:

Ruida KT332 - analog laser control wiring
Ruida KT332 – analog laser control wiring

This time the scope traces include both the controller’s output voltage and the laser tube current:

The traces:

  • 1 X axis DIR, low = left-to-right (yellow)
  • L-ON laser enable, low active (magenta)
  • L-AN analog voltage (cyan)
  • 4 tube current – 10 mA/div (green)

At 50 mm/s = 50 Hz both the L-AN analog voltage and the laser current hit full scale:

Tube Current - analog bandwidth - 10 sine - 50mm-s - 10mA-div - 254dpi
Tube Current – analog bandwidth – 10 sine – 50mm-s – 10mA-div – 254dpi

The laser current resembles a damped RLC oscillation when started at nearly full scale and is entirely chaotic when started from zero, but behaves reasonably well for the rest of the cycle.

The power supply’s current bandwidth is definitely smaller than the controller’s voltage bandwidth, as shown by all those sampling steps simply vanishing.

As expected, at 200 mm/s = 200 Hz the L-AN analog voltage is down 3 dB:

Tube Current - analog bandwidth - 10 sine - 200mm-s - 10mA-div - 254dpi
Tube Current – analog bandwidth – 10 sine – 200mm-s – 10mA-div – 254dpi

At that frequency the tube current is down 8 dB, from 23.4 mApp to 9.4 mApp, showing how much the power supply’s PWM filter contributes to the rolloff. Since we’re interested in the overall bandwidth, the tube current is down 2.4 dB to 17.8 mA at 100 Hz, suggesting the -3 dB (16.6 mA) frequency is just slightly higher:

Tube Current - analog bandwidth - 10 sine - 100mm-s - 10mA-div - 254dpi
Tube Current – analog bandwidth – 10 sine – 100mm-s – 10mA-div – 254dpi

However, I think that’s the wrong way to calculate the -3 dB point of the laser power, because the tube operates at essentially constant voltage, which means both the analog voltage and the tube current are linearly related to the laser tube power, rather than being proportional to its square root.

If that’s the case, then the analog output voltage is down by ½ at 300 Hz and the tube’s half-power point occurs at 23.4 mA/2 = 11+ mA, closer to 200 Hz than 100 Hz. Given the resolution of the measurements, this doesn’t make much difference, but it’s worth keeping in mind.

Applying a 100 Hz PWM pulse (thus, a sharp step) to the power supply shows the laser tube current has a risetime (and falltime) around 2 ms, about what you’d expect from a single 200 Hz lowpass filter inside the power supply:

Tube Current - 50pct 0.1kHz PWM - glitches - 10 ma-div
Tube Current – 50pct 0.1kHz PWM – glitches – 10 ma-div

As far as I can tell, the controller’s “analog” output is just its digital PWM output passed through a 200 Hz low-pass filter. It would be useful as an analog input to a power supply without an additional PWM filter, but combining those two filters definitely cuts the overall bandwidth down.

All of the measurements as a slide show:

  • Tube Current - analog bandwidth - 10 sine - 25mm-s - 10mA-div - 254dpi
  • Tube Current - analog bandwidth - 10 sine - 50mm-s - 10mA-div - 254dpi
  • Tube Current - analog bandwidth - 10 sine - 100mm-s - 10mA-div - 254dpi
  • Tube Current - analog bandwidth - 10 sine - 200mm-s - 10mA-div - 254dpi
  • Tube Current - analog bandwidth - 10 sine - 300mm-s - 10mA-div - 254dpi
  • Tube Current - analog bandwidth - 10 sine - 400mm-s - 10mA-div - 254dpi
  • Tube Current - analog bandwidth - 10 sine - 500mm-s - 10mA-div - 254dpi

To round this out, I must measure the laser tube current bandwidth using the controller’s PWM signal. Because PWM passes through only the power supply’s lowpass filter, the bandwidth should be slightly higher.

Overall, though, the bandwidth seems surprisingly low.

CO₂ Laser Tube Current: Controller Bandwidth Measurement

Use the sine-bar bandwidth pattern:

Sine bars - 10 cycles
Sine bars – 10 cycles

Engrave it in grayscale mode as a negative image with 0.1 mm line spacing:

LightBurn - bandwidth test pattern setup
LightBurn – bandwidth test pattern setup

Monitor the Ruida KT332N controller’s analog laser power control output:

Tube Current - analog bandwidth - 10 sine - 25mm-s - beam off - 254dpi
Tube Current – analog bandwidth – 10 sine – 25mm-s – beam off – 254dpi

The traces:

  • 1 X axis DIR, low = left-to-right (yellow)
  • 2 L-ON laser enable, low active (magenta)
  • L-AN analog voltage (cyan)

The scope triggers when the top two traces go low during a left-to-right scan with the laser beam active. The trigger point lies far off-screen to the left, with the delay set to pull the interesting part of the scan into view.

Although both the controller’s L-AN output and the laser’s IN input specify a signal range of 0 V to 5 V, the analog output voltage never goes below 0.4 V, but (as will seen later) that produces 0 mA from the laser power supply.

Set the X cursors to the top and bottom of the sine wave and read off the 4.36 V peak-to-peak value.

Set the Y cursors to matching points on successive cycles and read off ΔT=33.44 ms. Because each cycle is 1 mm wide, the scan speed is set to 25 mm/s and traveling 1 mm should require 40 ms, puzzle over that number and the related fact that 1/ΔT=29.91 Hz. This seems to happen only for speeds under 50-ish mm/s, for which I have no explanation.

Repeat the exercise at various speeds up through 500 mm/s:

Tube Current - analog bandwidth - 10 sine - 500mm-s - beam off - 254dpi
Tube Current – analog bandwidth – 10 sine – 500mm-s – beam off – 254dpi

The analog output voltage has dropped to 1.56 Vpp.

The average voltage increases from 2.66 V at 25 (or is it 33?) Hz to 2.78 at 500 Hz, which is reasonably close to the same value.

The signal’s -3dB point would be at √½ × 4.36 Vpp = 3.1 Vpp, which happens at 200 mm/s = 200 Hz:

Tube Current - analog bandwidth - 10 sine - 200mm-s - beam off - 254dpi
Tube Current – analog bandwidth – 10 sine – 200mm-s – beam off – 254dpi

Which is eerily close to the “around 200 Hz” bandwidth figured from the risetime measurements.

All of the analog output measurements as a slide show:

  • Tube Current - analog bandwidth - 10 sine - 25mm-s - beam off - 254dpi
  • Tube Current - analog bandwidth - 10 sine - 50mm-s - beam off - 254dpi
  • Tube Current - analog bandwidth - 10 sine - 100mm-s - beam off - 254dpi
  • Tube Current - analog bandwidth - 10 sine - 200mm-s - beam off - 254dpi
  • Tube Current - analog bandwidth - 10 sine - 300mm-s - beam off - 254dpi
  • Tube Current - analog bandwidth - 10 sine - 400mm-s - beam off - 254dpi
  • Tube Current - analog bandwidth - 10 sine - 500mm-s - beam off - 254dpi

One might now wonder whether there’s any bandwidth difference between the analog and PWM signals as measured in the laser tube current.

Data! We need more data!

LightBurn Grayscale Image Sampling

Take a sine-wave grayscale pattern with one cycle across 10 pixels at 254 dpi = 10 pixel/mm:

Sine bars - 10 cycles
Sine bars – 10 cycles

Then if you tell LightBurn to engrave the pattern with a line-to-line (vertical) spacing of 127 dpi = 5 pixel/mm, it will sample every other pixel in each row, producing a rather peculiar sine-ish wave:

Tube Current - analog bandwidth - 10 sine - 25mm-s - beam off - 127dpi
Tube Current – analog bandwidth – 10 sine – 25mm-s – beam off – 127dpi

You must engrave at 254 dpi = 10 pixel/mm in order to get all the pixels in the output stream:

Tube Current - analog bandwidth - 10 sine - 25mm-s - beam off - 254dpi
Tube Current – analog bandwidth – 10 sine – 25mm-s – beam off – 254dpi

That still looks gnarly, but it’s more along the lines of what the coarse 10 samples / cycle pattern calls for.

The risetime for each of those steps is on the order of 2 ms, so the controller’s analog output bandwidth isn’t much better than 150-ish Hz.

Close examination of the bar pattern shows the end of the first cycle really does hit exactly 0% intensity where the controller raises L-ON (magenta trace) to force the output current to zero. The other minima remain a few percent above zero and cannot be squashed flat.

Today I Learned: LightBurn enforces square pixels at the line spacing distance for grayscale engraving.

I think this means you must resize / resample the grayscale image to match the engraving line spacing, because LightBurn could take the nearest adjacent pixel or average two adjacent pixels if its horizontal sampling doesn’t match the image resolution.

Lid Box

Mary reuses empty sour cream / ricotta cheese / cottage cheese to freeze / store garden produce, which results in a need to store their lids:

Lid box - filled
Lid box – filled

It’s made from 1.5 mm chipboard, which seems both sturdy enough for the purpose and sufficiently stylin’ for life in a middle drawer.

A bead of Elmer’s yellow wood glue along the tops of meshing fingers (which then hits the bottom of the opposing slots) holds the joints together, with a quartet of steel blocks + magnets ensuring perpendicularity during curing:

Lid box - gluing
Lid box – gluing

The glue cures to a transparent skin, so it doesn’t look nearly as awful as you might think. Besides, being inside with lids all over, nobody will ever see the overage. Right?

The box pattern comes from the wonderful boxes.py as a magic URL:

https://festi.info/boxes.py/UnevenHeightBox?FingerJoint_angle=90.0&FingerJoint_style=rectangular&FingerJoint_surroundingspaces=2.0&FingerJoint_edge_width=1.0&FingerJoint_extra_length=0.0&FingerJoint_finger=2.0&FingerJoint_play=0.0&FingerJoint_space=2.0&FingerJoint_width=1.0&Grooved_arc_angle=120&Grooved_gap=0.1&Grooved_interleave=0&Grooved_inverse=0&Grooved_margin=0.3&Grooved_style=arc&Grooved_tri_angle=30&Grooved_width=0.2&bottom_edge=f&x=70&y=80&outside=0&height0=40&height1=40&height2=60&height3=60&lid=0&lid_height=0&edge_types=eeee&thickness=1.5&format=svg&tabs=0.0&debug=0&labels=0&reference=0&inner_corners=corner&burn=0.04&render=0

CO₂ Laser Tube Current: Analog Bandwidth Target

Along the same lines as the grayscale bars, a grayscale sine wave pattern allows direct bandwidth measurement:

Sine bars - 10 cycles
Sine bars – 10 cycles

The sine wave pattern comes from a totally cargo-culted Imagemagic invocation:

magick -size 100x100 gradient: -rotate 90 -function sinusoid 10.0,-90 'Sine bars - 10 cycles.png'

The pattern gets plunked into the same white/black frame as before, using GIMP because it’s easy.

Importing the resulting PNG image into LightBurn allows configuring the laser parameters. Each sine wave is 1 mm (ten whole pixels!) wide, so engraving at 250 mm/s covers one cycle every 4 ms for a 250 Hz signal:

Tube Current - analog - 10 sine - 250mm-s - 10 ma-div
Tube Current – analog – 10 sine – 250mm-s – 10 ma-div

Changing the engraving speed will change the test signal frequency, although the laser can’t get much beyond 500 mm/s.

The sine wave pattern goes from 0% to 100%, but at 250 Hz the controller output doesn’t reach those extremes, suggesting the output filter rolloff is lower than the 200 Hz inferred from the 1.5 ms risetime and falltime values.

Because the power supply output current isn’t matching the controller voltage excursion and its waveform is much rounder, its bandwidth is even lower.

The more I measure, the more puzzling it gets …

CO₂ Laser Tube Current: Analog RiseTime Target

Given that the CO₂ laser power supply seems just as happy with an analog input as a digital PWM signal, one might wonder about the bandwidth of each mode. Rather than feeding the supply with a function generator, raster-scanning a grayscale target should suffice.

For example, this would generate five square waves:

Gray bars 10-90
Gray bars 10-90

The bars are 10 pixels wide, so scaling the image at 254 dpi makes them 1 mm wide:

LightBurn - bandwidth test pattern setup
LightBurn – bandwidth test pattern setup

As before, the first and last bars are 100% (white), with 0% (black) bars just inboard. The other bars are 10% and 90% to stay a little bit away from the 0 V and 5 V limits. I set Lightburn to invert the colors so that 100% = full power and 0% = beam off.

Engraving the pattern at 100 mm/s makes each bar 10 ms wide and the risetimes and falltimes are easy to see:

Tube Current - analog - gray bars 10-90 - 100mm-s - 10 ma-div
Tube Current – analog – gray bars 10-90 – 100mm-s – 10 ma-div

[Edit: Clicked the wrong picture.]

Although it’s a bit handwavy, a 1.5-ish ms risetime suggests a single pole (ordinary RC) time constant τ = 700 µs = 1.5 ms/2.2, so the controller’s output filter cutoff would be around 200 Hz = 1/(2π τ).

The laser tube current looks a little slower than that, so there’s a definite tradeoff among engraving speed, edge crispness, and power level.

More study is definitely needed …

CO₂ Laser Tube Current vs. Analog Control

Up to this point, the Ruida KT332N controller has set the laser power supply current from the PWM terminal:

Ruida KT332 - PWM laser control wiring
Ruida KT332 – PWM laser control wiring

The blue and purple wires go off to the oscilloscope I’ve been using to measure how the controller and power supply behave.

The L-AN terminal produces an equivalent analog signal:

Ruida KT332 - analog laser control wiring
Ruida KT332 – analog laser control wiring

The power supply accepts both analog and PWM signals on its IN terminal, so no rewiring was needed on that end:

OMTech 60W HV power supply - terminals
OMTech 60W HV power supply – terminals

This test pattern came in handy again:

Gray bars
Gray bars

The pattern has white bars on the left and right edges as markers. I invert the pattern in LightBurn so that white produced 100% PWM and black produced 0% PWM.

The L-AN output produces 5 V for 100% power and 0 V for 0% power, with other power fractions spread out in between:

Tube Current - analog - gray bars - 10 ma-div
Tube Current – analog – gray bars – 10 ma-div

The traces:

  • 1 X axis DIR, low = left-to-right (yellow)
  • 2 L-ON laser enable, low active (magenta)
  • 3 L-AN analog voltage (cyan)
  • 4 tube current – 10 mA/div (green)

Engraving that pattern in scrap acrylic looks like you’d expect:

Analog mode acrylic engraving
Analog mode acrylic engraving

There’s little trace of the discrete intensity levels in the acrylic trench and the scan interval is a rather coarse 0.2 mm.

The analog-mode current looks remarkably like the PWM-mode current for the same test pattern:

Tube Current - grayscale bars - 100mm-s 10ma-div
Tube Current – grayscale bars – 100mm-s 10ma-div

The PWM signal does not appear in that scope shot, because it runs at 20 kHz and is a blur at 20 ms/div.

It’s worth noting that the tube current has large startup spikes at low power levels in both PWM and analog control, so the spikes are generated internal to the power supply and have nothing to do with the PWM input signal.

Another test pattern using constant power:

Pulse Timing Pattern - 1 mm blocks
Pulse Timing Pattern – 1 mm blocks

At 10% power the analog output is about 0.5 V:

Tube Current - analog - 10pct 250mm-s - 10 ma-div
Tube Current – analog – 10pct 250mm-s – 10 ma-div

At 50% power the analog output is a constant 2.5 V and the tube current settles at a constant 12-ish mA, about half of the power supply’s maximum 25 mA:

Tube Current - analog - 50pct 250mm-s - 10 ma-div
Tube Current – analog – 50pct 250mm-s – 10 ma-div

Obviously, controlling the laser power to intermediate values using an analog signal does not involve switching the current between the supply’s minimum and maximum values: there are no PWM pulses involved to do the switching.

I suspect the analog output comes from the PWM signal run through an internal low-pass filter similar to the one in the power supply. Based on the PWM frequency measurements and squinting at the rise / fall times, the analog filter cutoff is probably around 1 kHz.

Other than bragging rights, I don’t see much advantage to using the analog signal in place of PWM.