Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time



Design files for a support and interface unit for the Garmin LiDAR Lite


The symbiont. Lichens, like this Reindeer Lichen found in northeastern Minnesota, are a symbiosis between fungi and algae. Our symbiosis is between silicon, copper, aluminum, and laser. But be it nature or machine, some partnerships are truly mutual in their benefits. Photo by Homer Edward Price.

The LiDAR Lite is a rangefinder from Garmin capable of returning distances to objects up to 40 m away. It is an effective sensor for water, snow, and ice levels, among other purposes. Extensive work to characterize the LiDAR Lite for environmental sensing of water levels has been performed by:

Paul, J. D., Buytaert, W., & Sah, N.(2020). A technical evaluation of lidar-based measurement of riverwater levels. Water Resources Research, 56, e2019WR026810.

Technical specifications

Electronic Hardware

  • Microcontroller (computer) core
    • ATTiny1634
    • Firmware written in Arduino-compatible C++
    • 12 MHz
  • Sensors
    • Externally connected: Garmin LiDAR Lite v3 HP
    • On board
      • MEMS accelerometer to detect board angle
      • Hall-effect sensor to for user to trigger with a magnet after providing a known angle to the accelerometer. This corrects for offset errors in the accelerometer, significantly improving its angular accuracy.
  • Connections and communications protocols
    • LiDAR Lite v3 HP
      • 6-pin screw-terminal header
      • Switchable 5V power supply
      • I2C
    • Data logger
      • Power in and Ground
      • Digital communications
        • I2C
  • Power
    • Voltage limits: 3.3 ~ 5.5V
    • Power consumption: ~0.5mA @ 4.5V, take reading every 60 seconds, then power down
    • Power conditioning: Provides an onboard, high power, step up to 5V to allow for interface to 3.3V loggers
  • Fault recovery: Using intermediate system to emulate an I2C connection prevents a global lockup of the logger system
  • Status LED
  • Open-source licensing via CC BY-SA 4.0

Symbiont board

Electronic Software and Firmware

  • Programmable using the Arduino IDE
  • Firmware available in this repository. At the time of writing, "LiDAR_InterfaceDemo" is the most up-to-date prototype firmware.
  • Software to use the Symbiont-LiDAR with Arduino-compatible devices
  • Open-source licensing via GNU GPL 3.0


Assembling this sensor is possible by hand with sufficient skill and the following tools:

  • Temperature-controlled soldering iron
  • Hot-air rework station
  • Equipment for stenciling with solder paste
  • ESD-safe tweezers and workstation
  • Solder wick

Most of the components on this board are coarse enough in pitch that assembly by hand is expected to be relatively straightforward. However, if you are concerned about this, there are PCB assembly workshops located in many parts of the world.

THOUGHT: I have basic instructions for assembly on the Project Walrus README; I will not reproduce these here just yet, as we might want to set up a separate assembly guide, mostly with good links to existing resources, since our writing something of this nature would be to reinvent the wheel.


Downloading and installing the Arduino IDE

Go to Choose the proper IDE version for your computer. For Windows, we suggest the non-app version to have more control over Arduino; this might change in the future. You will have to add custom libraries, so the web version will not work (at least, as of the time of writing). Download and install the Arduino IDE. Open it to begin the next steps.


To install firmware on the Symbiont board, you use the 2x3-pin 6-pin ICSP (also called ISP) header with a special device called an "in-circuit system programmer" (or just "in-system programmer; yup, that's what the acronym stands for).

Many devices exist to upload firmware, including:

Uploading the firmware

Using this ISP, upload (as of the time of writing): the Arduino sketch in this folder. To do so, follow these steps:

  1. Open the Arduino IDE.
  2. Follow these instructions to install the ATTinyCore board definitions
  3. Select ATTiny1634 (No bootloader)
  4. Plug your ISP of choice into your computer (via a USB cable) and onto the 6-pin header. There are two ways to place it on; the header is aligned such that the ribbon cable should be facing away from the board while programming. If this fails without being able to upload, try flipping the header around. This should both power the board and provide communications.
  5. Go to Tools --> Programmer and select the appropriate programmer based on what you are using.
  6. Go to Tools --> Burn Bootloader. Yes, we know that you just selected "ATTiny1634 (No bootloader)", but this step sets the fuses, which configure their internal oscillator and brown-out detection.
  7. Go to Sketch --> Upload Using Programmer. After several seconds, you learn whether you succeeded or failed. Hopefully it worked!

Upload using programmer

Uploading using the in-system programmer.

Important note for Linux users: You must supply permissions to the Arduino IDE for it to be able to use the ICSP, or you will have to run it using sudo. The former option is better; the latter is easier in the moment.

Note: Be sure to download and/or update drivers for your ISP.

Writing a program to connect to the Symbiont-LiDAR

Once it is bootloaded and connected with a LiDAR Lite sensor, you should be able to use any standard Arduino device to connect to it and read its data.

Very simple Arduino code

This code is intended for any generic Arduino system.

// Include the Symbiont library
#include "SymbiontLiDAR.h"

// Declare variables -- just as strings
String header;
String data;

// Instantiate class
SymbiontLiDAR myLaser;

void setup(){
    // Begin Serial connection to computer at 38400 baud
    // Obtain the header just once
    header = myLaser.getHeader();
    // Print the header to the serial monitor

void loop(){
    // Take one reading every (10 + time to take reading) seconds
    // and print it to the screen
    data = myLaser.getString();
    delay(10000); // Wait 10 seconds before the next reading, inefficiently

Northern Widget Margay code

The Margay data logger is the lightweight and low-power open-source data-logging option from Northern Widget. It saves data to a local SD card and includes on-board status measurements and a low-drift real-time clock. We have written a library to interface with the Margay, which can in turn be used to link the Margay with sensors.

// Include the Symbiont library
#include "Margay.h"
#include "SymbiontLiDAR.h"

// Declare variables -- just as strings
// Empty header to start; will include sensor labels and information
String header = "";
String data;

// Instantiate classes
SymbiontLiDAR myLaser;
Margay Logger; // Margay v2.2; UPDATE CODE TO INDICATE THIS

// I2CVals for Symbiont
uint8_t I2CVals[] = {0x50}; // DEFAULT

//Number of seconds between readings
uint32_t updateRate = 60;

void setup(){
    header = header + myLaser.getHeader();
    Logger.begin(I2CVals, sizeof(I2CVals), header);

void loop(){, updateRate);

String update() {
    return myLaser.getString();

void initialize(){

Northern Widget Resnik code

Currently nearly identical to Margay code, by design. Add telemetry with Particle Boron.

// Include the Symbiont library
#include "Resnik.h"
#include "SymbiontLiDAR.h"

// Declare variables -- just as strings
// Empty header to start; will include sensor labels and information
String header;
String data;

// Instantiate classes
SymbiontLiDAR myLaser;
Resnik Logger;

// I2CVals for Symbiont
uint8_t I2CVals[] = {0x50}; // DEFAULT

//Number of seconds between readings
uint32_t updateRate = 60;

void setup(){
    header = header + myLaser.getHeader();
    Logger.begin(I2CVals, sizeof(I2CVals), header);

void loop(){, updateRate);

String update() {
    return myLaser.getString();

void initialize(){

Housing and cabling

Parts required

This is what we used for our build; you can be creative based on materials and availability.

Mounting plate perspective view in Easel

Mounting plate perspective view in Easel for easy integration with the X-carve series of lower cost CNC routers.


Prior to assembly, ensure that you have:

  1. Drill and tap 12 mm holes in the side of the box. Use a M12-1.5 tap for the threads.

  2. Install the Symbiont board as shown below using two of the #4 self-tapping screws.

Symbiont prototype in box

  1. Using the sealing screws, cap nuts, and washers, install the LiDAR Lite sensor onto the lid. By mounting the LiDAR Lite at an angle, you can fix it to the box lid in a way that still allows the box to open and close properly. The cap nuts go on the outside of the housing.

Prototype sensor assembly

  1. Thread the cables through the cable glands and attach them to the screw terminals. A 1.8 mm flat-head screwdriver can be very useful for this. Note that these cables cross the board in the above image (upper left) -- and that (unlike in the image!) you should do this after the board is in the box.

  2. Using the switch in the box, select the desired communications protocol. For most of our uses, this is I2C.

  3. Attach the cable to the data logger.

  4. Test the LiDAR Lite unit.

  5. When satisfied with the tests, turn off the data logger and place a protective cover over the lenses of the LiDAR Lite for safety during transport. We have a set of "safety glasses" available for 3D printing. You may want to secure these in place with electrical tape.

  6. Place desiccant in the box. I typically install two small desiccant packs on the side of the board above the switch and large capacitor and pack them in so they are unlikely to move; this is in order to keep the indicator LED visible.

  7. Securely screw the lid onto the box to seal the LiDAR Lite + Symbiont unit.

  8. Mark the corner of the box next to the Hall-effect sensor, and mark the orientations of the roll and pitch axes. The pitch axis should be positive when the long strain-relieved cable gland tilts upwards. The roll axis should be positive when, when looking at the side of the assembly such that the long strain-relieved cable gland is on the left and the laser rangefinder is pointed up, the laser rangefinder rolls towards you.

Add an annotated picture of roll, pitch, and Hall-Effect sensor locations

  1. Place the box on a measured flat surface and tap the magnet to the marked location by the Hall Effect sensor. This will appropriately zero the offsets for the sensor and increase its near-horizontal accuracy significantly. This must be done when the sensor is powered; the LED will light up during the full duration of magnetic contact. When connected to a logger, this can be done by putting the magnet in place, hitting the "RESET" button (e.g., on a Margay logger), and then holding the magnet in place with the read light on until the first reading is complete. Doing this while connected to a computer is recommended in order to see the first reading on the serial monitor and double check that the zeroing/calibration is appropriate. For a convenient magnet holder, you can use our [3D-printable magnetic wand][3Dprint], which holds a small rare-Earth magnet. This may be a generic part, though this 3/8" x 1/8" Neodymium Disk Magnet works well in our experience.

  2. Use the 1/4"-20 hardware to attach the LiDAR Lite box to the mounting plate. The bolts pass through the center holes on the tabs on either side of the box, with their heads towards the box lids.

Note: Mounting plate holes currently too small for these; will need to be updated. Currently using #8 hardware.

Side view: long axis

Side view: short axis, LiDAR Lite cable

  1. (Can wait for field installation) attach the unit via its mounting plate to the appropriate pipe, post, etc. This typically involves the U bolts, noted above. Curved EMT conduit can be helpful for providing a way to select the angle of the sensor. Although we use a single 45-degree bend piece of conduit in the images below, we might suggest attaching a 90-degree bend conduit first, and then a 45-degree bend as necessary to adjust the sensor away from a direct down-looking view; the sensor will attach directly to the convex side of the bend instead of bridging over airspace, which required us to use rocks as shims to reduce mounting-plate flexure. (This suggestion, however, increases torque on the mast; future field testing is needed to determine the best method.) Note: The LiDAR Lite unit will likely give a return only if its angle to the surface that it is measuring is steeper (i.e., more orthogonal) than 45 degrees.

Field installation prototype in the lab: Sensor only

Field installation

Field installation prototype in the lab

Lab mock-up of field installation for LiDAR Lite. The boxes at right contain Northern Widget Margay data loggers with a single cable gland to connect to the Symbiont box. The two posts next to them provide examples of how to connect the 3/4" EMT conduit to some fixed point in the environment, either the side of a flat(ish) wall (right) -- though the brackets aren't necessary or even always good, since we can bolt right through the pipe -- or to a flat(ish) surface using a floor flange. We drilled holes through the conduit to attach 1/4" eye bolts (1/4"-20, 1.5" long) using nuts, lock washers, and washers, to the conduit. These eye bolts then held turnbuckles to which we attached cables (lower left). The other end of the cables can be attached via sleeve or wedge anchors to rock, or to other sturdy structures. The LiDAR Lite + Symbiont is in the upper left corner, albeit attached in a way that would have it looking up... unless it were attached to the end of the 90-degree bend.

Mast construction


  • 3/4" EMT rigid conduit
    • Straight: main mast
    • 90-degree bend
    • 45-degree bend
  • 3/4" Conduit screw-down connectors (to join multiple pieces of conduit)
  • 3/4" Conduit-to-threaded connectors (to link smooth conduit to threaded 3/4" plumbing, needed only if you use a floor flange)
  • Floor flange (1, if you want to attach to a flat surface)
  • 1/4-20 x 1.5" eye bolts (3, +1 in case you bend/break one)
  • 1/4" x 2+" long sleeve or wedge anchors; 4 for the floor flange or 2 for bolting into the side of a rock. Extras suggested, as these can be broken during installation.
  • Turnbuckles; I suggest getting 3 that are threaded all the way down (as shown in the picture above). Get an extra in case you break one.
  • 1/8" metal cable
  • 1/8" cable clamps (x6, +1 in case you lose the nuts)
  • 1/8" metal cable turns (x6; if you lose one, don't worry; these are nice for durability but not totally necessary)
  • 3/8" x 2.5+" long sleeve or wedge anchors for the cables; these are less breakable than their 1/4" cousins, but you might still want an extra one.
  • Extra 1/4"-20 hardware. I almost always end up needing this.
  • Cable management (keep secure and prevent from flapping in the wind, which can cause damage)
    • Cable ties (zip ties). Ensure that these are UV-resistant; many black ones are.
    • Electrical tape
  • Optional: 2x ~1-3/4" hose clamps if mounting a data-logger box for the Margay on the main mast. Longer hose clamps (or multiple 1-3/4" clamps in series) for larger logger boxes, so long as they can remain stable on the mast.

You might not need the guy wires and associated hardware if you bolt your assembly to the side of something (like a rock or wall). Some guy wires are generally encouraged.


Leveling the base Placing and leveling the base.

Base is installed using wedge anchors Installing the base using wedge anchors.

Conduit installed and anchored with eye bolts and turbuckles. Installing the conduit and anchoring it with eye bolts and turnbuckles. Before going out to the field, we strongly suggest you pre-drill the holes and pre-install the eye bolts.

Cable to rock bolt Tightening the cable around the bolt in the rock using the cable clamp.

Aiming the LiDAR Lite Aiming the LiDAR Lite unit at the river. In future models, we are considering adding peep sights to the mounting bracket. Professor Billy Armstrong in the photo.

The quality of any zeroing with the Hall-effect sensor will be limited by the ~1-degree precision of the accelerometer that is used as an inclinometer; as an additional check, it is recommended to measure and record the orientation of the field-mounted unit by hand.

Perspective view upvalley Fully installed clifftop unit

Perspective view after installation. Fully installed clifftop unit Note data-logger box attached with cable ties, as well as the mounting-plate attachment. For the latter, we used a rock as a shim with a 45-degree piece of EMS conduit. However, it may have been better to use a 90-degree piece of conduit and a 45-degree piece of conduit together to keep us from needing this shim -- though this would have increased torque on the main mast.

Alternative method: installing on the side of a rock.

Culvert deployment with context Full mast installed on the side of a rock. *Note the LiDAR Lite + Symbiont and the data-logger box.


Support for this project provided by:



Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.


Design files for a support and interface unit for the Garmin LiDAR Lite



CC-BY-SA-4.0, GPL-3.0 licenses found

Licenses found






No packages published