Setup for laser in marlin questions?
November 22, 2022 05:18PM
Hi all! I’ve gotten some serious help here on another topic so I thought I’d try here.
I’m building a standalone laser from parts I have and @dust was very kind in helping me configure
My Creality v4.2.7 board to work with marlin.
In my quest I’ve come across the need to continue my education on this project so I
Figured I would ask if it’s appropriate to request help with marlin in this forum?
I ask the question and hopefully someone could help.
I have a problem with the frequency of the laser. I’m using the cooling fan to fire the
PWM portion and it kinda works, it pulses too slow and doesn’t stay steady until over
70% of speed scale. Can I turnoff soft fan control and use hard fan control in marlin?
What is a safe frequency to drive the output up too on the v4.2.7 board?
In marlin it describes mosfet heating could be an issue?
Thank you for reading this and thank you for your time and hard work
Jerry
VDX
Re: Setup for laser in marlin questions?
November 22, 2022 07:16PM
... I'm on a different path - using a Marlin4Due (much faster with a 32Bit-Arduino) and no common PWM, but the extruder-pulses for driving the laser "speed-independant".

Essentially it's emitting laser-pulses when moving with G1-moves and without laser when moving with G0.

Instead of PWM the E-value in a G-code like "G1 Xxxx Yyyy Eeee Ffff" defines, what amount of laserpulses will be uniformly distributed along the line form last XY-position to the specified one ...

Edited 1 time(s). Last edit at 11/22/2022 07:17PM by VDX.


Viktor
--------
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: Setup for laser in marlin questions?
November 22, 2022 07:33PM
Thank you for the quick response but I’m a little short on the meaning of what your describing? Could you expand? I’m a noobie!!

Edited 1 time(s). Last edit at 11/22/2022 08:07PM by Jmartens1114.
VDX
Re: Setup for laser in marlin questions?
November 23, 2022 01:48AM
... I'm using the pulses for the extruder-stepper (mostly E0, see the pin-definition in "pins.h" for the assigned pin) to pulse the laser-driver.

Here one of the possible pin definitions, where the pin 64 would be used for pulsing the laserdiode:

#define E0_STEP_PIN        64   // Z2 STP
#define E0_DIR_PIN           63   // Z2 DIR
#define E0_ENABLE_PIN   62   // Z2 ENA


Viktor
--------
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: Setup for laser in marlin questions?
November 23, 2022 06:39AM
@VDX

"using a Marlin4Due (much faster with a 32Bit-Arduino) "

the creality v4.2.7 controller is STM32F103RC (or RE) running at 72Mhz Cortex M3, only slightly slower than the SAM3X8E Cortex M3 at 84MHz

Edited 2 time(s). Last edit at 11/23/2022 06:41AM by Dust.
Re: Setup for laser in marlin questions?
November 23, 2022 08:06AM
thanks folks!!
i think i understand whats being said. marlin4due (and the concept of dedicated pin) looks truely interesting but slightly
out of my current scope. it looks like something to try when i get that far in my learning. right now im trying to concentrate on
the materials at hand. again thank you!!
now that ive been able to get past the movement hurdles (thank you @dust) im looking at my laser control now.
in marlin it looks as if it has a cap (default maybe?) of a 1000hz. so when my laser was just flashing at startup i started looking for answers and found questions i couldnt find answers to. i asked here for help.
when i changed the fan output from soft fan control to
hard control i found that creality locked the soft contol for this board, i figured out how to get past that and while was reading the frequency section in marlin they briefly touched on mosfet heating. so im concerned about hardware and keeping it alive.
thank you for your time
jerry
VDX
Re: Setup for laser in marlin questions?
November 23, 2022 09:53AM
@dust -- yes, actually there are even faster µC's (use some with 200MHz or faster) - the ArduinoDue was my first replacement/optimization for the 16Bit-Arduinos many years ago, but still usefull for most tasks smoking smiley


Viktor
--------
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: Setup for laser in marlin questions?
November 23, 2022 10:38AM
Hi how about I ask just a simple question for right now?
If I change the fast_pwm_fan _ frequency value of 1000U to 5000U will I get the
5khz the manufacturer sez it wants for the PWM signal?
And will this damage the board?
Thanks in advance

Edited 1 time(s). Last edit at 11/23/2022 10:42AM by Jmartens1114.
Re: Setup for laser in marlin questions?
November 25, 2022 05:49AM
Hi, any thought on these questions?
VDX
Re: Setup for laser in marlin questions?
November 25, 2022 02:40PM
... dunno exactly -- but shouldn't wreck the board either ...


Viktor
--------
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: Setup for laser in marlin questions?
November 25, 2022 02:42PM
Thanks for your time and energy
Sorry, only registered users may post in this forum.

Click here to login