Using p2.4 (small mosfet Q8)

Hi all,
First of all: I’m new to laser cutting and I’m in the proces of modifying my K40 to a Smoothieboard.

I have my Smoothieboard not yet connected to the K40 but just trying to figure out how this all works. So, I want the Laser to be controlled by P2.4 but if I measure the output I get something I did not expect…

Hm. I cannot post an image. Bummer.

I expected to see a pulse from 0 to 5Volt (or 3v3) but not this… (a pulse of give or take 400mV negative and sharp spikes on the start of the pulse of 600mV positive)

Is this due to the fact that I’ve not connected the P2.4 to a real load? I have also not used any jumper…

This is the config part:

## Laser module configuration
laser_module_enable          true      # Whether to activate the laser module at all. All configuration is
                                       # ignored if false.
laser_module_pin                 2.4   # this pin will be PWMed to control the laser. Only P2.0 - P2.5, 
                                       # can be used since laser requires hardware PWM
laser_module_maximum_power        .8   # this is the maximum duty cycle that will be applied to the laser
laser_module_minimum_power       0.0   # This is a value just below the minimum duty cycle that keeps the laser
                                       # active without actually burning.
laser_module_default_power       0.3   # This is the default laser power that will be used for cuts.  
                                       # The value is a scale between the maximum and minimum power levels specified above
laser_module_pwm_period          20    # this sets the pwm frequency as the period in microseconds

Second question: Do I need a level shifter if I connect this port to the Laser Input signal? For what I’ve read the PWM signal to control the laser should be 5 Volt.

Thanks for your help

UPDATE:

  • I connected 5 Volt to “Power IN2”
  • I now have a positive voltage reading on the VBB pin of p2.4
  • If I send the command “G1 X10 Y10 G0 X100 Y100” the red LED on the board (near p2.4) goes on and on the scope I see “SAW tooth shaped” pulses of 3V. After that the LED goes out and the voltage on the scope shows “3v5” (more or less).
  • “fire 1” gives a pulse of 50kHz with a curved rising edge and a sharp falling edge (Vavg ~ 2.2Volt)
  • “fire 50” gives a 50kHz pulse again with a curved rising edge and a sharp falling edge (Vavg ~700mV)
  • “fire 90” gives a 50kHz pulse, curved rising edge and sharp falling edge (Vavg ~40mV)
  • “fire 100” gives a low output (0 Volt).

So, I think(?) it works, I’m only a bit confused about the shape of the pulse. It certainly is not a digital pulse!
Is there something I can or have to do to shape it up a bit?
Any help is appreciated!

Imported from wikidot

Maybe it’s just an issue with the way your scope is reading it ? It’s a pretty simple PWM signal, and it’s know to work well.

You may need to invert the pin depending on your PSU.