Building a DIY Electric Bike Battery Pack with 18650 Cells

Building a custom electric bike battery pack using 18650 cells offers a cost-effective way to optimize your bike's performance, ensuring the right balance of power, range, and safety.

With careful planning, the right tools, and a solid understanding of battery configurations, you can create a pack that meets your specific needs while enhancing the efficiency and reliability of your ride.

Published: October 24, 2024.

electric bike battery

Warning: Lithium batteries, including 18650 cells, can pose serious safety risks such as overheating, fire, and electrical shock if mishandled. If you are not experienced with building battery packs or are unfamiliar with the necessary safety precautions, it's highly recommended to use OEM (Original Equipment Manufacturer) electric bike batteries, which are professionally designed and tested for safe use. Always prioritize safety when working with high-powered battery cells.

Understanding 18650 Battery Cells

18650 battery cells come in different chemistries, with lithium-ion (Li-ion) and lithium iron phosphate (LiFePO4) being the most common types used in electric bike battery packs. While both types offer distinct advantages, the choice between them depends on your specific needs for safety, energy density, and battery life.

Lithium-Ion (Li-ion) 18650 Cells

These cells are widely used due to their high energy density, making them ideal for applications that require a lightweight battery with a long range. Here are the typical specifications for Li-ion 18650 cells:

  • Nominal Voltage: 3.6V - 3.7V
  • Capacity: 2000 mAh to 3500 mAh+
  • Maximum Discharge Rate: Varies by model, often between 10A and 35A
  • Recharge Cycles: Around 300-500 cycles before noticeable capacity loss

LiFePO4 (Lithium Iron Phosphate) 18650 Cells

LiFePO4 cells offer lower energy density compared to Li-ion, but they are much safer and more durable. These cells are highly resistant to overheating and thermal runaway, making them a popular choice for applications where safety is critical.

Although they have a lower voltage, they can last significantly longer in terms of charge-discharge cycles.

Typical specifications for LiFePO4 18650 cells:

  • Nominal Voltage: 3.2V - 3.3V
  • Capacity: Usually lower than Li-ion, ranging from 1000 mAh to 1500 mAh
  • Maximum Discharge Rate: Generally lower than Li-ion, but many cells can still handle high discharge rates around 10A to 25A
  • Recharge Cycles: 1500-2000+ cycles, significantly more than Li-ion batteries, making them ideal for long-term use

Advantages of LiFePO4 Cells for Electric Bikes

  • Safety: LiFePO4 cells are much more stable and less prone to catching fire or exploding, even under harsh conditions like overcharging or high temperatures.
  • Longevity: LiFePO4 batteries can endure far more charge/discharge cycles than standard Li-ion cells, which can greatly extend the life of your battery pack.
  • Consistent Power Output: While LiFePO4 cells have a lower nominal voltage, they provide a consistent voltage throughout their discharge cycle, which can be beneficial for maintaining a steady power supply to the bike.

Choosing Between Li-ion and LiFePO4 18650 Cells

  • If you prioritize range and lighter weight, Li-ion 18650 cells are the better choice due to their higher energy density.
  • If safety, long-term durability, and cycle life are more important for your project, LiFePO4 18650 cells are an excellent alternative, especially if you're willing to accept the tradeoff of slightly lower voltage and capacity.

Both types of 18650 cells can be used for building electric bike battery packs, and the final choice depends on balancing these factors with the specific needs of your bike and riding style.

Note: some manufacturers offer 18650 batteries with huge capacities - if something is too good to be true, then it is not a truth, i.e., their claimed capacities are fake. Stay away from such batteries and brands.

panasonic 18650

Planning Your Battery Pack Configuration

Before building a DIY battery pack for your electric bike, it's important to plan out the configuration of the battery. The two main factors to consider are the voltage and the capacity (Ah or Wh) required for your bike’s motor.

Calculating Voltage and Capacity

  • Voltage: Electric bike motors are typically rated for specific voltages, such as 36V, 48V, or 52V. To achieve the required voltage, you need to connect cells in series. For example, if your bike requires a 48V battery, you will need 13 cells in series (since each 18650 cell has a nominal voltage of 3.7V; 13 cells × 3.7V ≈ 48.1V).
  • Capacity: The capacity of the battery pack determines how long the bike can run on a single charge. To increase capacity, you connect cells in parallel. For example, if each 18650 cell has a capacity of 3000 mAh, connecting two cells in parallel will give you 6000 mAh of capacity (3 Ah × 2 = 6 Ah).

Series vs. Parallel Connections

  • Series Connection: Increases the voltage of the battery pack without increasing capacity. Cells are connected end-to-end, with the positive of one cell connected to the negative of the next. The total voltage is the sum of all the cells' voltages.
  • Parallel Connection: Increases the capacity (Ah) of the battery pack without increasing voltage. All positive terminals are connected together, and all negative terminals are connected together. The total capacity is the sum of all the cells' capacities.

Carefully balancing the number of cells in series and parallel helps customize the battery pack to meet both the voltage requirements of your motor and the desired range of your electric bike.

18650 soldering tabs

Gathering Tools and Materials

Building a DIY 18650 battery pack requires a variety of tools and materials, many of which are essential for ensuring a safe, well-constructed battery pack. Here is a list of the key items you'll need:

Essential Tools

  • Spot Welder: A spot welder is required for safely joining nickel strips to the terminals of each 18650 cell without damaging the cells through excessive heat.
  • Multimeter: To check voltage and continuity at various stages of the build, a multimeter is a must-have for ensuring proper connections.
  • Soldering Iron: Although soldering directly to battery terminals is discouraged due to heat concerns, a soldering iron can be useful for wiring the BMS and other components.
  • Heat Shrink Tubing: Provides insulation and protection for the wiring and connections.
  • Wire Cutters and Strippers: To cut and strip wires cleanly.
  • Battery Insulation Paper or Tape: Used to ensure that there are no shorts between cells and to provide additional insulation.

Materials

  • Nickel Strips: These conductive strips are used to connect the cells in both series and parallel configurations.
  • Battery Management System (BMS): A crucial component for protecting the battery pack from overcharging, over-discharging, and balancing the cells during use and charging. Without a proper BMS, don't even think about making an 18650 battery pack.
  • 18650 Battery Holders/Cell Spacers: Holders or spacers keep the cells in place and help organize the pack, allowing for safe assembly.
  • Copper Bus Bars (optional): For high-current applications, using copper bus bars can ensure better current distribution.
  • Wires (appropriate gauge): Depending on your battery pack's current requirements, you'll need to choose the appropriate gauge for wiring.

Safety Equipment

  • Protective Gloves: Lithium-ion cells can be dangerous if mishandled; gloves provide protection during assembly.
  • Safety Goggles: Protect your eyes from potential sparks when spot welding or soldering.
  • Fire Extinguisher: Always have a fire extinguisher nearby when working with batteries, especially lithium-ion cells, as they can catch fire if damaged or improperly handled.

Note: When working with 18650 or similar lithium-ion batteries, it is highly recommended that you have a metal bucket half full of dry sand - if the battery starts to burn, throw the battery into the bucket first and than quickly take the bucket outside if possible. Only then try the fire extinguisher which may have issues in putting out fires from larger lithium ion battery packs. Just my 2c.

By gathering all the necessary tools and materials ahead of time, you can ensure a smooth assembly process and build a high-quality battery pack for your electric bike.

Designing the Battery Layout

The physical layout of your 18650 battery pack is vital for optimizing performance and ensuring the battery fits properly in your electric bike. Proper planning of the layout not only helps with efficient space usage but also ensures better heat dissipation and balanced weight distribution.

Space Constraints

One of the primary considerations when designing the layout is where the battery pack will be mounted on your bike. Measure the available space in your bike's frame or storage compartment and design the layout to fit within those dimensions.

Battery cells can be arranged in different configurations, such as in a single row, a double row, or stacked vertically, depending on the available space.

Cooling and Ventilation

Since lithium-ion cells generate heat during use and charging, it's essential to allow for adequate cooling. Leaving small gaps between cells or using spacers can promote airflow around the pack, reducing heat buildup.

If the battery will be enclosed, consider adding ventilation holes or a fan to improve airflow, particularly in hot climates or for high-performance applications.

Weight Distribution

An imbalanced battery pack can negatively affect the handling of your electric bike. Try to position the battery pack centrally, either on the frame or low down on the bike, to keep the center of gravity balanced.

If the battery is too heavy in the rear or mounted too high, it could make the bike feel unstable, especially at higher speeds.

Pack Shape and Configuration

The most common configurations are:

  • Brick Pack: Cells are arranged in a tight brick-like shape, offering a compact and solid structure.
  • Flat Pack: Cells are laid out in a flat, wide arrangement, ideal for fitting inside slim compartments.

Once you’ve chosen your configuration, you can also plan where to position components like the BMS and wiring to keep the layout tidy and accessible for maintenance or repairs.

Assembling the Battery Pack

Once you’ve designed the layout and gathered your tools, it’s time to start assembling the battery pack. The assembly process requires careful attention to detail to ensure both safety and performance.

Step-by-Step Assembly Process

  • Arrange the Cells: Start by positioning the cells according to your planned layout (e.g., series and parallel configuration). Make sure they are firmly held in place using battery holders or cell spacers to avoid any movement during welding and operation.
  • Weld Nickel Strips: Using a spot welder, attach nickel strips to the positive and negative terminals of the cells. For series connections, connect the positive terminal of one cell to the negative terminal of the next. For parallel connections, connect the positive terminals of multiple cells together, and do the same for the negative terminals. Ensure the connections are solid, and avoid applying excessive heat that could damage the cells.
  • Install the BMS (Battery Management System): The BMS is responsible for monitoring the health of your battery pack, balancing the cells, and protecting against overcharging, over-discharging, and short circuits. Follow the manufacturer's wiring diagram to connect the BMS to your pack. Typically, the BMS will be connected to both the positive and negative ends of the series configuration, along with additional balance wires for monitoring individual cells or cell groups.
  • Connect the Output Wires: Attach the main output wires to the battery pack, which will connect to the electric bike’s controller. Ensure you use wires with the appropriate gauge to handle the expected current without overheating. Insulate all connections properly with heat shrink tubing or electrical tape.

Test the Pack

Before fully sealing the pack, use a multimeter to test the voltage and ensure that the series and parallel connections are correct. The voltage should match your planned configuration (e.g., 48V for a 13-series pack). Also, check the connections for any potential short circuits.

Seal and Enclose the Battery Pack

Once everything is properly connected and tested, enclose the battery pack in an appropriate housing. Use materials that offer insulation and protection against moisture, dust, and physical impact, especially when choosing industrial bonding materials for parts that need secure, stable placement. A durable plastic case or heat shrink wrap is often used for this purpose.

18650 with bms

Ensuring Electrical Safety and Balance

When assembling a DIY electric bike battery pack, safety is a top priority. Lithium-ion cells, while highly efficient, can be dangerous if mishandled. Ensuring electrical safety and maintaining balance within the pack is critical to avoiding accidents like overheating, fires, or reduced battery lifespan.

Electrical Safety Measures

  • Proper Insulation: Ensure that all connections, especially where wires meet terminals, are properly insulated to prevent shorts. Use heat shrink tubing or electrical tape to cover any exposed wires or terminals.
  • Avoid Overheating: During assembly, be mindful of heat buildup, especially while welding the nickel strips to the cells. Excessive heat can damage the cells, leading to performance issues or safety risks. Allow cooling periods between welds if necessary.
  • Fusing the Cells (Optional): Some builders prefer adding small fuses between each parallel group of cells to provide an additional layer of protection in case of a short circuit. Fusing each cell individually ensures that any fault in one cell won't affect the entire pack.

Cell Balancing

  • Importance of Balancing: Over time, small differences in cell voltage can develop, which may cause individual cells or groups of cells to become overcharged or undercharged. This imbalance can reduce the lifespan of the pack or create safety issues.
  • Balancing via the BMS: A good-quality BMS will help balance the cells by equalizing the charge between them, ensuring that no single cell is charged or discharged more than the others. This process is automatic in most BMS units, but it's important to ensure that the BMS is functioning properly during assembly and testing.
  • Manual Balancing: In some cases, especially during the initial setup, you may need to manually balance the cells by charging each cell group individually to the same voltage. This ensures that the pack starts off in a balanced state.

Preventing Overcharging and Over-Discharging

  • BMS Role: The BMS plays a critical role in preventing overcharging and over-discharging, which can damage cells and create safety hazards. Ensure that the BMS you choose is rated for the specific voltage and current requirements of your battery pack.
  • Use of Proper Chargers: Always use a charger designed for lithium-ion batteries and the specific voltage of your pack. Avoid overcharging by regularly monitoring the charging process, especially in the first few uses of the DIY battery pack.

Testing and Troubleshooting the Battery Pack

Once your battery pack is assembled, it's very important to thoroughly test it to ensure it's functioning correctly and safely. This step involves checking the voltage, current, and capacity to make sure everything is balanced and ready for use.

Testing for Voltage

Start by testing the overall voltage of the battery pack using a multimeter. Compare this reading with the expected voltage based on the number of cells in the series.

For example, a 13S (13 cells in series) pack should read approximately 48V (13 × 3.7V). If the reading is significantly lower, check the connections for any miswiring or poorly welded cells.

Next, check the voltage of each cell group to ensure they are consistent. If one group is significantly higher or lower than the others, it could indicate an imbalance or a faulty cell. This can be corrected by balancing the cells manually or relying on the BMS to do so over time.

Testing for Current and Capacity

After verifying the voltage, the next step is to test the battery pack's current and capacity. Use a battery capacity tester to discharge the pack under a controlled load.

This will give you an accurate reading of the pack's overall capacity (measured in amp-hours, Ah) and confirm that it matches your expected values. If the capacity is much lower than expected, it could indicate weak or damaged cells.

You can also test the current draw by connecting the battery pack to a load (such as a high-wattage light or motor) and using a multimeter to measure the current. Ensure the current draw does not exceed the rated capacity of the pack or the BMS.

Common Issues and Troubleshooting

  • Low Voltage in One Cell Group: This could indicate a weak or faulty cell. You may need to replace the entire group or manually balance the cells.
  • Overheating: If the battery pack heats up excessively during testing, it could indicate a poor connection, damaged cells, or an undersized wire gauge.
  • Inconsistent Voltage Across Cells: This could be a sign that the BMS is not balancing properly or that some cells are defective.
  • No Power Output: If the battery pack is not delivering power, check for disconnected wires, faulty BMS connections, or short circuits.

Integrating the Battery Pack into Your Electric Bike

Once you've tested the battery pack and confirmed that it's functioning correctly, the next step is to integrate it into your electric bike. This involves connecting the pack to the bike's controller and motor, ensuring proper wiring, and securely mounting the battery.

Wiring the Battery Pack to the Controller

The battery pack must be connected to the bike's controller, which manages the power flow to the motor. Follow these steps for proper wiring:

  • Identify the Positive and Negative Terminals: Ensure that the positive terminal of the battery is connected to the positive input of the controller, and the negative terminal is connected to the negative input.
  • Use Appropriate Wire Gauge: Choose wires with a gauge that can handle the current draw of your motor. Undersized wires can overheat and cause power loss. For most e-bikes, 12- or 10-gauge wires are appropriate.
  • Install a Fuse: To protect the system from overloads or short circuits, consider installing an inline fuse between the battery pack and the controller. Choose a fuse rated slightly above your bike's maximum current draw.

Mounting the Battery Pack

Once wired, mount the battery pack securely to the bike frame or another suitable location. Consider the following tips:

  • Centralized Mounting: Mount the battery in a central location to balance the weight distribution. This could be on the downtube, in a battery bag, or within a custom case.
  • Protection from Vibration and Impact: Use padding or foam to protect the battery pack from vibrations and shocks that occur during riding. This will prevent damage to the cells and connections over time.
  • Weatherproofing: If your bike will be used in wet or dusty conditions, ensure the battery pack is properly sealed in a weatherproof case to prevent water or dirt from getting inside.

Final Connections and Testing

Once everything is connected and mounted, do a final test. Power on the bike and check that the motor responds properly when you engage the throttle or pedal assist.

Test the bike under load (e.g., on a short ride) to ensure the battery delivers the expected power and range.

Maintaining and Charging Your DIY Battery Pack

To keep your DIY battery pack in good condition and ensure a long lifespan, proper maintenance and charging habits are essential. Lithium-ion batteries like the 18650 cells can last for several years if treated well, but improper handling can shorten their life or even cause safety issues.

Charging Guidelines

  • Use a Proper Charger: Always use a charger designed specifically for lithium-ion batteries and for the voltage of your battery pack. Overvoltage can damage the cells, while undervoltage can cause incomplete charging.
  • Avoid Overcharging: Most BMS units will prevent overcharging, but it’s good practice to monitor the charging process, especially during the first few cycles. Disconnect the charger once the battery is fully charged to avoid unnecessary stress on the cells.
  • Balanced Charging: Some chargers have a built-in balancing function to equalize the voltage across all cells. This is particularly useful for maintaining the health of your battery pack over time.

electric bike battery charging

Storage Tips

  • Store at Partial Charge: When storing your battery pack for long periods (e.g., during the off-season), avoid storing it at a full charge or completely drained. A charge level of around 50% is ideal for long-term storage.
  • Temperature Control: Store the battery pack in a cool, dry place, away from direct sunlight or extreme temperatures. High temperatures can cause the cells to degrade more quickly, while freezing conditions can damage them.

Maintenance Checks

  • Regular Voltage Checks: Periodically check the voltage of your battery pack and individual cell groups to ensure the pack remains balanced. This can help catch issues before they cause major problems.
  • Inspect for Physical Damage: Regularly inspect the battery pack for signs of wear, such as damaged wires, loose connections, or swelling cells. Address these issues immediately to prevent further damage or safety risks.

Extending Battery Life

  • Avoid Deep Discharge: Try not to fully discharge your battery pack during use. Discharging lithium-ion cells below their minimum voltage can cause permanent damage. Aim to recharge the battery when it reaches around 20-30% of its capacity.
  • Moderate Power Usage: Avoid running the motor at maximum power for long periods, as this can generate excessive heat and shorten the battery’s lifespan. If possible, ride in lower power modes to extend both the range and life of the battery.

nitecore 18650

Building your own electric bike battery pack using 18650 cells can be a rewarding project that allows you to customize your bike's power and range.

However, always prioritize safety throughout the process. Make sure to carefully follow all guidelines for assembly, testing, and maintenance, and ensure that your battery pack is properly balanced and protected.

If you are looking for a new electric bike or electric bike battery pack, feel free to check the following Amazon links (links open in the windows):

Note: Lithium-ion and LiFePO4 cells can be dangerous if mishandled. Improper wiring, overcharging, or physical damage to the cells can result in fire, electrical shock, or even explosions. If you are unsure at any stage, consult with a professional or consider using OEM batteries, which are specifically designed and tested for safety. Always work in a safe environment and use appropriate protective gear. Whatever you do, it is your own responsibility.