Feeling a bit more energetic than normal, I decided to drag my scope out and verify just what’s going on pin 44 of my RAMPS board. With so many laser threads going, I really didn’t know where to put this… so here’s as good a place as any, I suppose.
[attachment file=87481]
For RAMPS…
Pin 44 is the D9 fan output, remapped and controlled with M106 Sxxx gcode commands. Pin 44 outputs a signal between 0v and +5v, whereas the D9 fan port outputs the same signal, ranging from 0v to +12v.
So, here the isolated green wire is pin 44 and the blue is GND. I’ve put the scope probe on the green wire…
[attachment file=87480]
Using RepetierHost…
M106 S127 is half-power and, as expected, pin 44 shows 50% duty cycle, and Vavg = ~ 2.5v
[attachment file=87482]
M106 S64 is quarter-power, 25% duty cycle, and Vavg = ~ 1.25v
[attachment file=87483]
M106 S0 turns the laser off, 0% duty cycle, and Vavg = ~ 0v
[attachment file=87484]
M106 S192 is three-quarters power, 75% duty cycle, and Vavg = ~ 3.75v
[attachment file=87485]
and, finally, M106 S255 is full-power, 100% duty cycle, and Vavg = ~ 5v
[attachment file=87486]
Given this variable duty cycle signal, the laser TTL input “sees” the Vavg level, ranging from 0v to +5v, and adjusts the laser power accordingly. The D9 fan output, unmapped, puts out the same variable duty cycle signal… but it ranges from 0v to +12v.
Hope this helps somebody, somewhere.
– David