Bye bye ramps?

So, after building my Primo I decided to repurpose the old burly parts for a dedicated laser engraver - the goal being to move away from the GRBL/Uno based (not MPCNC) thing that’s been darkening a corner of my shop for the better part of two years. Marlin has been so much nicer to work with and Octoprint plays nicely with it (without annoying half-baked addons) so… yeah.

Now that the darn thing is built and wired up and very recently flashed with the new firmware hotness… I’m playing hell finding any info about how to wire up the laser. On the GRBL board I just connected the PWM input for the laser to the spindle speed pin plus a ground pin and that was that.

Is Marlin just the wrong firmware to use for a (diode) laser? Would this be easier with a different control board? Have I just overlooked a “how to” article or stickied forum post?

Any guidance would be very welcome. After a certain point the brain starts shutting down and it’s rapidly approaching beer-thirty. Actually… it’s 12 minutes to five here… it’s happening.

With the disclaimer that I’m not doing so myself, you should be able to run the diode laser from the RAMPS board. The problem is that there are multiple ways to do so. I think the “regular” enable and PWM pins are on the Aux 1 connector. Enable laser mode in the firmware then use M3/M5 commands for on/off. Some folks also use the PWM output of one of the fan connections, that uses a different gcode command for control.

Like I said, I’m not doing this myself so can’t offer a guide, or even a more informed opinion, but I didn’t want you to wait too long to get that beverage.

1 Like

HA! The beverage was in-hand five seconds after posting! lol, I appreciate that though!

Right - I was trying to avoid using the fan pwm hack as I’d much prefer to use the intended (M3/M5) codes to control the laser. If that’s the only way, I’m ok with that so long as the rest of the laser functionality follows along (like not powering the laser during boot and turning the laser off during travel moves). As it stands, I don’t think that’s the case but I could be wrong - thus the plea for guidance! :slightly_smiling_face:

thanks very much for your reply @ttraband

You can find a bunch of laser options in configuration_adv.h. You just need to give it a pin in the pins_ramps file (one is probably already set) and enable it, then you can fine tune it with the different laser options.

1 Like

@jeffeb3

yep - now that the brain is recharged…

From Configuration_adv.h (line 2898 in this pic):

Then pins_RAMPS.h says that the default pin for hardware PWM laser control would be pin 6:

Which corresponds with the servo headers on the board:

Leaving this here for posterity.

I see there’s an option to leave the laser on during G0 moves as long as there’s a power parameter in the command - Trying to decide if that’s a good idea. The problem that I’m running into is when trying to focus, any movement of the Z axis from the LCD control box disables the laser. Seems wise to leave it that way but it makes it very tedious to dial in the focus with the Z height.

Several folks have referred to a laser focus script - search the forms.

1 Like

I am doing the opposite. I have a laser running marlin, and I am going to switch to GRBL. Marlin doesn’t support power ramping, which I can hide a little bit with overscan, but the more I do with the laser and read forums, the more I think GRBL will be a better solution. Just my current thinking, and likely to change once I actually get it up and running :slight_smile:

1 Like

While researching this, I ran across a recommendation for using Smoothieware specifically because of its laser support. If I absolutely have to use GRBL to get this thing to work well, then I will.

I was really striving to have a standardized interface for all of my machines though. All eight of my printers and my Primo run some variation of Marlin and they all use Octoprint as a GCode sender and general control interface. I guess I should know better than to try to ‘one size fits all’ with this stuff; it just seems a smarter way to go about it when it comes to maintaining all of these machines. Utilizing a standardized tool set to keep up with software and firmware updates and having a similar (if not identical) GUI interface for machine control makes things easy and reigns in the learning curve.

It did occur to me that things like power ramping should be able to be handled in the GCode if it’s not supported in the firmware - though finding software that will generate such code would be the trick, I guess.

I’d love to hear more opinions on both hardware (control board) and firmware preferences of people that are using the MPCNC as a dedicated engraving machine.

The reason for the disclaimer on my first post is that I use a CNC shield/arduino uno hardware and grbl firmware to run my K40. I’ve used ramps boards for 3D printers, but the laser mode in grbl “just worked” and I didn’t need to futz around with it. I use Lightburn software in conjunction.

Maintenance on the hardware/firmware combination on the K40 has been nonexistent once I got it running a couple of years ago.

2 Likes

I probably have the same UNO/CNC shield you do on the ‘other’ CNC machine I referenced. I’d love to know more about your K40 setup - I was considering something like that but a fairly nice diode setup landed in my lap and I couldn’t not use it.

1 Like