- Configuring LinuxCNC
- Advanced Configuration
- Dual PID loops with motor encoder + scale encoder per axis
Dual PID loops with motor encoder + scale encoder per axis
- TangentAudio
- Offline
- Senior Member
-
Less
More
- Posts: 74
- Thank you received: 19
02 May 2024 18:44 #299586
by TangentAudio
Replied by TangentAudio on topic Dual PID loops with motor encoder + scale encoder per axis
I couldn't find a good camera angle that shows everything at once, but there's a jackscrew on the back of the motor mount that sets a hard limit. This physical stop is about 1/4" beyond where my home switch actually triggers, but even when it's parked right at the hard limit, the home/limit switch is still active. Power was off when I took these photos, so the sensor LED is not on, but you'll get the point.
Hopefully this clears it up.
cheers,
Steve
Hopefully this clears it up.
cheers,
Steve
Attachments:
Please Log in or Create an account to join the conversation.
- TangentAudio
- Offline
- Senior Member
-
Less
More
- Posts: 74
- Thank you received: 19
06 May 2024 14:17 #299945
by TangentAudio
Replied by TangentAudio on topic Dual PID loops with motor encoder + scale encoder per axis
I was lucky to stumble into a DMM DYN4 750W AC servo and drive for free, so this gives me a good opportunity to test a modern setup on one axis.
I was able to temporarily mount the 80 frame motor into the same mount as the original brushed DC motor, though only two bolt holes align in the motor slots - good enough for testing, but I'll have to modify the mount if this becomes a permanent thing. For testing, I 3D printed a custom Gates HTD 5M 17T pulley for the AC servo's much larger 19mm shaft, as there's no off-the-shelf availability with exactly the right combination of bore, keyway, and tooth count.
I've got the drive wired up in step/dir mode as I don't have any +/-10V output options on my bench test breadboard at the moment.
Using the DMM tuning software, I was able to put a quick auto-tune on it, and I've got it moving around under LinuxCNC control using position control from a stepgen in the Mesa. It sure seems to move the heavy table with an extra 100lbs on it like it's nothing, at some pretty absurd rapids (350+ inch/minute).
I need to decide if I'm going to either build or buy a means of getting +/-10V output so I could try running the drive in torque or velocity mode. With step/dir I'm limited to position mode, or faking velocity mode using the stepgen velocity output mode.
I also have not yet wired up the drive's encoder outputs, but they are available on the 9 pin connector on the drive. That will be necessary to play with velocity or torque mode.
I was able to temporarily mount the 80 frame motor into the same mount as the original brushed DC motor, though only two bolt holes align in the motor slots - good enough for testing, but I'll have to modify the mount if this becomes a permanent thing. For testing, I 3D printed a custom Gates HTD 5M 17T pulley for the AC servo's much larger 19mm shaft, as there's no off-the-shelf availability with exactly the right combination of bore, keyway, and tooth count.
I've got the drive wired up in step/dir mode as I don't have any +/-10V output options on my bench test breadboard at the moment.
Using the DMM tuning software, I was able to put a quick auto-tune on it, and I've got it moving around under LinuxCNC control using position control from a stepgen in the Mesa. It sure seems to move the heavy table with an extra 100lbs on it like it's nothing, at some pretty absurd rapids (350+ inch/minute).
I need to decide if I'm going to either build or buy a means of getting +/-10V output so I could try running the drive in torque or velocity mode. With step/dir I'm limited to position mode, or faking velocity mode using the stepgen velocity output mode.
I also have not yet wired up the drive's encoder outputs, but they are available on the 9 pin connector on the drive. That will be necessary to play with velocity or torque mode.
Attachments:
The following user(s) said Thank You: besriworld
Please Log in or Create an account to join the conversation.
08 May 2024 14:20 #300126
by Tinine
2-74HC4050 (level-shifter, 5V to 3.3V)
1-MC3486 (differential line receiver - assuming that the encoder has diff outputs)
1-MC3486 if the pulse/dir is differential
1-MCP4922 DAC
1-OP-amp (TL072 or LM358)
2-LS7366R (one for quad decode and one for pulse/dir)
1- +/- 15V PSU (although I seem to remember that +/- 12V was fine. Bit fuzzy on that one)
Might not need the LS7366Rs because the PIO of the Pico can do it. I am already doing high-speed quad decode
but need to look at the pulse/direction thing.
Craig
Replied by Tinine on topic Dual PID loops with motor encoder + scale encoder per axis
1-RPi Pico
I need to decide if I'm going to either build or buy a means of getting +/-10V output so I could try running the drive in torque or velocity mode. With step/dir I'm limited to position mode, or faking velocity mode using the stepgen velocity output mode.
2-74HC4050 (level-shifter, 5V to 3.3V)
1-MC3486 (differential line receiver - assuming that the encoder has diff outputs)
1-MC3486 if the pulse/dir is differential
1-MCP4922 DAC
1-OP-amp (TL072 or LM358)
2-LS7366R (one for quad decode and one for pulse/dir)
1- +/- 15V PSU (although I seem to remember that +/- 12V was fine. Bit fuzzy on that one)
Might not need the LS7366Rs because the PIO of the Pico can do it. I am already doing high-speed quad decode
but need to look at the pulse/direction thing.
Craig
Please Log in or Create an account to join the conversation.
- TangentAudio
- Offline
- Senior Member
-
Less
More
- Posts: 74
- Thank you received: 19
16 May 2024 17:46 #300770
by TangentAudio
Replied by TangentAudio on topic Dual PID loops with motor encoder + scale encoder per axis
Still tinkering on this as time allows. I did some junk box engineering this week and put together a little isolated PWM+direction to +/-10V circuit. Now that it's validated I can reconfigure the servo drive from step+direction to analog input.
Seems to be nice and linear.
.. but it won't win any awards for the neatest prototyping job I've ever done.
Seems to be nice and linear.
.. but it won't win any awards for the neatest prototyping job I've ever done.
Attachments:
The following user(s) said Thank You: tommylight, Tinine
Please Log in or Create an account to join the conversation.
20 May 2024 14:39 #301011
by Tinine
Replied by Tinine on topic Dual PID loops with motor encoder + scale encoder per axis
The following user(s) said Thank You: TangentAudio
Please Log in or Create an account to join the conversation.
- TangentAudio
- Offline
- Senior Member
-
Less
More
- Posts: 74
- Thank you received: 19
20 May 2024 15:04 #301012
by TangentAudio
Replied by TangentAudio on topic Dual PID loops with motor encoder + scale encoder per axis
Thanks, Craig. Over the weekend, I managed to get a half decent tune with the drive in velocity mode (analog input). Velocity loop closed on the drive, tuned using the DMM software, and position loop closed on the LinuxCNC side using the drive's encoder output only for feedback (no table scales yet).
I finally feel like I am gaining understanding and confidence with the loop topologies and tuning process. Taking my time with it and getting my brain wrapped around it has proven valuable so far. Next up will be resuming experiments with adding the table scales back into the mix, and maybe later if I'm feeling bold I can try my hand at switching the drives to torque mode as you suggested a while back.
I'm also keeping an eye on ebay to try to find a mate to this single 750W DMM servo motor + drive that I have. I can't really justify buying new for this conversion when the original DC servos are honestly probably fine for my intended use, but I would like to ditch them in the name of modernity (and electrical cabinet real estate) anyway.
I finally feel like I am gaining understanding and confidence with the loop topologies and tuning process. Taking my time with it and getting my brain wrapped around it has proven valuable so far. Next up will be resuming experiments with adding the table scales back into the mix, and maybe later if I'm feeling bold I can try my hand at switching the drives to torque mode as you suggested a while back.
I'm also keeping an eye on ebay to try to find a mate to this single 750W DMM servo motor + drive that I have. I can't really justify buying new for this conversion when the original DC servos are honestly probably fine for my intended use, but I would like to ditch them in the name of modernity (and electrical cabinet real estate) anyway.
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Advanced Configuration
- Dual PID loops with motor encoder + scale encoder per axis
Time to create page: 0.360 seconds