I've been banging my head off the wall with this one for about a week now.
Was given a K40 laser with dead motherboard back in October and ordered an X4 smoothieboard to go with it. After a few months of reading and researching I finally started the conversion at the start of January. All went well at first - I've completely rewired the steppers and and endstops using proper cables and cable tracks, and got it working and square with Smoothie. Then came the laser control…
My PSU has the following pins for laser control:
K- K+ G IN 5V
After a lot of experimentation I've come to the conclusion that it's a dual pin setup - K+ needs to be pulled to fire the laser, and a potentiometer needs to be connected across G IN 5V to set power.
Apart from the crappy moshi board, the machine also had a control panel: all the ws dropbox . com /s/uaapfn66y6o96ri/2016-01-22%2021.13.47.jpg?dl=0 <—-can't post link to image
This looks to be a digital potentiometer - the right hand side connector is to G IN 5V (and the K switches, of which only one was connected and it was only connected to the test-fire button and a pull resistor). The right hand connector is a serial connection, but was not in use. The IC is completely unmarked, but I believe it to be a digipot IC of some description.
Powering that control board up and pressing the buttons gives me a variable voltage coming out of its IN pin, 0 to 5V on a not-quite-linear scale (50% is 3v).
So far so good - I thought I could set the PWM pin on smoothie to use 5V via the MOSFET, sink it through a RC low pass filter to get an analogue voltage and Bob would be my auntie's live in lover. But sadly it was not to be.
Further investigation reveals that on the PSU side, the 3 pins labeled as G IN 5V actually have the following voltages on them: 0V 1.68V 5V. Now understandably when I connect pin 2.4 or 2.5 to another pin that's floating at 1.68 volts the Smoothie isn't very happy (the orange LED for the pin comes on even when no G1 move is being selected). I've tried connecting it in various ways, including through an RC low pass filter and with a diode in series to prevent the reverse voltage reaching the smoothie. So far nothing has worked.
Apologies for the long post, I've been bugging folk on IRC for the last week and reading and trying everything I can think of and I'm about ready to give up. There *must* be a way to make this work!
In my investigations I've tried the following:
PWM to K+ or K- = no laser fire
PWM to IN = no laser fire
PWM to IN and K+ pulled up = laser fire but no control over power level
K+ pulled up via a switch statement on pin 0.26 = laser fire but no control over power level
K+ pulled up via switch statement on pin 0.26 with the original digipot board = laser fire + manual control of power, but essentially useless as have to enable/disable laser with M3 or M5 (hoping to use Visicut which, as far as I can tell, doesn't support doing this, only supports setting power by S command per line, not turning laser on/off per line)