Trickle: chargers that read the wire
Battery-rickshaw chargers that keep a neighbourhood's transformer alive with no server, no network and nothing to cut.
Track: Neptune North | DurHack 2026 | Team: Alex, Shafian, Aryan, Aaron
Every figure below comes from our simulation (
docs/RESULTS.md, 10 runs per scenario) or from a source listed in In the news (full notes indocs/SOURCES.md). Simulation results are labelled as such, and the transformer heating model is illustrative, not measured.
Inspiration
Every night in Dhaka, battery rickshaws come home and plug in at about the same time. Bangladesh's road transport authority estimates there are more than six million of them. The Home Minister told Parliament they use about 5% of the country's electricity, and a Power Development Board official says night-time demand no longer falls the way it used to after midnight.
Most of this charging happens in small, informal garages on neighbourhood transformers that were never sized for it. We wanted to know whether those chargers could share the transformer fairly without anyone organising them, and whether that would still hold when the organiser disappears.
In the news
| What was reported | Source |
|---|---|
| More than 6 million battery-run rickshaws in Bangladesh (BRTA estimate, Aug 2025) | The Business Standard |
| They use about 5% of national electricity (Home Minister, Parliament, Sep 2026) | The Financial Express |
| Night demand now falls by only about 1,000 MW after midnight, down from about 3,000 MW (power board, Jun 2026) | Prothom Alo |
| Mobile internet shut down nationwide for about ten days, 18 to 28 July 2024 | Wikipedia |
None of these sources says rickshaw charging caused a specific blackout or transformer failure, and we don't claim that it did. They show a grid that's short of power at night, a fast-growing charging load, and networks that can go down.
What it does
Trickle is an interactive simulation of a real block of Dhanmondi, Dhaka, built from OpenStreetMap: two neighbourhood transformers, ten rickshaw garages and 200 rickshaws that drive the streets by day and come home to charge at night. It opens with a short pixel-art intro, tells the story in three acts, then lets you break things yourself:
- Dhanmondi today. Ordinary chargers draw full power the moment a rickshaw plugs in. The load spikes, the east transformer overheats, and in our model it fails at about 23:30. 309 buildings go dark.
- The usual fix. A utility server schedules every charger over the mobile network. It works: the load stays under the limit. Then the network drops, as it did nationwide in July 2024. Chargers with no instructions fall back to charging flat out, and the transformer fails again.
- Our fix. Every charger runs a tiny rule and reads only the voltage at its own socket. When the neighbourhood draws too much, the voltage sags. Each charger that feels it backs off for a random time, and a nearly empty battery backs off less. There's no server, no messages and no clock. The same outage hits both sides; ours has nothing to lose, and the lights stay on. You can click any garage bay to see what one charger "feels": the power at its socket over the last 90 minutes, the line where it backs off, and in plain words why it's doing what it's doing. Free play adds heatwaves, power cuts, rule-breaking chargers and a network outage button.
The hardware is Ebb: a small plug-in box between the wall and the charger a garage already owns. Inside are a metering chip to read the socket voltage, a microcontroller to run the rule and a relay to switch the charger. There's no radio and no SIM. It's a concept design that we haven't built.
How we got here
We didn't start with emergence. We started with the obvious answer and followed where it broke.
- Step 1: show the problem honestly. We built a simulation of one transformer and calibrated it against ordinary charging only, so it shows the evening overload without being tuned to flatter any fix.
- Step 2: try the conventional fix. The natural engineering answer is central control: register every charger, connect it to a server, and schedule it. We built that rival properly, with full knowledge of every rickshaw's departure time, and it does very well while it's connected.
- Step 3: ask what the brief asks. What happens when communication fails? In Dhaka that isn't hypothetical: mobile internet was shut down nationwide for about ten days in July 2024, and most garages are informal and couldn't be networked anyway. Without its server, the conventional fix fails exactly like the ordinary chargers.
- Step 4: remove the network entirely. Every charger is already connected to the one thing they all share, the wire. Its voltage sags as the neighbourhood's load rises, so each charger can sense the whole system from its own socket. The wire is the network. ## How it works: the maths
Time moves in steps of one minute (t = 0, 1, 2, ...). Each transformer and the chargers on it are simulated together; the two transformers are separate networks.
The grid
Load. Household demand B(t) follows a 24-hour profile B̄(h), scaled by the number of buildings each transformer feeds, with a slow random wobble n(t):
B(t) = B̄(h(t)) × (1 + 0.04 × n(t))
n(t+1) = clip(0.98 × n(t) + 0.2 × (u − 0.5), −1, 1), with u uniform on [0, 1]
Each charger draws P = 1 kW or nothing. With D(t) chargers drawing, the transformer's load is
L(t) = B(t) + P × D(t)
Voltage. The further a garage is along the cable from the transformer (position f from 0 to 1), the more its voltage sags. A charger at position f reads, one minute late,
V(t, f) = V_nom × (1 − α × (1 + β × f) × L(t−1) / R) + noise, noise ~ Normal(0, 1 V)
with V_nom = 230 V, α = 0.08 (8% sag at full rating), β = 0.5, and R the transformer's rating (115 kW west, 92 kW east). This is the only thing a charger can sense about everyone else. The sag is a broadcast signal of the total load, delivered for free by physics.
Charging. A charger that's on adds Δs = P × η / (60 × E) to its battery each minute (η = 0.85, E = 7 kWh), so an empty battery needs about 8 hours. A rickshaw leaving at s ≥ 0.9 counts as fully charged.
Heating and burst. A first-order model of the transformer's hottest point, in the spirit of IEC 60076-7 but deliberately simple:
K = L(t) / R
θ* = θ_a + Δθ_r × K²
θ(t+1) = θ(t) + (θ* − θ(t)) / τ
with ambient θ_a = 32 °C, rated rise Δθ_r = 78 °C and τ = 75 minutes. At θ ≥ 140 °C the transformer bursts and stays dark for the rest of the night. At full rating (K = 1) it settles at 110 °C; at 130% load it heads towards 164 °C. These numbers are illustrative. We calibrated them against ordinary charging only, before testing any fix.
The rule on every Ebb charger
Each charger knows five things: its socket voltage V, the voltage printed on it, its battery level s, whether it drew last minute, and how long it has been plugged in. Its memory holds its own counters, and nothing about anyone else.
1. How much sag am I feeling? The charger remembers the highest trusted reading it has seen, V_ref (a quiet-wire baseline), and computes
σ = 1 − V / V_ref
2. How much sag will I tolerate? Its line depends on how empty the battery is, and on how often it has been turned away:
λ(s, d) = [0.025 + 0.06 × (1 − s)] + [0.075 × (1 − d)]
The first bracket means an emptier battery tolerates more sag; the second means a charger that has been turned away a lot pushes harder, where
d = min(1, minutes drawn / max(minutes plugged in, 60))
The duty term d is what keeps far garages, which always feel more sag, from being starved.
3. What do I do?
| When | Condition | Action |
|---|---|---|
| Charging | σ > λ |
Switch off, wait a random time w |
| Waiting, wait over | σ < λ − 0.012 (room for one more) |
Switch on; otherwise wait again |
| Waiting | σ < λ − 0.03 (plenty of room) |
Switch on early, 5% chance per minute |
| Just plugged in, or power just back | (none) | Start after a random 0 to 20 or 1 to 15 minutes |
4. How long do I wait? Like Ethernet's back-off, the wait grows with each back-off in a row (k, reset after 30 minutes of steady charging) and shrinks for emptier batteries:
w = 1 + random integer from 0 to round(10 × 2^min(k, 4) × (0.3 + 0.7 × s)) − 1 minutes
Why the neighbourhood settles. Every charger feels the same L through σ ∝ L, so there's one shared feedback loop: more load means more sag, which means more chargers back off, which means less load. The random waits stop everyone reacting in step, so the load settles near the limit instead of oscillating. And because the line λ rises as a battery empties, the emptiest and longest-waiting rickshaws are served first. No line of code says "flatten the peak" or "serve the emptiest first"; both emerge.
The rivals
| System | What it knows | What it does |
|---|---|---|
| Ordinary | Nothing | Charges whenever a rickshaw is plugged in |
| Random delay (control) | Nothing | Waits a random 0 to 3 hours after plugging in, then charges; no sensing |
| App-controlled | Everything: every battery, every departure time, the household load | Every 5 minutes, computes headroom H = 0.97 × R − B − P × (stubborn chargers) and switches on the chargers with the least slack (time to departure minus time needed), up to H / P. Without the network, chargers fall back to charging flat out |
| Ebb (ours) | Only its own socket | The rule above |
How we built it
- Simulation engine (TypeScript): one simulated minute per step, deterministic and seeded, so every run is exactly reproducible. It covers household demand, arrivals and departures, voltage sag along the feeder, charging, transformer protection, and the heating model above.
- The rule: one short file (about 200 lines including comments) that sees only the five inputs above. Tests check that it never imports anything else and keeps no hidden state.
- The map: an OpenStreetMap extract of Dhanmondi, turned into a road network with schematic buildings, two transformer sites, and ten garages placed by real road distance (the feeder position
fcomes from that distance). - The interface: plain TypeScript and Canvas 2D, in a night palette that matches our pixel-art intro, with one red kept for trouble. There's a story mode, a socket view and free play.
- Evidence: an experiment runner that writes
docs/RESULTS.md, with pass marks for our claims fixed in writing before any run. 163 automated tests, and a CI workflow that runs them on every pull request. - The video: recorded frame by frame from the real app in headless Chrome, so it's identical every time it's rendered. ## Results (our simulation)
Headline: Dhanmondi, two transformers, 10 runs per scenario
| Ordinary | App-controlled | Trickle (Ebb) | |
|---|---|---|---|
| Runs with a transformer burst, all 6 scenarios | 60 / 60 | 20 / 60 | 0 / 60 |
| Runs with a burst when the network fails | 10 / 10 | 10 / 10 | 0 / 10 |
| Rickshaws fully charged, normal night | 50.2% | 99.9% | 96.4% |
| Rickshaws fully charged, worst night (see below) | 0.1% | 0.1% | 95.4% |
Worst night: a heatwave, 20% of chargers ignoring the rule, and the network down from 21:00.
Read this honestly. While its network holds, the app-controlled system beats ours: cooler, never over its limit, and about 3 points more rickshaws charged (99.9% against 96.4% on a normal night). Ours spends long stretches over the limit (216 minutes a night normally, 600 on the worst night) while staying below the burst point; in reality that would age a transformer faster. Our case is that ours never bursts, whatever fails. The full table for all six scenarios is in docs/RESULTS.md.
One transformer, the controlled experiment (10 runs, first day excluded as warm-up)
| System | Peak load (% of rating) | Minutes over the limit per night | Fully charged |
|---|---|---|---|
| Ordinary | 119% | 235 | 99.0% |
| Random delay (no sensing) | 111% | 154 | 95.9% |
| Ebb | 101% | 3 | 99.1% |
| App-controlled | 97% | 0 | 99.9% |
The claims, with pass marks written before any run
| Claim | Pass mark (set before any run) | Result |
|---|---|---|
| Ebb flattens the peak | peak at most 0.85 × ordinary, lower in at least 8 of 10 runs | 0.843 ×, lower in 10 of 10: passed (only just) |
| Ebb still sends rickshaws out charged | at least as many as ordinary | 99.1% vs 99.0%: passed (only just) |
| Sensing matters, not just randomness | less overload than random delay in at least 7 of 10 | 10 of 10: passed |
| Central control fails without its network | trips after the server dies in at least 8 of 10 | 10 of 10: passed |
The other two claims (ordinary charging overloads; Ebb never trips the protection) also passed, 10 of 10.
Why it's credible
- A fair rival, not a straw man. While its network holds, the app-controlled system beats ours. We show that. Our claim isn't "better than central control"; it's "works when central control can't".
- A model that's fair to the problem. The transformer was calibrated against ordinary charging only, and the result runs were never hand-tuned.
- Sensing, not luck. Delaying chargers at random without sensing still overloads: 154 minutes over the limit a night against our 3. The voltage feedback is what does the work.
- Real place, real sources. The map is real Dhanmondi, and the problem figures come from Parliament, the power board and the road authority, each recorded with its source, date and exact wording.
- Honest about prior art. Voltage-responsive charging has been studied for electric cars (for example, Marinelli et al., 2016, on a Danish grid). We're not claiming a new algorithm; we're applying a proven idea to an informal fleet that nobody can register, schedule or network.
Honest about limits. The heat model and burst point are illustrative. Ours runs over the limit for long stretches on hard nights. Power cuts are our weakest case: on a single transformer, after a one-hour cut, 90% of rickshaws leave charged, against about 99% for the other systems.
Challenges we ran into
The far end of the street. Garages further along the cable feel more voltage sag, so our first rule kept turning them away: only 81% of far-end rickshaws left charged. We added the duty term
d, so a charger that has been turned away a lot becomes more insistent. That lifted the far end to 98.5%, still using only the charger's own memory.Making the rival fair. It was tempting to let the networked system fail badly. Instead we gave it full knowledge of every rickshaw and let it win while connected, so the comparison means something.
Power cuts. After a blackout our chargers restarted too cautiously. Clearing their back-off memory and restarting faster raised the charged share from 87% to 90%. A stronger setting reached 91% but nearly broke our peak-load pass mark, so we kept the safer one and report the gap.
Keeping the numbers honest. Only figures that came from a run or an opened source could appear anywhere. Several tempting claims, like real transformers exploding because of rickshaws, didn't survive that rule, and we left them out.
Designing something people can read in ten seconds. Our first interface looked like a dashboard. We rebuilt it several times, ending with a calm night map that matches our intro, a small key, plain labels, and a story in three short acts.
Four people, four lanes, one night. We split the work into lanes (engine, charger rules, interface, scheduler and pitch) with shared, frozen contracts between them, then merged the pieces at the end.
What we learned
Start with the obvious fix, and find where it breaks. The central system was the right comparison, and seeing it fail under a network outage showed us what to build.
The physical system can be the communication channel. You don't always need to add a network; sometimes the signal is already in the wire.
Simple rules need careful edges. The core idea fits in one sentence, but fairness along the feeder and recovery after a blackout took most of the engineering.
Fix the pass marks before you run the experiment. Writing them down first stopped us moving the goalposts, and made the results something we could stand behind.
Show your limits. Reporting where central control wins, and where our rule is weakest, made the result more convincing, not less.
What's next for Trickle
Real voltage, replayed. Log a night of socket voltage in a Dhaka garage and run the rule on it, to see exactly when Ebb would have backed off.
Fix the power-cut weakness, and test a networked rival with a smarter offline fallback.
Build Ebb. A bench prototype, then a pilot in one garage, ideally with Dhaka's distribution companies.
Policy fit. The government says registration will be tied to how these vehicles charge. Ebb could be one simple way to meet that rule.
Built with
TypeScript, Vite, Vitest, HTML5 Canvas, OpenStreetMap (Overpass API), Node.js, Chrome DevTools Protocol, ffmpeg, GitHub Actions
Map data (c) OpenStreetMap contributors, ODbL.
Built With
- canvas
- css3
- html5
- node.js
- typescript
- vite
- vitest

