PDA

View Full Version : Servo for camera follow focus system



Martin Amada
03-12-2009, 10:57 AM
Hi, it's my first post. I'm an independant filmmaker and build all my own camera rigs.

I've constructed a remote follow focus using R/C equipment. It includes a Hitec 785 boat winch servo and Futaba two channel transmitter with a dial.

A large gear goes around one of various camera lens and is driven by a smaller gear that is attached to the servo hub. The aim is to be able to set two focus points (lens positions) and switch back and forth between them by rotating the lens using the transmittor's dial. Sometimes the lens has to rotate more than halfway around, so a servo with maximum rotation such as the 785 is needed.

The system works except that the servo is slightly overshooting the mark and then oscillating. With high definition video this is a no-no. The servo needs to stop exactly where I expect it to with no oscillation so I can acheive critical focus and maintain it until the shot is over.

It's been suggested that Trossen's Robotis AX-12 servo would be a better choice. Are these digital servos controlled using standard R/C equipment or is additional hardware and programming skills needed? Does this servo have the accuracy I'm looking for and the torque needed to turn the lenses?

Martin

DresnerRobotics
03-12-2009, 11:46 AM
Welcome to the forums!

Do you know exactly how much rotation you need on the servo itself?

Oscillation can be caused by a couple of things, noise on the signal, noise on the RF link, over torqueing the servo (I doubt this is the case as it doesn't sound like a high torque app), etc. It could also be the pot itself getting a bad read internally on the servo, have you tried replacing the servo itself?

The AX-12s have a 300 degree positional rotation and are pretty high torque, however they would not be compatible with your receiver directly (with uses PWM, AX-12s use TTL serial). You would have to implement a microcontroller as an in-between. The micro would read the PWM output from the receiver and output the proper TTL serial string to communicate with the AX-12.

Martin Amada
03-12-2009, 09:28 PM
Thank you Andrew, and thanks for allowing me to benefit from the knowledge here. I've attached a photo so you can more easily visualize the app in its current form.

Obviously the larger the gear that is attached directly to the servo, the less rotation I need. But there is a limit to how large I can go, and the new gear will probably have to be custom made. But that's okay.

Let's assume I achieve a better than 1:1 gear ratio between these two gears. The amount of rotation I need for a given shot then depends on the lens I am using and the length of a given focus change. Let's assume that 300 degrees is enough when using the following set-up methodology. The servo is disattached (swung away from) the lens. The lens is rotated to the counterclockwise extreme of the focus change and the gears are re-meshed. At this point the servo should also be moved to its counterclockwise limit, and this position would be marked on the transmitter dial. Now the servo is ready to move in the other direction. To set the second focus point it is rotated until that part of the image is in focus, and another mark is made on the transmitter dial. (These two marks are presumably within the rotational limits of the servo.) It must now be possible to move back and forth between them with good speed and a very high degree of accuracy.

In answer to your question, no I have not tried another servo as this is the only one I have. The tech person at the vendor (to whom I also put this question) suggested another model with a smaller range of movement might be more accurate with less oscillation. Unfortunately here in Phhnom Penh there are no R/C hobby shops, so that complicates my R&D efforts.

What is the advantage in using this actuator/servo? It is highly accurate? What is involved in creating the microcontroller solution you said is necessary? Does it mean programming and burning a chip and integrating it into a circuit with connectors etc? That's beyond my capabilities. However if I found someone to do it, would this then be compatible with a standard R/C transmittor and capable of the accuracy needed?

Many of my colleagues in the world of DIY camera rig building will be following the results of this effort. The professional quality remote follow focus systems now on the market are beyond the means of many. I might be able to interest people in a group effort.

Martin

Adrenalynn
03-12-2009, 09:55 PM
Welcome to the forum!

The AX12 is not meant to be R/C controlled. Could you design a circuit and programming to build a PWM to ttl serial control for it? Sure. But I wouldn't go there myself. R/C, especially that car R/C controller, just isn't meant for this.

Myself, I'd use something like the AX12 interfaced to something like the Arduino, then use a serial trackball or variable resistor to control it. Something very high resolution. Even a variable resistor (as a "dial") would give you 1024 steps from the 10bit ADC on the Arduino.

Martin Amada
03-12-2009, 10:33 PM
Thanks. Ideally what we need however is a wireless solution. The follow focus will be used on devices such as a steadicam, camera crane, dolly, camera rigs that are moving around and that the focus puller needs to be able to control without being tethered to them. Can an Arduino project work wirelessly?

Martin

DresnerRobotics
03-12-2009, 10:50 PM
What sort of radio are you using? Its entirely possible you're running into RF interference.

Adrenalynn
03-12-2009, 10:52 PM
I fly a Steadicam, and am certified (and used to have my SAG card). I can relate to your requirements for pulling focus.

I have an Arduino working with XBee wireless. You can literally get miles away with the right choice.

Tyberius and Fergs have an Arduino-like board with built-in XBee wireless.

Understand though that the project would still require programming. You need to bit-bang serial out to the servos from some DIO pins. And you'd probably be needing two arduinos. One for input/transmitter, one for output/receiver.

That said, my Arduino -> SSC-32 wireless arm controller (soon to be published in SERVO with a build article) is basically the same idea.

Adrenalynn
03-12-2009, 10:52 PM
The car R/C TX are notoriously inaccurate anyway, unless you have some like super-honking-butt-kicking Airtronics or something.

jes1510
03-12-2009, 11:15 PM
The Arduino has some libraries already put together for servos. Check out www.arduino.cc for more info.

Martin Amada
03-12-2009, 11:23 PM
Will your build article include a parts list and tutorial? I can use a soldering iron and have done a bit of programming, but I would need to get on a new learning curve for this, and don't have any hardware for burning chips etc. I don't think I want, nor do I have the time to go to this level.

I don't know what XBee wireless is.

Am I likely to be able to find someone who can build this (or some of the elements) without paying a fortune?

When you mentioned 1024 steps from the pot, is that the answer to my question about accuracy?

When you say R/C TX are notoriously inaccurate are you talking about the transmitter? Does that imply that a wired in controller with perhaps a better R/C servo would produce a better result?

Martin

Martin Amada
03-12-2009, 11:30 PM
I guess I had better look into the Arduino site and come back again when I have a better overview of what is possible and am a bit more familiar with the terminology.

Martin

Adrenalynn
03-13-2009, 12:43 AM
We're more than happy to answer your specific questions like this, Martin. You're doing a great job asking them, imho! No reason to ship you off to the Arduino site before you even know what you're reading!

Jes - I haven't seen any libraries for the AX12 "smart servos" - does the latest Arduino libraries have support?

The 1024 is the number of samples or "range" the potentiometer's analog values will be converted (digitized) to. The Arduino has 10bit analog to digital conversion (ADC).

So there will be 1024 distinct values.

My article will have parts list and source code. No need to "burn" the Arduino, it comes with a bootloader and free software. You just plug it into USB or a serial port (depending upon version) on your PC and upload software to it. Unplug it and start running.

My article will cover interface to the SSC-32 over wireless which is a traditional analog servo interface, not an AX-12 interface. But we can certainly help you bit-bang out to an AX-12 here. I wrote some code, thanks to Andrew "Tyberius" for his xmas/birthday present to me, to drive the AX-12's on the Arduino.

Martin Amada
03-13-2009, 02:54 AM
Thanks. For what it is worth I built my steadicam from scratch over the course of a full year, so I'm not a fainthearted DIYer. It's just that electronics is not my strong suit.

I looked at the arduion site briefly. Is this maybe the library to which Jes was referring?
http://arduino.cc/en/Reference/Servo

Adrenalynn if you fly steadicam you understand the app as well as anyone. Do you use a follow focus? How about a wireless video tap so your focus puller can see what you're shooting? (sorry to digress there.)

If I don't need a smart servo and can find a solution driving the analogue one I have now or a similar one, great. I look forward to seeing your article. Maybe it will provide the inspiration needed to find the time for this. Will there be a sneak preview here?

What I'd like to (must) avoid is spending time and money to rebuild the rig only to find it doesn't perform better than what I have now. But you guys must have precedents for this if anyone does? Can my aim be achieved without spending more than $100-$200 on parts, and weeks of study?

Please let me know if I've got this workflow straight.

1) I buy the Arduino board(s) and the Xbee board that piggybacks on.
2) I download the software to use them which is written in java.
3) I figure out what pot I need and get a housing for it, and wire it to the output board.
4) I decide what servo I need. Analogue or digital? Torque is less important than accuracy. I wire that to the input board.
5) I find a library (script?) that will program the Arduino board to turn the servo left and right using the pot
6) I program the board(s) via the computer's USB port, using the script. I also need to program which signals go to which pins?
7) I power the boards and servo. But how?
8) When I'm finished, turning the pot and stopping it stops the servo on a dime (or a pinhead in this case) with no oscillation. My range is equal to the servo's range?

Would it be worth trying a better quality R/C servo and controller before going to these lengths?

Martin

jes1510
03-13-2009, 09:29 AM
Do'h! I seemed to have glossed over the part where you specified the AX-12's, I was talking about standard PWM servos. I don't think it would be a big deal geting them working with an Ardui9no though.

lnxfergy
03-13-2009, 11:50 AM
Do'h! I seemed to have glossed over the part where you specified the AX-12's, I was talking about standard PWM servos. I don't think it would be a big deal geting them working with an Ardui9no though.

The big thing I see there is that the Arduino has only 1 hardware serial port... you might find that having the XBEE on the HW port, and then bit-banging the AX-12s is tough... especially when you have RX interrupts creeping up on the HW port. A chip like the 324P or 128 would have multiple ports and might be better suited... (I do have an AX-12 driver for Serial1 on a 324P... no sync write yet as I haven't finished specing a format for holding the positions...)

-Fergs

jes1510
03-13-2009, 11:56 AM
Swapping them might work. Put the AX-12's on the hardware port and the XBee on a software serial port.

MikeG
03-13-2009, 12:47 PM
You could go with a Parallax Propeller.

1) Process the PWM from the RC receiver.
2) Convert the pulse width to an AX-12 instruction.
3) Query the AX-12 for current position, voltage, load, speed, and temperature.
4) Send the result out via an RCA connection to a monitor or via TTL to an LCD display

Everything you need is already written except for the PWM to AX-12 command which would only take me a few minutes. With servo position feedback, it would be a little easier to control. Plus the Prop has 8 cogs (parallel micros) and for this application you would only need two or three depending on design.

You can take the RC out of the picture and go with a good variable resistor and simply read RC time. As investigated in this post already, you can also use xBee as your wireless link. And again mods already exist for reading RC time and xBee interfaces.

mannyr7
03-13-2009, 06:23 PM
Maybe this is too simplistic, but couldn't you get a ESC, rig up a standard 540 size motor mount instead of the servo and control it using the adjustable endpoints and trim built in to your existing R/C setup? If this wouldn't be accurate enough, possibly incorporate some optical detectors attached to the ring gear on the lens running off a board with H bridge/gearhead motor and minimal sensor support?

Martin Amada
03-13-2009, 09:38 PM
Simple is good if it works. Whatever will work the first time is best.

I'm in Phnom Penh Cambodia where the local electronics supply shop resembles what was seen in the Western world oh maybe 30 years ago. There are resistors, caps, pots, wire (not all gauges) and a few tools. No servos, no microcontrollers, no Xbee boards and no one who knows anything about this stuff. Fortunately I can order from the Internet but if I'm going to attempt to build this myself I need to get everything I need all in one go or the shipping and customs will kill me. So guys please consider my situation in this context.

Moreover I am not a robotics or even an electronics hobbiest. For example I just learned what PWM stands for, having Googled it. I don't know what ESC stands for, except the escape key on the computer. That's where I'm at.

So here are what I see as probably my only two realistic options.

1) Someone builds and programs this for me. I don't need any of the parts put in enclosures or any gearing. I'll do that myself. I just need it all (pot, boards, software, servo) wired together and working out of the box when it arrives. If I'm given a parts list I can order everything on the Internet and have it shipped to the designer/builder anywhere in the States.

or

2) Someone supplies with me with a parts list and tutorial first having somehow verified that these will produce the desired result, and then I try to build it myself.

Is there anyone out there who would consider one of the above arrangements?

Martin

mannyr7
03-14-2009, 12:03 AM
ESC= Electronic Speed Control, see--> http://www3.towerhobbies.com/cgi-bin/wti0001p?&I=LXGZX1&P=ML
540= standard R/C car motor size ---> http://www3.towerhobbies.com/cgi-bin/wti0001p?&I=LXULR5&P=7

Martin Amada
03-14-2009, 05:31 AM
Thanks Manny, but there doesn't appear to be a gear train on that motor. I think the shaft will spin much too fast for this app.

Martin

Adrenalynn
03-14-2009, 01:38 PM
I can't see a reason for using an electric motor. A lot of complication, and by the time you geared a 540 down enough it would rip the lens off the camera and beat you with it. A pair of 540's will drive a 50lb robot around just fine when geared down. Those are drill motors.

The king of accuracy for what you're looking to do is the stepper motor. More complex for the novice, but the repeatability is practically guaranteed.

I just don't have time right now to even consider another project...

Nic Jackson
06-11-2009, 02:12 PM
Hello

My name is Nic and i am also a Steadicam operator and i am also making a remote follow focus unit! :)

I stumbled across this forum string and you guys have been talking about what i have been trying to do for the past month or so. I have already have myself an Arduino and have been playing around with it for a while.

From what i have read you guys say about using a Dynamixel AX-12 as the servo motor to control the lens and from the videos i have seen of this in action i think it could just work. I have tested other expensive servos with no luck here is a link to one i tested out:

http://www.vimeo.com/4885222

I am also having problems when it comes to the programming and circuitry. This is what i would like to make:

http://farm4.static.flickr.com/3655/3617650174_dc3c404319_o.jpg

Any ideas or feedback would be great,

Thanks,

Nic

Adrenalynn
06-11-2009, 02:34 PM
Hi Nic,

Welcome to the forum! What kind of servo is that in the video? I'm generally not accustomed to plastic splines and plastic servo horns being "high end". I could be a programming issue - or it could just be the choice of servo is holding you back

Nic Jackson
06-11-2009, 03:15 PM
Its a Align digital servo, it was way to noisy anyway and also only moved 60. i Need a servo that is almost silent but at the same time drive a lens.

I basically need to program the board so that when the user turns the potentiometer and sets it in a particular place on the lens, they can then hold down a button for 3 seconds and then it sets that point as being the stop point and if the user turns the potentiometer past that point the motor stops turning.

Its so frustrating ( but also fun ) when you know how it should be and can build the unit but when it comes down to building the electronics its not my strong area :(

Once i have the electronics sorted i can then build and machine the the motor case,receiver case and transmitter case!

I was thinking about hiring a coder, but i should do it myself!

How would you approach it?

Adrenalynn
06-11-2009, 03:29 PM
Well, I'm used to my mics being off-camera, so the volume doesn't make as much difference to me. A servo is not going to be "quiet". Probably a mechanical linkage, and place the servo in a sound-tight box?

A lot tougher programming challenge, but I'm still a fan of stepper motors in this application. Once you figure out the electronics, then we can whip up the programming, I'm sure.

Nic Jackson
06-11-2009, 03:33 PM
Ok well sounds good to me i will have a look into stepper motors and how i can implement them.

Will get back to you when i have had a look into it and feel i need some more advice.

Many thanks,

Nic