Issue about using 1XD to drive a stepper motor driver
-
Hi,everyone
I am trying to use 1XD to control a stepper motor driver in order to drive the motor, however I failed. Here are the situations I met, and I really need your help, please!!!!!I am sure that I build the connection between 6HC and 1XD, and everytime I give an order through the web, the 1XD will flash a green light(I guess that means the order is successfully sended), but the motor didn't move even a little.
I use the differential connection way to connect, and I set the address of 1XD is 40, then in the config.g file I wrtoe the code
M569 P40.0 S1 R1 M584 X40.0
therefore I think now the driver connected with 1XD is assigned as X-axis driver, but when I give orders, it didn't move. And I use oscilloscope to test the step+ and step-, there is no waves shown.
BTW it also gives a warning shown in the following.Warning: Driver 0.2 warning: phase A may be disconnected, phase B may be disconnected
-
@Joseph Please post your full config.g, and the responses to sending
M115
andM98 P"config.g"
. Also provide a link to the datasheet of the external driver you are using, or at least post the make and model number.Generally, external driver issues are to do with incorrectly wiring the 'enable' terminals (many drivers expect no enable connection), and the stepper driver timing. From the small amount of information you have supplied, it looks like you haven't set any stepper driver timings. Have a look at this thread, where the same issue has come up:
https://forum.duet3d.com/topic/32437/external-driver-and-duet-1xd-issuesRegarding the warning message, either the wiring to the stepper motor on that stepper driver is faulty or incorrect, or there is a configuration error.
Ian
-
@droftarts Hi, I am so sorry that the informations I gave is so poor, cuz I was so hurry.
My stepper motor driver mode is M542C, I think it is quite common device right? Sorry I just started to learn these 3D printing stuff
here are my config.g:; 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.16 on Mon May 15 2023 17:32:55 GMT+0800 (中国标准时间) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"New one" ; set printer name ; Network M552 P192.168.2.1 S1 ; enable network and acquire dynamic address via DHCP M554 P192.168.2.255 M553 P255.255.255.0 M586 P0 S1 ; enable HTTP M586 P1 S1 ; enable FTP M586 P2 S1 ; enable Telnet ; Drives ;M569 P0.0 S1 ; physical drive 0.0 goes forwards ;M569 P0.1 S1 ; physical drive 0.1 goes forwards ;M569 P0.2 S1 ; physical drive 0.2 goes forwards ;M569 P0.3 S1 ; physical drive 0.3 goes forwards ;M584 X0.0 Y0.1 Z0.2 E0.3 ; set drive mapping M569 P40.0 T5:5:10:10 ; change enable polarity, active = disable drive M569 P40.0 S0 R0; M584 X40.0 Y0.1 ; set X and Y drivers M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400.00 E420.00 ; set steps per mm M566 X900.00 Y900.00 Z60.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2) M906 X800 Y800 Z800 E800 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 X230 Y210 Z200 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 Y1 S1 P"!io1.in" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin !io1.in M574 Z1 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 M557 X15:215 Y15:195 S20 ; define mesh grid ; Heaters M308 S0 P"temp0" Y"thermistor" T100000 B4138 ; configure sensor 0 as thermistor on pin temp0 M950 H0 C"out0" T0 ; create bed heater output on out0 and map it to sensor 0 M307 H0 B1 S1.00 ; enable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"temp1" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin temp1 M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Fans M950 F0 C"out4" Q500 ; create fan 0 on pin out4 and set its frequency M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off M950 F1 C"out5" Q500 ; create fan 1 on pin out5 and set its frequency M106 P1 S1 H1 T45 ; set fan 1 value. Thermostatic control is turned on ; Tools M563 P0 D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ; Custom settings are not defined
BTW I just read that thread which u posted before I posted this discussion, and I tried to use the code to solve my problem, however I failed.
the main problem I thought is that the 1XD didn't give any signal (or pulse) to the STEP+ and STEP-, even though I wrote the codeM569 P40.0 T5:5:10:10
and I tried to disconnect the enable wires, it doesn't work neither.
I use my classmate's computer to test the driver and motor through stm32, and the motor moves. So I wonder there is something wrong in my configuration -
@Joseph Please post the responses to sending
M115
andM98 P"config.g"
.I can't see anything in your config.g that would stop the X axis from moving, though you have a lot axis configuration commands for axes that are currently unspecified in M584. The stepper driver timings look sensible for the specification here: https://kitaez-cnc.com/f/m542c.pdf
What commands/button presses are you actually sending? Is the axis homed, or a position set within the bounds of the machine (M208) with G92 before you try and move it, or have you sent
M564 S0 H0
to allow motor movement without homing? The axis won't move unless it know its position. See https://docs.duet3d.com/User_manual/Connecting_hardware/Motors_testingIan
-
@droftarts Hi, thanks for your helping, I am sorry that I forgot to upload my picture of sending M115 and M98 P"config.g"
Here are the responses, there is something strange when I send M98 P"config.g", as shown in the picture, the response is "connection lost , attempting to reconnect", however it never reconnects again, I have to restart the power to make it connect.)
For the commands I send for moving, I firstly click the Home X button, then after waiting for several seconds (even though the motor didn't move), it allows me to click X+0.1 X+10 X+50......, but none of them makes the motor move.
I just tried M564 S0 H0, there is no movement neither. -
@Joseph Your 6HC isn't on the latest firmware, which is v3.4.5. Check that the 1XD is on the same firmware version as the 6HC with
M122 B40
. Post the output from that command. If they are not on the same firmware version, that could explain why it is not working.I'm not sure why it would lose connection when running the config.g file again. I can't see anything in your last config that would cause that. Update the firmware on the 6HC and 1XD to the latest, and see if that helps.
Are these genuine Duet3D boards, or clones?
Ian
-
@droftarts Hi Ian, thanks for your help!! Finally it moves! I just upgrade the 6HC and 1XD firmware version, then probelm solved!
btw for the Duet3D boards, it is not me who bought these, I just got a box said "re-layout" version, I am not sure whether it is genuine or clone.
again, thanks for your help! -
@Joseph can you post a picture of your boards?
Ian
-
-
@Joseph Great, glad it is working. Thanks for the pictures, they are interesting to see. Yes, these are clone boards, not genuine Duet3D boards. As such, they are not covered by our warranty, nor are they supported by us.
Ian
-
@droftarts okey, again ,thanks for your help Ian!