Jumpy speed reporting on MDC2230
8 years 11 months ago #29529397
by jgannon
Jumpy speed reporting on MDC2230 was created by jgannon
I have my encoder plugged into the MDC2230, and for the purposes of debugging I have the motor connected to a power supply. Using a stopwatch I've determined that it's steady around 35 RPM. In Roborun+, I've set the Pulses/Rev to 1024, and the Max Speed (RPM) to 60. When I switch to the Run tab to monitor Speed 1, the reported value jitters between 29 and 43 RPM. It isn't varying over that range; it's only ever one of those two numbers. If I turn up the voltage on the power supply, the motor speeds up, and the reported speed jitters between 43 and 58 instead. Again, no other values in that range, just 43 or 58. Is this really as good as the resolution gets, or do I have something misconfigured? Thanks in advance.
Please Log in or Create an account to join the conversation.
- Griffin Baker
8 years 11 months ago - 8 years 11 months ago #29529398
by Griffin Baker
Replied by Griffin Baker on topic Jumpy speed reporting on MDC2230
Is this operating in an open loop mode or a closed loop mode?
The resolution of the encoder will determine how accurate the readings will be. The better the resolution (samples taken) the better the results.
Interesting that the motor speeds up if you increase the voltage. Understandably the voltage rises, and current consumption gets reduced and vice versa.
The resolution of the encoder will determine how accurate the readings will be. The better the resolution (samples taken) the better the results.
Interesting that the motor speeds up if you increase the voltage. Understandably the voltage rises, and current consumption gets reduced and vice versa.
Please Log in or Create an account to join the conversation.
8 years 11 months ago #29529399
by jgannon
Replied by jgannon on topic Jumpy speed reporting on MDC2230
It's currently set to closed loop speed, but I'd hope that wouldn't matter. As I mentioned, I have my motor connected directly to a power supply for the purposes of debugging this.
Please Log in or Create an account to join the conversation.
- Griffin Baker
8 years 11 months ago #29529400
by Griffin Baker
Replied by Griffin Baker on topic Jumpy speed reporting on MDC2230
If the speed is jumpy, then it is most likely that your PID is not properly tuned, or another parameter is the cause(speed and acceleration parameter).
Our controllers provide a PWM output, where as the power supply does not.
Our controllers provide a PWM output, where as the power supply does not.
Please Log in or Create an account to join the conversation.
8 years 11 months ago #29529401
by jgannon
Replied by jgannon on topic Jumpy speed reporting on MDC2230
The actual speed of the motor is not jumpy at all. It is at a consistent ~35 RPM, based on my observation. It's the reported speed that is jumpy, by a factor of 50%. Since it's just bouncing between the same two values, it seems suspiciously like a resolution issue. Does that make sense?
Please Log in or Create an account to join the conversation.
- Griffin Baker
8 years 11 months ago #29529402
by Griffin Baker
Replied by Griffin Baker on topic Jumpy speed reporting on MDC2230
Have you checked to see if maybe your encoder A and B lines are swapped.
Also, one more thing that is overlooked. Did you disable the pulse inputs 1 and pulse inputs 2 completely? Remove the checked boxes in the input use section of each pulse inputs?
Also, one more thing that is overlooked. Did you disable the pulse inputs 1 and pulse inputs 2 completely? Remove the checked boxes in the input use section of each pulse inputs?
Please Log in or Create an account to join the conversation.
8 years 11 months ago #29529403
by jgannon
Replied by jgannon on topic Jumpy speed reporting on MDC2230
A and B channels are wired correctly, and pulse inputs 1 and 2 are disabled.
Here's a short video of what I'm seeing in Roborun+: www.youtube.com/watch?v=MDAUyEymrZY
I went ahead and connected a scope to the encoder, and verified that the signal is not varying like the software indicates.
Here's a short video of what I'm seeing in Roborun+: www.youtube.com/watch?v=MDAUyEymrZY
I went ahead and connected a scope to the encoder, and verified that the signal is not varying like the software indicates.
Please Log in or Create an account to join the conversation.
- Griffin Baker
8 years 11 months ago - 8 years 11 months ago #29529408
by Griffin Baker
Replied by Griffin Baker on topic Jumpy speed reporting on MDC2230
Not that I think this will solve the problem, but lets' give it a try. I've attached the encoder cpld code. In the utility, go to the console tab and click on Update control unit logic.
Then load the file and program.
Then load the file and program.
Please Log in or Create an account to join the conversation.
- Griffin Baker
8 years 11 months ago #29529410
by Griffin Baker
Replied by Griffin Baker on topic Jumpy speed reporting on MDC2230
What is the make and model of the encoder you are using? Correction to my previous posts regarding pulse inputs. The MDC2230 does not require them to be disabled since the encoder lines are not on the DB15 I/O connector.
If these are open collector encoders, you may need to add a pull up resistor between 5V and the encoder A and B lines.
If these are open collector encoders, you may need to add a pull up resistor between 5V and the encoder A and B lines.
Please Log in or Create an account to join the conversation.
8 years 11 months ago #29529417
by jgannon
Replied by jgannon on topic Jumpy speed reporting on MDC2230
The encoders are line drivers. I can't imagine that'd be the problem. Did you watch the video I posted? It really, really looks like a discretization problem.
I tried applying the update, and it hung (screenshot attached). Now the USB won't come back up, even after trying the factory reset, so now I've got two problems. :(
I tried applying the update, and it hung (screenshot attached). Now the USB won't come back up, even after trying the factory reset, so now I've got two problems. :(
Please Log in or Create an account to join the conversation.
Moderators: tonysantoni
Time to create page: 0.103 seconds