Welcome! Log In Create A New Profile


Marlin firmware as laser cutter

Posted by Humpster 
Re: Marlin firmware as laser cutter
January 18, 2016 12:47PM
Whoa really? for some reason I didn't think that would work well. So correct me if I am wrong, but this is how I would want to wire it?

PSU GND + Arduino GND <-------> Driver GND

Arduino PWM <-----> Driver TTL

PSU V+ <------> Driver V+

Edited 1 time(s). Last edit at 01/18/2016 12:54PM by jeyton.
Re: Marlin firmware as laser cutter
January 18, 2016 03:18PM
... yes - if you don't support the Arduino with the PSU, then you have to 'define' a basis potential as GND, which defines the signal voltage to drive the TTL input of the laser driver.

Otherwise -- without any sort of back-connection, the voltage is 'floating' without the ability to trigger the input ... or may even be totally wrong defined, so your Arduino-PWM-output can be something like let's say +30V or maybe even -50V off (possible random 'floating' switching potentials of different PSU's without proper ground level), what will immediatly destroy one of the devices or both eye popping smiley

Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: Marlin firmware as laser cutter
January 26, 2016 06:50AM
If you still want to use Marlin to make a laser cutter / engraver have a look here.
I modified the already modified Marlin firmware to suit my china laser cutter.
The actual workings underneath are still plain Marlin, just with the additions for the laser use.
Should be pretty straight forward to convert for your needs, bed setup, stepping and endstops and off you go.
Re: Marlin firmware as laser cutter
August 08, 2016 12:43AM
The D9 mosfet on the RAMPS board (all the mosfet's actually) switch the negative leg of the PS connector closest to the mosfets. I use a wall wart with 12v pos going to a relay board, and the negative of the wall wart tied to the negative terminal of the PS connectors on the RAMPS 1.4, the negative from the relay board goes to the D9 negative line of the screw connector. you could do the same thing with a 5v supply as well.. PS negative to the negative PS connector, posative to your device, and the negative from the device to the D9, D8, D10 on the RAMPS mofests screw connectors. I don't even use the positive terminals on the mosfet blocks. This also works on the MKS 2560 boards as well.
Re: Marlin firmware as laser cutter
August 23, 2016 01:21PM
I bought a laser head that I connected to the d9 output, but it's ON from the start.
It doesn't respond to any Gcode command to turn it off or decrease power. And yes, 13_EFB. The PMW works fine for my layer fan.
I've checked everywhere but I cannot find an answer.
The company that sold me the unit isn't of much help either. They say it worked fine on their printers and the unit was tested before shipping, so I must be doing something wrong. Just don't know what can it be.
Must I do some changes in Marlin in order to make it run?
Thanks in advance for any tips.
Re: Marlin firmware as laser cutter
March 22, 2017 11:12AM
I don't know if this has been already solved, but I would like to point out that all high power outputs on RAMPS 14 (that is, fan, extruder heater, bed heater) are OC (open collector) outputs. This basically means, that the MOSFET itself only drives the output to GND and does not provide any particular voltage on output. Check out the schematics:


If you look carefully, you'll see, that negative out of D9 is driven by the MOSFET, and positive out is wired to +12v directly. So, to have 0....5v range for D9 output, just use a 1k resistor between MOSFET out and +5v power supply. So, when MOSFET is active (open), your output will read 0v, when MOSFET is not active, it will be +5v. Note also, this causes the logics to be inverted (which Marlin firmware is aware of). If you redefine the FAN pin to a servo output, you will lose the inversion and the voltage on PCM out will be reversed relative to M106 command setting.

For those folks trying to drive a 12v LED module directly from the FAN output. Bad news, most likely it will not work. The reason is, the LED itself is not powered by 12v, and the module that you purchased has a regulator. So, whenever you try to control LED power by PWM output of your RAMPS, the regulator takes "care" of it and feeds the LED whatever it's required. So, the correct solution would be to power your LED module directly from a 12v power supply and use a PWM control INPUT pin that your LED module SHOULD have besides the +12v pin. In case it doesn't, it's, again, bad news for you. smiling smiley

p.s. MOSFETs do not have a collector, but essentially, it's the same. smiling smiley

Edited 2 time(s). Last edit at 03/22/2017 11:16AM by AngelOfGrief.
Re: Marlin firmware as laser cutter
March 23, 2017 03:37AM
I just made a voltage divider to reduce 12V FAN output to 5V. No inversion necessary.

Regarding LED power regulation: It's true what you said about LED controllers, but there are 12V LED modules that can run directly on 12V without current limitter. Those modules can be PWM controlled by a Fan output. I'm using LED rings called "Angel Eyes". It's a car front light assessory made for 12V.
Sorry, only registered users may post in this forum.

Click here to login