How to interface a GPS/GNSS module with Ouster Lidar

This article provides instructions on setting up, wiring, and synchronizing with a GPS/GNSS device (NEO-M9N) and Ouster lidar sensor.

 

 


Required Items

Hardware Needed

  1. Ouster Sensor: OSx-[32, 64, 128] with included Interface Box (IBOX)

  2. GPS Board: SparkFun GPS Breakout - https://www.sparkfun.com/products/15712 (1) and applicable antenna

  3. PC: Windows machine recommended for this exercise in order to utilize https://www.u-blox.com/en/product/u-center configuration software. Ensure the PC has 1000Base-T (Gigabit Ethernet) capability (via ethernet port on PC or separate USB-Ethernet converter).

  4. Miscellaneous:

    • Required: Ethernet cable, USB-C cable, M3 torx screwdriver, jumper wires (male and female)

    • Optional: Breadboard (or plugblock), oscilloscope

Note: This specific SparkFun product requires an antenna (sold separately). Be sure to pick a suitable antenna with U.FL connector for this exercise.

 

Software Needed

  1. u-center GNSS evaluation software for Windows [freeware]

The u-center version utilized for the creation of this article: u-center, v22.07

 

Sensor and GPS/GNSS Configuration

Ouster Sensor Configuration via Web Interface

The Ouster sensor must be configured to accept externally generated, electrical signals as ‘inputs’ for both PPS and NMEA. There are many ways to configure the sensor (e.g. via TCP/HTTP api), however the Ouster Web Interface is probably the most simple and effective method.

See our documentation on Web Interface for further details.

Tip: to access the web interface, enter one of the following arguments into a web browser url bar.

  1. http://os-991234567890.local/

    1. where 991234567890 represents the unique serial number of your device.

      1. This can be found on the sensor label or GET /api/v1/sensor/metadata/sensor_info

  2. http://169.254.1.100/

    1. where 169.254.1.100 represents the set IPv4 address of the sensor

      1. Sensor IPv4: GET /api/v1/system/network/ipv4

From the Configuration tab, ensure the following items are configured as described. All other fields can remain as the default values.

Sensor configuration via Web UI

1

Timestamp Mode: TIME_FROM_SYNC_PULSE_IN

2

Multipurpose IO Mode: INPUT_NMEA_UART

3

NMEA In Polarity: ACTIVE_HIGH

4

NMEA Baud Rate: BAUD_9600

5

NMEA Leap Seconds: 0

6

Sync Pulse In Polarity: ACTIVE_HIGH

7

Click Apply Config (reinit)

8

Click Persist Active Config

 

GPS/GNSS Configuration with u-center

NEO-M9N Configuration Settings for use with Ouster sensor

It is important to ensure you have configured the GPS/GNSS device to be compatible with the Ouster sensor. For details on initial installation of https://www.u-blox.com/en/product/u-center, connecting the GPS receiver, and other introductory features, please refer to the user guide by visiting the manufacturer site.

Getting started:

  1. Open the Configuration View (Ctrl+F9)

List of configuration topics to be changed:

  1. Save (BBR/Flash)

  2. NMEA Protocol

  3. UART Out

  4. PPS Out

  5. NMEA Message Types

1. Save (BBR/Flash)

1

Highlight CFG (Configuration)

2

Select Save current configuration

3

Send the message to the receiver

 


2. Configure NMEA Protocol

1

Highlight NMEA (NMEA Protocol)

2

Select CFG-NMEA-DATA2

3

Number used for SV’s not supported by NMEA: 1-Extended (3 digit)

4

Main Talker ID: 1-GP (GPS)

5

Send the message to the receiver


3. Configure UART Out

1

Highlight PRT (Ports)

2

Target: 1-UART1

3

Baudrate: 9600

4

Send the message to the receiver

 


  1. Configure PPS Out

1

Highlight TP5 (Timepulse 5)

2

Timepulse Settings: 0-TIMEPULSE

3

Check the radio button: Frequency

4

Frequency: 1 [Hz]

5

Length: 10000 [us]

6

Length Locked: 10000 [us]

7

Select 0-UTC Time

8

Send the message to the receiver

 

  1. Configure NMEA Message Types

1

Highlight MSG (Messages)

2

Timepulse Settings: 0-TIMEPULSE

3

For each message type below, uncheck the box (OFF) for UART1 only.

F0-00 NMEA GxGGA

F0-01 NMEA GxGLL

F0-02 NMEA GxGSA

F0-03 NMEA GxGSV

F0-05 NMEA GxVTG

4

Ensure that UART1 checkbox is selected (ON) for the RMC message type:

F0-04 NMEA GxRMC

5

Send the message to the receiver after each step 3a, 3b, ….4a.


Hardware Interface and Connections

Component connections

  1. Connect the Ouster sensor to the Interface Box (provided in the box with the sensor). The IBOX comes in a kit which includes the IBOX unit, sensor cable, Ethernet cable ,and a AC-to-DC power supply.

  2. Plug the ethernet cable into the designated port on the IBOX. Connect the other end to your PC (or USB-Ethernet converter). Provide power to the IBOX via the DC jack.

  3. Power the SparkFun NEO-M9N board with a USB-C cable as shown and connect the other end to your PC.

  4. Attach the antenna with U.FL connector to the GPS board where indicated (not shown). Place the antenna module outdoors, or near a window for a sufficient view of the sky.

NEO-M9N + IBOX connections

  1. Remove the clear, plastic cover from the IBOX using the torx screwdriver.

  2. Using jumper wires, connect the PPS, GND and TX/MISO pin on the GPS board to the designated pins on the IBOX as shown in the table/figure below.

GPS Board pin

IBOX Pin

GPS Board pin

IBOX Pin

PPS

SYNC_PULSE_IN

TX/MISO

MULTIPURPOSE_IO

GND

GND

Verification of Success

Once all prior steps are complete, follow the instructions below to check if the sensor is synchronized properly and reporting the expected values.

 

Query the status via Ouster API

HTTP: GET /api/v1/time/sensor

The sensor can be queried and configured using HTTP GET requests. This can be done using several different tools such as HTTPie, cURL, Advanced REST Client, etc. You can execute these queries from a command line application (e.g. Windows CMD, macOS & Linux Terminal)

Here are two examples using a curl command:

  1. curl -i http://os-991234567890/api/v1/time/sensor

    1. where 991234567890 represents the unique serial number of your device. This can be found on the sensor label as a reference.

  2. curl -i http://169.254.1.100/api/v1/time/sensor

    1. where 169.254.1.100 represents the set IPv4 address of the sensor

Response from API Query

From the outputted response below:

{ "multipurpose_io": { "mode": "INPUT_NMEA_UART", "nmea": { "baud_rate": "BAUD_9600", "diagnostics": { "decoding": { "date_decoded_count": 384, "last_read_message": "GPRMC,164853.00,A,4102.23151,N,08141.59407,W,0.052,,080823,,,D,V*16", "not_valid_count": 0, "utc_decoded_count": 384 }, "io_checks": { "bit_count": 80332, "bit_count_unfiltered": 80331, "char_count": 27478, "start_char_count": 393 } }, "ignore_valid_char": 0, "leap_seconds": 0, "locked": 1, "polarity": "ACTIVE_HIGH" }, "sync_pulse_out": { "angle_deg": 360, "frequency_hz": 1, "polarity": "ACTIVE_HIGH", "pulse_width_ms": 10 } }, "sync_pulse_in": { "diagnostics": { "count": 401, "count_unfiltered": 363, "last_period_nsec": 0 }, "locked": 1, "polarity": "ACTIVE_HIGH" }, "timestamp": { "mode": "TIME_FROM_SYNC_PULSE_IN", "time": 1691513333.6113698, "time_options": { "internal_osc": 399, "ptp_1588": 1651168147, "sync_pulse_in": 1691513333 } } }

 

Verify the following:

  1. The sensor is locked on to the PPS signal

    1. "sync_pulse_in" (line 32)

      1. "locked": 1 (line 38).

  1. The sensor is locked on the NMEA signal

    1. "nmea" (line 4)

      1. "locked": 1 (line 22)

  1. The last read message looks like a valid GPRMC sentence 

    1. "last_read_message" (line 9)

      1. "GPRMC,164853.00,A,4102.23151,N,08141.59407,W,0.052,,080823,,,D,V*16"

Field

Example Data

Description / Format

Field

Example Data

Description / Format

Message ID

GPRMC

RMC Protocol Header

Time (UTC)

164853.00

hhmmss.ss

Status

A

A - valid data

V - invalid data

Latitude

4102.23151

ddmm.mmmm

North/South indicator

N

N - North

S - South

Longitude

08141.59407

ddmm.mmmm

East/West indicator

W

E - East

W - West

Speed over ground

0.052

Knots

Course over ground (tracking)

““

Degrees (blank if slow or not moving)

Date

080823

ddmmyy

Magnetic variation

““

Degrees

Mode

D

A, D or E

Checksum

*16

hex

Sentence terminator

 

[CR][LF]

  1. The timestamp time has updated to a reasonable GPS time

    1. “timestamp” (line 41)

      1. "time": 1691513333.6113698 (line 43)

 Related articles