Skip to content

Spindle pwm pin pw:period has no effect #1103

Description

@xpix

Hello,

i test for my XATC some boards to get some functions stable. During my test with the PWMSpindle i wonder that the change in pwm_period has no effect on pin 1.23 (PWM capable pin).

Here my configuration:
Build version: edge-75df940, Build date: Jan 18 2017 20:24:49, MCU: LPC1768, System Clock: 100MHz
CNC Build 3 axis

switch.spindle.enable                            true             #
switch.spindle.pwm_period                        100000            # <---- default 1000, sets the PWM frequency
switch.spindle.input_on_command                  M3               #
switch.spindle.input_off_command                 M5               #
switch.spindle.output_pin                        1.23             # Here we are using the first big MOSFET
switch.spindle.output_type                       pwm            # pwm output settable with S parameter in the input_on_comand
switch.spindle.max_pwm                           255              # set max pwm for the pin default is 255

image

You see pic from my oszi at the command "M3 S100" ... (btw, can we put the max rpm/min in config and calculate the pwm value correct? i.e. "M3 S6000" max 12000rpm/min == 50% on pwm pin)

I changed for my DC Motor Controller the PWM Frequency to 100 kHz but the Frequency never changed. I check the code but find nothing:

https://github.com/Smoothieware/Smoothieware/blob/edge/src/modules/tools/spindle/PWMSpindleControl.cpp#L84

Please help :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions