I have built a pan/tilt head that is powered by two DC motors in an open loop configuration. I control them with a joystick. I follow speakers on a stage with this setup, and there have been some unforeseen limitations to the open loop system.
When people are speaking on stage, it is very rare that they stand absolutely still. They shift their weight, make small movements, and walk from side to side. While open loop control is awesome for following the large movements, it is quite incapable of making the tiny adjustments required of my setup when people make small movements. Is there any way to move to a closed loop system, while maintaining the open loop functionality?
Ideally, this would happen:
I have one joystick that controls gross movement in an open loop configuration. ie. following speakers as they walk across the stage/out into the audience. I also need to be able to leave the camera in whatever position the joystick is returned to center at. (I haven't seen a way to do this with closed loop as it moves the motors in positional relation to the joystick, so when the joystick springs back to center, it would return the camera to its "center" position)
I would have a second joystick that runs in a closed loop configuration and moves each axis, say +/-5 degrees from its current position in order to follow the small movements people make.
short of mounting my open loop system inside a separate closed loop system, is there any way to do this? I can work out the math of how to shift the center +/-5 degrees from current position easily enough, but I am unsure of how to make both of them work at the same time.
Hi,
You can make the joystick a proportional system.
You have a variable that represents the output position.
The joystick only increments or decrements that value when it is one way or the other from centre, the speed of the motion depends on how far the joystick is from its central position.
The joystick central position does nothing to the variable.
So your joystick is now a direction/speed control not a direct position control. Just like a fighter pilot.
I hope you are using real joysticks with potentiometers and analog output, not those twiddly things that have switches and a digital output for the four directions.
I have some questions that will perhaps get you thinking about the issues in play from a more practical perspective - rather than defining a solution (closed loop) before you've defined the problem.
What is your current systems angular resolution? Or, perhaps an easier measurement would be to ask what is the minimum distance that can move your spotlight at the normal target distance? One foot, one inch, one Furlong, half a cubit, whatever units you use.
Why do you think you need two systems? A brief answer is fine.
Could you briefly explain both the physical and functional differences between your current system and a closed loop system?
That should be enough to get the conversation off to a good start.
Maybe if you make the large-movement joystick work like in the excavator it would be sufficient for the small-movement joystick to retain its natural self-centering behaviour without the need for a more complex control system. Release the small-movement stick before moving the other one.
The small-movement joystick could add (or subtract) a little bit from the position determined by the large-movement joystick.
Of course you could ignore the small movements and just show up the speakers who have not learned to stop fidgeting when speaking in public.
TomGeorge:
I hope you are using real joysticks with potentiometers and analog output, not those twiddly things that have switches and a digital output for the four directions.
Tom.....
Tom: Yep - real analog joysticks here. Using potentiometer at the moment, but am heavily considering going to a Hall effect analog joystick in my next design iteration.
Avr_fred:
1)
Angular resolution is difficult to estimate due to my lack of proper measuring equipment. (Would need a laser measuring device for those distances) but I need to be able to easily track an 8 inch movement at a focus distance of 40 feet or so.
2) My thoughts on two systems stem from my inexperience with closed loop systems. for simplicity, let's just consider panning motion - if you have a closed loop base that can move +-5 degrees from center that is controlled by a joystick that is positionaly related to the base, you would then mount an open loop system atop the closed loop base. That way you continually have a +-5 degree control over the current camera position no matter its speed or current position. However this is more expensive and I'd like to avoid it if possible.
Current Physically: I am using a stripped down CamRanger on tilt head. It consists of two small dc motors that are run through two worm gear reductions each.
Current functionally: I have stripped all control from the CamRanger (as it was terrible for this application) and wired the motors directly to my arduino's motor shield (seed v2). In order to overcome the startup friction issues, I use my joystick to control duty cycle and set the frequency as low as I can. This causes large vibrations or chatters as I am hitting the motors with a large burst of full current/voltage and then I let the optical stabilization of my camera remove the vibrations from the video. The problem I have may be totally due to undersized motors. If that is the solution to this then that is perfectly fine.
Proposed physical:
larger dc motors with suitable reduction, torque, and some sort of positional feed back (I tend to lean toward a rotary encoder from past CNC experience)
Proposed functionality:
Large gross movements controlled in a way similar to the current open loop setup. Ie, joystick center is 0 motor rpm, and the RPM is proportional to joystick position. Smaller movements are in a typical closed loop setup where deviation from current position is proportional to joystick position.
Robin:
I am following a Pentecostal preacher. If you can get one to stand still, I'd like to know how I will check out your link though - it sounds promising.
So I have wrapped my head around Tom's suggestion now, and while I can stand some jitter in the system, the image stabilization can only do so much - when incrementing/decrementing the positional value, what does a typical step response look like?
Obviously, with this system, the proportionality of this system would be in the speed of the incrementation and not the actual speed of the motor.
So, let's say I wanted to move between two "steps" very slowly, the motors would simply move from position A to position B as quickly as possible - even though point A and point B may be very near each other correct?
I can see this being an issue if I use an encoder on the position of the pan/tilt as a whole, and less so if I instrument the position of the motors and calculate the final positions instead. In the latter case, due to the gear reduction I assume the jitter would be sufficiently small? What does this do to gear slop?
I have not considered using stepper motors - would they be superior to an equivalent DC/encoder feedback loop?
Honel:
while maintaining the open loop functionality?
Define 'open loop functionality'.
Honel:
(I haven't seen a way to do this with closed loop as it moves the motors in positional relation to the joystick, so when the joystick springs back to center, it would return the camera to its "center" position)
You're looking for closed loop 'velocity control' - let the joystick define the velocity instead of the position.
Maybe is that what you meant by open loop functionality?
Honel:
So, let's say I wanted to move between two "steps" very slowly, the motors would simply move from position A to position B as quickly as possible - even though point A and point B may be very near each other correct?
Are you asking a question about a system using two joysticks - one for large-movements and one for small-movements OR are you talking about a system using one joystick?
The program in the excavator Thread uses the position of the joystick to control the speed, not the position. Or it could easily be modified to do that - it's a long time since I read it. It is up to the operator to relase the stick when the desired position is reached.