Log in

View Full Version : Delaying/Dampening motor response


cadets
05-02-2004, 13:26
I need to know how to delay or dampen motor responses to the joystick input.
:confused:

Mark McLeod
05-02-2004, 14:36
I need to know how to delay or dampen motor responses to the joystick input.
:confused:

It's discussed in this thread.
24613

KenWittlief
05-02-2004, 15:09
that other thread is kinda of hodgepodge of questions and answers, with several different problems/solutions being discussed.

Im assuming from your question that you dont want the operator to be able to slam the motors from full forward to full reverse - that you want the software to filter the commands so the motors dont take such a pounding?

I can understand wanting to do this - the motors are very powerful and you can break small gears and pins in your drivetrain if they are not up to the task - but filtering the response to the joystick input is like adding inertia to your bot - like adding a lot of weight to it

which means, it will speed up gradually, and slow down and stop gradually - this will protect the drivetrain, but your robot will handle like a bucket of jello on ice

If you want to have a safe mode, or new-driver pratice mode, I would suggest simply scaling the joystick signals, so that full forward is only 1/2 or 1/4 forward - this is easy to do by dividing the joystick variable by 2, then adding 64 to get 127 back to 'zero', or dividing by 4 and added 96.

In the competition you want a skilled driver who wont slam the joysticks back and forth - who will drive with a steady hand on the throttles - and you want a bot that CAN slam into reverse, or spin on a dime, if necessary in the heat of battle - as long as the driver only uses all that power only when necessary.

Robby
05-02-2004, 18:00
you could also just record the last used pwm value and compare it to your desired pwm value and if the two are more than so far apart, add or subtract only a certain percentage of the change desired by the joystick input?

- hope that makes sense

Venkatesh
05-02-2004, 18:27
Our team has given some thought to the issue of smooth joystick control and the like.

Last year, we did some tests with recording prior pwm values and stepping up or down in small increments to reach a desired speed. However, the robot became very difficult to handle as certain motions of the joystick would take time to become apparent.

We also attempted something interesting. We used an x^3 (i forgot the other terms of the expression, but this was the largest) curve, so that our joysticks were very sensitive (small changes in input value -> precise changes in output) near the center, but relatively insensitive in the end. We added some ramping code to the curve, so that changes wouldn't be abrupt.

We discovered that if drivers need to get used to only one thing (ramping) they get frustrated, but if they have to get used to two things (ramping and non-linear joystick), they are happier.

I also had had the idea to use inductors in between the joysticks and the OI. I did some testing, and the 2004 OI doesnt like it. It sometimes fails to recognize the existance of the joystick. I have not tried capacitors to smooth the output yet.

Our conclusion: train the driver to not jam on the joysticks.