You want to zoom or focus a lens from your vision program. The lens in the box turns out to be small DC motors and a position potentiometer — no serial port, no driver to install. That is the common CCTV-style motorized zoom. It is driven with plain power electronics: a reversible voltage per motor, a position voltage coming back, and a short control loop. Below you get the voltage and current class to design for, the polarity-switching circuit that changes direction, and the potentiometer mapping that closes the position loop with the arithmetic worked through. You also get the decision on the auto-iris wires that most machine-vision cameras cannot feed. By the end you can wire the drive, calibrate the map, and know when a different lens is the better buy.
What do you need to drive a motorized zoom lens?
You need four things: a 12 VDC supply, a polarity-reversing driver (an H-bridge or a two-relay reversing switch) rated 500 mA or more per motor, one spare digital output pair per motor from your control system, and the lens's position potentiometer brought back to an analog input.
On the bench that list looks like this:
- a 12 VDC supply, 0.5 A or better, one per station — from here on, "the rail"
- one bridge channel per motor — zoom, focus and motorized iris if the lens carries them
- two logic-level digital outputs per motor
- one analog input per motor that reads a potentiometer
- the lens pin-out identified before power goes on: motor pair, pot track and wiper, auto-iris wires left alone
What voltage does the zoom motor take?
Design for a 12 VDC supply and a driver channel rated at least 500 mA per motor. Motors in this lens family draw up to about 60 mA each while running, and stall current at the end of travel climbs to several times that.
Lenses of this type specify an operating range of 6-12 VDC per motor. Run at the top of the range for full travel speed; a DC motor's speed tracks its supply voltage roughly linearly, so 6 V gives about half speed, and 50 % PWM on the rail lands in between without losing torque. Size the supply from the motor count: zoom, focus and iris at 60 mA each is 3 × 60 mA = 180 mA at full draw. A 500 mA supply carries the whole lens with a 2.8× margin, and a 500 mA bridge channel runs each motor at more than eight times its running current.
The number that matters beyond running current is the locked-rotor figure. When the barrel reaches its mechanical stop the motor stalls, back-EMF disappears, and current climbs toward several times the running value. The position loop below therefore stops the motor short of the stop instead of driving into it.
A minority of motorized lenses move on stepper motors instead. Those take pulse-and-direction signals rather than a reversed DC rail, and the stepper motor driving guide covering voltage, current and microstepping is the reference for that family.
How do you reverse the zoom direction?
Direction follows polarity: swap the positive rail and 0 V across the motor and it runs the other way. That is exactly what an H-bridge does, with two pairs of switches you never close at the same time.
An H-bridge sits the motor between two half-bridges. One diagonal ties the left motor terminal to the positive rail and the right to 0 V; the other diagonal reverses that. The H-bridge reference on Wikipedia shows the switch table. At 60 mA, relays do the same job — one DPDT relay wired as a reversing switch plus a run relay — at the cost of slow switching and contact wear.
Three firmware rules keep the hardware alive: never assert both diagonals, hold about 10 ms of dead time at every direction change, and gate both lines through one enable output so the power-up state is defined.
Speed control rides on top of direction: PWM the enable at a few kilohertz and at 50 % duty the travel takes about twice as long. To settle the barrel without chatter at the target, switch on both low-side switches for a fraction of a second — a dynamic brake that stops the rotor immediately.
Can a vision controller drive the lens, or do you need extra hardware?
A vision controller is the right place to run the loop. Its switched outputs — the light channels — source one polarity, so the controller commands the bridge and the bridge performs the reversal.
The controller earns its place for everything around the motors: it runs the cameras, fires the strobes, and can hold zoom moves between frames so the barrel is never mid-travel during an exposure. Log the wiper voltage with every acquisition and each image carries its zoom position with it. Filter the vision controllers by ports and channels to match your camera count.
The light channels run the illumination. The direction lines need logic-level digital outputs from your I/O, and the wiper goes to any analog input in the system. On channel count, the MV-VC3301H-128G66 provides five or more LAN ports, three or four USB 3 ports, four built-in light channels and 8 GB of memory; the MV-VC5525-256G70-NN steps up to PoE camera ports, eight built-in light channels and 32 GB of memory.
- LAN ports
- 5+ LAN ports
- USB 3 ports
- 3-4 USB 3 ports
- LAN ports
- 5+ LAN ports
- USB 3 ports
- 3-4 USB 3 ports
What is the potentiometer on the lens for?
That third wire is zoom position feedback: a potentiometer geared to the zoom mechanism. Its wiper voltage sweeps between two end values over the travel, and it is what turns a motor drive into a positioning system.
The track is a plain resistive element, commonly 1-10 kΩ, drawing 0.5-5 mA from a 5 V rail. Power it from the same clean 5 V that feeds your ADC reference so the counts do not drift with the supply. Wiper to the input, grounds shared with the bridge.
Two properties shape the calibration. First, the wiper is linear in mechanical travel, not in focal length — zoom optics compress the tele end — so calibrate voltage against measured field of view instead of assuming proportion. Second, the useful span is not the full 0-5 V: a typical unit reads 0.42 V at the wide end and 4.86 V at the tele end.
Command a fraction of travel by interpolating between the ends:
Worked example with a 12-bit ADC on a 5 V reference and a mid-travel target: V_target = 0.42 V + (4.86 V - 0.42 V) × 0.50 = 0.42 V + 2.22 V = 2.64 V, which is 2.64 V / 1.22 mV = 2163 counts. A ±5-count deadband is ±6 mV, about 0.14 % of the 4.44 V span — tight enough for framing, loose enough that the loop does not hunt.
Calibrate the map by measurement: at five wiper voltages spread across the travel, read the field of view off a ruler in the object plane. Then convert each one to an effective focal length with the focal length calculator:
How do you zoom to a saved position automatically?
To move to a saved zoom position, compute the target wiper voltage from the map, run the motor toward it, and stop when the reading enters a deadband of about five ADC counts, always approaching from the same direction.
The steps, in wiring order:
- Bridge: motor across OUT1 and OUT2, rail positive and 0 V to the bridge power pins, IN1 and IN2 to two logic-level outputs, bridge ground tied to controller ground.
- Potentiometer: track across the 5 V reference rail, wiper to an analog input.
- End stops in software: step toward wide in 300 ms pulses, reading between pulses. When the wiper has not moved for three consecutive pulses, record that voltage as the wide soft limit. Repeat toward tele.
- Calibration: at five wiper voltages across the travel, measure the field of view on a ruler in the object plane and store the voltage-to-FOV pairs.
- Move: interpolate the target voltage, approach it from one direction only, and release the drive inside the ±5-count deadband.
- Verification: command the mid-travel position from both ends. The wiper must settle within the deadband both times, and the framed field of view must repeat on the ruler.
The mistakes that cost the most time: asserting both direction outputs at once (the dead short from the warning above); driving a 6-12 V motor straight from 24 V; approaching targets from both directions, which turns backlash into position scatter tens of counts wide; and command timeouts shorter than the real travel time. Measure one full travel and set the timeout from that.
For zoom settings whose field of view falls under 76 mm, a dot target gives the map a known scale to re-check against: the LS-LXR-0029 prints 0.5 mm dots on a 76 × 76 mm plate, and other formats sit in the lens accessories range.
- Type
- Calibration targets
Why will your camera not drive the auto iris?
A DC-auto-iris lens expects the camera to supply the iris drive voltage on its small four-pin connector. Machine-vision cameras do not provide that output, so the iris sits at its rest aperture no matter what exposure you set in software.
Inside the lens, the connector feeds a servo that needs a drive voltage proportional to the metering error; a machine-vision camera controls exposure in firmware and has no such output. That makes the iris a purchase decision, not a wiring problem.
The three ways out, for a fixed station in order of preference: set a manual iris once for the working distance and lighting and lock it — stopping down also improves aberration, as how stopping down helps optical aberrations explains. If the iris must change remotely, order the motorized-iris version and give its motor the third bridge channel, exactly like zoom and focus. Let exposure time and gain handle the fine trimming, as in automatic iris, exposure and gain control in machine vision. Treat the auto-iris pins as unused on a machine-vision camera.
When is a motorized zoom lens the wrong choice?
Choose a motorized zoom only when the field of view must change between products or runs. For a fixed view a fixed focal length lens images better, and for a changing working distance you want motorized focus, not zoom.
What the zoom buys is field-of-view range. Take an example set-up — an 8-48 mm zoom on a 1/2-inch sensor 6.4 mm wide, at a 300 mm working distance:
A 6:1 field-of-view range earns its complexity when one line runs several products; it is dead weight when the view never changes. By case: one product at one distance takes a fixed focal length lens with better distortion and aberration control. Where you measure, the entocentric vs telecentric lens comparison explains why zoom optics are the wrong tool. A part whose height varies wants motorized focus or a liquid lens for changing working distances. And zooming shifts the working distance on many barrels; zoom lens working distance extension without losing field of view works through that coupling.
The 6.4 mm width and the other standard formats are tabulated in lens sensor format: 1/1.8 inch, 2/3 inch and 1 inch lenses. To start with a lens whose motor control is documented, filter the machine vision lenses by the Motorized focus type — 19 models currently listed — and confirm the control interface matches your outputs before ordering.
Fixed and zoom lenses, C-mount to M72
1,765 models · from $50.00If the pin-out in your hand does not match these assumptions, send the datasheet through the contact page and we will read it with you. The lens configurator is where the search for a documented-control lens starts, and the lenses topic page collects the rest of this topic.
The configurator matches a camera, lens, light, light controller and cables to each other, step by step, and lists only parts that fit what you already picked.
Questions
Can I run the zoom motor straight from a 24 V industrial output?
No. 24 V is twice the top of the 6-12 V class range, so the motor overspeeds and overheats, and a plain switched output cannot reverse polarity, so it would travel one way only. If 24 V is the only rail in your panel, feed a small buck converter set to 12 V and put the H-bridge after it.
How long does a full zoom travel take?
At full rated voltage, compact zooms of this type travel end to end in a few seconds. Travel time scales inversely with drive voltage, so running at 6 V takes roughly twice as long. Time one full travel on your lens at its working voltage. Use that measured value as the timeout for every move command.
Can I read the potentiometer while the motor is running?
Yes, with filtering. Motor brush noise shows up as a few counts of flicker on the wiper. Either pause about 100 ms after the motor stops and then read, or average 8 to 16 readings while it runs. A 0.1 µF capacitor from wiper to ground removes most of it without slowing the response.
What happens if I drive the motor past the end of travel?
The motor stalls against the mechanical stop: current rises from the roughly 60 mA running figure toward several times that, the motor heats, and the small gear train can strip. Use the wiper end voltages as soft limits and command stops about 2 % of the span short of each end.
Do focus and iris motors on the same lens need different hardware?
No. On lenses that carry them, focus and motorized-iris motors are the same small DC class with the same polarity-reversal scheme. Give each motor its own bridge channel and its own potentiometer where one is fitted. Budget three bridge channels for a zoom-focus-iris lens.


