PWM tuning for Smoothie Firmware

pwm
smoothie

(Chris Leitch) #1

Every laser is unique and it is important to tune your PWM settings for best performance.

The best way to go about testing PWM levels using g-code is:

  1. Set your max laser output to 10mA
  2. Send the command G1 X10 S0.1 F600 from your laser control software console.
  3. Vary the X value - new target coordinate (to get a new burn location) and S value - power level between 0 and 1 (to vary the burn power via PWM)

Here is an example set of commands you can run that will move the head and fire at a number of power levels

  1. G21
  2. G0 X0 Z0
  3. G0 X0 Y10
  4. G1 X10 S0.1 F600
  5. G0 X0 Y15
  6. G1 X10 S0.2 F600
  7. G0 X0 Y20
  8. G1 X10 S0.3 F600
  9. G0 X0 Y25
  10. G1 X10 S0.4 F600
  11. G0 X0 Y30
  12. G1 X10 S0.5 F600
  13. G0 X0 Y35
  14. G1 X10 S0.6 F600
  15. G0 X0 Y40
  16. G1 X10 S0.7 F600
  17. G0 X0 Y45
  18. G1 X10 S0.8 F600
  19. G0 X0 Y50
  20. G1 X10 S0.9 F600
  21. G0 X0 Y55
  22. G1 X10 S1 F600
  23. G0 X0 Y0 Z0

You may be able to see different amounts of burn, but you should definitely see the mA gauge needle go to a somewhat different value each time. For example, S1 is 100% and with the pot at 10mA, I would expect to see the needle close to 10mA. S0.4 is 40% and I would expect to see the needle somewhere around 4mA. Laser power is not linear, so it won’t be exact, but you should be in roughly this range.

If your laser is not behaving as expected (a common occurrence would be it is firing at full power regardless of the S value) try tuning the PWM period in the config file on the MicroSD Card in the Cohesion3D Mini / LaserBoard. The default value for the pwm period is 200 and this works for quite a few machines. However, you may need to set it to 400 for your machine to start responding to pwm and outputting proper “gray” burns. In the SD card config file look for:

laser_module_pwm_period 200

After you have changed the 200 to 400, you must save the config file, close it, safely eject the drive in Computer (another term for this is unmount) and reset the Cohesion3D Mini / LaserBoard

Repeat the burn lines procedure and observe whether the machine is now burning at the proper power levels.


High Pitch Sound
Laser not firing - new laserboard
Laser power low
Problems with C3D with LightBurn
New Install - No Laser Fire
No laser fire. Possible wiring issue
New Install - No Laser Fire
Cuts Great but won't Etch
X and y axis moving but laser not firing
Lightburn not connecting to the laser