Skip to content
doomke edited this page Jul 6, 2023 · 23 revisions

Welcome to the XR Twin Lab wiki, where you can find everything concerning the physical side of our twin lab setups.

General

XRTL strives to make standard optical lab equipment like mirrors and lasers remote controllable by adding cheap electronics including actuators, sensors and cameras. We provide 3D-printable attachments that allow to secure the electronics to the equipment without permanently altering it. The components are capable to communicate their current state and any changes with a remote server using socket.io.

graph LR
    hardware(hardware)
    ESP32(ESP32)
    server[server]

    ESP32 -- controls --> hardware
    hardware -- reads --> ESP32
    ESP32 -- status --> server[server]
    ESP32 <-- command --> server
Loading

We chose espressifs ESP32 family to act as the bridge between the physical and virtual world in our setups, as those microcontrollers are comparably cheap, powerful and easy to use due to the widespread availability of dev boards. The dev boards are very flexible and offer a large number of input and output pins, a variable number of different actuators and sensors might therefore be connected to each individual microcontroller depending on the setup. To accomodate this variability, this project is organized in modules that can be dynamically added to an individual dev board.

Setting up a specific component poses two particular challenges:

  1. installing the necessary hardware including power supplies and wiring
  2. configuring the firmware

Firmware

The firmware is the software that gets installed on the ESP32 and handles all interactions with the server and the hardware. It comes as a pre-compiled binary file that needs to be flashed onto the ESP32 prior to use. The firmware is hardware specific only in the way that different versions are needed for a specific types of dev board to accomodate major board differences like pin configurations. Otherwise it is universal, so any specific type of module can be added to or deleted from an ESP32 after the firmware has been flashed.

You can find a short guide guide to flash a pre-compiled binary in our guide section or you can compile the binary yourself using platform.io (recommended for experienced users only).

Once the firmware is installed, the hardware can be initialized by editing the settings.

Modules

Name Description
camera stream camera images to the server
infoLED simple display device indicating information like connection status or active movement
input read and convert voltages, monitor and relay values
macro group other modules by defining more complex states and executing several instructions at once
output switch a voltage to control actuators directly or by PWM
servo manage position, speed and power state of a servo motor
socket establish connection to the socket server, send and receive events
stepper manage position, speed and power state of a stepper motor
wifi establish and maintain connection to a wireless network

Installing the Hardware

General

Guides

Principle of Operation

Modules

Software Hardware
camera camera
infoLED infoLED
input input
macro macro
output output
servo servo
socket socket
stepper stepper
WiFi wifi

Clone this wiki locally