# Acceleration and transition to constant speed activating laser signal

Hello, I would like to confirm if my assumption it is ok.

In my application I use a spray nozzle to apply lubricant over a metallic surface. This spray nozzle is driven by a PWM signal generated by the Smoothie board, using the laser driver signal. In order to avoid to apply lubricant during the acceleration and deceleration phase of the movement, and only apply lubricant during movements at constant speed, I am considering to use a acceleration phase to reach the desire speed, then activate the PWM during the constant speed phase, turn off the laser and stop the head with a deceleration phase. My question is if this approach works. I would use a sequence of instructions like this:

G0 X0 Y40 F600 ; Acceleration phase to reach coordinate (0, 40) at the desire speed
M3 ; Turn laser on
G1 X0 Y 60 S0.5 F600 ; Constant speed phase from (0, 40) to (0, 60) with laser signal at 50%
M5 ; Turn laser off
G0 X0 Y 80 F50; Decelaration phase

My doubt is if the instruction M3 between the G0 and G1 signal could affect to the movement, I would expect that once the G0 instruction finish the head will maintain a constant speed during the G1 instruction. I will use a group of sequences like this for each path where I need to apply lubricant, so at the end I will cover all the surface only applying lubricant at constant speed avoiding the lack of uniformity of the lubricant layer during to the accelerations and decelerations.

The M3 will not in any way impact the movement.

But you also (should) not need it: G0 turns the laser off, and G1 turns the laser on (if you have the laser module properly configured).

This should work, you should test it.

(also note, the pwm output is proportional to speed, so if your lubricant output is proportional to the pwm output, you shouldnât need to ramp up like this, same as with lasers)

1 Like

Can you explainâŚ?

I know little about smoothie boards, but understand the pwm functionsâŚ

It just means the laser power (pwm) is proportional to the speed.

If it wasnât, when accelerating/decelerating, the laser output would be âtoo muchâ, and you would get darker/deeper laser cuts at the end/beginning of moves.

2 Likes

Got itâŚ The Ruida does it alsoâŚ I was âconfusedâ, thanks for the clarificationâŚ

1 Like

Thank you Arthur!

You are right with the proportional effect of the acceleration/deceleration on the PWM output, I have read that it is implemented but I would like to have a backup solution in case any other parameter could affect. I am considering the potential effect of the speed of the nozzle on the shape of the spray (mainly the angle of the spray), if I always apply spray at constant speed I will avoid that potential risk, in case of a laser application, the shape of the beam is not affected by the speed of the laser head.