Skip to content

Instantly share code, notes, and snippets.

@eonist
Created March 12, 2026 20:30
Show Gist options
  • Select an option

  • Save eonist/87f89662e86116a2a0463a5ea7ce1742 to your computer and use it in GitHub Desktop.

Select an option

Save eonist/87f89662e86116a2a0463a5ea7ce1742 to your computer and use it in GitHub Desktop.
battery-bike.md

Here's a comprehensive overview of ebike battery designs — especially relevant for your Omera frame project.

Cell Types: 21700 vs 18650

The industry has largely moved to 21700 cells for new builds. They're 50% larger in volume than 18650s but pack up to 45% more energy density, meaning more range with fewer cells and better heat management. em3ev

Spec 18650 21700
Diameter 18mm 21mm
Height 65mm 70mm
Max capacity ~3,500 mAh ~5,000 mAh
Weight ~48g ~70g
Best for Compact builds, legacy packs New builds, higher range batterydesign

Battery Placement Approaches

Downtube Integrated (Most Relevant for Omera)

The battery pack sits inside an oversized downtube, typically accommodating 40–60 cells. This is the cleanest look — the battery is invisible. Modern frames like Giant's EnergyPak use a removable cartridge that slides in/out through the bottom of the DT. This is why we discussed going to a 50mm DT for Omera — a standard 42mm DT can't fit 21700 cells (21mm diameter × 2 rows = 42mm bare minimum, no room for BMS/wiring). myvelo

Downtube External Mount

Battery bolts to the outside of the downtube using rivnuts or braze-on bosses. Common for conversions. Looks less clean but simpler to engineer. A 48V 25Ah pack with 65× 21700 cells comes pre-shaped in a downtube profile. yosepower.co

Triangle Bag/Pack

A custom-shaped battery fills the front triangle, held by a frame bag or custom cradle. Maximizes capacity (85+ cells possible) but looks bulky. Good for range-focused builds. twowheellifestyle

In-Tube Stealth

Cells are packed directly inside the frame tubes — split across top tube, seat tube, and down tube. Extremely stealthy but hard to service, limited capacity (~20 cells), and structurally risky since you're drilling access holes. forums.electricbikereview

What This Means for Omera

For a clean fixed-gear-style ebike, the best approach is downtube integrated with a removable cartridge:

  • DT outer diameter: 55–60mm (up from Detroit's 42mm) to fit 21700 cells in a 2-wide or 3-wide arrangement
  • Configuration: 13S3P (48V, ~15Ah, 720Wh) = 39× 21700 cells — fits in a ~55mm × 400mm downtube cavity
  • BMS: 40A continuous, UL 2271 certified for US/California compliance bev-intl
  • Access: Bottom-load at BB junction or side-load panel
  • Weight: ~2.8kg for the pack alone

The 2026 California regulation (SB 1271) now requires UL 2849 or UL 2271 certification on all ebike batteries, so designing around a certified battery pack from the start avoids costly redesigns later. bev-intl

Want me to calculate the exact cell layout dimensions for the Omera downtube, or look into specific off-the-shelf battery packs that could fit?

@eonist
Copy link
Author

eonist commented Mar 13, 2026

What you're describing is essentially the Shimano STEPS / Bosch PowerTube internal battery connector pattern — and it's the industry standard for good reason. connectors-cables

How It Works (Your Design Matches)

The mechanism has two halves:

Frame side (fixed):

Battery side (removable):

  • Matching parallel grooves that only accept the frame fins in one orientation (keyed/polarized). Slide in, no rotation possible. [si.shimano](https://si.shimano.com/en/pdfs/dm/BT0001/DM-BT0001-05-ENG.pdf)
  • Flat gold-plated contact pads that the pogo pins press against when seated. No exposed pins on the battery — just flush pads recessed between the plastic ribs. connectorsupplier
  • A detent pocket (small dimple or notch) for the ball-spring to snap into.

Why This Pattern Works

  • Anti-rattle: The parallel fins create a tight sliding fit with zero lateral play. Ball-spring detent eliminates axial play. connectors-cables
  • Safety: Pogo pins are recessed on the frame side; pads are flush on the battery side. No exposed live contacts on either half when separated. connectorsupplier
  • Blind-mate friendly: Slide in along the rails, feel the click, done. One direction only, no alignment guesswork. si.shimano
  • Vibration-proof: Pogo pin springs maintain constant contact pressure even under road vibration — rated for 100K+ cycles. jiatelcn

Typical Pin Count

Pin Function
2 × power B+, B− (high current, 10–25A capable)
1 × signal Communication / CAN bus to BMS
1 × temp NTC thermistor sense
1 × ground Signal ground (separate from power ground)

For Omera you'd likely need 4–5 pogo pins: 2 power (sized for ~15A), plus signal/temp/ground. The power pins should be larger diameter (2.5–3 mm) with higher spring force than the signal pins. jiatelcn

Where to Source

Off-the-shelf pogo pin connector blocks (5-pin, 2.54 mm pitch, gold-plated, magnetic or friction-mount) are available from suppliers like Jiatel, CCP, and Higo — many already designed for e-bike battery applications. You'd design the plastic fin housing around these standard pins. ccpcontactprobes

This is exactly the right approach for Omera. The connector block would sit at the bottom of the downtube (inside the BB area), and the battery scaffold slides down from the top, rails engage, click.

@eonist
Copy link
Author

eonist commented Mar 13, 2026

Exactly — that's IP2X / finger-proof by geometry, the same principle used in EV battery packs and industrial blade connectors.

How It's Finger-Safe

The IEC 61032 "test finger" is 12 mm diameter, 80 mm long. If your fin gap is under 8 mm, no adult or child finger can enter. Put the contacts deeper than 10 mm inside that gap and nothing can touch them — not a finger, not a key, not a coin.jiatelcn+1

Your design:

text
Gap: 5mm (finger can't enter) ┌───┐ ┌───┐ ┌───┐ ┌───┐ ┌───┐ │ │ │ │ │ │ │ │ │ │ ← fins, 2mm thick, 15mm tall │ │ │ ● │ │ │ │ ● │ │ │ ← pogo pins at ~10mm depth │ │ │ │ │ │ │ │ │ │ └───┴─┴───┴─┴───┴─┴───┴─┴───┘ frame block (fixed in downtube floor)
  • Fin thickness: 2 mm

  • Gap between fins: 5 mm (finger-proof)

  • Fin height: 15 mm

  • Contact depth: 10 mm down from fin top (unreachable)

When the battery scaffold drops in, its matching fins slide into the gaps. The pads on the scaffold fins meet the pogo pins at depth. From the outside, both halves just look like plastic combs — no visible metal, no exposed contacts, nothing to short with a tool or touch accidentally.

The Two Halves

Frame block (lives at downtube floor):

  • 5 fins pointing up

  • Pogo pins press-fit into the inner face of fins, facing inward across the gap

  • Wired down through the block into the frame harness

Scaffold bottom (battery side):

  • 4 matching fins pointing down, interleave between the frame fins

  • Gold-plated flat pads on the fin faces, flush with the plastic

  • No springs, no moving parts on the battery side

Pin Assignment (4 contact pairs across 4 gaps)

Gap | Left face | Right face | Function -- | -- | -- | -- 1 | pogo → | ← pad | B+ power 2 | pogo → | ← pad | B− power 3 | pogo → | ← pad | Signal / CAN 4 | pogo → | ← pad | Temp + ground

Power pins in the outer gaps, signal in the inner gaps — even if moisture gets in, the low-voltage signals are furthest from the high-current contacts.

This whole block is maybe 30 × 15 × 15 mm. You buy standard pogo pins and flat pads, press them into a small 3D-printed or moulded housing, and mount it at the downtube floor. Want me to add this to the scaffold SCAD as the bottom connector block?

@eonist
Copy link
Author

eonist commented Mar 13, 2026

Exactly right. What you're describing is called IP2X finger-safe design — it's an actual engineering standard.[gt-engineering]

The rule

The IEC 60529 standard says: if a 12mm diameter test finger (simulating a human fingertip) cannot reach the live contact, it's IP2X finger-safe. So your fin gap just needs to be less than 12mm wide, and the contacts need to be recessed deep enough inside.ledphotometer+1

Your interleaved fin connector

text
Cross-section (looking down into the battery bottom): FRAME SIDE (fixed in DT): BATTERY SIDE (electronics bay): ┌─┐ ┌─┐ ┌─┐ ┌──┐┌──┐┌──┐┌──┐ │ │ │ │ │ │ │ ││ ││ ││ │ │ │ │ │ │ │ │ ││ ││ ││ │ │█│ │█│ │█│ ← pads │●││●││●││●│ ← pogo pins │ │ │ │ │ │ on fins │ ││ ││ ││ │ on inner │ │ │ │ │ │ │ ││ ││ ││ │ slot walls └─┘ └─┘ └─┘ └──┘└──┘└──┘└──┘ 3 fins 4 slots Battery drops in → slots interleave over fins: ┌──┐ ┌──┐ │ │┌─┐ │ │┌─┐ │ ││ │ │ ││ │ │● ││█│ │● ││█│ ← pin meets pad │ ││ │ │ ││ │ inside ~4mm gap │ │└─┘ │ │└─┘ finger can't reach └──┘ └──┘

Design parameters

Parameter | Value | Why -- | -- | --

Why this is perfect for your design

  • Vertical drop-in: battery falls straight down, slots slide over fins naturally with gravity.

  • Self-centering: the interleave guides the battery into exact alignment during the last 15mm.

  • Finger-proof by geometry: 3–4mm slot gap is physically impossible to stick a finger into. Meets IP2X without any extra covers or caps.[ledphotometer]

  • Rattle-free: tight fin-slot fit + ball spring detent = zero play.

  • No magnets needed: gravity + ball spring is enough.

Off-the-shelf or custom?

Werner Wirth (German company, supplies Bosch/Shimano tier) makes exactly this kind of interleaved blade battery connector for ebikes — IP67 rated, up to 30A power pins, finger-safe, keyed. Their modular system lets you pick pin count and current rating. Alternatively, you 3D-print the fin/slot housings yourself and press-fit standard pogo pins or blade contacts into the walls.[wernerwirth]

Want me to model the interleaved fin connector as a SCAD piece — both the frame-side fins and the battery-side slots?

Exactly right. What you're describing is called **IP2X finger-safe** design — it's an actual engineering standard. [[gt-engineering](https://www.gt-engineering.it/en/insights/electrical-hazard-and-arc-flash-mitigation/protection-from-direct-contacts-ipxxb-or-ip2x/)](https://www.gt-engineering.it/en/insights/electrical-hazard-and-arc-flash-mitigation/protection-from-direct-contacts-ipxxb-or-ip2x/)

The rule

The IEC 60529 standard says: if a 12mm diameter test finger (simulating a human fingertip) cannot reach the live contact, it's IP2X finger-safe. So your fin gap just needs to be less than 12mm wide, and the contacts need to be recessed deep enough inside. ledphotometer

Your interleaved fin connector

Cross-section (looking down into the battery bottom):

FRAME SIDE (fixed in DT):          BATTERY SIDE (electronics bay):

    ┌─┐  ┌─┐  ┌─┐                    ┌──┐┌──┐┌──┐┌──┐
    │ │  │ │  │ │                    │  ││  ││  ││  │
    │ │  │ │  │ │                    │  ││  ││  ││  │
    │█│  │█│  │█│  ← pads            │●││●││●││●│ ← pogo pins
    │ │  │ │  │ │    on fins          │  ││  ││  ││  │   on inner
    │ │  │ │  │ │                    │  ││  ││  ││  │   slot walls
    └─┘  └─┘  └─┘                    └──┘└──┘└──┘└──┘

         3 fins                          4 slots

Battery drops in → slots interleave over fins:

              ┌──┐     ┌──┐
              │  │┌─┐  │  │┌─┐
              │  ││ │  │  ││ │
              │● ││█│  │● ││█│  ← pin meets pad
              │  ││ │  │  ││ │     inside ~4mm gap
              │  │└─┘  │  │└─┘     finger can't reach
              └──┘     └──┘

Design parameters

Parameter Value Why
Fin thickness 3–4 mm Structural, holds the copper pad
Gap between fin and slot wall 3–4 mm Way under 12mm → finger-proof [gt-engineering](https://www.gt-engineering.it/en/insights/electrical-hazard-and-arc-flash-mitigation/protection-from-direct-contacts-ipxxb-or-ip2x/)
Fin height 12–15 mm Enough engagement depth for stable contact
Contact point depth 8–10 mm down from top of fin Even a child's finger (test probe is 12mm Ø) can't reach
Number of fins 3 (frame side) Gives 4 contact channels: V+, V−, signal, signal
Fin keying Center fin is wider/offset Prevents wrong orientation

Why this is perfect for your design

  • Vertical drop-in: battery falls straight down, slots slide over fins naturally with gravity.
  • Self-centering: the interleave guides the battery into exact alignment during the last 15mm.
  • Finger-proof by geometry: 3–4mm slot gap is physically impossible to stick a finger into. Meets IP2X without any extra covers or caps. [ledphotometer](https://www.ledphotometer.com/blogs/ip-code-finger-safety-testing/)
  • Rattle-free: tight fin-slot fit + ball spring detent = zero play.
  • No magnets needed: gravity + ball spring is enough.

Off-the-shelf or custom?

Werner Wirth (German company, supplies Bosch/Shimano tier) makes exactly this kind of interleaved blade battery connector for ebikes — IP67 rated, up to 30A power pins, finger-safe, keyed. Their modular system lets you pick pin count and current rating. Alternatively, you 3D-print the fin/slot housings yourself and press-fit standard pogo pins or blade contacts into the walls. [wernerwirth](https://wernerwirth.com/en/connector-solutions/e-bike-connectors/)

Want me to model the interleaved fin connector as a SCAD piece — both the frame-side fins and the battery-side slots?

@eonist
Copy link
Author

eonist commented Mar 13, 2026

There are two solid ready-made options that match your blade-interleave, finger-proof concept:

Amphenol DuraEV™

This is the closest match to what you described. It's purpose-built for battery packs:amphenol+1

  • 2 power + 4/6 signal pins in a blade-style housing with IP2X finger protection on both halves when unmated.

  • First-mate-last-break (FMLB) — ground connects before power, power disconnects before ground. Safety by design.

  • IP67 rated mated and unmated (with cap).

  • Up to 70A continuous, 10,000 mating cycles.

  • Keyed, CPA locking, compact.

  • Buyable on Mouser Norway as single units.[no.mouser]

Anderson SB50

The original blade-interleave battery connector, since 1953:mariner-sails+1

  • Genderless — both halves are identical, flip one 180° to mate.

  • Contacts sit deep inside parallel plastic blades — finger-proof by geometry.

  • Stainless steel springs retain contacts, extremely low resistance.

  • Up to 50A UL-rated (120A peak), 600V.

  • Colour-coded mechanical keying prevents cross-mating.

  • ~$5–10 per pair, available everywhere (Amazon, 12VoltPlanet, eBay, Biltema).

Which for Omera

  | DuraEV™ | Anderson SB50 -- | -- | -- Power pins | 2 (70A) | 2 (50A) Signal pins | 4–6 built in | None (power only) Finger-proof | ✅ IP2X both sides | ✅ by geometry Keyed | ✅ | ✅ colour-coded Price per pair | ~$15–25 | ~$5–10 Signal for BMS/temp | ✅ included | ❌ need separate connector Availability | Mouser (ships to Oslo) | Everywhere

DuraEV™ is the better fit — it has power + signal in one block, so you don't need a second connector for BMS comms and temp sensing. One connector does everything. Mount the socket half at the downtube floor, put the plug half on your scaffold bottom plate, and you're done.futureelectronics+1

The Anderson SB50 works too if you only need power and run signal wires separately — it's cheaper and more available, but means two connectors instead of one.

There are two solid ready-made options that match your blade-interleave, finger-proof concept:

Amphenol DuraEV™

This is the closest match to what you described. It's purpose-built for battery packs: amphenol

  • 2 power + 4/6 signal pins in a blade-style housing with IP2X finger protection on both halves when unmated.
  • First-mate-last-break (FMLB) — ground connects before power, power disconnects before ground. Safety by design.
  • IP67 rated mated and unmated (with cap).
  • Up to 70A continuous, 10,000 mating cycles.
  • Keyed, CPA locking, compact.
  • Buyable on Mouser Norway as single units. [no.mouser](https://no.mouser.com/new/amphenol/amphenol-fci-duraev-battery-connectors/)

Anderson SB50

The original blade-interleave battery connector, since 1953: mariner-sails

  • Genderless — both halves are identical, flip one 180° to mate.
  • Contacts sit deep inside parallel plastic blades — finger-proof by geometry.
  • Stainless steel springs retain contacts, extremely low resistance.
  • Up to 50A UL-rated (120A peak), 600V.
  • Colour-coded mechanical keying prevents cross-mating.
  • ~$5–10 per pair, available everywhere (Amazon, 12VoltPlanet, eBay, Biltema).

Which for Omera

DuraEV™ Anderson SB50
Power pins 2 (70A) 2 (50A)
Signal pins 4–6 built in None (power only)
Finger-proof ✅ IP2X both sides ✅ by geometry
Keyed ✅ colour-coded
Price per pair ~$15–25 ~$5–10
Signal for BMS/temp ✅ included ❌ need separate connector
Availability Mouser (ships to Oslo) Everywhere

DuraEV™ is the better fit — it has power + signal in one block, so you don't need a second connector for BMS comms and temp sensing. One connector does everything. Mount the socket half at the downtube floor, put the plug half on your scaffold bottom plate, and you're done. futureelectronics

The Anderson SB50 works too if you only need power and run signal wires separately — it's cheaper and more available, but means two connectors instead of one.

@eonist
Copy link
Author

eonist commented Mar 13, 2026

Critical point. When the battery is out charging in your apartment, the downtube is open at the top and the connector at the bottom is exposed to rain. It needs to survive that unmated and uncapped — because you won't always remember to plug a dust cap in.

This actually changes the recommendation:

The Problem with DuraEV / Anderson

Both achieve IP67 only when mated or with a protective cap. Frame-side socket exposed to rain with no cap = not rated. Water pools at the downtube floor (lowest point), sits right on the connector pins. That's a corrosion and short-circuit risk over time. futureelectronics

Better Approach: Pogo Pins Are Inherently Weather-Proof

This is where pogo pins actually win over blade connectors for your use case:

The Real Solution: Fin Block + Pogo Pins + Drain

Design the frame-side fin block with:

  • Pogo pins recessed 10 mm deep between fins (finger-proof + splash-proof).
  • Open bottom / drain slots in the fin block so any water that enters runs straight out, never pools.
  • Conformal coating (silicone spray) on the PCB/wiring behind the pins — cheap insurance.
  • The downtube itself should have a drain hole at the very bottom (1–2 mm) so water that enters from the top opening exits and doesn't sit on the connector.

What to Buy

Go back to the custom pogo pin block approach, but with off-the-shelf pins:

  • High-current pogo pins (3 mm barrel, 10A rated, gold-plated): ~$1–2 each from Jiatel or AliExpress. jiatelcn
  • Signal pogo pins (1.5 mm barrel, 2A): ~$0.30 each. aliexpress
  • Press them into a 3D-printed fin housing you design yourself — the fins provide finger safety and weather shielding in one part.
  • Total cost: under $10 for pins + printed housing.

This way there are no cavities, no sockets, no places for water to collect on the frame side. Just gold pins between plastic fins that drain freely. When the battery drops in, the fins interleave and pogo pins compress against pads. When the battery is out charging, rain hits plastic fins and gold pins — nothing to damage.

Want me to source specific pogo pin part numbers from Jiatel or AliExpress that fit your current/signal requirements?

@eonist
Copy link
Author

eonist commented Mar 13, 2026

Spot on. This is a critical design point — the bike lives in Oslo weather, battery goes inside, frame stays out in the rain. The frame-side connector will get wet.

Three layers of protection

1. Fin geometry = self-draining

The interleaved fins are vertical — water doesn't pool, it runs straight down and out the bottom of the DT. No trapped puddles. This is actually better than most horizontal ebike connectors that can collect water.[bedeconnector]

text
Rain enters open DT top ↓ ↓ ↓ ┌─┐ ┌─┐ ┌─┐ │ │ │ │ │ │ ← water runs DOWN │█│ │█│ │█│ the fin surfaces │ │ │ │ │ │ └─┘ └─┘ └─┘ ↓ ↓ ↓ drains out bottom of DT

2. Contact material = corrosion-proof

Gold-plated contacts are standard for outdoor battery connectors — they don't oxidize, corrode, or build resistance even after years of rain exposure. Even if water touches them, nothing happens because:alibaba+1

  • Gold doesn't corrode.

  • 36V DC at open circuit won't arc or short through rainwater across a 3–4mm gap between pins.

  • When battery is removed, there's no voltage on the frame-side pads at all — they're just passive copper/gold surfaces.

3. Optional: drain + dummy cap

For extra Oslo winter protection:

Feature | Purpose -- | -- Drain hole at bottom of DT cavity | Water never sits, always exits [bedeconnector]​ Snap-on dummy cap (like Giant does) | Plastic cover that clips over the fin area when battery is out. Takes 1 second [forums.electricbikereview]​ Dielectric grease on contacts | Thin coating repels moisture, doesn't affect conductivity [alibaba]​

What this means for the design

The frame-side fin connector needs:

  • Housing: glass-filled nylon or PETG — UV and water resistant.

  • Contact pads: gold-plated phosphor bronze — welded/soldered to wires, rain-proof by material.

  • Open bottom: fins don't sit in a closed box — the bottom is open so water drains through.

  • No electronics: frame side is 100% passive — just metal pads on plastic fins. Nothing to break, nothing to short.

The battery side is always dry (it's inside with you when charging), so standard pogo pins + PCB are fine there.

Want me to model the full interleaved fin connector now — both the frame-side fin piece and the battery-side slot piece?

Spot on. This is a critical design point — the bike lives in Oslo weather, battery goes inside, frame stays out in the rain. The frame-side connector **will get wet**.

Three layers of protection

1. Fin geometry = self-draining

The interleaved fins are vertical — water doesn't pool, it runs straight down and out the bottom of the DT. No trapped puddles. This is actually better than most horizontal ebike connectors that can collect water. [bedeconnector](https://www.bedeconnector.com/news/guide-to-waterproofing-xt60-connectors-for-outdoor-safety-284496.html)

Rain enters open DT top
        ↓ ↓ ↓
    ┌─┐  ┌─┐  ┌─┐
    │ │  │ │  │ │   ← water runs DOWN
    │█│  │█│  │█│     the fin surfaces
    │ │  │ │  │ │
    └─┘  └─┘  └─┘
        ↓ ↓ ↓
    drains out bottom of DT

2. Contact material = corrosion-proof

Gold-plated contacts are standard for outdoor battery connectors — they don't oxidize, corrode, or build resistance even after years of rain exposure. Even if water touches them, nothing happens because: alibaba

  • Gold doesn't corrode.
  • 36V DC at open circuit won't arc or short through rainwater across a 3–4mm gap between pins.
  • When battery is removed, there's no voltage on the frame-side pads at all — they're just passive copper/gold surfaces.

3. Optional: drain + dummy cap

For extra Oslo winter protection:

Feature Purpose
Drain hole at bottom of DT cavity Water never sits, always exits [bedeconnector](https://www.bedeconnector.com/news/guide-to-waterproofing-xt60-connectors-for-outdoor-safety-284496.html)
Snap-on dummy cap (like Giant does) Plastic cover that clips over the fin area when battery is out. Takes 1 second [forums.electricbikereview](https://forums.electricbikereview.com/threads/is-there-a-cover-for-the-battery-connections-when-battery-is-not-installed.29335/)
Dielectric grease on contacts Thin coating repels moisture, doesn't affect conductivity [alibaba](https://www.alibaba.com/supplier/waterproof-battery-connector.html)

What this means for the design

The frame-side fin connector needs:

  • Housing: glass-filled nylon or PETG — UV and water resistant.
  • Contact pads: gold-plated phosphor bronze — welded/soldered to wires, rain-proof by material.
  • Open bottom: fins don't sit in a closed box — the bottom is open so water drains through.
  • No electronics: frame side is 100% passive — just metal pads on plastic fins. Nothing to break, nothing to short.

The battery side is always dry (it's inside with you when charging), so standard pogo pins + PCB are fine there.

Want me to model the full interleaved fin connector now — both the frame-side fin piece and the battery-side slot piece?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment