Autonomous Vehicle/Sensors

GPIO (General Purpose Input/Output)

Naranjito 2026. 5. 27. 13:49
  • GPIO (General Purpose Input/Output)

 

 

 

- A programmable electrical pin used for communication between hardware devices. It lets a device send or receive electrical signals.

- The reason why it exists is a camera alone cannot know :

  • when an object arrives
  • when a robot arm moves
  • when a laser fires
  • when another camera captures

So, GPIO allows hardware synchronization.


  • Two Main GPIO Modes 

 

Mode Meaning
Input receive signal
Output send signal

 

- GPIO Input & Output Example :

 

1. GPIO Input Example :

 

Suppose a camera sensor detects a passing object.

Camera Sensor ─────> Camera GPIO Input

When object arrives :

  • sensor outputs HIGH pulse
  • camera receives trigger

This becomes :

TriggerSource = Line1

2. GPIO Output Example : 

 

Camera can also output signals.

Camera GPIO Output ─────> LED Strobe

When exposure starts:

  • camera outputs HIGH
  • flash turns ON

This synchronizes lighting with image capture.


  • Industrial Camera GPIO

 

- Most industrial cameras have :

isolated trigger pins
opto-isolated inputs
output lines
strobe outputs

 

- And Typical connector :

Line0
Line1
GND
+12V
Output0

 

In GenICam SFNC, GPIO lines are usually called :

Name Meaning
Line0 GPIO pin 0
Line1 GPIO pin 1
Line2 GPIO pin 2

 

So, 

TriggerSource = Line1

means trigger signal comes from GPIO Line1


- GPIO Timing Example :

 

 

1. Free-run Camera :

Camera captures continuously

 

2. GPIO Triggered Camera :

Sensor pulse
     ↓
GPIO HIGH
     ↓
Camera captures frame

 

Timing :

GPIO Signal
____|‾‾‾|____

Camera Exposure
________|‾‾‾‾

  • GPIO Signal Types

 

1. Pulse Signal

 

Short HIGH pulse:

____|‾|____

 

2. Level Signal

 

Signal stays HIGH:

____|‾‾‾‾‾|____

  • Camera Hardware Trigger

 

Photoelectric Sensor
        ↓
GPIO Line1
        ↓
Industrial Camera

 

GenICam :

TriggerMode       = On
TriggerSource     = Line1
TriggerActivation = RisingEdge

  • GPIO and Edge Detection

 

Event Meaning
RisingEdge LOW → HIGH
FallingEdge HIGH → LOW

 

Example :

LOW ____|‾‾‾
          ↑
      RisingEdge

And this directly connects to:

TriggerActivation = RisingEdge

  • GPIO synchronization

 

LiDAR PPS Signal
      ↓
GPIO Trigger
      ↓
Camera Exposure
      ↓
Aligned sensor timestamps

 

'Autonomous Vehicle > Sensors' 카테고리의 다른 글

[Camera] Lenses, Aberration  (0) 2025.10.29
[Camera] Aperture, Depth-of-Field (DoF), ISO  (0) 2025.10.29
[Camera] Glossary-Camera Calibration  (0) 2023.11.28
[Gyroscope]  (0) 2023.10.12
Sensor Selection Criteria  (0) 2023.10.05