Feature Request: New switch Output_type option

I am using a RC type brushless motor for an air compressor on my laser engraver. I would like to have control of this in software, but PWM output will not work to drive the electronic speed controller that accepts standard hobby servo input pulses.

In addition, I will be using a smoothie on my CNC mill project which has a VFD that accepts a 0-10v analog input. An analog output type would be very helpful in controlling it.

I have been browsing around the documentation and I’m still left looking for the nitty-gritty of the firmware. I’m not a C programmer, but I feel like the behind the scenes stuff is not publicly documented and likely for good reason. What is in the config file is only marginally useful when trying to do something out of the norm.

What is the easiest way to get a deeper look into what functionality is there that may be able to be put to use?

In summary what i’m looking for:

  1. New switch.module_name.output_type for hobby servos
  2. New switch.module_name.output_type for analog 0-5v or 0-10v
  3. More in depth functionality information?

Thanks!

Imported from wikidot

Did you read http://smoothieware.org/switch ? It answers your question 1 ( ie. you need to set the type to hwpwm, and may also need to set pwm_period_ms ).

About question 2, I don’t think we have analog control in the code at the moment. I believe bouni coded something like that, but it’s not been merged in yet.

I did read about and try the HWpwm option, but hadn’t set the PWM_Period_ms parameter. I’ll have to give that a try and see if it makes a difference.

My ESC did respond, but I had no control over speed and the motor would barely turn when I had tested it. Now that I read it a little closer, I’m assuming if i use a 20ms pwm period I can use a duty cycle of 5% for a 1ms pulse width corresponding to 0 degrees of a servo, and a duty cycle of 10% for a 2ms pulse for 180 degrees. My brushelss motor esc is programmable for its low and high input signal, so those numbers are a bit arbitrary. I’ll give it a try tonight.

Is there any timeline for incorporating the analog output type?

I believe the code is here : https://github.com/Bouni/Smoothieware/tree/feature/spindle-refactor and just needs to be tested/integrated into Smoothie.

Maybe you can ping bouni and ask him what his plans are.