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

yeah. each battery tube just has a flashlight cap. just like a maglight. you screw it in. Tighten it with a coin so it goes flush. can be all plastic I suppose? silicon ring in the plastic cap would keep it in place even under vibration over long time. also works as a weather seal. you only access this hatchet every 5 years or so when you change bats. its not something you open every day. we could add a thin teflon like tape inside each bat tube, that would reduce rattling, but not make the bats so tight that they would not slide out with gravity when needing to be replaced. wiring could go into the center of the cage in a long hole. I added a render of the scad you made earlier. I think we could iterate that design. just add screw-in caps and seal the bottom and add the pads there. and add a hole in the center that connects it all. the spring caps would connect to touchpoint just like a maglight. injection molding could have screw cap moulding part. that unscrew when mold is done. so groves are made when molding. the rest is just cylinder that goes with the mold cap sort of.

@eonist
Copy link
Author

eonist commented Mar 13, 2026

Here's the updated scaffold . Here's what changed from v1:

What's in v2

4 channel tubes (2×2 grid, same as your render):

  • Thin-walled cylinders, bore sized for 21mm cell + 0.3mm PTFE liner + sliding clearance = ~21.9mm ID.
  • Cells slide in/out with gravity. PTFE liner reduces rattle without gripping.

Bottom plate (sealed base):

  • Solid plate that hulls around all 4 tubes — closes the bottom.
  • 4 spring contact pad recesses (10mm diameter, 2mm deep) — this is where the flat contact pads sit, just like the bottom of a Maglite.
  • Central wire hole passes through.

Screw-in caps (Maglite style, print 4×):

  • Threaded plastic cap that screws into the top of each channel.
  • Coin slot on top — tighten flush with a coin, no tools.
  • O-ring groove on the skirt — silicone ring seals against moisture and holds under vibration.
  • Spring contact nub on the inside face — presses against the positive terminal of the top cell, compresses the stack downward onto the bottom pad.

Central wiring channel (6mm hole):

  • Runs the full length through the center of the 2×2 grid.
  • Carries bus wires and BMS balance taps from the contact pads/springs to the electronics below.

Cross ribs at every 70mm (cell boundary):

  • Structural bridges between adjacent tubes — keeps the scaffold rigid without being solid.

Assembly sequence

  1. Slide PTFE liner into each channel (friction fit, stays permanently).
  2. Drop 5 cells into each channel from the top, positive-nub up.
  3. Screw in the 4 caps — spring nub compresses stack onto bottom pad.
  4. Tighten flush with a coin. O-ring seals it.
  5. Whole scaffold slides into the DT as one unit.

Injection molding notes

  • The screw cap threads are made with an unscrewing core in the mold — standard technique for bottle caps, Maglite bodies, etc. [richfieldsplastics](https://richfieldsplastics.com/blog/considerations-for-battery-pack-mold-making/)
  • The main body pulls straight out of a two-part mold along the tube axis — channels are just core pins.
  • The bottom plate is the parting line — mold splits there.
  • Only the O-ring groove on the cap is a minor undercut, easily handled by the unscrewing core.

Drop it into OpenSCAD and send me a screenshot — the thread profile is simplified (stacked rings instead of true helix), so it'll look approximate but the dimensions are correct for printing.

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