grblHAL / core

grblHAL core code and master Wiki
Other
305 stars 74 forks source link

Is there away to add implement a "map" for PWM output #383

Closed terjeio closed 2 months ago

terjeio commented 8 months ago

Is there away to add implement a "map", where a pwm of 0=0, the smallest increment above 0 detectable by micro can be set to a selected pwm value, and what a program may perceive as 100% to another value(75% duty). I know that now you can do the later and the available option on lower value is almost the oposite of what im looking for..... also itd be nice to be tunable with out recompiling. Using the $$ settings or potentiometer would be slicker. Thanks

Originally posted by @customsolutions in https://github.com/grblHAL/core/discussions/203#discussioncomment-7369539

terjeio commented 8 months ago

I am not sure what you mean by this. $34-36 does not handle what you are after?

image

A plugin can override spindle functions or implement custom spindle drivers like this or these. So you are not stuck with what the standard implementation provides.

phil-barrett commented 8 months ago

I think what he is asking is for a PWM mapping function. In general terms if would be f(PWM_in) = PWM_out.

In practical terms it could be a table of PWM with linear interpolation between points. For example 11 entries in steps of 10% fPWM[0] = 0.0 // 0% fPWM[1] = 0.08 // 10% fPWM[2] = 0.16 // 20% fPWM[3] = 0.24 // 30% fPWM[4] = 0.32 // 40% fPWM[5] = 0.40 // 50% fPWM[6] = 0.47 // 60% fPWM[7] = 0.53 // 70% fPWM[8] = 0.61 // 80% fPWM[9] = 0.68 // 90% fPWM[10] = 0.75 // 100%

So a requested PWM of 50% would actually be 40% PWM output. A requested PWM of 55% would be 43.5% ( (40+47)/2 ).

This could be useful in linearizing PWM and 0-10V output. A simple PWM to 0-10V converter often has some "sag" in the mid range and could benefit from a "boost" mapping. Also, I've noticed that straight PWM input on several HY VFDs I have is not very linear - sometimes the mid range is quite a bit low. They could benefit from a boost mapping.

It doesn't need to be steps of 10%. Could be a 5 entry table for steps of 25%. Also, allowing greater than 100% on the output would be useful.

terjeio commented 8 months ago

I think what he is asking is for a PWM mapping function.

Something like this then?

phil-barrett commented 8 months ago

Yes. I had seen that but presumed it was only for lathe mode. It looks like a possibility but I don't quite understand how to use it. Needs a grblHAL build with spindle sync and tuning options, I presume. Will check it out today. My test bed for Pro is on a shelf and I have 100 Pico ETH boards to do intake processing on so will be later today. I'm sure I will have questions...

terjeio commented 8 months ago

Yes. I had seen that but presumed it was only for lathe mode.

It is not, it only makes it possible to automate data collection since real RPM is available from the controller. One can use a tachometer to collect data points for the python algorithm.

Settings $66 - $69 becomes available when spindle linearization is enabled, it is not dependent on lathe mode. I guess I should make this option available from the Web Builder.

customsolutions commented 8 months ago

Similar however it'd be 0%=0%, 2% = x%, and 100% = y%. So off is off and any recognizable on would output a minimum pwm value, 100% could be set to max allowable pwm. Right now it hold pwm to 0 until you reach a pwm minimum requested set to 1.5. Now...ex 0=0 .5=0 1=0 1.5 =1.5. Id like 0=0, .01=1.5, .5=2 ,1 =2.5, 1.5 =3( this is just an easy low end ex). If max was adjusted thes numbers would be diff

phil-barrett commented 8 months ago

Yes, from the Web builder would be very useful. Is it not enabled when I turn on Spindle sync? I have a tachometer but have been using VFD RPM readout.

terjeio commented 8 months ago

Similar however it'd be 0%=0%, 2% = x%, and 100% = y%

You want a lookup table or function for the converting percentages? Currently the conversion is from RPM to PWM duty cycle and this code is called directly by the PWM spindle driver code and cannot be overridden by plugins. I may make them overridable if that helps. It is possible to "fake" the RPM input as a percentage if you set $30 (max spindle speed) to 100, is this what you are doing? If so transforming the RPM input before it is sent to RPM -> PWM conversion might be what you are after.

Yes, from the Web builder would be very useful.

Ok, I'll add it.

Is it not enabled when I turn on Spindle sync?

No, it is not. IIRC linearization was mainly aimed at (CO2) lasers?

Edit: fixed copy/paste error.

phil-barrett commented 8 months ago

It is possible to "fake" the RPM input as a percentage if you set $30 (max spindle speed) to 100, is this what you are doing? If so transforming the RPM input before it is sent to RPM -> PWM conversion might be what you are after.

Probably better to set spindle max to 10000 and then you can express in 100ths %. 5005 is 50.05%

Ok, I'll add it.

Thank you!

customsolutions commented 8 months ago

That works on the max ouput end, however (i should specify), for laser if it needs an minimum of 5% to fire once you do what stated above the minimum now needs to be raised to 10%. So now in lightburn for ex instead of 0 to 100% you can only use 10% to 50 for etchingand maybe 80-100% for cutting. What would be awesome is an absolute max for cutting that is set to produce safe amperage for laser tube. Then preferably in light burn have a setting that will be set on a layer to determine if its a cutting layer or an engraving layer. Then 100% is set in lb and doesnt matter in grbl. However tha absolute max is set in grbl. Next item would be a minimum need to activate laser. 0= off and the next recognizable amount above zero starts at laser on pwm/rpm/voltage for ex .01% = 5% then its mapped from there to the afore mentioned absolute maximum.

On Tue, Oct 24, 2023, 5:50 PM phil-barrett @.***> wrote:

It is possible to "fake" the RPM input as a percentage if you set $30 (max spindle speed) to 100, is this what you are doing? If so transforming the RPM input before it is sent to RPM -> PWM conversion might be what you are after.

Probably better to set spindle max to 10000 and then you can express in 100ths %. 5005 is 50.05%

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1778175399, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYCEAJSVCTOJS23AI4DYBBA2LAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZYGE3TKMZZHE . You are receiving this because you were mentioned.Message ID: @.***>

customsolutions commented 8 months ago

Here is an example. Lets say grbl is set to 10000rpm and lightburn also.... then 0%=0rpm, 5%=500rpm 100% = 10000rpm. Well 10k will prob burn up the laser so we set LB to a max of 5k, so max output from LB is what grbl sees as 50%(5k/10k). Now when we request 5% we only get 250rpm which is not enough to fire laser... so it would be nice to map .1% in grbl to the needed 500rpm. So the user sees 0=off .1% = laser on minimum and 100% = a safe maximum. Hope that helps.

terjeio commented 8 months ago

I still do not get why setting $35 isn't working for the just above 0 RPM input, is your $31 setting > 0?

customsolutions commented 8 months ago

Its been awhile since I played with it. Maybe tomorrow I can check the way it reacts and confirm. Maybe Its a setting i had wrong. Is they a version o should check also?

On Tue, Oct 24, 2023, 8:05 PM Terje Io @.***> wrote:

I still do not get why setting $35 isn't working for the just above 0 RPM input, is your $31 setting > 0?

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1778310510, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYEHZI5R25Q3ENVBHZLYBBQVDAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZYGMYTANJRGA . You are receiving this because you were mentioned.Message ID: @.***>

customsolutions commented 8 months ago

Also is there a testing platform you are specifically using?

On Tue, Oct 24, 2023, 9:50 PM Custom Solutions @.***> wrote:

Its been awhile since I played with it. Maybe tomorrow I can check the way it reacts and confirm. Maybe Its a setting i had wrong. Is they a version o should check also?

On Tue, Oct 24, 2023, 8:05 PM Terje Io @.***> wrote:

I still do not get why setting $35 isn't working for the just above 0 RPM input, is your $31 setting > 0?

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1778310510, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYEHZI5R25Q3ENVBHZLYBBQVDAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZYGMYTANJRGA . You are receiving this because you were mentioned.Message ID: @.***>

terjeio commented 8 months ago

Is they a version o should check also?

$I output contains build dates for both the core and the driver

Also is there a testing platform you are specifically using?

The main one is STM32F466 on a Nucleo dev board, but I test on several others as well - depending on what has been changed.

terjeio commented 8 months ago

FYI I have now changed the code for RPM > PWM conversion to make it easier to override the default functionality from plugins. However, these changes will not be made available from github until after I am back home in early december. Until then I can make the code available, on request, from the master subversion repo.

@phil-barrett I have added the option to enable spindle linearization from the Web Builder.

customsolutions commented 8 months ago

Awesome, thanks for the update! Enjoy your trip.

On Fri, Oct 27, 2023, 3:19 AM Terje Io @.***> wrote:

FYI I have now changed the code for RPM > PWM conversion to make it easier to override the default functionality from plugins. However, these changes will not be made available from github until after I am back home in early december. Until then I can make the code available, on request, from the master subversion repo.

@phil-barrett https://github.com/phil-barrett I have added the option to enable spindle linearization from the Web Builder.

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1782498704, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYGV6W765JBI7MJ2INLYBNU7JAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGQ4TQNZQGQ . You are receiving this because you were mentioned.Message ID: @.***>

phil-barrett commented 8 months ago

@phil-barrett I have added the option to enable spindle linearization from the Web Builder.

Thanks, have been building with it. Hope you are someplace warm/nice.

customsolutions commented 7 months ago

I decided to play with nucleo446 and a proteneerboard. When i use the web builder, and once connected to lightburn, I dont see $35, and when I try to set $32 to laser mode I get error 17. Under web builder general settings it does say spindle[pwm]. Am I 0 for 2 in webbuilder?

terjeio commented 7 months ago

I dont see $35, and when I try to set $32 to laser mode I get error 17.

My bad - default for the Protoneer board is spindle on/spindle dir/no PWM. I have changed this to spindle on/PWM for the Web Builder - so please try again.

customsolutions commented 7 months ago

All the $$ menu options are there now. Not 100% that im getting Pwm.... does the webbuilder use the proteneer3xx.h board file and if so it looks there is a spot to enable pwm( not sure your process on the backend). Also looks like gpioa5 or d13 on arduino pinout? Thanks for your help. I hope these things im finding are helpful too.

On Tue, Nov 21, 2023, 11:29 PM Terje Io @.***> wrote:

I dont see $35, and when I try to set $32 to laser mode I get error 17.

My bad - default for the Protoneer board is spindle on/spindle dir/no PWM. I have changed this to spindle on/PWM for the Web Builder - so please try again.

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1822139052, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYE6UH5HVLZIYPQHTELYFWEUNAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRSGEZTSMBVGI . You are receiving this because you were mentioned.Message ID: @.***>

terjeio commented 7 months ago

Is the PWM pin listed in the $pins output?

customsolutions commented 7 months ago

Where is $pins located, I was looking in boardfile I assume is used for proteneer shield.

On Thu, Nov 23, 2023, 12:41 AM Terje Io @.***> wrote:

Is the PWM pin listed in the $pins output?

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1823880861, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYBCI3FBIPJFSX3PLGTYF3VY5AVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRTHA4DAOBWGE . You are receiving this because you were mentioned.Message ID: @.***>

phil-barrett commented 7 months ago

In a GCode sender's MDI section (aka Console), enter $pins and you should get back the pin assignments used for that build.

customsolutions commented 7 months ago

Wow, thats new to me. Thanks for that tip. I will give it a try and report back.

On Thu, Nov 23, 2023, 12:12 PM phil-barrett @.***> wrote:

In a GCode sender's MDI section (aka Console), enter $pins and you should get back the pin assignments used for that build.

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1824794391, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYCTJL6BPBITZKGID6TYF6G2VAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRUG44TIMZZGE . You are receiving this because you were mentioned.Message ID: @.***>

customsolutions commented 7 months ago

So when I check $pins in the console it shows PA5 = spindle pwm. However upon testing it does not apear to be doing anything... PA6 is changing state depending on m3/m5 commands.

On Thu, Nov 23, 2023, 12:12 PM phil-barrett @.***> wrote:

In a GCode sender's MDI section (aka Console), enter $pins and you should get back the pin assignments used for that build.

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1824794391, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYCTJL6BPBITZKGID6TYF6G2VAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRUG44TIMZZGE . You are receiving this because you were mentioned.Message ID: @.***>

terjeio commented 7 months ago

The PWM output is on the spindle direction pin. Is this the pin you are checking? There are several versions of the Protoneer board, including many clones. Some have an additional PWM pin assigned, seemigly swapped by the Z limit input. Which one do you have?

customsolutions commented 7 months ago

I dont have the shield on, and was checking at the header directly...

On Thu, Nov 23, 2023, 4:54 PM Terje Io @.***> wrote:

The PWM output is on the spindle direction pin. Is this the pin you are checking? There are several versions of the Protoneer board https://blog.protoneer.co.nz/arduino-cnc-shield/, including many clones. Some have an additional PWM pin assigned, seemigly swapped by the Z limit input. Which one do you have?

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1824979703, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYCKQ25FV4FEKI7UOFDYF7H2FAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRUHE3TSNZQGM . You are receiving this because you were mentioned.Message ID: @.***>

phil-barrett commented 7 months ago

The main way to tell the shields apart - Grbl 0.9 and earlier do not have a labeled PWM spindle output pin, Spindle Enable is on D12 and Z limit is on D11. Grbl 1.1 has PWM on D11, Z limit on D12 and they dropped spindle enable. The protoneer shield 3.1 is a Grbl 0.9 board. For what it is worth, you can use the pins how ever you choose, there is no filtering or optos on that shield - the connectors go straight into the arduino headers.

customsolutions commented 7 months ago

Im testing at the header on the nucleo64(446) board. Freshly built from webuilder.

On Thu, Nov 23, 2023, 5:57 PM phil-barrett @.***> wrote:

The main way to tell the shields apart - Grbl 0.9 and earlier do not have a labeled PWM spindle output pin, Spindle Enable is on D12 and Z limit is on D11. Grbl 1.1 has PWM on D11, Z limit on D12 and they dropped spindle enable. The protoneer shield 3.1 is a Grbl 0.9 board. For what it is worth, you can use the pins how ever you choose, there is no filtering or optos on that shield - the connectors go straight into the arduino headers.

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1825005517, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYDGVIRFWC2NG7TSKP3YF7PHLAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRVGAYDKNJRG4 . You are receiving this because you were mentioned.Message ID: @.***>

customsolutions commented 7 months ago

Here is a question, on the webuilder should I be using (protoneer v3/nucleo64 446) or (generic uno/nucleo64 446)?

On Thu, Nov 23, 2023, 5:57 PM phil-barrett @.***> wrote:

The main way to tell the shields apart - Grbl 0.9 and earlier do not have a labeled PWM spindle output pin, Spindle Enable is on D12 and Z limit is on D11. Grbl 1.1 has PWM on D11, Z limit on D12 and they dropped spindle enable. The protoneer shield 3.1 is a Grbl 0.9 board. For what it is worth, you can use the pins how ever you choose, there is no filtering or optos on that shield - the connectors go straight into the arduino headers.

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1825005517, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYDGVIRFWC2NG7TSKP3YF7PHLAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRVGAYDKNJRG4 . You are receiving this because you were mentioned.Message ID: @.***>

terjeio commented 7 months ago

You should be using the Protoneer version, if the Uno board has compatible pin mappings that could of course be used instead.

I have a F446 Nucleo board at hand and luckily PA5 is wired to an on-board LED. I flashed Web Builder build and it works for me in that the LED intensity varies with the commanded spindle speed. Either your PA5 pin is damaged or you have laser mode enabled ($32=1)?

customsolutions commented 7 months ago

That clears it up. I do have laser mode enabled. Because on previous boards and versions for my laser pwm was used to control my laser intensity. Is pwm moved? Or disabled in this version?

On Thu, Nov 23, 2023, 7:58 PM Terje Io @.***> wrote:

You should be using the Protoneer version, if the Uno board has compatible pin mappings that could of course be used instead.

I have a F446 Nucleo board at hand and luckily PA5 is wired to an on-board LED. I flashed Web Builder build and it works for me in that the LED intensity varies with the commanded spindle speed. Either your PA5 pin is damaged or you have laser mode enabled ($32=1)?

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1825060520, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYFMDWMB6E45IX5VMILYF75NDAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRVGA3DANJSGA . You are receiving this because you were mentioned.Message ID: @.***>

terjeio commented 7 months ago

Is pwm moved? Or disabled in this version?

For the Protoneer board: no and no.

When laser mode is enabled there will be no PWM output unless there is non-rapid motion ongoing. This is the same behaviour as legacy Grbl.

customsolutions commented 7 months ago

Tried 2 diff nucleo boards with only a resitor and led wired as a tester. I have verified that both pa5 and pa6 do turn on and off, however regardless of polarity, or s setting pa5 is either off or so low i can balerely see it. I have check the $30setting to make sure im sending the correct ramge of values. Pa6 is alot brighter when it switches on. This is really interesting. Both boards are brand new and freshly flashed today.

On Thu, Nov 23, 2023, 8:15 PM Terje Io @.***> wrote:

Is pwm moved? Or disabled in this version?

For the Protoneer board: no and no.

When laser mode is enabled there will be no PWM output unless there is non-rapid motion ongoing. This is the same behaviour as legacy Grbl.

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1825068334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYEF2LQ3MIPJVDWNS63YF77KRAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRVGA3DQMZTGQ . You are receiving this because you were mentioned.Message ID: @.***>

terjeio commented 7 months ago

The on-board LED worked fine for me. Post your settings so I can check, use ioSender and select Help > About > To clipboard and paste in a comment. Or check yourself with an oscilloscope.

customsolutions commented 7 months ago

Thanks for all your suggestions. Currently not useing io sender. Im using lightburn. So could I post them here? Also my on board led also lights, just very dim.

On Thu, Nov 23, 2023, 10:48 PM Terje Io @.***> wrote:

The on-board LED worked fine for me. Post your settings so I can check, use ioSender and select Help > About > To clipboard and paste in a comment. Or check yourself with an oscilloscope.

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1825143444, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYCHIRYTZIXUA6KYHMDYGARLLAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRVGE2DGNBUGQ . You are receiving this because you were mentioned.Message ID: @.***>

terjeio commented 7 months ago

Just reset the settings with $rst=* and set $14 as needed.

Here is how the LD2 lights up with M3S1000 after I did that, IMO not "very dim":

IMG_20231124_142316

customsolutions commented 7 months ago

Ill try that... thx.... ill post a pic too.

On Fri, Nov 24, 2023, 1:31 AM Terje Io @.***> wrote:

Just reset the settings with $rst=* and set $14 as needed.

Here is how the LD2 lights up with M3S1000 after I did that, IMO not "very dim":

[image: IMG_20231124_142316] https://user-images.githubusercontent.com/20260062/285388202-0bbb56e6-9e42-40e6-bda1-6b07d8b3d171.jpg

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1825252347, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYAM6YIZMPOCZ6WNYLTYGBEMTAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRVGI2TEMZUG4 . You are receiving this because you were mentioned.Message ID: @.***>

customsolutions commented 7 months ago

Ok, gave it a try. 2 diff pc's & 2 diff nucleo's same result. I did $rst =*, then set $14=70 and $5=7, i had to disconnect then reconnect $x , then m3s1000. I am curious what other settings you or I may have set diff in web build or our apps. Are you using iosender? Im going to try my revamped mg2 board(upgraded to stm32f103b and compiled grbhal in stmcubeide, for comparison.

On Fri, Nov 24, 2023, 1:37 AM Custom Solutions @.***> wrote:

Ill try that... thx.... ill post a pic too.

On Fri, Nov 24, 2023, 1:31 AM Terje Io @.***> wrote:

Just reset the settings with $rst=* and set $14 as needed.

Here is how the LD2 lights up with M3S1000 after I did that, IMO not "very dim":

[image: IMG_20231124_142316] https://user-images.githubusercontent.com/20260062/285388202-0bbb56e6-9e42-40e6-bda1-6b07d8b3d171.jpg

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1825252347, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYAM6YIZMPOCZ6WNYLTYGBEMTAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRVGI2TEMZUG4 . You are receiving this because you were mentioned.Message ID: @.***>

terjeio commented 7 months ago

This is the firmware I tested with, built with default options in the Web Builder:

firmware(3).zip

I use ioSender and putty for control and I only change $14 after resetting.

customsolutions commented 7 months ago

Thanks, I'll check it out.

On Fri, Nov 24, 2023, 5:00 PM Terje Io @.***> wrote:

This is the firmware I tested with, built with default options in the Web Builder:

firmware(3).zip https://github.com/grblHAL/core/files/13462431/firmware.3.zip

I use ioSender and putty for control and I only change $14 after resetting.

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1826126329, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYAWJXKQYXXFKPHGNX3YGERJDAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWGEZDMMZSHE . You are receiving this because you were mentioned.Message ID: @.***>

customsolutions commented 7 months ago

Ok, so I had to do the same routine. Flash. Det $14=70, $5=7, LB related(do a read, unplug and reconnect), $x. M3 s1000. But now much brighter. Not sure whats diff.... any other settings in webbuilder diff you think?

On Fri, Nov 24, 2023, 5:00 PM Terje Io @.***> wrote:

This is the firmware I tested with, built with default options in the Web Builder:

firmware(3).zip https://github.com/grblHAL/core/files/13462431/firmware.3.zip

I use ioSender and putty for control and I only change $14 after resetting.

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1826126329, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYAWJXKQYXXFKPHGNX3YGERJDAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWGEZDMMZSHE . You are receiving this because you were mentioned.Message ID: @.***>

terjeio commented 7 months ago

any other settings in webbuilder diff you think?

Could be - which ones did you select?

customsolutions commented 7 months ago

I believe I may have had probe, spindle linearization, and maybe reset as estop.

On Fri, Nov 24, 2023, 11:14 PM Terje Io @.***> wrote:

any other settings in webbuilder diff you think?

Could be - which ones did you select?

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1826218340, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYC5TECRCPVZBZYT7NDYGF5FBAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWGIYTQMZUGA . You are receiving this because you were mentioned.Message ID: @.***>

terjeio commented 7 months ago

Ok, spindle linearization is then the likely reason. Did you add setting values for that?

customsolutions commented 7 months ago

I was under the impression those were the $35 etc.

On Fri, Nov 24, 2023, 11:21 PM Terje Io @.***> wrote:

Ok, spindle linearization is then the likely reason. Did you add setting values for that?

— Reply to this email directly, view it on GitHub https://github.com/grblHAL/core/issues/383#issuecomment-1826219471, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF5JEYB7MM5Z2SQHI2RVY4LYGF55ZAVCNFSM6AAAAAA6NUN7ISVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWGIYTSNBXGE . You are receiving this because you were mentioned.Message ID: @.***>

terjeio commented 7 months ago

I was under the impression those were the $35 etc.

No, $66 - $69 are used for spindle linearization (if enabled). $35 and $36 is for min and max PWM output.

dJOS1475 commented 5 months ago

Hi All, I've just moved over from FluidNC (didnt play nice with my prefered sender OB Control), and Im finding the PWM spindle control to not work very well. 30k RPM works perfectly, but 10k RPM behaves oddly and is not stable. In FluidNC I was able to put in a simple speed map and this worked perfectly. I cant use the SPINDLE_LINEARIZATION module as my GRBL_SPD controller doesnt support the features AFAIK.

Here is my current grblHAL config vs FluidNC - am I missing something obvious?

grblHAL:

$30=30000.000 ;Maximum spindle speed, RPM
$31=10000.00 ;Minimum spindle speed, RPM
$32=0 ;Laser-mode enable, boolean
$33=1000.0 ;Spindle PWM frequency
$34=0.0 ;Spindle off Value
$35=1.0 ;Spindle min value
$36=100.0 ;Spindle max value

FluidNC:

PWM:
  pwm_hz: 1000
  direction_pin: NO_PIN
  output_pin: gpio.32
  enable_pin: gpio.27
  disable_with_s0: false
  s0_with_disable: true
  spinup_ms: 0
  spindown_ms: 0
  tool_num: 0
  speed_map: 0=0.000% 10000=1.000% 30000=100.000%

cheers Derek

terjeio commented 5 months ago

@dJOS1475

I cant use the SPINDLE_LINEARIZATION module as my GRBL_SPD controller doesnt support the features AFAIK.

Did you try it? The GRBL_SPD controller takes a PWM input so it should work?