# kenberland/lime-scooter architecture

> Architecture diagram of the GitHub repository kenberland/lime-scooter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kenberland/lime-scooter
- Repository: https://github.com/kenberland/lime-scooter

## Overview

This repository documents a Lime Gen3 scooter retrofit: a microcontroller reads scooter/controller signals and drives a replacement display with speed, odometer, and battery information. It also includes circuit and enclosure designs. The README documents these relationships, but no source excerpts were provided, so firmware internals and exact signal-processing details are not represented.

Main entry points: [`lime-display.f3z`](https://github.com/kenberland/lime-scooter/blob/main/lime-display.f3z) (Replacement display), [`lime.ino`](https://github.com/kenberland/lime-scooter/blob/main/lime.ino) (Display firmware), [`lime.v03.fzz`](https://github.com/kenberland/lime-scooter/blob/main/lime.v03.fzz) (Wiring circuit), [`README.md`](https://github.com/kenberland/lime-scooter/blob/main/README.md) (S866 UART protocol)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_electronics["Electronics"]
  node_controller["Replacement motor controller"]
  node_circuit["Wiring circuit<br/>[lime.v03.fzz]"]
  node_power["5V power supply"]
  node_mcu["Wemos D1 Mini"]
  node_display["Replacement display<br/>[lime-display.f3z]"]
end

subgraph group_firmware["Firmware and protocol"]
  node_firmware["Display firmware<br/>[lime.ino]"]
  node_telemetry["Speed, odometer, battery<br/>[lime.ino]"]
  node_protocol["S866 UART protocol<br/>[README.md]"]
  node_diagnostics["Protocol investigation tools<br/>[diagnostics.zip]"]
end

subgraph group_mechanical["Mechanical design"]
  node_display_housing["Display housing<br/>[lime-display.stl]"]
  node_mcu_standoff["MCU standoff<br/>[MCU-standoff.f3d]"]
  node_power_housing["Power-supply housing"]
end

node_rider(("Scooter rider"))
node_scooter["Lime Gen3 scooter"]

node_rider -->|"views"| node_display
node_controller -->|"UART signals"| node_firmware
node_firmware -->|"drives"| node_display
node_firmware -->|"displays"| node_telemetry
node_diagnostics -->|"investigates"| node_protocol
node_protocol -->|"reverse-engineers"| node_controller
node_power -->|"supplies 5V"| node_mcu
node_mcu -->|"powers"| node_display
node_scooter -->|"uses replacement"| node_controller
node_circuit -->|"wires"| node_mcu
node_circuit -->|"connects"| node_controller
node_display_housing -->|"houses"| node_display
node_mcu_standoff -->|"mounts"| node_mcu
node_power_housing -->|"houses"| node_power

click node_circuit "https://github.com/kenberland/lime-scooter/blob/main/lime.v03.fzz"
click node_display "https://github.com/kenberland/lime-scooter/blob/main/lime-display.f3z"
click node_firmware "https://github.com/kenberland/lime-scooter/blob/main/lime.ino"
click node_telemetry "https://github.com/kenberland/lime-scooter/blob/main/lime.ino"
click node_protocol "https://github.com/kenberland/lime-scooter/blob/main/README.md"
click node_diagnostics "https://github.com/kenberland/lime-scooter/blob/main/diagnostics.zip"
click node_display_housing "https://github.com/kenberland/lime-scooter/blob/main/lime-display.stl"
click node_mcu_standoff "https://github.com/kenberland/lime-scooter/blob/main/MCU-standoff.f3d"
click node_power_housing "https://github.com/kenberland/lime-scooter/blob/main/power-supply-housing.f3d"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_controller,node_circuit,node_power,node_mcu,node_display toneBlue
class node_firmware,node_telemetry,node_protocol,node_diagnostics toneAmber
class node_display_housing,node_mcu_standoff,node_power_housing toneMint
class node_rider,node_scooter toneIndigo
```

## Components

### Electronics

- **Replacement motor controller**
- [Wiring circuit](https://github.com/kenberland/lime-scooter/blob/main/lime.v03.fzz): `lime.v03.fzz`
- **5V power supply**
- **Wemos D1 Mini**
- [Replacement display](https://github.com/kenberland/lime-scooter/blob/main/lime-display.f3z): `lime-display.f3z`

### Firmware and protocol

- [Display firmware](https://github.com/kenberland/lime-scooter/blob/main/lime.ino): `lime.ino`
- [Speed, odometer, battery](https://github.com/kenberland/lime-scooter/blob/main/lime.ino): `lime.ino`
- [S866 UART protocol](https://github.com/kenberland/lime-scooter/blob/main/README.md): `README.md`
- [Protocol investigation tools](https://github.com/kenberland/lime-scooter/blob/main/diagnostics.zip): `diagnostics.zip`

### Mechanical design

- [Display housing](https://github.com/kenberland/lime-scooter/blob/main/lime-display.stl): `lime-display.stl`
- [MCU standoff](https://github.com/kenberland/lime-scooter/blob/main/MCU-standoff.f3d): `MCU-standoff.f3d`
- [Power-supply housing](https://github.com/kenberland/lime-scooter/blob/main/power-supply-housing.f3d): `power-supply-housing.f3d`

### Other components

- **Scooter rider**
- **Lime Gen3 scooter**

## Connections

- Scooter rider → Replacement display: views (evidence: `README.md`)
- Replacement motor controller → Display firmware: UART signals (evidence: `README.md`)
- Display firmware → Replacement display: drives (evidence: `README.md`)
- Display firmware → Speed, odometer, battery: displays (evidence: `README.md`)
- Protocol investigation tools → S866 UART protocol: investigates (evidence: `README.md`)
- S866 UART protocol → Replacement motor controller: reverse-engineers (evidence: `README.md`)
- 5V power supply → Wemos D1 Mini: supplies 5V (evidence: `README.md`)
- Wemos D1 Mini → Replacement display: powers (evidence: `README.md`)
- Lime Gen3 scooter → Replacement motor controller: uses replacement (evidence: `README.md`)
- Wiring circuit → Wemos D1 Mini: wires (evidence: `README.md`)
- Wiring circuit → Replacement motor controller: connects (evidence: `README.md`)
- Display housing → Replacement display: houses (evidence: `README.md`)
- MCU standoff → Wemos D1 Mini: mounts (evidence: `README.md`)
- Power-supply housing → 5V power supply: houses (evidence: `README.md`)
