---
title: "Setting up raw lens encoders"
canonical: "https://documentation.chaos.com/space/ARENA/924090403/Setting%20up%20raw%20lens%20encoders"
format: markdown
---
This page details how to set up raw lens encoders in Chaos Arena.


## **1. Initialize the Encoder Range**

---

Move the lens through its physical limits to define the encoder's operational range.

- **For Hard Stop Encoders:** Rotate the lens from one end to the other. Arena will automatically update the **Near** and **Far** fields with the minimum and maximum raw values received.
- **For Soft Stop (Infinite Roll) Encoders:** Manually set the **Near** and **Far** values to match one full rotation or a specific range of movement that corresponds to the lens markings.

## **2. Map Physical Points**

---

Create a mapping table to translate the normalized encoder range into physical lens values.

1. Move the lens to a specific marking (e.g., **50mm** focal length or **2.5m** focus distance).
2. In the **Lens Mapping** UI, observe the **Normalized Value** at that position.
3. Add a new entry to the mapping table with that **Normalized Value** and the corresponding **Physical Value** (e.g., `50`).
4. Repeat this process for all major markings on the lens.

## **3. Select Interpolation Method**

---

- Use **Linear** interpolation for a simple, direct mapping.
- Use **Cubic Mono** for a smoother transition between mapping points, especially for lenses where the encoder-to-physical relationship is non-linear.

## **4. Verify and Save**

---

Rotate the lens through its entire range and verify that the reported **Physical Value** in Arena matches the markings on the physical lens. Once verified, use the **Save as **button to store the configuration as a `.json` file for future use.


> ℹ️ If the reported physical value increases while the lens is moved towards a lower marking (e.g., moving from 85mm to 50mm), enable the **Invert** toggle to flip the mapping direction.