Monolith v2#

Overview#

Monolith is a wireless data logger platform with logger hardware (a.k.a. TMA-1) and web-based Control Hub.

The project's inspiration was to help students (me 3 years ago) participating in Formula Student and Baja easily collect data from their cars, but it can be used in any other applications, or just as an ESP32-S3 development board.

This is an open-(source & hardware) project, licensed under the 🍺Beerware License for all non-commercial use. You can find more details on the GitHub.

Features#

📡 Full wireless support

📀 10 Hz data rate across various signals

💡 Customizable web-based data analysis tool

All wireless features require a Wi-Fi connection to the Internet.

Q. But where to get it on the car?
A. Bring a phone with Wi-Fi hotspot on board! It will also make you available to blame the driver by calling them while driving.

Preview#

Compare with v1#

Data Viewer Demo#

Do It Yourself!#

Monolith is an open-hardware project. It is highly recommended to build the TMA-1 PCB yourself.

KiCAD schematic and layout are available at device/hardware.

Build TMA-1 PCB#

  1. Download and unzip monolith-{version}.zip from the Release.
  2. Go to JLCPCB and upload pcb/gerbers/GERBER-monolith.zip.
  3. Turn on the PCB Assembly toggle switch at the bottom.
    • Select 2D barcode with 5*5mm, Specify Position option for Mark on PCB.
    • No need to adjust any other options. Maybe choose a color you prefer?
      Please just keep in mind that black is the best color ever for the TMA-1 and all other PCBs around the Earth.
  4. Upload BOM-monolith.csv and CPL-monolith.csv.
  5. Place an order and enjoy some beer until the shipment arrives.
  6. Solder 8x Molex 5569-04A2(39300040) connectors to the PCB.
  7. Insert a CR1220 battery and an SD card.
  8. goto 'Upload Firmware';
⭐ Secret tip

Warm Secret Tip

To reduce PCB manufacturing cost, exclude the BT1 CR1220 battery holder, L1 power inductor and U2 ESP32-S3 module from assembly. Instead, purchase and solder these parts manually.

Skipping BT1 and L1 will save you a bottle of beer (extended components fee $3 each).

In particular, ESP32-S3 module requires Standard PCB Assembly instead of Economic PCB Assembly, which doubles the price💸!

Soldering ESP32 manually may be a bit challenging for the newbies, but it will be worth it. Without those parts, the cost is about $60 for 5x assembled PCBs.

You should use the ESP32-S3-WROOM-1 module, and do NOT use the module with 8MB+ PSRAM (R8/R16 variants). Just solder the cheapest one (ESP32-S3-WROOM-1-N4).

If you only need a few PCBs, set PCBA Qty to 2 instead of 5. It will save you another $20 and give you 3 empty PCBs as souvenir.

Upload Firmware#

  1. Prepare a 3.3V UART to USB converter.
    • ⚠️ The converter MUST have both DTR and RTS in addition to RX and TX.
    • ⚠️ Do NOT use a converter with 5V output unless it has a 3.3V voltage selector.
  2. Solder a 2x3 2.54mm pin header to the board's UART connector.
  3. Connect each pin of the Monolith PCB with the following pinout:
    • 3V3, GND, DTR, RTS: corresponding pins on the converter.
    • RX, TX: cross-connect with the converter (RXTX).
  4. Download and unzip esptool from here.
  5. Download and unzip monolith-{version}.zip from the Release.
  6. Copy the esptool binary into the unzipped firmware/ directory.
  7. Open a command prompt, cd to the firmware/ directory and run:
    ./esptool --chip esp32s3 -b 460800 --before default-reset --after hard-reset write-flash "@flash_args"

Prepare Server#

The TMA-1 and the Control Hub need an MQTT server (broker) to communicate.

For your sake, there is a free default server v2.monolith.luftaquila.io.

To use the default server, send an email to mail@luftaquila.io with your school name, desired channel name and channel key. Please note that the default server may become unavailable at any time for any reason.

I want to set up the server on my own.

Deploy (Optional)

If you want to stay away from me, use a commercial MQTT broker service or deploy your own server by following the guide below.

Here, I'll assume you have experience with server things. (DNS records, firewalls, etc.).

Prerequisites: A Linux machine with Docker Engine and Node.js. Don't have one? Go get one.

It is theoretically possible to run with Docker Desktop and a Windows machine, but I haven't tried it.

Run the commands below, and don't forget to replace <YOUR_CHANNEL_NAME> with a cool name.

sudo apt install -y mosquitto
git clone https://github.com/luftaquila/monolith.git

cd monolith/web
npm install
npm run build

cd ../server/config
# set your channel key as the password
mosquitto_passwd -c mosquitto.passwd <YOUR_CHANNEL_NAME>

cd ..
cp .env.example .env
vi .env # set `ACME_EMAIL` and `DOMAIN_NAME` to your own

sudo docker compose up -d

Usage#

Device (TMA-1)#

As mentioned in the DIY section above, all 8x connectors on the PCB are Molex 5569-04A2(39300040). The mating part is Molex 5557-04R(39012040), which uses the Molex 5556T(39000038) as a crimp terminal.

The pinout for each connector is labeled on the PCB. Please remember that the misconnection of the pins may cause PERMANENT damage to the device.

Specifications#

MINTYPMAXUNIT
Supply Voltage5.536V
Power Consumption0.51W
Digital Input Voltage058.5V
Analog Input Voltage (1)-0.37.2V
Accelerometer Range-88g
Gyroscope Range-500500°/s

(1) When voltage divide jumper is connected. 1/2 for AIN5, AIN6 and channels with no jumper.

Wi-Fi#

TMA-1 requires a 2.4GHz Wi-Fi connection to provide wireless features such as live telemetry and remote record downloads.

However, the data logging function works without Wi-Fi. To use it offline, remove the SD card and mount it on your computer after driving.

TMA-1 automatically sets its internal clock via SNTP, so you must connect it to the Internet at least once for time synchronization.

Initial Setup#
  1. Power up the device.
  2. On first boot, it creates its own Wi-Fi access point (AP) named Monolith v2 XXXXXX. Password is monolith.
  3. Connect to that AP and open http://192.168.4.1 in your browser.
  4. Set Wi-Fi SSID and Wi-Fi Password to the phone's Wi-Fi Hotspot that TMA-1 will connect to while driving (the phone that the driver will bring onboard).
  5. Set Server Address to your server.
  6. Set Device Name and Device Key to match the values you emailed me.
  7. Click Save, then click Reboot.

TMA-1 will try to connect to the configured Wi-Fi network after rebooting.

Reset#

To reset the Wi-Fi and server configuration, short the RST jumper on the PCB for 3 seconds and release. This restores Wi-Fi, server, device name/key, and all configuration data to factory defaults.

After reset, proceed to the Initial Setup step above.

Power & CAN#

The PWR/CAN port supplies power to the TMA-1 and provides a CAN connection.

VIN and GND are the power supply pins. The device draws about 0.5W during active operation (40mA @12V).

A PCB jumper labeled CAN 120Ω enables the on-board termination resistor. Set it according to your CAN bus design. There must be 2x 120Ω resistor on the bus, one at each end, resulting in 60Ω between CANH and CANL line.

GPS#

TMA-1 supports an external GPS module for location tracking.

Connect the GPS port to a GPS module with UART support using the following pinout:

Currently, only U-BLOX NEO-6M/7M/8M modules are supported. Support for additional modules may be added in the future on demand.

Debug Output#

DEBUG port is inactive and reserved for custom use.

It is intended for outputting the recorded logs to other onboard MCUs (e.g., a cockpit display).

Electrically, it provides a 3.3V 0.5A power rail and two free GPIO lines. It's up to you to customize how you use this connector.

Digital & Analog#

TMA-1 provides 4x digital inputs and 6x analog inputs, with 5x 5V power rails that can supply 2.5A in total.

Digital Inputs#

It can withstand brief higher voltages, but continuous operation is limited to 8.5V.

Analog Inputs#

Absolute maximum input voltage of the analog channel is 3.6V.

Meanwhile, AIN1 to AIN4 have a selectable 1/2 voltage divider circuit. It is enabled by connecting the jumper in front of the each AIN channel on the PCB. The maximum input voltage is increased to 7.2V if the divider is enabled.

Therefore, sensors with the maximum output voltage of 5V are only applicable when the divider is enabled.

Since AIN5 and AIN6 have no voltage divider, their maximum voltage is fixed at 3.6V.

Control Hub#

Control Hub is at https://v2.monolith.luftaquila.io and you can use it for free any time.

Live Telemetry#

Before using Live Telemetry, set the server information in the Device Configuration tab.

Also, to view the incoming CAN data, you need to set the CAN Decoders in the UI Configuration tab first.

Once the server is configured correctly and the TMA-1 is online, there is nothing else to do here. Everything will work like magic.

Console#

You can send a user event or a CAN message to the device.

Data Viewer#

To review your drive, you need to download the recorded data first. Refer to the Data Downloader section in the Device Configuration tab to download data.

To view the recorded CAN data, set the CAN Decoders in the UI Configuration tab first.

UI Configuration#

You can adjust the visibility of the cards in the Live Telemetry and the Data Viewer. Also, you can set the input signal's name, unit and value multipliers.

Refresh the page for the changes to take effect.

Import/Export#

Export/import the current UI configuration across devices/browsers.

Display#

Control the visibility of the cards in each view.

Units#

Manage custom units that can be used for analog and CAN data.

Digital#

This section enables you to change the channel name. (e.g., RUINED IF ON instead of DIN1)

Analog#

CAN#

Manage CAN message decoders. A decoder extracts useful data from the CAN message bytes.

Device Configuration#

This section configures the server for the Control Hub and the device peripherals.

The configurations will be automatically loaded if the device is online.

Server#

All values must match the values configured to the device during the Device - Initial Setup sequence.

The server will be automatically connected after you click the save button.

Device#
Inputs#

Controls whether the digital/analog input channels are logged or not.

CAN#

Refer to the Acceptance Filter section of the ESP32-S3 API Reference for the detailed explanation of the Filter and Mask. All CAN messages will be accepted by default.

GPS#
Danger Zone#
Data Downloader#

After loading the file list, click the download button to download a specific file.

Development#

This section is for computer-guys who wants to modify the software on their own.

Open the magic

Firmware

  1. Star the GitHub repository.
  2. Install ESP-IDF And run the following commands.
git clone https://github.com/luftaquila/monolith.git
cd monolith/device/firmware
make build
make run   # build & flash

Control Hub

  1. Star the GitHub repository.
  2. Run the following commands:
git clone https://github.com/luftaquila/monolith.git
cd monolith/web
npm install
npm run vite
npm run build
Monolith v2 Documentation v1.0.0