gnea / grbl

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino
https://github.com/gnea/grbl/wiki
Other
4.04k stars 1.61k forks source link

How to disable spindle gradient startup (pwm) ? #1225

Closed ASHIT-AXAR closed 1 year ago

ASHIT-AXAR commented 1 year ago

hello there... i need pwm but this gradient spindle startup makes trouble for my use. i need instant change of output pwm when i send different spindle values what can i do ? is there a switch in config files ? or do i need to change source codes the hard way? thank you.

AlexHolden commented 1 year ago

I believe the change in PWM output is instant (see line 124 of spindle_control.c). If you are seeing the resulting voltage change slowly perhaps your breakout board has an RC filter on the output with a long time constant?

ASHIT-AXAR commented 1 year ago

hii Alex. yes, actually there is. at first due to the noisy environment i couldn't read the exact PWM signal accurately and i was not sure whether its the GRBL or not. i was in hurry so i just switched to reading it simply by smooth out the PWM to ADC and put another controller in between. later i suspected it is the RC filter. its just working and i decided to leave it as is for now. i appreciate for your time and attention.