Setting up Remora for laser cutting

More
08 Jun 2021 20:11 - 08 Jun 2021 20:42 #211540 by Doogie

if you are having issues with the remora pwm gen i would say to skip it for now.
Just have remora give you a normal output pin and then have linux cnc make the PWM signal.

I asked the creator about the ability to set freq of the pwm in his github but im not sure if its going to be worked on yet i think the tmc driver are still being done.


I've looked at the remora sources and found the modules/pwm and that's where I realized it was infect doing PDM instead of PWM.
Then that reminded me that there was a Servo setting for pins(RCSERVO type) so I tried that just to see on an O'scope what the default frequency might be. Standard is 50Hz so too low for me but maybe it could be moded to take a parameter to specify a particular frequency. I've not heard anything yet from Scott Alford yet on his thoughts on this. indeed he is working on the tmc5160 drivers and DC motor control.


some reading in regards to pwm scroll down and you will find it
linuxcnc.org/docs/2.8/html/hal/rtcomps.html

then take one of the files i uploaded the used linux cnc for the pwm gen and change
setp pwmgen.0.pwm-freq 0 to setp pwmgen.0.pwm-freq 400

This will turn on and off the normal output pin on your 3d printer main board as normal pwm.


I will try implementing Hal generated PWM on another pin and see how that goes. It should get this LinuxCNC laser cutter functionality operational. Looking at my config.txt file I don't see a digital pin defined as Output, but I found you showed a section of your config.txt specifying a digital pin as Output. I will try that. Thanks for your help and guidance.
Last edit: 08 Jun 2021 20:42 by Doogie.

Please Log in or Create an account to join the conversation.

More
12 Jun 2021 04:24 #211854 by Doogie
the Remora developer has added both fixed frequency PWM and adjustable freq/period hardware PWM and it's now in the main code branch!

The firmware config.txt pin definition now looks like this:

{
“Thread”: “Servo”,
“Type”: “PWM”,
“Comment”: “Bed heater PWM”,
“Hardware PWM”: “True”,
“Variable Freq”: “True”,
“Period us”: 200,
“SP”: 0,
“Period SP”: 1,
“PWM Pin”: “2.5”
},

Please Log in or Create an account to join the conversation.

More
15 Jun 2021 00:02 #212074 by Doogie
@Aaroncnc, not sure if you saw but Scott Alford added hardware support for fixed frequency PWM and he added the ability to use another SP pin to control the frequence/period for dynamic frequency PWM. With fixed freq PWM you still use SP.x for setting your pulse duration.

I was really hopeful that LinuxCNC could handle raster laser engraving too(besides just vector cutting) but I've not been able to get it to work at any reasonable speed. There's just too much in the TP pulling down motion when spindle speed is changed. Since I was getting very little from this forum other than to use M67/M68, which didn't work either for the same reason it seems, I started more googling and found out this issue has been beat to death for at least 10 years.

Some people have gone to great lenghts to use LinuxCNC for raster engraving by things like creating custom software to generate a raster file which just moves the tool along X from one side to the other and incrementing Y THEN they create a realtime process outside of LinuxCNC which streams laser power levels to the HAL.

It's too bad because while not everyone is going to try Remora on the K40 laser cutter with a Cohesion, Smoothie or other upgrade boards, there are lots of CNC users putting lasers on their CNC machines at over $1000 a pop and they are add-on kludges. Kludging it with LinuxCNC seems also the only way to make it work.

Now unless Scott comes up with an interesting way to handle the laser power levels with each commanded motion, ie Remora handles what LinuxCNC can't, then this is a dead end and the hopes of rPi/LinuxCNC/Remora on 3D printers and laser cutters and CNC is shot.

Please Log in or Create an account to join the conversation.

More
15 Jun 2021 00:43 #212081 by tommylight
There is also the method described by PCW on the topic i linked to about using the Z axis value for output, that would require setting the right scaling and using the right pin, but i do not recall how that was then.
I am sure i did make it work perfectly smooth at 3m/m since that is the maximum usable for me, usually i use 2m/m, but i need that again i just do not have time to fiddle with it.
The following user(s) said Thank You: Doogie

Please Log in or Create an account to join the conversation.

More
15 Jun 2021 02:29 - 15 Jun 2021 02:48 #212087 by Doogie
I will look at it again and maybe go through the steps to set it up and test if for performance but 50 mm/s( 3m/m ) is not acceptable performance. 150-200mm/s is considered avg speed for raster engraving. I was shooting for grayscale which is the hardest and most sought after capability but maybe if I could get dithering working at speed( with M62 ) it would be enough. Most on the non-DSP based machines use dithering over grayscale because it produces better results. I just checked and dithering does do ON/OFF with the On values at a fixed laser power level throughout the file. If the power level can be set and all ON commands enable at that power level it could work. And no Z axis moves getting blended in with XY movements.

It's a shame because it operates the 3D printer nicely and we know it can do any CNC machine.... I thought the laser cutter was a slam dunk easy setup and tough to find people had been messing with this for over 10 years. Would have been really something to show the rPi/LinuxCNC/Remora setup handling the 3 top digital tools of every maker space.
Last edit: 15 Jun 2021 02:48 by Doogie.

Please Log in or Create an account to join the conversation.

More
15 Jun 2021 03:12 #212089 by Doogie
I did a quick test starting with a toolpath with the image dithered and having single line motion + laser power since this is what LinuxCNC parser performs better with. I then swapped all S0 with M63 P0 and then all S102 with M62 P0 and the motion performance did not look bad.

I will try wiring those up in the hal and see what happens.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
17 Jun 2021 00:14 #212240 by andypugh
Mesa has a data-painter module. But as far as I know it needs support.

Please Log in or Create an account to join the conversation.

More
17 Jun 2021 17:40 - 17 Jun 2021 17:44 #212285 by Aaroncnc

the Remora developer has added both fixed frequency PWM and adjustable freq/period hardware PWM and it's now in the main code branch!

The firmware config.txt pin definition now looks like this:

{
“Thread”: “Servo”,
“Type”: “PWM”,
“Comment”: “Bed heater PWM”,
“Hardware PWM”: “True”,
“Variable Freq”: “True”,
“Period us”: 200,
“SP”: 0,
“Period SP”: 1,
“PWM Pin”: “2.5”
},


okay i found an error with the way the forums is handling our configs and why if you copy paste them they fail
doogie take a look at the
“SP[i]”: 0,
but when not placed in code brackets looks like “SP”: 0,
the forum is removing the square bracket i square bracket

to verify what i am saying hit edit and or quote on my or your config post and notice it shows correctly in the editor but not in the actual post.

{
	"Thread": "Servo",
	"Type": "PWM",
		"Comment":			"pwmspindle",
		"SP[i]":			3,
		"PWM Pin":			"2.0",
		"Hardware PWM":			"True",
		"Variable Freq":		"True",
		"Period SP[i]":			1,
		"Period us":			200
	},
Last edit: 17 Jun 2021 17:44 by Aaroncnc.
The following user(s) said Thank You: Doogie

Please Log in or Create an account to join the conversation.

More
17 Jun 2021 21:56 #212295 by Doogie
oh no, I will keep that in mind if/when I share config elements. I hope that didn't set you back much time.

Please Log in or Create an account to join the conversation.

More
23 Jun 2021 18:51 - 23 Jun 2021 18:52 #212760 by Doogie
both dithering and gray scale are operational!

The light band in the lower section of the top image is due to dynamically changing the PWM freq from 5KHz to 2.5KHz then back again to 5KHz.

Last edit: 23 Jun 2021 18:52 by Doogie.

Please Log in or Create an account to join the conversation.

Time to create page: 0.363 seconds
Powered by Kunena Forum