Widgets

How to Add a Battery Storage Lab to Your Website

LK Forge · 4 min read · Updated September 2026

You can add a full battery storage lab to any website, blog, or classroom page with a single line of code — free, with no sign-up, no plugin, and no script to install. Visitors charge and discharge a lithium-ion pack and watch its round-trip efficiency and cycle-life fade in real time. The physics ceiling here is round-trip efficiency: energy lost as I²R heat grows with the square of the current, so fast, hot, deep cycling both wastes energy and ages the cells. This guide covers the fastest way to embed the Battery Storage Lab, what it shows, and where it works.

The quickest way: paste one embed snippet

An embed is just an <iframe> that loads the lab from lkforge.com, plus a small credit line. Copy this into your page’s HTML where you want the widget to appear:

<iframe src="https://lkforge.com/embed/battery/"
        width="100%" height="1890" loading="lazy"
        style="border:0;max-width:720px"
        title="Battery Storage Lab by LK Forge"></iframe>
<p><a href="https://lkforge.com/tools/physics/battery/">Battery Storage Lab</a>
   by <a href="https://lkforge.com/">LK Forge</a></p>

The <iframe> is the live lab; the <p> underneath is a plain credit link. Keep that line — the visible link is what keeps the widget free to embed. You can also copy this exact code straight from the LK Forge widget gallery.

What the widget shows

The lab opens as a charge/discharge dashboard, so a visitor can press Run and then take control:

  • Pack sliders: capacity, charge rate (C-rate), discharge load, hold time, resistance quality and ambient temperature set up the cycle before you press ▶ Run.
  • Presets and reset: Gentle 0.5C, Fast charge 3C, Deep cycle and Hot 45°C jump to common cases; ↺ Reset clears the run.
  • Live readouts: energy in, energy delivered, state of charge, round-trip efficiency and cycles to 80% capacity update as the pack charges and discharges.
  • Two plots: state of charge over the cycle, and projected cycle-life fade toward 80% capacity, beside a schematic and a loss donut showing where the energy goes.

Pick the right height

The snippet uses height="1890" and max-width:720px. This is a dashboard-style lab with sliders, readouts and two plots, so on a narrow phone the panels stack into a single column — the tall height keeps that stacked layout from clipping. On a wider page the widget simply centres within its max-width, so the one height works across screen sizes.

Where it works

Because it is a standard iframe, the embed works anywhere you can add HTML:

  • WordPress: add a Custom HTML block and paste the snippet.
  • Squarespace: use a Code / Embed block.
  • Wix: add an Embed HTML / iframe element.
  • Ghost: insert an HTML card.
  • Notion: paste the /embed/battery/ URL and choose "Create embed".
  • Plain HTML, an intranet, or a lesson page: paste the snippet straight into the markup.

That’s the whole job. Copy the embed code from the widget gallery and paste it wherever an energy-storage, physics, or engineering lesson — or a blog post on batteries and the grid — needs a pack students can actually charge and discharge.

Grab the embed code from the LK Forge widget gallery — free, no sign-up.

Open the Battery Storage Lab

Frequently asked questions

What can visitors do with the embedded Battery Storage Lab?
They set the pack capacity, charge rate (C-rate), discharge load, hold time, internal resistance quality and ambient temperature, then press Run to charge and discharge a lithium-ion pack. One-click presets — Gentle 0.5C, Fast charge 3C, Deep cycle and Hot 45°C — jump to common cases, and Reset clears the run. Live readouts show energy in, energy delivered, state of charge, round-trip efficiency and cycles to 80% capacity.
What does the Battery Storage Lab teach and show?
It shows round-trip efficiency: the energy you get back divided by the energy you put in, with the difference lost as I²R heat that grows with the square of current. Push the C-rate up or worsen the resistance and efficiency drops while heat climbs; a state-of-charge plot tracks one cycle, and a second plot projects cycle-life fade toward 80% capacity so deep, hot, fast cycling visibly shortens pack life.
Is embedding the Battery Storage Lab free?
Yes. It is free to embed on any site, with no account, no API key and no usage limits. The whole simulation runs in your visitor’s own browser, so there is no server cost — we only ask that you keep the small "Battery Storage Lab by LK Forge" credit line that comes with the embed code.
What iframe height should I use, especially on mobile?
The snippet ships with height="1890", which is tall enough that the schematic, sliders, readouts and both plots all fit without clipping. This is a dashboard-style lab, so on a narrow phone the panels stack into a single column — the tall height keeps that stacked layout from clipping. On a wider page the widget centres within its max-width of 720px.
Where can I embed it — WordPress, Wix, Squarespace, Notion?
Anywhere you can add HTML, because it is a standard iframe. In WordPress use a Custom HTML block; in Squarespace a Code/Embed block; in Wix an Embed HTML element; in Ghost an HTML card; in Notion paste the /embed/battery/ URL as an embed. On a plain HTML page or an intranet, paste the snippet straight into the markup.
Does the embedded Battery Storage Lab track visitors or set cookies?
No. Everything runs locally in the visitor’s browser — nothing is uploaded. The embed sets no tracking cookies and sends no analytics, so it is safe to place on a privacy-sensitive site, an intranet, or a page for students.