1. Basic principle
When converting a bicycle to an electric bicycle (or pedelec, pedal electric cycle), the existing front or rear wheel hub is usually replaced with a hub motor. (Similar to a hub dynamo.) The motors are mostly three-phase motors, recognizable by 3 thick power cables. Three-phase motors have the advantage that they are brushless, i.e. they do not have any electrical wearing parts.
Today, lithium-ion batteries, which store electrical energy as direct current, are usually used to supply the motor with energy. You can store energy for a range of around 20 – 30 kilometers per kg of battery weight.
In order to convert the direct current from the battery into a three-phase current for the motor, you also need a control unit or “controller”. In addition, a throttle grip and/or a pedal sensor must be connected to this controller in order to be able to regulate the motor at all.
The gas handle (or lever) works similarly to that of a moped; By turning the throttle grip, the motor can be infinitely adjusted from zero to full throttle. (However, this type of control is not legal in Germany, but it is, for example, in AT.)
Alternatively, this function can also be performed by a PAS sensor (pedal assistant system). This measures, for example, the speed of the pedaling movement on the pedal crank and, depending on the pedaling speed, also controls the motor from zero to maximum speed. (The faster you pedal, the faster the motor runs.)
Depending on the design, other parts can also be connected to the controller; such as brake handle cut-off switches, which automatically interrupt the current flow to the motor when the brake is applied; Step switch, which can be used to specify different maximum speeds; Cruise control or “auto cruise” switches, which act as a kind of locking function for a specific engine speed; 6 km/h button, battery level indicator, possibly also displays or control panels with additional functions, etc.
Legally, pedelecs are considered bicycles and are therefore free of insurance and registration. However, the following conditions must be met: 1. The motor may only provide support up to a maximum speed of 25 km/h. 2. The rated continuous power of the motor may only be a maximum of 250 watts. 3. The motor may only be assisted if you are pedaling at the same time.
In a test arrangement for self-conversion, the whole thing then looks like the following picture, for example. Here you can also see what needs to be attached to the bike to be converted.
2. The required components in detail
2.1 Motors
There are many different types of bicycle motors. Brushless three-phase motors are now common, which are controlled by a controller that converts the direct current of the battery into a suitable and controllable three-phase current.
These motors are available for front installation as well as for rear wheel installation. (There are also central motors that are attached directly to the pedal crank. Their advantage is that the gears of the bike can be used to develop the power of the motor, which promises advantages, especially on steep inclines.)
For your own conversion, however, only front and, if necessary, rear-wheel motors are usually suitable, although the installation of front-wheel motors is easier than that of rear-wheel motors. Therefore, this presentation is primarily limited to the installation of front engines.
Bicycle motors are available with and without gears. Geared motors are usually lighter than gearless ones and usually have a freewheel. This makes them better suited for most applications than the heavier gearless (“direct drive”) motors. The main disadvantages of geared motors are the lack of recuperation capability (feedback of energy when braking) and the increased wear since the gears usually contain small plastic gear wheels. Therefore, these motors should not be operated at much higher power than those specified. The drag loss when turning a 250-watt freewheel motor passively at 25 km/h should be around 1 – 2 watts, that of a direct motor around 4 – 8 watts.
Both motor types are available with and without Hall sensors; the motors with Hall sensors can usually be controlled more sensitively and without jerking, but are also a little more susceptible to faults.
The motors are also available in different voltage classes; usually with 24V, 36V, or 48V. A higher motor voltage in no way means a higher speed. All motors are usually designed to reach a speed of 25 km/h for the respective operating voltage and wheel size. With a 24V motor, you can reach a speed of 25 km/h with 24V as for example with a 48V motor 48V. The main advantage of higher voltages is that according to the relationship power equals voltage times current, a lower current is required to achieve the same power at higher voltages (P = U x I; e.g. 250 watts = 10.4 A x 24 V or 5, 2A x 48V). This enables the use of thinner lines or reduces the line losses with the same cable cross-sections.
For most applications, a 36V 250-watt front (or rear if applicable) motor with gearing in combination with a controller that supplies max. approx. 12 A should be the most suitable. With this, a speed of 25 km/h can be easily reached on the level and (at a lower speed) inclines of up to about 7% can be mastered.
Such 250-watt gear motors from “Bafang” can be seen in the first and second pictures. The Bafang motor is available both with and without Hall sensors. Motors with hall sensors usually have 3 thick wires for the motor phases and 5 thin wires for the hall sensor connections. [Motors without Hall sensors therefore only have 3 connections for the motor phases. (If a motor only has 2 connections, it is probably a brushed motor, which also requires a completely different type of controller.)]
The geared motors are available with different transmission ratios. The motors that can be seen in the first and second pictures below are geared motors with a single-stage planetary gear; they have a transmission ratio of approx. 1:4…1:5.
The third and fourth pictures show engines with a two-stage gearbox with a transmission ratio of approx. 1:11…1:15. Due to the higher speed of the internal rotor, these motors have a higher performance for the same weight; or are smaller and/or lighter with the same performance. In practice, however, it should be noted that not all controllers can generate the internal speed of the motor.
It should be noted that the motors are unfortunately not 100% waterproof. It is therefore advisable on the one hand to cover cable passage openings and bearings with chain grease or the like. on the other hand, to park the bike under a roof if possible.
2.2 Controllers
Controllers are also available in a wide variety of designs and performance classes. There are programmable [see below] and non-programmable, controllers with and without connections for Hall sensors, 3-step switches, speed limits, brake handle cut-offs, speed hold functions, displays [see below], the possibility of recuperation, controllers for brushed motors, etc.
The most common controllers are (only) suitable for brushless motors (“brushless”) and have the following connections:
- the three motor phases; three thick cables in yellow, blue, and green [in the following picture above]
- the battery; with a thick black cable (Gnd, 0V, Minus) and a thick red cable (+36V, Plus) [second from the top]
- the throttle grip or thumb throttle with three connections (throttle); black for Gnd, 0V, red for +5V, and green (or blue) for the signal. Only a “normal” throttle grip or thumb throttle with 3 connection cables can be connected here. A button + resistor can be connected in series to the signal and the +5V line, for example, to obtain a 6 km/h button. [Pushbutton + 10k = approx. 20%, + 8.2k = approx. 40% of the maximum speed.]
- the PAS sensor with three terminals; black for Gnd, 0V, red for +5V, and green or blue, or purple for the signal, for pulsed signal sensors
- if necessary, an additional connection with 3 poles for a three-stage switch for speed limits (3 speed)
- for motors with Hall sensors with a 5-pin connection for the Hall sensors; black, red, yellow, green and blue. Many controllers have a dual mode function that Hall sensors can but do not have to be connected to
- possibly a connection for an auto cruise or cruise control function. If the cables are plugged in, the motor maintains the specified speed after 10 seconds; pressing the throttle again resets the system [autocruise]
- one or two 2-pin connectors for a brake lever switch; black and white (or black and yellow). Are the cables connected; is the engine off [L-brake] Gg. there is also a third mostly red cable with +5V (H-brake)
- possibly a two-pin connection for switching the system on/off (ignition)
Most controllers work in such a way that the signal from the throttle grip and PAS independently control the motor. (Or linkage.) The motor can therefore be controlled completely independently of each other by both the throttle grip and the PAS sensor. [Throttle = 1, PAS = 0 => Motor = 1 || Throttle = 0, PAS = 1 => Motor = 1 || Throttle = 1, PAS = 1 => Motor = 1 || Throttle = 0, PAS = 0 => Motor = 0 || Throttle = 0.5, PAS = 0 => Motor = 0.5 || Throttle = 0, PAS = 0.5 => Motor = 0.5]
It is therefore sufficient to only connect a throttle grip in addition to the battery and motor. Or alternatively only battery + motor + PAS.
If the motor is only to be controlled by the throttle grip when pedaling (i.e. the PAS sensor is active), an additional function or component is required; see below “Throttle grip release switch”.
The image below shows a programmable sensorless controller with connectors for [top to bottom]
- the three motor phases; three thick cables in yellow, blue and green
- a three-stage switch [1. stage: be connected to red, 2nd stage: all open; 3rd stage: sw connected to green]
- the throttle grip
- the PAS sensor
- the programming cable
- a brake cut-off switch
- the battery
Programmable controllers are particularly recommended if you want to limit the battery current to a certain value if you want to adapt the low-voltage shutdown exactly to the battery (if it has no BMS) or to specify precisely defined levels for speed limits. For example, the widely used standard controller KU63 / 36V has a current limit of 15 amperes, an under-voltage cut-off of 27.5 volts and fixed speed levels. Now, however, a current of 15 amperes (this corresponds to a power of 540 watts at 36V for some motors or to obtain the greatest possible battery range) may be too much. Or the undervoltage cut-off of 27.5 volts for a 36V battery without internal (Battery Management System controlled) switch-off can lead to the deep discharge of the battery a 36 volt battery with BMS, which always switches off at BMS, for example, 31 volts, is only discharged to a minimum of 33 volts to extend its service life. Or you want to set the bike precisely to a maximum speed of 25 km/h (or 27 km/h). Many programmable controllers can also recuperate, ie feed energy back into the battery when braking. …. In all of these cases, using a programmable controller makes sense. Programmable controllers in the version shown here are available both with connections for Hall sensors and without [image]. In contrast to many other (universal) controllers such as the KU63, the programmable controllers with Hall sensors only work with Hall sensor motors. Of course, the sensorless programmable controllers work with all brushless (3-phase) motors.
There is also open source software for programming:
Furthermore, there are now very good controllers with the option of connecting displays, which can be used to set and read a wide variety of functions and parameters. Here there is also the possibility of real power control, ie as an alternative to speed levels, the maximum power of the entire system can be set in stages. [In the following example max. approx. 80, 150, 250, 350, 500 watts.]
Since these controllers can also be operated quite normally, like the controllers described above, without a display, you have a very diverse range of possible applications with this type of controller. [For this, blue and red must be bridged on the display port or a jumper must be inserted. However, you cannot use the power control in this way, because how do you want to call up the power levels if you only control it via a throttle grip or PAS sensor, which specifies the speed signal.]
250 watt controller, which you can either use as normal or to which you can also connect a display to the upper connector*.
[The other connections from top to bottom: PAS, throttle grip, speed sensor, auto cruise or cruise control**, battery, motor, brake handles.]
* The controller can also be switched on without a display by bridging with a jumper from red and blue in the display connection
** Plugged; then a cruise control function is activated after a restart; after 10 seconds a certain speed will be maintained.
Display with which, among other things, 5 speed or 5 power levels [“Assist”] and other functions can be set similar to a bicycle computer.
The display also shows the speed, the distance, the driving time and (unfortunately very imprecisely) the battery level.
Further information on this can also be found here .
250 watt sine wave controller, which can either be used as normal or to which a display can be connected to the upper connector.
[Connections from top to bottom: motor, battery, PAS, throttle grip, display*, Hall+speed sensor, speed limit, 2x brake handle disconnect.]
* By bridging red and brown in the display connection, the controller can also be switched on without a display
LED display, with which among other things 5
The battery status can also be read on the right (inaccurately). A 6 km/h function can be activated by pressing and holding the top button (W).
Another advantage is the use of a so-called throttle grip release switch, which combines the advantages of a pedelec sensor and throttle grip or makes the legal operation of a throttle grip in Germany possible in the first place. The release switch works in such a way that as soon as you pedal, the throttle grip is released via the pedal sensor. So it can always [and only] be regulated individually from 0 to full power when pedaling. You can, for example, ride long distances without a motor [which is otherwise not possible with a connected pedal sensor], or you can call up the full motor power even at very low speed or cadence. The throttle grip release switch can be built into the controller relatively easily as an additional component. [Throttle = 1, PAS = 0 => Motor = 0 || throttle grip = 0, PAS = 1 => engine = 0 || Throttle = 1, PAS = 1 => Motor = 1 || Throttle grip = 1, PAS = 0.05…1.0 => engine = 1 || Throttle grip = 0.5, PAS = 0.05…1.0 => engine = 0.5 || Throttle grip = 0.2, PAS = 0.05…1.0 => motor = 0.2]
If necessary, a so-called “anti-lightning circuit” can also be installed between the battery and the controller, which prevents the high inrush current (charging of the capacitors in the controller) and thus the burning of the plug contacts if the controller does not have an additional switch (small +36V wire on the battery connection ) is switched on. (The small +36V wire is then permanently connected to the +36V connection; components of the anti-lightning circuit: e.g. IRF 4110, 47µF, 22k, 56k.)
2.3 Combination of motor and controller
Since questions about the speed of the electric bike often arise, here are some basic comments:
The motors are usually designed for a speed of 25 km/h, as this corresponds to the legal requirement in many countries.
With a 28-inch wheel, this means a nominal speed of approx. 200 rpm [200 rpm x 2.185 m wheel circumference x 60 = 26,220 m/h (= 26.2 km/h)], which the motor achieves at the nominal voltage of eg 36 volts. With a 20-inch wheel, a nominal speed of approx. 280 rpm is required to achieve the same speed [280 rpm x 1.530 m wheel circumference x 60 = 25,704 m / h].
If you install a “20 inch motor” with 280 rpm that is actually intended for 25 km/h in a 28-inch wheel, you get a speed of approx. 37 km/h [280 rpm x 2.185 m wheel circumference x 60 = 36 708 m / h]. However, with a lower torque (driving force) over the entire speed range. It is also possible, for example, to operate a 36 volt / 28 inch motor at 200 rpm with 43 volts, for example, then you also get a higher speed (proportionally) to the higher voltage (and higher power consumption). [200 rpm x 43/36 x 2.185 m wheel circumference x 60 = 31 318 m/h]. The torque is the same here at a comparable speed. Conversely, you can of course also install a “28 inch motor” with 200 rpm in a 20 inch wheel and then achieve a speed of approx.
The controller normally allows these maximum speeds to be reached. The maximum speed is therefore achieved completely independently of the type of controller and cannot normally be changed (increased) by choosing a different controller. With most controllers, however, speeds below the maximum speed can be set by plugging in speed limits or programming speed levels. Even with programmable controllers, this maximum speed cannot be increased (or at best by maybe 10% in an “experimental mode”).
Motors without Hall sensors can only be connected to sensorless controllers or universal controllers. A connection to a Hall sensor controller is not possible.
Motors with Hall sensors (3 motor phases and 5-pin Hall connection) can be connected to both Hall sensor controllers and sensorless controllers (as well as universal controllers). The connection to the Hall sensor controller promises a somewhat more sensitive and jerk-free control, especially when starting since the controller does not first have to look for the position of the motor. But it is also possible to connect Hall sensor motors to sensorless controllers, which saves you 5 cables and a possible source of error since no possible defect in the Hall sensors could take effect since they are not used. This is paid for with the slightly poorer motor control behavior described.
In addition to choosing the right speed, it is just as important to choose a controller with the right power for the performance of the motor. Often the controllers on offer deliver too much power, which only leads to lower efficiency and faster motor wear. For example, it makes little sense to combine a 36V / 250 watt geared motor with a 36V / 18A controller, since this would supply the motor with too high an input power of up to 650 watts. (Which would not do the plastic cogs of the gearbox any good in the long run.)
The performance of a controller is basically calculated from the product of voltage times current. For example, a controller with a maximum current of 15 amps at 24 volts has an output of (max.) 360 watts (24V x 15A = 360W), but a 36V controller with 15A has an output of 540 watts (36V x 15A = 540W). Unfortunately, the information on a controller is often inconsistent; eg a controller labeled 36V and 15A cannot be a 250 watt controller. In these cases, the product of current x voltage is usually the more correct value and the power specification is incorrect.
Before permanently installing the motor on the bike, it’s a good idea to try everything out in some sort of test setup like the one below, as there’s no guarantee that everything will work right away. For this purpose, the motor is connected to the controller via the 3 motor phases (+ if necessary the Hall phases); the battery is connected via the battery connection as well as a throttle grip and, if necessary, the PAS sensor. With some controller-motor combinations, the yellow and blue colors of the motor phases and/or Hall sensor phases may have to be swapped over.
The motor can now be controlled from zero to max. independently of one another both only by the gas handle and only by the pedaling sensor (moving the magnets past the sensor). It is sufficient to connect only one of the two control elements, throttle grip or pedal sensor, ie only the pedal sensor. [Important, unfortunately not every pedal sensor fits every controller since the signal evaluation can take place in different ways, see below]
Very important: Under no circumstances confuse the positive pole + (usually red) and the negative pole – (usually black) when connecting to the battery, otherwise the controller will be destroyed immediately! It should also be noted that there are sometimes different cable assignments in the China plugs.
2.4 Combination of battery and controller
The combination of battery and controller is also of some importance. Of course, it is very important that the battery does not have a higher voltage than the maximum voltage of the controller. For example, you cannot simply connect a 36V battery [fully charged = 42V] to a 24V controller, since the 24V controller can contain capacitors that are only designed for a maximum voltage of 35V.
Then it is particularly important to ensure that the battery can also supply the current required for the controller. There can be several limiting factors; In most cases, it will be the maximum design current of the BMS [Battery Management System], often also the maximum current carrying capacity of the battery cells used, but sometimes also factors such as the cross-section of the internal wiring. For example, if the BMS is only designed for a maximum of 15 amperes, you can of course not simply connect a 22 ampere controller to the battery. Or if you build a battery pack from 3P Panasonic NCR18650A cells, for example, you can only use a controller with a maximum current draw of approx. 15 amperes, since the cells should only be loaded up to approx. 5 amperes each. Here is possibly also include the heat development of the battery pack in the considerations. A 3P10S battery made of NCR18650A cells has a power loss of about 60 watts at 15 amps, while a 5P10S made of 18650VTC4 cells only has about 10 watts. [Ploss = R total x I²; 1/R total = (1/R) xn; n = number of parallel cells, R = DC internal resistance of each cell]
2.5 PAS (“Pedal Assistant System or Sensor”)
The PAS sensor has three connections, black for Gnd [0V], red for +5V, and green or blue for the signal. The metal ring on the sensor is used to mount the sensor under the plastic seal of the bottom bracket. The magnetic disc is placed on the crank. The sensor must be mounted in such a way that the magnets run toward the tip of the sensor when you pedal.
The pedaling sensor usually controls the motor depending on the speed, ie the faster you pedal, the more power the motor also gives.
With the PAS sensors, one can essentially distinguish between two different types of sensors, so-called “digital” sensors and analog sensors. The digital sensors [V7] emit a pulsed signal in the form of a square-wave voltage, the number of pulses of which depends on the cadence. The analog sensors [V5] emit a (linear) increasing voltage that depends on the pedaling frequency, similar to a gas grip.
Most controllers (including KU63, EBXXX, and controllers with power control…) require a digital PAS sensor with a pulsed signal. PAS sensors with a pulsed signal only work on the corresponding input of the controller; not at the throttle input. (Or the corresponding controllers only work with a pulsed PAS sensor via the PAS input.) PAS sensors with a linear signal usually only work on the throttle grip input and not on the PAS signal input of most controllers.
Sometimes it is the case that when the motor is controlled via the pedal sensor, the speed is slightly lower than when it is controlled via a throttle grip. There is also often a lag time of approx. 1 – 2 seconds that is perceived as disadvantageous.
There are also differences in the arrangement of the magnets. In the disks shown here, the magnets are arranged radially, ie the same pole always points out of the plane of the disk. However, there are also panes in which the polarity of the magnets is arranged in the direction of rotation, ie first the north pole and then the south pole is guided past the sensor.
The sensor is usually mounted on the chainring side. To do this, the screw connection of the bottom bracket is loosened and the metal sleeve including the sensor is also screwed on. The sensor can also be turned by loosening a small screw on the sleeve so that it can be mounted on the left side of the bottom bracket. (The magnets always point out of the disk with the same pole, so that the direction of rotation of the disk is irrelevant. It is only important that the magnets always run toward the tip of the sensor.)
2.6 throttle grip or thumb throttle
Like the PAS sensor, the throttle grip or thumb throttle has three connections, black for Gnd [0V], red for the +4.5V power supply and green or blue for the signal. However, unlike the PAS sensor, the signal is usually an [analog] signal in the form of a linearly increasing voltage, ie the more the throttle grip is opened, the higher the signal voltage. In contrast to Austria, however, the use of a throttle grip is not legal in Germany at speeds over 6 km/h or only in combination with a throttle grip release switch. In most of China However, it can be connected to controllers and is then only legal in Germany if this component is also installed, which only releases the throttle grip when you pedal along. [If this component is not installed, the motor can be controlled independently and in parallel via both the pedal sensor and the throttle grip.]
Most throttle grips have a resistance of approx. 2 kOhm between +4.5V (red) and GND (black). A variable voltage between approx. 1V and 4V are generated at the signal output (blue) by turning a magnet and a Hall effect sensor. This voltage level is the key signal for speed. If you want to simulate a throttle grip, you have to bridge the +4.5V and GND input with two resistors in series and then tap off a corresponding voltage between the resistors; For example, with two resistors of 2.2k in series (4.4k together), a voltage of approx. 2.25V is tapped off in the middle. If necessary (somewhat uncleanly) you can simply bridge a much larger resistor of eg 10k…100k of +4.5V to the signal output [start with high R!]; a corresponding voltage is then also set depending on the internal resistances in the controller. However, we advise against bridging +4.5V against the signal with too little resistance or short-circuiting, otherwise, the controller could be damaged!
2.7 6 km/h button
If this is not already implemented in the controller (with panel), this level can also be easily retrofitted to standard controllers with an additional button. The button is connected in series with +5V (red) and signal (blue) with an approx. 10k resistor parallel to the throttle grip. (More resistance => lower speed, lower resistance => higher speed.) The gas handle shown above can also be opened on the side and a cable connection to the button can be laid there.
2.8 bicycle battery
Bike batteries are almost a science in themselves. I build these myself and always carry them loose in my luggage. Depending on the route, you can take batteries with different ranges with you. The smaller battery on the right in the picture has a nominal capacity of approx. 180 Wh [16 x Panasonic NCR18650A], which is sufficient for a daily driving distance of up to approx. 20 km. The weight of this battery is only 0.85 kg with a volume of 0.5 L. The middle battery weighs 1.8 kg and has a nominal capacity of 400 Wh [36 x NCR18650A], and the large battery at 2.9 kg of 560 Wh [60 x Sanyo 18650F]. You can find more information about rechargeable batteries here: Do-it-yourself rechargeable batteries.
3. Description of the assembly steps
3.1 Assembly of the (front) motor
In principle, the motor is built into the fork like a normal front wheel hub. The fork ends may have to be filed down a bit.
Two so-called lug washers are used to absorb the counteracting forces of the motor axle (via which the torque of the motor is transmitted to the fork). Here you can also mount other torque arms, which are available in a wide variety of designs. In order to prevent the motor housing from rubbing against the dropouts of the fork, the screws for the fender attachment or the like may also have to be removed. be filed off easily.
3.2 Installing the pedal sensor
The pedal sensor and the associated magnetic disc are mounted on the bottom bracket; for optical reasons preferably on the chainring side. To do this, the pedal crank with the chain ring must be removed using a puller. [With the sensor pictured, it is important to note that the magnets converge towards the tip of the sensor as you pedal. Otherwise, before you finally install the PAS sensor / magnetic disc, it is best to try it out by hand to see if everything works. (Turn the disk over the sensor.)
There are always 4 ways of geometric alignment, but only one of them works. (Disc with the top, or rotated 180° with the bottom facing the sensor, rotating magnets of the disk clockwise or counterclockwise past the sensor (pin).)
Therefore, the sensor (at least the elongated red model) can be mounted either on the right or on the left by turning the sensor or the magnetic disc. [So in the first picture below, the magnetic disk would rotate clockwise.]
To mount the sensor, the plastic seal of the bottom bracket is removed and the ring sleeve is then mounted together with the sensor between the seal and the bottom bracket shell. Often, however, a self-construction is better or necessary, where you have to improvise something according to the conditions of the bike [following pictures].
3.3 Mounting the controller
The controller can be placed in a wide variety of places on the bike. Both fixed and loose attachment is possible.
I prefer an arrangement where the controller is bolted or clamped under the rear rack (and a basket on top of it).
In the case of a fixed attachment, the plug connections should be exchanged for those made from permanently soldered connections, which promises less susceptibility to faults.
3.4 Laying the cables
Some of the cables are routed along the frame tubes and fixed with cable ties, existing clamps or adhesive tape. If the controller is mounted at the rear, a comparatively inconspicuous routing under the mudguard is also possible between the bottom bracket and the luggage rack. However, this has to be drilled in order to attach the cable and, if necessary, bent open a little. The cables are combined here with 9.5 mm² shrink tubing. Since the motors (and possibly also the controller) are only watertight to a limited extent, I usually add some semi-solid chain grease or similar to the cable entry points on the motor and controller.
3.5 Connection of the cables
If the controller is permanently installed, the cables should be firmly connected to each other instead of using cheap and flashy China plugs. In addition, some of the cables have to be lengthened. This is preferably done by soldering. To do this, the two ends of the cable are stripped, twisted together and then soldered. The electrical insulation is done with heat-shrink tubing and/or adhesive tape.
3.6 Connecting the battery
The bike battery is best connected to the controller with XT60 high-current connectors. These are protected against polarity reversal and hold sufficiently tight.↳
The battery can then be carried in a rucksack, for example, and is simply unplugged and taken away when the bike is parked. The cables must of course be long enough for this.
4. Enjoy your riding
You should plan a few days for the entire conversion. Since now you had finished all the assembling steps, go to ride and enjoy it.