Spindle Configuration & Setup Help
-
I hooked up a PWM to voltage module following the Workbee CNC w/Duet and Chinese Spindle Control post over on OpenBuilds and a lot of reading over here. I didn't have luck following the Workbee spindle configuration. I'm not certain in that example which specific PWM pins are being used. I chose to use OUT 4 and finally got the configuration not to bark at me for the tool not being defined, etc. I connected a volt meter to the output of the PWM to Voltage Module and sent M3 S4000 or M3 S10000 and nothing happened.
Would someone please take a look at my configuration file and setup? And possibly help me figure out what I'm missing. Everything else works with the CNC and I've been able to play around with it.
Notes for the VFD; however, I'm testing with a volt meter so these are not yet relevant
- P0001 = 1 // Source of Operations, 1 = Set by external controls
- P0002 = 1 // Source of Operating Frequency, 1 = Set by external terminals
- Jumper from DCM to FOR for always on mode
- Jumper for VI/VR for pins 1&2 // When using external connection potentiometer
Workbee CNC w/Duet and Chinese Spindle Control
https://openbuilds.com/threads/workbee-cnc-w-duet2-and-chinese-spindle-control.14004/PWM to Voltage Module
https://www.amazon.com/dp/B07XZ836QF?psc=1&ref=ppx_yo2ov_dt_b_product_detailsSystem Specifications
Duet3D 6HC with SBC
Duet Web Control 3.4.5
Huanyang HY01D511B (with 1.5kW Spindle)Configuration File - Comments aren't always accurate as I'm still debugging things
; Configuration file for Duet 3 MB 6HC (firmware version 3.3) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v3.3.15 on Thu Feb 09 2023 09:08:43 GMT-0500 (Eastern Standard Time) ; Globals global xMax = 660; global yMax = 570; global zMax = 90; global speedMax = 5000; global zSpeedMax = 400; global motorCurrent = 2240; ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"CNC" ; set printer name ; Network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0.0 S0 ; physical drive 0.0 goes forwards - X M569 P0.1 S0 ; physical drive 0.1 goes forwards - Y1 - Left M569 P0.2 S0 ; physical drive 0.2 goes forwards - Y2 - Right M569 P0.3 S1 ; physical drive 0.3 goes forwards - Z M584 X0.0 Y0.1:0.2 Z0.3 ; set drive mapping M350 X16 Y16 Z16 I1 ; configure microstepping with interpolation M92 X640.1582 Y640.1582 Z1600.00 ; set steps per mm M566 X900.00 Y900.00 Z60.00 ; set maximum instantaneous speed changes (mm/min) M203 X{global.speedMax} Y{global.speedMax} Z{global.zSpeedMax} ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z80.00 ; set accelerations (mm/s^2) // The original speed M906 X{global.motorCurrent} Y{global.motorCurrent} Z{global.motorCurrent} I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X{global.xMax} Y{global.yMax} Z{global.zMax} S0 ; set axis maxima ; Endstops M574 X1 S1 P"!io0.in" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin ^io0.in M574 Y2 S1 P"!io1.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin ^io1.in M574 Z2 S1 P"!io2.in" ; configure switch-type (e.g. microswitch) endstop for low end on Z via pin ^io2.in ; Z-Probe M558 P0 H5 F120 T6000 ; disable Z probe but set dive height, probe speed and travel speed M453 ; CNC mode ; Tools M950 R0 C"out4" Q100 L0:14000 M563 P0 R0 S"Spindle" G10 P0 X0 Y0 Z0 G10 P0 R0 S0 M568 P0 F0 ; Set Spindle speed to 0 T0 M453 P0 R14000 F100
Photos for Reference and Double Checking
IndyMill Build
-
Solved:
I got the spindle working. Switched over from fan to heater, then to the 5V PWM VFD output, which is Out9 (pins: out9->pwm+, GND->pwm-). The spindle works now. Won't stop spinning when I give it an M5, but that's a problem for another day.Regarding the information out there and trying most of it, this solution is mentioned here:
https://duet3d.dozuki.com/Wiki/Configuring_RepRapFirmware_for_a_CNC_machine
Specifically the section: Connecting a spindle, option 2Here's the relevant config file section:
M950 R0 C"out9" Q100 L24000 M563 P0 R0 S"Spindle" G10 P0 X0 Y0 Z0 G10 P0 R0 S0 M568 P0 F0 T0
5V PWM* - Noted at the bottom, connected as Out9, but the 3 pins beside it.
-