While testing some PID code discused in This Thread “PID with encoder”](http://www.chiefdelphi.com/forums/showthread.php?threadid=140910) of our team. We had the min/max output set to -0.1 , 0.1. When driving to a set point that took some time to finish the Talon frequently stopped/started and the LED went from green-orange-green or red-orange-red depending on the directions. I looked through the talon Talon_User_Manual_1_3.pdf documentation and found that the Talon will blink Orange if Disable ( I don’t believe to be the case here) , If the PWM is lost, or throttle
is within the 4% dead band. How can I isolate the possibilities? Seems that i could be possibly operation in or near the dead band?
Sounds like your problem is you are going into and staying in the deadband zone for a noticeable amount of time. If your max is .1 (10% of full throttle) and your min is -.1, 40% of your range is in the deadband zone. Besides not being on a good place on the motor curve, you are going to have a hard time controlling your movements when 40% of speeds get cut off to 0. Sounds like you may need a larger gear reduction on your motor (or find a slower motor). Is there a reason you are limiting the output so severely besides speed? Maybe try re-tuning the PID coefficients and reducing the output limits.
It does sound like you’re near the deadband. One way to tell is to hook up an oscilloscope to measure the PWM waveform… 1500 microseconds is the “0” or neutral position.
A quick and dirty way could be to just print the motor output values to screen and see if you’re near 0.
I was just teaching the concept of PID and to slow things down to a point we could see it in action is why we set the limits so small. For testing purpose I will scope it as well but it good to hear I was possibly on the right track with dead band. In a competition set up I know this would be undesirable. This was classroom stuff with no load spinning a wheel a given deg.
For your demo, you’d be better off going at full speed with a smaller motor geared down than low speed with a larger motor. Not only is the deadband effectively narrower, you’ll have a lot less effect from the motor resistance (that is, the current drawn by the motor when spinning free, not just its literal electrical resistance).
Agreed, It was what we had already. I been working with two first year freshmen kids that wish to be programmers. Team has/had a Senior member that has been MIA all preseason and I’m not banking on him for the build season. No major loss to the team only his expanding knowledge since the team has rarely used any feed back devices on past robots because they simply could not get them to work or didn’t know how to use them. This year is new and exciting I can see in the Veteran students and mentors eyes they are excited with all the new functionality of using feedback and if the senior shows up I with the Freshmen can get him caught up on everything he missed.
Follow up.
I found today as I was testing some other code with hobby servos I had the same pause. Turns out with further investigation I had packet loss every 12 seconds in the Diverstation status trend. This matched the pause spot on. With a bit of searching I found others had this issue as well after installing Autodesk Inventor. Yes I just installed this too. I killed the Autodesk update manager and trouble are gone. Used System configuration to disable all Autodesk apps from starting on boot.
At the office (where we build and use a number of data collection and classified computers) we have a name for this:
Phone Home (v. int.), 1. The act of checking in with one’s family (that is, entities derived of the same source as oneself). 2. A good thing for E.T. 3. A bad thing for time-critical software running on hardware that is disconnected from the internet.