Delta Z-carriage won't move down after homing
-
I realize I forgot to add the firmware version.
M115
FIRMWARE_NAME: RepRapFirmware for Duet 2 WiFi/Ethernet FIRMWARE_VERSION: 3.2.2 ELECTRONICS: Duet WiFi 1.02 or later FIRMWARE_DATE: 2021-02-11@Phaedrux Attached below are my config.g and homedelta.g files, along with the servo motor TDS.
config.g
homedelta.g
Servo Motor User Manual.pdfSome additional information about the behavior after homing:
- I turned off power to the servo motors so I can turn them manually
- I lowered all carriages by a hundred mm or so
- I turn power back on to the servo motors
- I press -50 z-direction a few times (so it thinks the carriages are sufficiently below the endstops)
- The X and Y carriages move down a few mm each
- I then press +50 z-direction and get the following behavior: X carriage goes up ~17mm, Y carriage goes up ~21mm, and Z carriage goes up ~20mm. This behavior seems to be repeatable, i.e. if I press +50 z-direction again each carriage moves up the same respective distance again (as far as I can tell with quick ruler measurements).
- I then press -50 z-direction: the Z carriage doesn't move and the X and Y carriages move a few mm down and then won't go further.
Based on successfully using these motors in the past, 200steps/mm should be correct and the step-pulse timing I set should be correct too.
Thank you again for any help!!!
-
Can you give this a shot?
https://duet3d.dozuki.com/Wiki/ConfiguringRepRapFirmwareDeltaPrinter#Section_Testing_the_motors_and_endstops_individuallyJust to make sure the tower and endstops are correctly paired.
Otherwise an issue with the servo step timings seems possible, but I'm no expert there.
-
@Phaedrux Thank you for linking the individual tower testing page. I tested all towers and endstops individually (problem not solved) and here are my results:
G28 to home - moves slowly to each endstop and reacts correctly by immediately stopping the correct motor for each respective endstop, moves down, and then does a second successful pass.
G91 to set to relative movement
G1 H2 X-10 - nothing happens
G1 H2 Y-10 - nothing happens
G1 H2 Z-10 - nothing happens
G1 H2 X1 - X carriage moves up approx. 1mm
G1 H2 Y1 - Y carriage moves up approx. 1mm
G1 H2 Z1 - Z carriage moves up approx. 1mm*turn off power to motors and manually moved all carriages down to give myself room to test
G1 H2 X-10 - nothing happens
G1 H2 Y-10 - nothing happens
G1 H2 Z-10 - nothing happensG1 H2 X10 - X carriage moves up approx. 6 mm
G1 H2 Y10 - Y carriage moves up approx. 6 mm
G1 H2 Z10 - Z carriage moves up approx. 8 mmG1 H2 X-100 - now I'm getting strange behavior where the carriages will move down but seem to struggle (as if under mechanical resistance) and move at variable speed
G1 H2 Y-100 - now I'm getting strange behavior where the carriages will move down but seem to struggle (as if under mechanical resistance) and move at variable speed
G1 H2 Z-100 - now I'm getting strange behavior where the carriages will move down but seem to struggle (as if under mechanical resistance) and move at variable speedThe above moves don't seem to be repeatable and go variable distances all the while speeding up and slowing down and seeming to barely be able to turn under all of the mechanical resistance of my stare?
G28 - again works as it should (although maybe too slowly?). Also, I should note the negative z-direction move during homing before the second pass doesn't seem to struggle like negative z-direction moves noted above.
G1 H2 X-10 - nothing happens
G1 H2 Y-10 - nothing happens
G1 H2 Z-10 - nothing happens
G1 H2 X1 - X carriage moves up approx. 1mm
G1 H2 Y1 - Y carriage moves up approx. 1mm
G1 H2 Z1 - Z carriage moves up approx. 1mmAnd so on.....
Okay so at this point I have a few ideas.
- after homing there seems to be a software endstop type effect because the motors won't move down using the 'G1 H2' or 'G1'
- based on the strange movement, 'struggling' to turn motion, and incorrect move distances there could be issues with timing or logic levels sent to the servo motor's external drivers.
The second point is what I will focus on next. For my current set-up, I am using the Duet Expansion Breakout Board to communicate with the servo motors at a 3.3V logic level (communication at this level has worked in the past using an MKS SGEN 32-bit controller board). The servo motors are JMC integrated AC servo motors iHSV57-30-18-36-01-BY V604 and their manual/TDS is Servo Motor User Manual.pdf (also attached to my previous post). To be honest, I don't understand the difference between differential vs. non-differential(?) signals so maybe that is playing a role. My motors do have ENA-,ENA+, DIR_,DIR+, STEP- and STEP+ pins, so I'm guessing it is correct to attached them to the Duet Expansion Breakout Board with it's differential 3.6V signals. HOWEVER, the servo manual does specific 5V logic is needed to control the optically-isolated driver pins (again, in the past I got away with 3.3V using the MKS SGEN board). So, I will try changing to 5V logic following the instructions here: https://duet3d.dozuki.com/Wiki/Duet_Expansion_Breakout_Board#Section_Notes
My apologies for the very long post. If it is poor etiquette to post something this long please let me know.
Best wishes,
Joshua -
I have rewired the servo cables following your guide so that PUL+, DIR+ and ENA+ for all three tower servo motors connect to the +5V pin on the H6_PMW header, while PUL-, DIR-, and ENA- are still connected to the respective pins on the E2, E3, and E4 headers. This changes seems to have fixed my first problem, so I can now move in the negative z-direction after homing. It also seems to have fixed the 'struggling' motion I noted in the above post. Woohoo!
HOWEVER, movement still does not work properly! Here's what happens:
G28 ; home
G90 ; absolute
G1 Z0 ; try to go down to bed
This should be a ~640 mm movement, but only goes about 270 mm. The towers do each seem to move in sync for the same distance. The tool position numbers react appropriately, and for this case show a position of 0,0,0, which is correct for my command but not what happens.G1 Z100;
G91 ; relativeG1 Z100 ; all carriages move up ~43 mm (no difference observed using a ruler)
G1 Z-100 ; all carriages move down X ~44 mm, Y ~44mm, and Z~45mmNext I tried going up 100 mm and then down 100 mm five times. End positions were: X +5 mm, Y +5 mm, Z +18 mm the starting position.
Next I tried going up 100 mm and then down 100 mm ten times. End positions were: X +8 mm, Y +8 mm, Z +34 mm the starting position.
For the final repeatability test, I repeated this 5 times and noted the different in end position:
G28
G90
G1 Z100
End position varied by about 1mm, both above and below the average position.My conclusion from this inconsistent motion is that I must be missing steps (open to other suggestions of course). A few thoughts/questions:
- In the servo motor manual, it says maximum communication speed is 250,000 Hz. Could the duet board be sending more commands per unit time than the servo's driver can handle?
- How does setting a microstepping mode (M350) affect external drivers? Could interpolation cause any issues?
- My timing could be off. This seems likely, except that I am using the same timing values that I successfully tested these motors with the MKS SGEN controller board. Copied from the servo manual:
t1: ENA must be ahead of DIR by at least 5μ s. Usually, ENA+ and ENA- are NC
(not connected).
t2: DIR must be ahead of PUL active edge by 6μ s to ensure correct direction;
t3: Pulse width not less than 2.5μ s;
t4: Low level width not less than 2.5μ s.
At this point, I'm fairly stumped as to what to try next. Any thoughts or suggestions are highly appreciated!
-
@pelz135 said in Delta Z-carriage won't move down after homing:
My apologies for the very long post. If it is poor etiquette to post something this long please let me know.
Not a problem at all. The more info the better.
-
From your config.g
M569 P5 S1 R1 T3:3:6:6 ; physical drive 5 goes forwards M569 P6 S1 R1 T3:3:6:6 ; physical drive 6 goes forwards M569 P7 S1 R1 T3:3:6:6 ; physical drive 7 goes forwards
It's these timings that are going to be the key. I don't know how transferable the values will be from the MKS board. Apparently not very.
As far as I understand the microstepping on the board itself is irrelevant, since it's based on the timings and the settings of the external servos.
-
@Phaedrux Am I correct in understanding that M569 P5 S1 R1 T3:3:6:6 will set motor 5 to forward, driver to active HIGH, pulse width to 3 us, step pulse interval to 3 us, direction setup time to 6 us, and direction hold time to 6 us?
-
Any understanding I have of M569 is derived from here: https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M569_Set_motor_driver_direction_enable_polarity_and_step_pulse_timing
-
@Phaedrux haha, fair enough.
I have solved my issue, finally! I will give a quick rundown of my findings here, with the hope it helps someone in the future.
Basic issue: the servo motors controlling my delta printer towers were not moving correctly. These motors have external drivers that I am controlling using the Duet Expansion Breakout Board. This includes no movement, stuttering movement, incorrect distances, and incorrect speeds.
Solution: I believe all of these steps were necessary, but if I could go back and do it again I would definitely try the timing adjustments first.
- Use 5V logic by connecting the PUL+, DIR+ and ENA+ for all three tower servo motors to the +5V pin on the H6_PMW header of the Duet Expansion Breakout Board.
- Use 'R1' to invert the enable signal (although this may be accomplished by switching the ENA+ and ENA- wires).
- Increase timing values. The tricky part here is that the values stated in the servo motor manual did not work! I had to increase the values well above what they stated was necessary. More details below:
Based on these figures, I believed that setting the timing to T3:3:6:6 using the M569 command would be sufficient. HOWEVER, after testing I found that the minimum values I can use are T4:4:10:6 meaning a 4 microsecond step pulse width, 4 microsecond step pulse interval, 10 microsecond direction setup time and 6 microsecond direction hold time. To be safe, my final values are as follows:
M569 P5 S1 R1 T5:5:12:6 ; physical drive 5 goes forwards (x-tower), enable signal inversion, timing:3,3,6,6
M569 P6 S1 R1 T5:5:12:6 ; physical drive 6 goes forwards (y-tower), enable signal inversion, timing:3,3,6,6
M569 P7 S1 R1 T5:5:12:6 ; physical drive 7 goes forwards (z-tower), enable signal inversion, timing:3,3,6,6 -
@pelz135 if you send M569 P5 to view settings, you may notice that the timing used is actually slightly longer, as it has to fit the MCU clock rate.
Ian
-
@droftarts Good to know, thanks. Here is what I get:
M569 P5
Drive 5 runs forwards, active high enable, timing 5.3:5.3:12.8:6.4us -
In theory you should be able to use T2.5:2.5:6:xx for those drivers. The diagram doesn't show the minimum value needed for the fourth value (which I called xx) but it may well be zero. But I see from your earlier post that 3:3:6:6 didn't work.
-
@dc42 Yes, that is what I thought as well.
Do you have any idea why timing is so far off? Like I mentioned above, I successfully tested these motors with the same power supplies and a MKS SGEN controller board with timings of 3:3:6:6. The MKS SGEN board provided 3.3V logic, so if anything I would have assumed it would need more time to activate the opto-isolators due to the underpowered signal.
One concern I have is these motors are supposed to run at a maximum pulse frequency of 250 kHz. Is there a way for me to set that for the Duet board?