3D visionHow-to

Connect a depth camera to Android over USB OTG

Wire a depth camera to an Android phone or tablet over USB OTG: orient host and device roles, split power correctly, and confirm enumeration on Android 11.

LumaSpec Vision10 min read Share on LinkedIn

On this page 9 sections
  1. 01Android is the host, the camera is the peripheral
  2. 02What you need
  3. 03Wire the chain, in this order
  4. 04Size the power leg before blaming the cable
  5. 05The data leg must be USB 3, not just USB-shaped
  6. 06Configure the Android side
  7. 07Common failures, in order of likelihood
  8. 08Cameras worth building with, and the next step
  9. 09Questions

Connect a depth camera to Android over USB OTG by making the phone the USB host and the camera the peripheral: the phone goes on the OTG Y-adaptor's role-signalling port, the camera's data cable on the USB-A receptacle, and the camera's power leg on its own supply sized to at least 1.3 × its rated current — a USB3 port guarantees only 4.5 W, which most depth cameras exceed.

Most failed attempts die in the cable, not in the code: the camera lights up, the phone charges, and nothing enumerates. The causes are mechanical — which port the phone lands on, whether the cable carries the role line at all, and who supplies the watts. This guide gives you the wiring decision, a five-minute power budget with the arithmetic shown, and the checks that prove the camera enumerated on Android 11. If the wiring already passes and the app still cannot see the device, the app-side USB host permission is the next suspect; that case has its own permission checklist for depth cameras on Android.

Android is the host, the camera is the peripheral

USB's On-The-Go extension defines the two roles: the A-device supplies power and acts as host, the B-device consumes power and starts as the peripheral (USB On-The-Go). Older micro-B OTG cables wired the role into the cable as a grounded ID pin. Type-C has no ID pin: on a Type-C Y-adaptor the role is set by pull resistors on the CC line, and a proper OTG adaptor wires them so the phone resolves as host and drives VBUS out to the camera.

That gives the orientation rule:

  • The phone goes on the adaptor's OTG port — the leg that carries the CC role signalling to the phone.
  • The camera's data cable goes on the USB-A receptacle, or on the camera's own Type-C device port.
  • The camera's power leg goes to its own external supply, not to the phone.

Reverse the orientation and the symptom is specific: the camera still lights up because VBUS is live somewhere in the chain, but the phone never changes role and nothing enumerates. That powered-but-silent state has a full triage in the USB link checks after a cable swap.

What you need

  • An Android device that supports USB host. Nearly every phone and tablet since release 3.1 does; a few ship with OTG disabled in Settings, so search the settings for an OTG entry before blaming hardware.
  • A Type-C OTG Y-adaptor wired for the job: role resistors on the phone-side port, a USB 3 USB-A receptacle for the camera, and a separate power input. An adaptor missing any of those will power the camera and stop there.
  • A supply for the power leg — 5 V 2 A (10 W) covers cameras rated up to about 1.5 A, per the budget below.
  • The depth camera, its data cable, and its rated current in amps from its data sheet.
  • For verification: the vendor's app or any USB video class viewer, plus platform tools (adb) on your workstation if you want the bus-level check.

The phone is not the only host that can do this. If the host side of the project is still open, a comparison of USB host boards for embedded builds lays out controller-level alternatives.

Wire the chain, in this order

  1. Prove the phone can host. Put a USB memory stick on any OTG adaptor and open it from the file manager. If the stick mounts, the host controller is fine; if not, look for the OTG switch in Settings first.
  2. Inspect the adaptor before the camera. The phone-side cable must be a data cable: charge-only Type-C leads often omit the CC conductor, and with no CC line the phone never latches the host role. The camera-side receptacle must be USB 3, with the extra row of contacts in the A plug, not a four-contact USB 2 port.
  3. Connect the phone to the adaptor's OTG port.
  4. Connect the camera's data cable to the USB-A receptacle.
  5. Connect the power leg to its supply, before the supply is switched on.
  6. Energize the supply, then wake the phone. The role latches at attach. If enumeration fails, unplug the phone end of the adaptor, wait a few seconds and re-seat it so the port negotiates fresh.
  7. Confirm enumeration. The vendor app listing the camera is the pass. For a bus-level view from your workstation, adb shell dumpsys usb prints the attached USB devices and the data role the phone took — you want host. A USB device-information app shows the same list without a workstation.
  8. Open a stream. A camera that speaks the USB video class works with any viewer app and no driver install on builds that ship the class driver; a vendor-specific camera class needs the vendor SDK running inside your app.

Size the power leg before blaming the cable

A USB 3 host port must deliver 900 mA at 5 V — 4.5 W — and that is the ceiling for a camera powered from the phone alone. Depth cameras routinely draw more once the projector and both sensors run, which is what the Y-adaptor's power input exists for.

P_cam = 5 V × Icam I_supply = 1.3 × Icam

Take Icam from the camera's data sheet. Anything rated above 0.9 A needs the external leg; at or below it, the phone can carry the load and pays for it in battery life.

Two points settle most field failures: the power leg feeds the camera, not the phone, so the phone's charger rating tells you nothing about the camera's brown-outs; and a supply shared with other devices must cover the sum of all draws. The same budget scales to a hub feeding several cameras — the USB versus external 5 V power decision and the multi-camera bandwidth and power budget cover both cases.

The data leg must be USB 3, not just USB-shaped

Depth is heavy. A 1024 × 768 depth map at 16 bits per pixel is 786,432 × 2 = 1.57 MB per frame, and at 30 fps that is 47.2 MB/s, about 378 Mbps of payload. Many cameras send an amplitude or IR image alongside; the total roughly doubles, to about 755 Mbps.

USB 2.0 advertises 480 Mbps and delivers about 40 MB/s — some 320 Mbps — of real bulk payload after encoding and protocol overhead. One depth stream already outruns it. USB 3 moves roughly 400 MB/s in practice, so both streams fit with headroom.

The decision: treat the camera leg as USB 3 and buy the adaptor accordingly. If a rig must fall back to USB 2, cut resolution or frame rate at the camera and expect depth quality to fall with it. Frames arriving cut short or black are the classic symptom of a leg that cannot keep up — the black-image fix for USB bandwidth and power walks that triage, and flaky pixels on a half-working port point to signal integrity on OTG ports.

Configure the Android side

Android 11 asks nothing extra for USB accessories beyond earlier releases. Apps reach the camera through the USB manager, and the app that wants it must declare host support in its manifest and request the device at runtime; Google's official Android USB host documentation lists the exact manifest entries and manager calls, and the permission prompt you see on first connect is the normal flow, not a fault.

Two Android-side quirks remain. Some phones gate OTG behind a Settings toggle that switches itself off after idle — if the camera enumerates on other hosts but not that one, search the settings, re-enable and re-seat. And for a fast end-to-end stream test before the depth SDK is involved, the preview-loop pattern from your own Android camera loop without a scanner app makes a two-hour harness.

Common failures, in order of likelihood

Symptom Likely cause Test, then fix
Camera lights up, never enumerates Charge-only cable without the CC conductor, or phone on the adaptor's power port Swap the phone-side lead for a full-featured data cable; re-seat the phone on the OTG port
Enumerates, stream never starts at full mode The adaptor's camera leg is USB 2 only Replace with a USB 3-rated adaptor; keep depth off USB 2
Stream starts, then dies or turns black Power sag when the projector fires Give the camera its own power leg sized in the budget above
A viewer app sees it, the depth app does not App-side host permission or device-class set-up Grant the accessory prompt, then check the class and its configuration-file requirements
Two cameras attached, one works Port or bandwidth budget, or one link trained down Test each camera alone; the single-camera isolation steps find the offender fast

Cameras worth building with, and the next step

If you are specifying the camera as well as the cable, the 3D sensors range covers the depth technologies this wiring serves: speckle structured light built for volume measurement, projected structured light, and ToF sensing.

3D sensorsHikrobot MV-DPS200P-02 Projected structured-light 3D cameraMV-DPS200P-02
Type
Stereo / structured light
$8,829.00 · quotedView and quote
3D sensorsHikrobot MV-DT01WMU ToF sensing cameraMV-DT01WMU
Type
Depth / ToF camera
Price on requestView and quote
3D sensorsHikrobot MV-DLS300P-04 Laser galvanometer stereo cameraMV-DLS300P-04
Type
Stereo / structured light
$16,579.00 · quotedView and quote

To prove the OTG chain before the depth SDK arrives, a plain USB 3 board camera is the cleanest stand-in: the LS-BCM-0003 is a 3.1 MP USB 3 board camera with a global shutter that streams 120 fps.

Board-level cameras3.1 MP USB3 board-level camera, IMX252, 1/1.8" global shutter, 120 fps (LS-BCM-0003)LS-BCM-0003
Sensor format
1/1.8"
Lens mount
C-mount
$690.00View part
Board-level camerasHikrobot MV-CB060-10UM-B 6 MP Board Level Camera, USB3, IMX178, Mono, Bare Board, V4MV-CB060-10UM-B
Sensor format
1/1.8"
Interface
USB3
$239.00View part
Board-level camerasUSB3.0 board camera / module, 1.3 MP, Color (LS-BCM-0047)LS-BCM-0047
Sensor format
1/2.7"
Lens mount
C-mount
$179.00View part

Both stand-ins come from the board-level cameras range, and what to weigh when choosing one is in the embedded board camera selection guide. From there, narrow the camera finder, build the parts list in the configurator, or send the rig's numbers to us through the contact page. The 3D vision topic page collects the rest of the depth-camera material.

Questions

Why does my depth camera light up but never appear on the Android device?

VBUS reaches the camera, so it powers, but the data role never latches. The usual causes: a charge-only USB-C lead without the CC conductor, an adaptor with no role resistors on the phone-side port, or the phone plugged into the adaptor's power input instead of its OTG port. Swap in a full-featured data cable first, then re-seat the phone end; only the third cause needs rewiring.

How much power can a phone give a USB camera on its own?

A USB 3 port must supply 900 mA, which is 4.5 W; a USB 2.0 port must supply 500 mA, or 2.5 W. A depth camera with projector and sensors running usually draws more, which is why the Y-adaptor has a separate power input. Anything rated above 0.9 A needs external power, leaving the phone to carry data only.

Does a depth camera need a driver on Android 11?

Not in the desktop sense. A camera that follows the USB video class works with Android's built-in class driver, so a generic viewer can open it on builds that ship the driver. Most depth cameras expose a vendor-specific class instead, and the vendor SDK inside your app does that work in user space; the app then needs the host permission and a runtime request before it can open the device.

Can I skip the OTG adaptor and use a plain USB-C to USB-C cable?

Sometimes. If the camera has a Type-C receptacle wired as a sink and the cable is a full-featured data cable with the CC line intact, a dual-role phone resolves as host and enumerates with no adaptor. The Y-adaptor remains the right answer whenever the camera needs more power than the phone grants or its cable ends in a USB-A or micro-B plug.

What Android version or hardware should I require for a field device?

Android has carried USB host support since release 3.1, so the version is rarely the blocker; the host controller and the OTG toggle are. For a field device, pick one whose vendor documents USB host, test it with a memory stick before the camera arrives, and prefer a full-featured Type-C port over a charge-optimized one.