Setting Up Duex5 for servo control - help needed
-
I have set up my duet wifi and duex5 and I think I have everything I need to get going however I cannot seem to get my duex5 to execute any commands.
I sent M115 and received a confirmation that my duex5 was connected. Are there any steps I need to take to get the duex5 to start working properly? I cannot seem to even get the fans to respond...
M115 output:
FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 2.02RC3(RTOS) ELECTRONICS: Duet WiFi 1.02 or later + DueX5 FIRMWARE_DATE: 2018-10-17b2here is my config file:
; General preferences
G90 ; Send absolute coordinates...
M83 ; ...but relative extruder moves
M555 P2 ; Marlin Compatibility; Drives
M569 P0 S1 ;
M569 P1 S1 ;
M569 P2 S0 ;
M350 X16 Y16 Z16 I0 ; Configure microstepping without interpolation
M92 X80 Y80 Z4000 ; Set steps per mm
M566 X300 Y300 Z12 ; Set maximum instantaneous speed changes (mm/min)
M203 X100000 Y100000 Z180 ; Set maximum speeds (mm/min)
M201 X2500 Y2500 Z250 ; Set accelerations (mm/s^2)
M906 X1400 Y1800 Z0 U0 ; Set motor currents (mA)
M84 S0 ; Disable motor idle current reduction; Endstops
; Helper Comments: X1 endstop at low end, Y2 endstop at high end
; Helper Comments: S0=active low endstop input,S1=active high endstop input
M574 X1 Y1 Z1 S1 ; See above for clarification.
M574 U0 V0 S0; Heaters
M140 H-1 ; Disable heated bed
M307 H0 A-1 C-1 D-1 ; this is what dc42 says to do; Fans
M106 P0 S0.0 I0 F500 H-1 ; Set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P1 S0.0 I0 F500 H-1 ; Set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P2 S0.0 I0 F500 H-1 ; Set fan 2 value, PWM signal inversion and frequency. Thermostatic control is turned off
M106 P3 S0.0 I0 F500 H-1 ; Set fan 3 value, PWM signal inversion and frequency. Thermostatic control is turned off; Tools
; Extras
M305 P101 S"DriverTemp"; Automatic saving after power loss is not enabled
; Custom settings are not configured
M42 P0 S0 ; set pump to off -
post the output of M122
-
@injoi9000 According to your config.g, the only thing I can see that you have connected to the Duex5 is a single fan (P3). Everything else is configured for the Duet board. I'm a bit concerned when you say that you can't get the fans (plural) to respond. The only command that would yield a response from the Duex5 would be M106 P3 Snnn. Have you tried this - i.e M106 P3 S255?
-
Have you provided VIN power to your DueX? It will be recognised by the Duet with just the ribbon cable connected.
-
@veti here is my M122
RepRapFirmware for Duet 2 WiFi/Ethernet version 2.02RC3(RTOS) running on Duet WiFi 1.02 or later + DueX5
Board ID: 08DGM-9T6BU-FG3SN-6JKD6-3S46R-KUYMD
Used output buffers: 1 of 20 (16 max)
=== RTOS ===
Static ram: 28532
Dynamic ram: 98152 of which 0 recycled
Exception stack ram used: 312
Never used ram: 4076
Tasks: NETWORK(ready,328) HEAT(blocked,1232) MAIN(running,4364)
Owned mutexes:
=== Platform ===
Last reset 00:04:48 ago, cause: power up
Last software reset at 2019-03-18 01:37, reason: User, spinning module GCodes, available RAM 4108 bytes (slot 1)
Software reset code 0x0003 HFSR 0x00000000 CFSR 0x00000000 ICSR 0x0041f000 BFAR 0xe000ed38 SP 0xffffffff Task 0x4e49414d
Error status: 0
[ERROR] Error status: 0Free file entries: 10
SD card 0 detected, interface speed: 20.0MBytes/sec
SD card longest block write time: 0.0ms, max retries 0
MCU temperature: min 32.8, current 33.4, max 33.5
Supply voltage: min 24.0, current 24.2, max 24.3, under voltage events: 0, over voltage events: 0
Driver 0: standstill, SG min/max not available
Driver 1: standstill, SG min/max not available
Driver 2: standstill, SG min/max not available
Driver 3: standstill, SG min/max not available
Driver 4: standstill, SG min/max not available
Driver 5: standstill, SG min/max not available
Driver 6: standstill, SG min/max not available
Driver 7: standstill, SG min/max not available
Driver 8: standstill, SG min/max not available
Driver 9: standstill, SG min/max not available
Expansion motor(s) stall indication: no
Date/time: 2019-03-18 15:40:34
Cache data hit count 1076554928
Slowest loop: 2.10ms; fastest: 0.07ms
=== Move ===
Hiccups: 0, StepErrors: 0, LaErrors: 0, FreeDm: 240, MinFreeDm: 240, MaxWait: 0ms, Underruns: 0, 0
Scheduled moves: 0, completed moves: 0
Bed compensation in use: none
Bed probe heights: 0.000 0.000 0.000 0.000 0.000
=== Heat ===
Bed heaters = -1 -1 -1 -1, chamberHeaters = -1 -1
=== GCodes ===
Segments left: 0
Stack records: 1 allocated, 0 in use
Movement lock held by null
http is idle in state(s) 0
telnet is idle in state(s) 0
file is idle in state(s) 0
serial is ready with "M122" in state(s) 0
aux is idle in state(s) 0
daemon is idle in state(s) 0
queue is idle in state(s) 0
autopause is idle in state(s) 0
Code queue is empty. -
@deckingman So last night I did try that and it didn't work however this morning I did that ....and now it works.
@dc42 yes everything is connected and now with the fan working there is definitely power.
I plugged in my fan to the P3 position and now I have a servo connected to the PWM_1 position. What do I need to do to initialize the servo in my config file?
-
I have added the following lines to my config file and connected my servo to PWM_1
; Servos
M307 H2 A-1 C-1 D-1 ; disable the E2 heater for the servo
M307 H3 A-1 C-1 D-1 ; disable the E3 heater for the servowhen I type M280 P3 S0 into the Gcode console....nothing happens
-
Okkk
So somehow along the way I burned out my servo and that was the problem all along. Now with the following changes to the config.g and command I can get it to work.
- plug servo into PWM_1
- place this into config.g "M307 H3 A-1 C-1 D-1 ; disable the heater 3/PWM_1 for the servo"
- type the following into the gcode console "M280 P3 S90" where changing the "S90" parameter changes the angle of the servo
I think my biggest issue is I thought H2 mapped to P3....so theres that.
SO NOW
How do I control a brushless motor with my servo controller?
-
I've done a little reading about ESCs, and it appears that some of them at least need to be calibrated. For example, see the calibration section at https://dronesandrovs.wordpress.com/2012/11/24/how-to-control-a-brushless-motor-esc-with-arduino/.