Skip to content
BoujeeEnjinia1701Public

About

An open digital twin starter kit: a small edge gateway that collects readings from lab sensors (FieldNode and others), plus software that ties live data to each project's build123d model so it can be seen and compared with the design calculations.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

TwinKit

TRL 3 Hardware: CERN-OHL-S-2.0 Software: MIT DOI REUSE compliant Archived in Software Heritage

Area: Digital Twins · TRL: 3 of 9 (proof of concept on paper) · Value-engineering target: about $300 USD · Difficulty: 3 of 5

An open digital twin starter kit: a small edge gateway that collects readings from lab sensors (FieldNode and others), plus software that ties live data to each project's build123d model so it can be seen and compared with the design calculations.

TwinKit: open digital twin starter kit and edge gateway, photoreal render

Interactive 3D model · Concept blueprint (PDF) · General arrangement (PDF) · Sizing calculations · Prototype build plan · Design decisions · Review note

Concept rationale

Every lab project already has a parametric model and calculated targets. Linking those to live readings closes the loop between design and reality at low cost: instead of alarming on fixed limits, the twin shows where a device departs from what its own calculation predicted, and on which part of the model.

The kit is open and garage-buildable because the pieces already exist as off-the-shelf modules and open-source software. What is missing is the thin mapping layer between sensor channels, model parts and calculations, and a small offline gateway that a small team can assemble on a DIN rail, inspect and adapt.

Burning platform

Small operators find faults late because they lack the monitoring that large operators take for granted. Water utilities alone lose an estimated 126 billion m³ of treated water a year, worth nearly $40 billion (World Bank), and about one in four handpumps in sub-Saharan Africa is out of service at any time (Foster et al., 2019, via IRC).

Digital twin platforms are priced for large firms, yet small and medium enterprises make up about 90 % of businesses and more than half of employment worldwide (World Bank). An open kit that runs on one small gateway puts the same early-warning idea within their reach.

Where it could be used

By industry

Industry Use
Water supply Compare tank levels, pump run time and flow with the expected demand curve to catch leaks and pump faults early
Off-grid energy Track battery state of charge and solar yield against the design power budget in mini-grids and solar kits
Small manufacturing Watch machine temperature, vibration or energy use against the process calculation
Cold chain and storage Compare cold room or grain store temperatures with the thermal model
Education and research Teach model-based design with a twin students can build and inspect
Municipal services Gateway and data layer for street sensors through CityTwin

By country or region

Country or region Why it matters there
Kenya Water utilities report a national average non-revenue water of 44 % (WASREB, 2025); low-cost monitoring helps find losses
Sub-Saharan Africa About one in four handpumps is non-functional at any time (Foster et al., 2019); remote twins can flag failures sooner
India About 63.4 million unincorporated micro, small and medium enterprises in the 2015 to 2016 survey (PIB, Ministry of MSME), most without access to enterprise monitoring tools
Brazil About 37.8 % of treated water was lost in distribution in 2022 (Instituto Trata Brasil)
European Union 99 % of the 32.3 million enterprises are micro or small (Eurostat, 2024); an open kit suits firms too small for vendor twin platforms
Singapore Virtual Singapore shows the value of a national twin; TwinKit offers a small, open counterpart for campuses, buildings and schools

What sparked the idea

The idea traces back to Apollo 13 in April 1970. After an oxygen tank failed, the procedures to bring the crippled command module back to life were worked out on the ground against a model of the spacecraft: NASA's history notes that Ken Mattingly "had spent hours in the CM simulator finalizing the procedures" before the crew ran them (NASA, 2020). That pairing of a model with the state of the real system, later formalized as the digital twin (Grieves and Vickers, 2017), then needed a room of simulators and a mission control center. TwinKit asks whether the same loop of model, live readings and comparison can run on one DIN rail gateway for a small device, using the model and calculations each project already has.

Problem

Digital twins are sold as enterprise software, out of reach for small builders and cities, yet the idea is simple: a model, live data and a comparison between them.

Concept

A DIN rail edge gateway (single-board computer, 8-channel LoRaWAN concentrator, 12 V input and LiFePO4 backup) runs open-source software that receives readings from FieldNode and other sensors, stores a year of data offline, and shows each reading on the project's build123d model next to the value its design calculation predicted. TRL 3 calculations (TWK-CAL-001): 50 nodes at 5 min with 0.21 % uplink loss using adaptive data rate (target under 1 %), 6.4 W average, 2.4 h of backup, 4.7 GB of data a year, and an estimated USD 334 in parts against a USD 300 value-engineering target. At 40 °C ambient the processor stays about 16 K below its assumed throttle point at normal load; heavy database jobs are scheduled for cool hours. Fourteen of sixteen requirements are met on paper; setup time needs a timed trial, and cost is reported against its target.

Full design precis: docs/02-concept.md

Key components

  • Single-board computer (4 GB) in a vented 9-module DIN rail enclosure
  • 8-channel LoRaWAN concentrator HAT and antenna (Wi-Fi and Ethernet built in; cellular optional)
  • 12 V DC input (9 to 30 V) with 3.15 A time-delay fuse, DC-DC converter, DIN UPS module with buck-boost charger, and a 12.8 V LiFePO4 backup pack in its own DIN battery box
  • Open-source network server, MQTT broker, TimescaleDB and dashboard
  • TwinKit twin service and model-to-data mapping schema
  • Example twin of FieldNode's battery and solar charge

The priced bill of materials is in bom/bom.csv. The parametric model is cad/src/model.py, with STEP and STL exports in cad/step/ and cad/stl/.

Building the prototype

TwinKit prototype: every component pulled apart and numbered in build order

The prototype build plan (TWK-BLD-001) shows, in pictures, how to make each of the twenty components and put them together in seventeen steps; nothing has been built yet. The worked parts are an aluminium bench plate, a cut DIN rail, and three bought DIN enclosures that are cut or drilled; everything else is bought DIN modules, boards and fittings, wired at their screw terminals. Writing the plan made the design buildable: the backup pack moved into its own battery box, the vents moved to the long walls, and standoffs, an antenna bulkhead, cable entries, rail screws and end stops were added (TWK-DDR-003, open for Amish's review). Every picture is drawn from the model, and the model checks that each part touches what it should and clears what it should not.

Safety

Low voltage only (12 V DC); use a certified mains adapter. The backup pack is a LiFePO4 battery: use a pack with a built-in BMS and fuse, charge it only through the UPS module and never leave a first build charging unattended. Secure the gateway: change default credentials and keep it off public networks until it is hardened. TwinKit is a monitoring aid, not a safety system.

Repository layout

Folder Contents
docs/ Problem, concept, requirements, calculations and design decisions
cad/src/ build123d Python source, the source of truth for all geometry
cad/step/, cad/stl/ Exported models for FreeCAD, other CAD tools and printing
cad/drawings/ 2D sketches and dimensioned drawings
bom/ Bill of materials
electronics/ KiCad schematics and PCB layouts
firmware/ Microcontroller code
media/ Renders, perspectives and photos
build-log/ Dated prototyping notes

Documentation

Controlled documents follow the portfolio documentation standard. Each carries a document ID (TWK-PRC-001 for the precis), a version and a revision history. Branded PDFs are built with python .kit/render.py and attached to GitHub Releases when a document is tagged, for example TWK-PRC-001/v1.0.

Credits

Designed by Amish Chadha. See CONTRIBUTORS.md for roles. To cite this design, use CITATION.cff (GitHub shows it as "Cite this repository").

AI assistance (Claude) was used to accelerate concept renders, prototype documentation and first-pass sizing calculations. Design direction and all decisions are Amish Chadha's, recorded in this repository's decision records (docs/decisions/).

Licenses

  • Hardware (CAD, drawings, BOM, electronics): CERN-OHL-S v2
  • Software (firmware, scripts, notebooks): MIT

A project of the Design Molecule lab.

About

An open digital twin starter kit: a small edge gateway that collects readings from lab sensors (FieldNode and others), plus software that ties live data to each project's build123d model so it can be seen and compared with the design calculations.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages