- Configuring LinuxCNC
- Basic Configuration
- (Solved) Using software pulse generation with Chinese steppers
(Solved) Using software pulse generation with Chinese steppers
08 Aug 2017 13:32 - 10 Aug 2017 22:35 #97172
by drksam
Hi everyone. I have been trying to configure linuxcnc to run with longs motors dm542a stepper drivers. I did not get any documents with them and the official info online is sketchie at best so I don't really have any concrete numbers for timing. I have them moving and they'e move the correct amount but they are oddly jumpy and it makes for unsatisfactory movement of the gantry (with a dc motor they move perfectly).
My computer is a core2 quad with 4gb ram running the installed version of the live disk and it is up to date as of last night . I Have tried with and with out an add on video card, but it made no difference. I am currently getting a max jitter about 29000 I know that's not the best but is it bad enough to cause my problem with the steppers?
I am using the 2x laser config. I have noticed that if I use the stepconf to make another config and run it it does run smoother but not perfect. I have tried to copy the important settings from the new config to the 2x laser config but I'm not sure I'm getting everything. I know about the base and servo period and I know about steplen, stepspace, dirsetup, and dirhold but they seem strange still the wizard set them to steplen=1 stepspace=0 and dirstep and hold are 37000ish I can't remember exactly but the 37 part is what it gave. I have tried different settings for those 4 as well as different micro stepping setting but in every configuration so far there is still a noticeable problem with movement.
Am I missing something in the settings or do I need a different computer or should I try an add on card to create the pulses?
My computer is a core2 quad with 4gb ram running the installed version of the live disk and it is up to date as of last night . I Have tried with and with out an add on video card, but it made no difference. I am currently getting a max jitter about 29000 I know that's not the best but is it bad enough to cause my problem with the steppers?
I am using the 2x laser config. I have noticed that if I use the stepconf to make another config and run it it does run smoother but not perfect. I have tried to copy the important settings from the new config to the 2x laser config but I'm not sure I'm getting everything. I know about the base and servo period and I know about steplen, stepspace, dirsetup, and dirhold but they seem strange still the wizard set them to steplen=1 stepspace=0 and dirstep and hold are 37000ish I can't remember exactly but the 37 part is what it gave. I have tried different settings for those 4 as well as different micro stepping setting but in every configuration so far there is still a noticeable problem with movement.
Am I missing something in the settings or do I need a different computer or should I try an add on card to create the pulses?
Last edit: 10 Aug 2017 22:35 by drksam. Reason: Typo
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1414
08 Aug 2017 14:55 #97175
by Todd Zuercher
Replied by Todd Zuercher on topic Useing software pulse generation with Chinese steppers
Start by sharing your config files.
Can you better describe your "jumpy" movement?
Is it jerking too fast like your acceleration is set too high?
Is it loosing steps? (If it's loosing steps can you discern why?)
Maybe it is a problem with your step pulse signal between the PC and the drive?
Is there a breakout board? Is there a wiring or grounding problem between the PC and the drives?
Is the step pulse signal from the PC 3.3v but the drive needs 5v?
Can you better describe your "jumpy" movement?
Is it jerking too fast like your acceleration is set too high?
Is it loosing steps? (If it's loosing steps can you discern why?)
Maybe it is a problem with your step pulse signal between the PC and the drive?
Is there a breakout board? Is there a wiring or grounding problem between the PC and the drives?
Is the step pulse signal from the PC 3.3v but the drive needs 5v?
Please Log in or Create an account to join the conversation.
08 Aug 2017 16:07 - 08 Aug 2017 22:15 #97184
by drksam
Replied by drksam on topic Using software pulse generation with Chinese steppers
Thanks for the quick reply.
I will share the configs as soon as I get home. Do you just want the .hal and .ini or do you want more files?
The motion is kinda like a non consistent speed issue (assuming that the slowest it goes is normal it has jerks of higher speed) you can hear the problem as the stepper turns it sounds just like the motion looks with a constant buzz and frequent jump ups in speed. It seems to be most prevalent after the acceleration is done and it is at speed.
I have tried several max speeds and it seems to run worse when it's running slow but if it's running really fast its still bad. Any faster and I get a following error.
I don't think the accel is too high but I will see what changing it does.
I am afraid that yes it is loosing steps but no haven't found where ( I am currently with out a physical scope). But the reason I think it's loosing steps is because I don't know what the proper timeing for the drives are. Altho I have tried settings from the very low to very high but not much changes except how fast its going when I get a following error.
Yes there is a breakout board. It is the one that came in the kit with the steppers and drives and also has no documentation.
The input for the drives is 5v and the output on the breakout board is also 5v.
Is there a potential for interference to cause problems with the step pulses?
Should the wires from the breakout to the drives be shielded?
Is there still a problem with useing a 64bit computer?
By the way the x and y step wave forms look fine on the the built in scope.
I will share the configs as soon as I get home. Do you just want the .hal and .ini or do you want more files?
The motion is kinda like a non consistent speed issue (assuming that the slowest it goes is normal it has jerks of higher speed) you can hear the problem as the stepper turns it sounds just like the motion looks with a constant buzz and frequent jump ups in speed. It seems to be most prevalent after the acceleration is done and it is at speed.
I have tried several max speeds and it seems to run worse when it's running slow but if it's running really fast its still bad. Any faster and I get a following error.
I don't think the accel is too high but I will see what changing it does.
I am afraid that yes it is loosing steps but no haven't found where ( I am currently with out a physical scope). But the reason I think it's loosing steps is because I don't know what the proper timeing for the drives are. Altho I have tried settings from the very low to very high but not much changes except how fast its going when I get a following error.
Yes there is a breakout board. It is the one that came in the kit with the steppers and drives and also has no documentation.
The input for the drives is 5v and the output on the breakout board is also 5v.
Is there a potential for interference to cause problems with the step pulses?
Should the wires from the breakout to the drives be shielded?
Is there still a problem with useing a 64bit computer?
By the way the x and y step wave forms look fine on the the built in scope.
Last edit: 08 Aug 2017 22:15 by drksam. Reason: typo
Please Log in or Create an account to join the conversation.
08 Aug 2017 21:41 #97209
by rodw
Replied by rodw on topic Using software pulse generation with Chinese steppers
The DM542a is a very good stepper driver and can manage very short timing pulses. It is not your problem.
What machine are you using and what are your drive ratios? eg How many mm of travel per RPM of the motor
Some of your symptoms sounds like you are moving too far per revolution. You might need to add some reduction gears.
What machine are you using and what are your drive ratios? eg How many mm of travel per RPM of the motor
Some of your symptoms sounds like you are moving too far per revolution. You might need to add some reduction gears.
Please Log in or Create an account to join the conversation.
08 Aug 2017 22:06 #97210
by drksam
Replied by drksam on topic Using software pulse generation with Chinese steppers
I found a drive on line with a name that was close and it had the same step and dir times as the DQ542MA from the wiki that was 500/500 step and 5050/5050 dir (none that i have found are the DM542A). I reran the latency test and got 29586 so i rounded up to 30000. I am using 10x micro stepping my rev/in is 0.41 (after reading rodw's post that may be a problem) the machine is home build but is very smooth with a dc motor. I put those numbers in the wizard and i got
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 35050
setp stepgen.0.dirsetup 35050
BASE_PERIOD = 100000
SERVO_PERIOD = 1000000
SCALE = 820
So i went with that and put those numbers in the 2x laser hal and ini. It did smooth out a little but its still not really smooth and still sounds kinda bad. the attached files are the most recent. I am not using the 3rd axis.
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 35050
setp stepgen.0.dirsetup 35050
BASE_PERIOD = 100000
SERVO_PERIOD = 1000000
SCALE = 820
So i went with that and put those numbers in the 2x laser hal and ini. It did smooth out a little but its still not really smooth and still sounds kinda bad. the attached files are the most recent. I am not using the 3rd axis.
Please Log in or Create an account to join the conversation.
08 Aug 2017 23:51 #97221
by drksam
Replied by drksam on topic Using software pulse generation with Chinese steppers
I changed to 20x micro stepping and it helped but although there is still a problem it now sounds like the fast is correct and the speed slows down during the problem moments. It sounds the same even with the motor disconnected from the belt but it sounds like the motor is dragging about every 1/3 of a sec of so.
I was beginning to wonder if i even had the stepper hooked up right I was able to find a diagram at
www.ebay.com/itm/US-Ship-3Axis-Nema-23-S...0:g:XCMAAOSwwo1Xd07d
On the diagram it shows grn/blk and red/blu as the coils and that is how i have them. Just for fun i swapped coil1 and 2 on one but it didn't make any difference. I have not been able to find exactly what wire is + and - tho is it possible that this is a problem of a coil hooked up backwards although i have tried most combinations.
I was beginning to wonder if i even had the stepper hooked up right I was able to find a diagram at
www.ebay.com/itm/US-Ship-3Axis-Nema-23-S...0:g:XCMAAOSwwo1Xd07d
On the diagram it shows grn/blk and red/blu as the coils and that is how i have them. Just for fun i swapped coil1 and 2 on one but it didn't make any difference. I have not been able to find exactly what wire is + and - tho is it possible that this is a problem of a coil hooked up backwards although i have tried most combinations.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1414
09 Aug 2017 13:25 #97238
by Todd Zuercher
Replied by Todd Zuercher on topic Using software pulse generation with Chinese steppers
I hate to burst your bubble but relying on micro stepping to increase a stepmotor's real resolution is a pipe dream. Anything much finer than about 1/4 step will not be resolvable with any accuracy at the machine. You really should consider adding more gear reduction. I would think about 5:1 would probably be a good amount of reduction for you to add to your system. (Aim for about 2-3revs/inch.)
What good is microstepping then you ask. It is very good for reducing resonance induced stalling.
What good is microstepping then you ask. It is very good for reducing resonance induced stalling.
Please Log in or Create an account to join the conversation.
09 Aug 2017 13:43 #97239
by drksam
Replied by drksam on topic Using software pulse generation with Chinese steppers
Ok I will keep that in mind, but I wasn't trying to increase resolution at the table as currently the motors are not even hooked to it and they still have the problem. I will definitely add some gear reduction after I get the simple operation of the motors smoothed out. Could it be posable that Resonance is part of the problem?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1414
09 Aug 2017 15:38 #97240
by Todd Zuercher
Replied by Todd Zuercher on topic Using software pulse generation with Chinese steppers
Not likely at 10 or 20x microstepping.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1414
09 Aug 2017 16:09 #97242
by Todd Zuercher
Replied by Todd Zuercher on topic Using software pulse generation with Chinese steppers
Could you post your config files, I have seen weird step pulse generation when some settings are set way out of whack. (specifically if the MAX_ACCELERATION and STEPGEN_MAXACCEL are set wildly different.) The STEPGEN_MAXACCEL should be about 25% larger than the MAX_ACCELERATION. If the STEPGEN_ACCELERATION is set to some silly too large number, the stepgen can overshoot and cause oscillations similar to a poorly tuned servo.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Basic Configuration
- (Solved) Using software pulse generation with Chinese steppers
Time to create page: 0.086 seconds