System designHow-to

Wire a GPIO output to a camera trigger input: TTL levels and pull-ups

Wire a GPIO output from a PLC or sensor to a camera trigger input: pull-up sizing, polarity, voltage limits, and splitting one pulse to two cameras.

LumaSpec Vision11 min read Share on LinkedIn

On this page 10 sections
  1. 01Know which input you have: opto-isolated or TTL-level
  2. 02What you need
  3. 03Match the output type to the wiring pattern
  4. 04Size the pull-up for an open-drain output on a 5 V trigger line
  5. 05Wire it in eight steps
  6. 06Drive two cameras from one pulse
  7. 07Leave the USB cable connected
  8. 08Checks before the first production run
  9. 09When the direct answer fails
  10. 10Questions

Wire the trigger as a small circuit, not just two wires: a TTL-class input wants a push-pull signal of at least 2.0 V high and 0.8 V low against a common ground, while an opto-isolated input is an LED that wants 5-20 mA from a bias supply in the 7-24 V range. Open-drain outputs need a 1-4.7 kOhm pull-up; two cameras split one pulse in a star from the source. A trigger that never arrives costs a bench afternoon: the PLC, sensor or pulse generator has fired, and the camera sits idle. The cause is almost always in the wiring — the wrong pins, a missing pull-up, or a voltage the input never registered. This guide gives the wiring decisions for connecting a GPIO output to a camera trigger input: which lead goes to which pin, what resistor to fit and why, and how to drive two cameras from one pulse.

Know which input you have: opto-isolated or TTL-level

Two input designs share the name "trigger input", and they want different wiring.

An opto-isolated input is an LED behind the two pins. It cares about current, direction and bias voltage: camera electrical tables print a wide operating range for it, common USB3 industrial families cap the absolute maximum at +30 V DC, and application notes for opto-to-opto wiring bias the input from a supply in that 7-24 V window. Wire it as a small circuit: supply, LED, driver.

A non-isolated, TTL-level input is a logic buffer referenced to the camera's own 0 V. Its GPIO tables typically print a 0-24 V level range with a sink rating around 25 mA, and it fires on voltage thresholds — the classic TTL levels are 2.0 V for a high and 0.8 V for a low.

The decision rule: read the pin diagram in the camera manual. A diode symbol or an "opto" label means treat the pair as a current loop. A buffer symbol means one signal pin plus ground. Both styles appear on industrial area scan cameras, sometimes on the same connector. If the wiring looks right and the line still never fires, the camera's trigger line settings are the next stop — the line-configuration checklist walks through them.

What you need

  • The camera's I/O pin table, with the trigger line's pins marked.
  • An open-ended camera I/O cable: connector at the camera end, bare leads at the other, so each wire lands on a terminal. These are ordinary entries in the camera data and I/O cables range.
  • The driver side: the PLC output, sensor output or pulse generator, with its own I/O table.
  • A 12 V or 24 V DC bias supply if an open-collector output drives an opto input.
  • 1/4 W resistors from the E12 series — 1 kOhm, 2.2 kOhm, 4.7 kOhm — for open-drain outputs.
  • A multimeter, and an oscilloscope if one is at hand.

The cable that carries the trigger just needs an open end you can wire to. The LS-CBL-0300 is an M8 8-pin male-to-open cable with eight free leads, 7 m long and drag-chain rated.

CablesCamera Power and I/O Cable, M8 8-pin connector, Male to Open end (8-core), 7 m, drag-chain use (LS-CBL-0300)LS-CBL-0300
Type
Power and I/O cables
Length
6-8 m
$79.00View partBuild a system with it

Match the connector to the camera or the frame grabber:

Cables5 m 12-Pin IO I/O and power cable (LS-CBL-0211)LS-CBL-0211$56.00View part
CablesFrame Grabber I/O Cable, DB9F to Open, 7 m (LS-CBL-0224)LS-CBL-0224
Type
Frame grabber I/O cables
Length
6-8 m
$79.00View part

Match the output type to the wiring pattern

Find your output in the left column and the camera input in the middle; the row gives the wiring and any extra parts.

GPIO output Camera input Wiring Extra parts
Push-pull, 3.3 V or 5 V TTL-level Output to the signal pin, grounds commoned None
Push-pull, 24 V PLC card Non-isolated, 0-24 V class Direct, with one shared 0 V None
Push-pull, up to 24 V Opto-isolated, 30 V class max Source to input +, return to input - None
Open-drain / open-collector TTL-level Pull-up to the logic rail 1-4.7 kOhm resistor
Open-drain / open-collector Opto-isolated Bias rail to input +, output to input - 7-24 V DC supply
Camera strobe output, opto Second camera's opto input Master-biased across the same rail Bias supply

Open-drain and open-collector mean the same thing here: the output can only pull its pin toward 0 V and never drives a high. The high has to come from somewhere — a pull-up resistor on a TTL line, or the bias rail on an opto input. If a source manual calls for a resistor on one of its outputs, that is the reason: the resistor is the load that creates the high level.

Polarity, committed: the signal or bias lead goes to the input's positive pin, the driver or return to the negative pin. On an opto input a reversed pair does not fire at all — the LED blocks — so a brand-new wiring that stays silent deserves exactly one polarity swap before you look elsewhere. Lead colors are not standardized between camera makers; on one common 6-pin camera I/O connector the opto-isolated output lands on the white lead and the opto-isolated input on the black lead, but confirm against the pin table before trusting any color.

Size the pull-up for an open-drain output on a 5 V trigger line

The inputs, and where each comes from:

  • Pull-up rail: 5 V DC, a standard logic rail. The camera's non-isolated inputs accept 0-24 V class levels, so 5 V sits inside with margin.
  • Output: an open-drain GPIO that sinks to 0 V, with a sink rating in the 25 mA class printed on common camera and PLC I/O blocks — check your device's own table for its figure.
  • Line capacitance: 100 pF, from roughly 1-2 m of cable at about 50 pF per metre plus the input pin.
  • Pulse plan: trigger pulses of 10 µs or longer.

The rule in words: the resistor has two jobs. It must limit the current the output sinks while the line is low, and it must recharge the line capacitance fast enough that the pulse reaches a solid high well before the camera samples the edge.

I_low = V_rail / R_pu t_rise ≈ 2.2 × R_pu × C_line P_R = V_rail² / R_pu

Try 2.2 kOhm and run all three:

  • Low-state current: I_low = 5 V / 2200 Ohm = 2.3 mA — under a tenth of the 25 mA class rating.
  • Rise time: t_rise ≈ 2.2 × 2200 Ohm × 100 pF = 0.48 µs — under 5% of a 10 µs pulse, so the edge settles long before the camera decides.
  • Resistor dissipation: P_R = 5 V × 5 V / 2200 Ohm = 11 mW — a 1/4 W part barely warms.

Result: fit 2.2 kOhm, 1/4 W or larger, from the trigger line to +5 V.

Decision thresholds: any value from 1 kOhm to 4.7 kOhm passes both tests for pulses of 10 µs and longer on runs up to about 3 m. Drop to 1 kOhm when a scope shows rounded edges — that sinks 5 mA and rises in about 0.22 µs. Go to 4.7 kOhm when the driver's sink rating is under 2 mA — it sinks 1.1 mA. On a 3.3 V rail the same 2.2 kOhm sinks 1.5 mA, and 3.3 V still clears the 2.0 V TTL high threshold; check the camera's printed thresholds whenever its I/O table is not TTL-class.

Wire it in eight steps

  1. Mark the pins. From the camera's I/O table, write down the trigger input's pins: + and - on an opto input, signal and ground on a TTL line.
  2. Power down the camera, the driver and any bias supply before touching wires.
  3. Pick the row of the table above that matches your output and input pair.
  4. Land the wires: signal or bias to the + pin, driver or return to the - pin, per the polarity rule above.
  5. Fit the extra parts the row calls for — the pull-up resistor at the terminal block, or the bias supply across the opto input.
  6. Arm the camera in software: set the trigger mode to On, the trigger source to the physical line the wire lands on (GenICam names these TriggerMode and TriggerSource), and the activation to rising edge.
  7. Measure before the first shot: a meter across the input should read the idle level — the bias voltage on opto wiring, the rail high on a TTL line. Fire the source once and watch that voltage move.
  8. Count frames against pulses over a few hundred shots. Equal counts close the job.

Drive two cameras from one pulse

Split at the source, not at the first camera. Run two cables from the same source terminals, one to each camera's input, with the inputs in parallel. Each opto input draws its own current, so two 10 mA inputs ask the source to switch about 20 mA — inside a 25 mA-class output but tight for a third camera. At that point buffer the pulse rather than load the output further; fanning one TTL pulse out to several cameras safely shows the circuit.

Keep the two runs the same length. A signal moves down cable at about 5 ns per metre, so a 2 m mismatch skews the triggers by roughly 10 ns — below anything a pair of cameras notices on a shared part.

Or make one camera the master and let its opto-isolated output fire the second camera's input through the master-bias pattern from the table. Both shutters then run on one signal with no extra driver hardware. Triggering two cameras from one frame grabber input and hardware sync for two USB cameras cover both routes in detail.

If the cell also strobes a light with the frame, the same source can drive a strobe input on one of the light controllers; the wiring follows the opto pattern above, and enabling a smart camera's strobe output covers the camera-side switch.

Leave the USB cable connected

Leave it connected. Industrial USB3 cameras are built to run powered around the clock, and the I/O connector is an electrically separate circuit from the USB data pair — an opto-isolated trigger cannot back-feed the host. The problem engineers actually meet is not damage but power management: an idle port gets suspended and the camera drops off the bus. Disable USB suspend for that port and the link holds for the life of the job.

On a moving rig the cable flexes every cycle, so pick a cable built for that duty:

Cables3 m USB3.0 camera cable, high-flex (drag chain) (LS-CBL-0219)LS-CBL-0219$62.00View partBuild a system with it

Checks before the first production run

  • The meter reads the expected idle level across the input: the bias voltage on opto wiring, the rail high on a TTL line.
  • One 0 V reference: source, bias supply and camera ground meet at a single star point, with no grounds daisy-chained through the trigger line.
  • The scope shows a rise time under about a tenth of the shortest pulse width you will use.
  • The camera's own frame counter matches the pulse count over a few hundred cycles.
  • The pinout is written on the electrical drawing, so the next engineer does not rediscover it by trial.

When the direct answer fails

  • 3.3 V straight into an opto input. It can fire on the bench and fail across temperature or a longer cable, because opto inputs are specified around a bias supply rather than a logic level. Drive a small transistor instead and let it switch the 12 V or 24 V bias — the transistor costs less than the troubleshooting day.
  • The trigger pair shares a multi-core cable with contactors or solenoids. Switched inductive loads couple spikes onto the line and the camera fires phantom frames. Give the trigger its own shielded core and ground the shield at one end only.
  • Trigger connectors daisy-chained from camera to camera. Stacked connectors add stubs and shared grounds; split at the source with equal runs instead.
  • Runs longer than about 10 m. Keep the pulse source close to the cameras, or trigger the nearest camera and chain from its strobe output. For a bench signal generator driving a longer line, choosing the camera trigger cable for a signal generator covers the cable side.
  • No separate I/O connector on the camera at all. Some cameras expose triggers only through the data cable or a breakout — when a camera GPIO cable is actually needed sorts that out first.
Build the whole station

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.

Start with the trigger sensor

Then wire, meter and count: a trigger that shows one frame per pulse is finished. The cable finder filters camera data and I/O cables by connector and length, and the systems topic page collects the rest of the trigger and synchronization guides.

Questions

Can a 3.3 V GPIO trigger a camera's opto-isolated input?

It often fires on the bench, but many opto inputs are specified around a bias supply in the 7-24 V range, so 3.3 V sits below the region chosen for reliable current through the LED. If the camera's electrical table lists a minimum operating voltage of 5 V or more, 3.3 V is simply out of range: add a small transistor and switch a 12 V bias instead.

When does a camera trigger line need a pull-up resistor?

Only when the driving output is open-drain or open-collector, because such an output pulls the line low but never drives it high; a push-pull output needs no pull-up, and adding one just wastes current. On a 5 V rail, a 2.2 kOhm 1/4 W resistor recharges a short cable in about half a microsecond while sinking 2.3 mA.

Which wire on the camera I/O cable is the trigger input?

Trust the pin table, not the colors: lead colors are not standardized between camera makers, and adapters can shift positions. On one common 6-pin camera I/O connector the opto-isolated output sits on pin 4 (white lead) and the opto-isolated input on pin 2 (black lead), but your cable can differ, so confirm each pin before landing wires.

Is it safe to leave a USB3 camera connected and powered all the time?

Yes. Industrial USB3 cameras are built for always-on machines, and the trigger and strobe circuits are electrically separate from the USB data pair, so a pulse cannot reach the host. What people meet in practice is the host suspending an idle port and the camera dropping off the bus; disable USB suspend for that port.

How much current does an opto-isolated camera trigger input draw?

Camera electrical tables commonly land in the 5-20 mA range at the recommended bias voltage. That figure is what you size the bias supply and any series resistor for, and it sets how many inputs one output can drive: two 10 mA inputs need about 20 mA from the source, which fits a 25 mA-class output with little to spare.