Can someone help with wiring for a Mega/RAMPS conversion?

This schematic illustrates my view of the wiring configuration including relevant internal circuits.
Google Photos

I suspect that there is something wrong with the way the PWM output from the RAMPS is configured.

With the power on to the controller and D8/(P$2)/[L] disconnected from the LPS what does the voltage read to ground?

I’m working tonight, so I’ll do some more testing tomorrow and let you know the results.

I’m leaning towards a wiring problem because with:

+24v and ground from LPS connected to 5A power input (X4-3 and X4-4 on schematic)
and L from LPS connected to D8

continuity measurement between D8 and ground is open circuit (as expected).

When I try and fire the laser from software the open circuit remains, i.e. the MOSFET doesn’t change state at all.

On the Smoothie drawing,

there are 2 connections from LPS G, one to the main power connection, one to POWER IN 1 ground. I’m missing the second ground.

the mosfet you are connecting to L should have its output connected to ground so that when it changes state it grounds out the L signal. right everyone or am i crazy?

The mosfet your using should SWITCH to ground.
Confused why are you referencing smoothie when you are using Ramps/Mega?
My query above asked for the voltage on D8 not continuity??

There is no voltage on D8. I was measuring continuity to see if the MOSFET switched, but didnt see evidence that it did.

What ive done today is connect both power supplies to the RAMPS with no other connections (so the LEDS would light) and found that an M3 command did not switch Q3 at all.

I then looked at the code and it appears that the cpu_map is wrong as i managed to switch Q2 with an M3 code. Ive now changed the code and have an M3 switching Q3, which when connected to LPS L, turns the laser on, and is PWM controllable.

Using laserGRBL software I can M3 S1000 to get full power, S500 gives 50% etc, with maximum power being set on the front panel pot. In short, exactly what i was trying to achieve.

Thanks to everyone for your help.

@Dan_Evans so you are fixed and the problem turned out to be a configuration change?

It would appear so. The comments in the code state an input for D8, but changing that has fixed the problem

When you have time, it would be great to share the section you had to change in order to get the ramps to work with GRBL with examples.

Sure. I’m away with work until Friday but I’ll post that info when I’m back

Hey Dan, I’m working with an identical issue and was wondering if you could upload the pin mapping and other changes you made to connect D8 to your L fire control in line with your pot. I’ve gone back and forth between Marlin and Grbl, and like you decided GRBL mega 5x was better suited for lasering. This is the last thing I want to nail down before I fire it up.