configuring for servomotors
-
@mrehorstdmd in https://www.facebook.com/groups/137073107015171/ the comment by Rene Bookwoods from July 15 is a similar problem like yours. He expects a too short pulse signal (in a german forum they recommend 3.5 us), another was to lower frequency from 200 kHz to 100 kHz.
A different user recommends setting switch 5 to falling flank/edge (he said it was a recommendation from Sorotec) (was for iHSV57, may be different switch for your servo).
Other problems were bad cable quality and a PSU too weak. -
My guess is that what you are seeing is a limitation of the accuracy of the servo motors, at least as they are tuned now. Typically, 3D printers can resolve to 1/16 microstepping, which is 3200 steps/rev using 1.8deg motors, or 6400 steps/rev using 0.9deg motors. Increasing to x32 microstepping doesn't usually help because the friction is too great. Do the 1000 line encoders on your motors resolve to 1000 points per rev, or are they sensed by quadrature encoders so that they give you 4000 lines per rev? If it's 1000 points per rev then that's quite a lot worse than for a stepper motor.
It will also depend on whether your servos try to achieve the last commanded position, or whether they attempt to guess when the next pulse is to give smoother movement.
I don't see any evidence of missed steps or layer shift in your print, so I think your timings are long enough. However, I suggest you check the hiccup count in case the timings are too long for the print speed.
-
@JoergS5 Thanks for the link. I'll have to spend some time with google translate... Each motor has a 200W power supply, and speed, jerk, and acceleration are all low in the printer, so I don't think it's a power supply issue. I have the pulse width set to 4 us.
@dc42 the specs on the motors are very limited as they come from China. All I know about the encoders is that they are 1000 lines. No idea if they're read in quadrature. Maybe I better open one of them up and have a look. There's no way to know about the control logic. The English manual is poor and so is the software for tuning the parameters. I'll keep playing with it and see what I can get them to do. They may just end up back in the sand table. They worked great for that application.
-
@mrehorstdmd said in configuring for servomotors:
@theruttmeister I don't understand why it worked "properly" (never mind the accuracy problem) when I had the steps/rev set to 20k and 500 steps/mm, but when I changed to 1000 steps/rev, it worked "properly" at 100 steps/mm. "Properly" meaning it moved the commanded distance. I'm thinking there may be an issue with pulse duration.
I can tweak the servo parameters, but have no real info on a tuning procedure, so I am using them at factory settings. The manual is little help, and the software that talks to them isn't much more help. It looks like a couple guys in Germany have figured out how to tune them, so I'll try sending some emails.
I'm more than a little rusty on encoders it turns out. Quadrature means you get 1/4 of the resolution, so your encoder counts are only 250/rev. That means that you can be getting +-0.16mm of drift in X/Y without the servo knowing. In fact there's a very good chance that the motor is jittering by that 0.32mm constantly. It would certainly explain the defects you are seeing.
No idea on the ratios, who knows with cheap Chinese electronics?
-
@theruttmeister said in configuring for servomotors:
I'm more than a little rusty on encoders it turns out. Quadrature means you get 1/4 of the resolution, so your encoder counts are only 250/rev.
I don't think that't right. Say you have an optical linear encoder with 1 black stripe per mm, each pair of stripes separated by a white band of the same width as the stripes (so alternately 0.5mm black and 0.5mm white). Then a quadrature reader will provide 4 transitions per mm, corresponding to the positions at which either of the readers (which are separated by 0.25mm) passes over one of the black-to-white transitions. In theory this means that with 1 stripe per mm you can get 0.25mm resolution.
In practice, the sensors may not detect the two edges of the stripe exactly. For example, the sensitivity of the sensor may be biased so that it changes its output when it is 0.1mm inside the black stripe instead of exactly over the edge. Then the transitions won't occur evenly, and it may be better to count alternate transitions instead of all transitions. This would worsen the resolution to 0.5mm.
On top of this, if the two optical sensors have different biases or they are not exactly 0.25mm apart, then there will be a further irregularity and it may be best to count 1 transition in 4; which would worsen the resolution to 1mm.
So if "1000 lines" really does mean 1000 stripes read by a pair of optical sensors producing quadrature outputs, then I conclude that the resolution will be 1000, 2000 or 4000 counts per rotation, depending on how the controller uses the quadrature output.
-
according to https://webseite.sorotec.de/download/Technische-Daten/servomotoren/jmc/iHSV_600.pdf page 9 P00-10
the iHSV encoder lines can be set by a parameter and can be between 0 and 65535, but I cannot find detail information about the precision. 1000 is only the default setting. In a document was mentioned 1000, 1250 and 2500 as values. The document is for iHSV 42/57/60/86 series.From the images of the iHSV57 servo, the encoder looks like a hall based one, so there are not optical hard limits, just signal resolution (ADC) and measurement errors as the limit (and magnetic distortions).
The used line encoder is the AM26LS32 https://www.ti.com/lit/ds/symlink/am26ls32ac.pdf -
@JoergS5 I interpreted the factory default of 1000 lines in the firmware to be a factory setting based on the specific encoder setup used in the specific motor. There may be other models of motor in which they change the encoder, or supply issues might force changing the encoder, so they would then set it for whatever matched the hardware being used. I could be completely wrong...
-
@mrehorstdmd I was astonished how many parameters can be set. There is eg an electronic gear mentioned in the document, but no explanation for it. When I tune the iHSV, I will try the tool https://github.com/robert-budde/iHSV-Servo-Tool but the setup seems to be a bit complicated in a windows environment.
I searched a while whether there is information about the tolerances for the encoder, something similar to "5% error of the position of the stepper", but I found nothing.
-
@JoergS5 Yeah, lots of stuff to tune, but no information or even a diagram of the control loop and where the parameters fit. I am using default settings for everything for now because of a lack of information on tuning. I opened and saved every image of every settings page from the JMC software and zipped it all into a file here. It provides more information than the manual, but only a little more.
-
@JoergS5 The JMC software for tuning the motors is here. It runs fine on windows, but the UI is awkward, so you'll have to mess around a little to figure it out. You'll need an RS-232 connection, so pick up a USB to RS-232 adapter cable. Look for cables that have the PL2303 chipset. They cost about $10.
-
@mrehorstdmd thank you for gathering all the information.
In a CNC forum they told the servo is so strong that if you set wrong parameters, the whole CNC machine can jump!
I am starting to use the iHSV servos for different tasks (a hacksaw eg), and I like them. I have not tuned them yet however.
-
In the sand table the mechanism has a lot of friction, but not a lot of moving mass. I was concerned that the servomotors wouldn't have enough grunt to make it move based on their torque specs, but servo torque specs aren't the same as stepper torque specs. The steppers were right at their limits running with 2k acceleration at 500 mm/sec. The servos let me run at 20k acceleration and 2000 mm/sec. I think they could go higher but the power supplies kept shutting down! One way to think about it is the servos are rated for 78 W while the steppers are 3V at 1.5A each phase, so maybe 10W or so. In my sand table tests the servos never got more than 2-3C above ambient after more than an hour of operation.
I'll have some time to mess around with it in the next couple days and post any new behavior here.
I wrote a blog post on the motors here. Any new information I get will get added to that post.
-
Hi.
I am about to buy IHSV servos for a CoreXY 3d printer.
First of all, thank you very much for sharing the information: Without it I would not have dared to take the step.
Some doubts arise:- The microsteps, although they are not set in the Duet configuration, do they work directly on the servos?
- You say you bought the Duet expansion board and connected directly and did it work? I ask this because the differential of the expansion board is 3.6V and that for 5V you have to bridge the 5V of the servo connectors on the board ... and the Servo manual says that it is compatible from 5 to 24V.
Anything else you think I should know about?
To this day, after having tried it, do you consider it a good option? Would you also do it on the 3D printer?
Thank you
-
@Pritt I would hold off on buying the motors for a printer. My initial tests don't look very good as you can see in the photos above. It seems like the resolution is inadequate. The motor resolution may be OK at high microstepping, but the encoders may be the limiting factor. I am trying to figure out if there are configuration changes in the motor drivers that will improve the results. I have made a few small changes and haven't found any that help yet.
The microsteps are set by dip switches on the servomotors. I use full step out of the Duet board.
The duet expansion board is able to drive the motor driver step/dir/enable inputs directly without any special tricks to raise the voltage levels. I did tweak the timing parameters in the M569 statements in the Duet config.g file for reliable operation.
-
Thank you very much for your answer.
The other question:
Do you think the problem is with these particular servos or with the servo motors themselves with the Duet?
I mean, would you try other servos?
I have seen some similar Leadshine, the IES-1706, with the great difference of the confidence that this brand gives ... but I do not find much information about them either.
Thank you. -
@Pritt I have no experience with other servos, but I think the problem I'm having with the iHSV motors is partly motor and partly encoder, but not the Duet board.
The iHSV motors worked perfectly with factory settings in my sand table- that's a much higher speed mechanism that does not require the precision and accuracy of a 3D printer- drawing lines in sand with a 12 mm steel ball is pretty sloppy.
Servos are made to run at high speeds. 3D printers are low speed machines. With 20 tooth drive pulleys, moving the mechanism at 200 mm/sec is only 5 revs per sec from the motor. Servos (at least, the ones I have) might work better by gearing them down with belts and pulleys so the motors are spinning fast even as the mechanism moves slowly. That would increase resolution, as well as the already more than sufficient motive force.
I watch the machine when it's homing and the motion doesn't look smooth which leads me to think that here may be some parameter tweaks that can improve the performance at low speeds.
-
I think it is a very interesting topic, so I open a thread, see if we can get something clear.
https://forum.duet3d.com/topic/17535/solved-leadshine-closed-loop-external-motor-drivers-with-duet2
Thanks you.
-
I just ordered the Nema 23 model.
Somebody in this forum mentioned that 1 to 3 gearing fixes the problem.
I also ordered 1 to 10 planetary gearbox. As far the servo torque is constant up to 3000 rpm I think this will give results. what do you all think? -
@martin7404 Wow! A NEMA-23 servo is definitely overkill for a 3D printer. The only thing I'd be concerned about with a planetary gear box is the possibility of backlash. That could cause some print artifacts.
The typical steppers used in 3D printers are only 5-10 watt devices. The NEMA-17 servos I used in the sand table are 78W motors. I would not want to get my fingers in the way of the moving mechanism. The NEMA-23 motors are probably >100W motors and if you add a gearbox, they will drive the printer mechanism through anything that gets in the way, including your hand.
GeckoDrives has an app note with a protection circuit that will protect your power supply and anything else you connect to the same power supply as the motor. I had an expensive lesson in operating servos at high speed and acceleration and managed to kill a 200W power supply and Duet wifi board. You need oversized power supplies for the iHSV servomotors because they will draw up to 3x rated current.
I have created a PCB layout for the protection circuit that I'm sure is good for the 24V motors I used and probably OK up to about 36V, but not sure how much higher than that. Unfortunately the app note isn't very detailed and I have no idea about the peak current/back EMF the motors can generate when stopped suddenly or driven beyond rated maximum rpm (that spec is supposed to be based on back-emf generated by the spinning motor).
The PCB is easy enough, but some of the component selection is a little "iffy". I will be using 1W wirewound resistors for R1 and R2, but it may not be necessary. 1/2 W resistors may be more than adequate. I also don't really know if the transistor should have a heatsink. I am using a 100V 15A Schottkey diode for D1, and put wide copper areas at the connector and diode so they don't burn up. You may need a bigger diode and more copper for NEMA-23 motors. The crimp lugs for the connector are back ordered until late March, so I'll probably build and test one by soldering wires to the board instead of the connector.
The board layout files are here.
My parts list is here, subject to change when I get a chance to test the board.It is safest not to connect the duet board to the same power supply as the servomotor(s).
-
@mrehorstdmd I did build a Special machine for drilling 6 meters long Alu profile, using old USSR universal milling machine and 2 axis X and Z. Initial test was witn Nema17 with 1:10 planetary , Now it is with Nema23 closed loop 3 Nm drives.
I am doing 20 countersinked holes for in 7 minutes now and the stepper is at about 150 rpm, but I want to make it faster . If I do It starts to work unreliably
My thoughts is Nema23 servo 0.6 Nm with 1:5 will give me about 3NM and about 5 NM peak all the way up to 600 rpm at the belt pulley, that is more than enough
here is photo of the milling machine