This repository holds the code, schematics, and documentation to build a Modular Internet Controllable Real-time Optical-density Logger (microLogger or µLogger for short). All content of this repository is free to use for noncommercial research and development efforts as outlined in the terms of the included LICENSE file.
To cite µLogger in publications use:
Kopf S and Younkin A, 2025. µLogger: a Modular Internet Controllable Real-time Optical-density Logger. https://github.com/KopfLab/micrologger_device
A BibTeX entry for LaTeX users is
@Manual{
microLogger,
title = {µLogger: a Modular Internet Controllable Real-time Optical-density Logger},
author = {Sebastian Kopf and Adam Younkin},
year = {2025},
url = {https://github.com/KopfLab/micrologger_device}
}
Modular Internet Controllable Real-time Optical-density Loggers (µLoggers) are optical density measurement devices for continuously recording the growth of a microbial culture directly in its culturing vessel. Each microLogger consists of a compact high strength carbon fibre culture vessel holder that has a built-in light source at a narrow band wavelength and a light sensor with automatically adjustable gain that measures the light transmission across the culture vessel to automatically and continuously quantify optical density at user defined time intervals. A magnetically coupled stirrer built into the vessel holder can agitate the culture both continuously as well as in vortexing mode (= pulse agitation) at user-set stir/vortexing speeds from 50 to 5000 rpm. Culture vessel adapters that are magnetically secured to the vessel holder allow for quick and easy swapping for differently sized culture vessels and snugly hold the culture vessel in place using a radial spring mechanism. Adapters can be custom sized for the preferred culture vessel from standard 18mm diameter 15mL culture tubes up to 58mm GL45 100mL media bottles. Typical adapter sizes also cover culture vessels typically used in anaerobic microbial culture including balch tubes and serum bottles of varying sizes. Additional optional adapters that are magnetically secured on top of the vessel adapter can provide additional functionality such as user-controlled illumination for experiments with phototrophic microorganisms. Each µLogger is connected to a compact controller (the micrologger "brain") that connects to the culture vessel holder via a single cable such that the vessel holder can be placed inside an incubator (e.g. for temperature or gas modulation) while the controller sits outside the incubator and provides full control and power to the culture vessel holder for stirring, optical density measurements, and (optionally) lighting. The controller has built-in WiFi connectivity and receives/sends data wirelessly wirelessly. This makes it possible to monitor optical density of the microbial cultures in real-time from any location. The controller also has a built-in screen that displays the state of the micrologger (e.g. stir speed, read interval, internet connectivity) as well as the real-time data from the culture vessel so that users can check on their experiments with a glance at the controller without opening the incubator and without handling the culture vessel in any way to avoid potentially disturbing an experiment. For convenience, the controller can also be attached magnetically to the outside of the incubator (if metal) or any other metallic surface.
- easily extensible framework for implementing cloud-connected µLoggers based on the secure and well-established Particle Photon 2 platform
- constructs JSON-formatted data logs for flexible recording in spreadsheets or databases via cloud webhooks
- build-in data averaging and error calculation
- built-in support for remote control via cloud commands
- built-in support for device state management (device locking, logging behavior, data read and log frequency, etc.)
- built-in connectivity management with data caching during offline periods - Photon memory typically allows caching of 50-100 logs to bridge device downtime of several hours
Install the Particle Cloud command line interface (CLI), and log into your account with particle login. Then the following make shortcuts are available:
- to compile:
make PROGRAM(e.g.make tests/blinkandmake devices/micrologger) - to flash latest compile via USB:
make flash - to flash latest compile via cloud:
make flash device=DEVICE - to start serial monitor:
make monitor
For additional options and make targets, see the documentation in the makefile.
To run any web commands, you need to either have the Particle Cloud command line interface (CLI) installed, or format the appropriate POST request to the Particle Cloud API. Here only the currently implemented CLI calls are listed but they translate directly into the corresponding API requests. You only have access to the microcontrollers that are registered to your account.
The state of the device can be requested by calling particle get <deviceID> state where <deviceID> is the name of the photon you want to get state information from. The latest data can be requested by calling particle get <deviceID> data. The return values are always array strings (ready to be JSON parsed) that include information on the state or last registered data of the device, respectively. Requires being logged in (particle login) to have access to the photons.
All calls are issued from the terminal and have the format particle call <deviceID> device "<cmd>" where <deviceID> is the name of the photon you want to issue a command to and <cmd> is the command (and should always be in quotes) - e.g. particle call my-logger device "data-log on". If the command was successfully received and executed, 0 is returned, if the command was received but caused an error, a negative number (e.g. -1 for generic error, -2 for device is locked, -3 for unknown command, etc.) is the return value. Positive return values mean executed with warning (e.g. 1 to note that the command did not change anything). The command's exact wording and all the return codes are defined in the header files of the controller and components (e.g. LoggerController.h and ExampleLoggerComponent.h). Issuing commands also requires being logged in (particle login) to have access to the photons.
Some common state variables are displayed in short notation in the upper right corner of the LCD screen (same line as the device name) - called state overview. The state overview starts with a W if the photon has internet connection and ! if it currently does not (yet). Additoinal letters and their meanings are noted in the following command lists when applicable.
See the full documentation in docs/commands.md for a list of available commands for the microloggers.