Suzuki TS125 Electric Conversion

Table of Contents

Introduction

This post covers the full electronic setup of our 1982 Suzuki TS125 electric conversion, using the latest range of VESC Labs products. This includes the VESC Maxim 120V, Harmony 32, and Dash35B and other peripherals which support the electronic setup. We’ll explain how each product was wired and configured using VESC Tool to create a reliable, high-performance electric motorcycle.

It is always recommended to update to the latest version to get the latest features and improvement. At the time of writing VESC Tool version 7.00 (beta) was used for configuration. The latest and beta versions of VESC Tool can be downloaded here.

We have also created a Github repository with all the example files used for this project.

Benjamin has also created a couple YouTube videos explaining the bikes setup which can be seen below:

Configuring the bike using using LispBM Scripting
(Advanced)

Configuring the bike using the new QML UI
(Easy)

Overview of the Electronic System

For this conversion the following electronic components were used:

The Maxim’s 12V DC-DC converter powers the 12V system on the bike, including the lights, indicators and horn. The IO-functions on the maxim control the indicator and hazard flashing and they monitor the high beam, kickstand and brake light signals. The state of these functions is then sent over CAN-bus to the Dash35B to update the indicator and light symbols.

Make sure that the 12V headlight is an LED as incandescent lamps draw too much power initially to heat up!

A multifunctional handlebar control switch with headlight, horn and indicator buttons was also used. 
At the time of writing this one was available on AliExpress. It is not exactly the same as on this bike, but there are many option to chose from that work.

Mechanical Overview

The Suzuki TS125 traditionally had a 125cc, 15HP (11kW) engine.
This got replaced with a 30 kW electric motor, making the bike around three time more powerful than the original.

The motor uses a two-stage reduction system, with the first stage using a 420 chain and the second stage using a 428 chain, resulting in a final gear ratio of 8.7:1.

The rear wheel diameter is 600 mm, a key value for configuring the Maxim.
Knowing both the
gear ratio and wheel size allows the motor controller to accurately calculate the vehicle speed, which is then displayed on the Dash 35B.

Configuring the VESC Harmony 32 BMS

This guide covers how to set up the Harmony 32 for this 22S battery.
Always read your BMS datasheet carefully to correctly wire up and configure a BMS to your specific battery!

For this project a 22S 42Ah Li-Ion battery was used.
The Harmony 32 has some specific rules which must be followed to ensure the BMS is wired safely and functions correctly. It is important not to directly follow this guide as the values used and how it is wired may not match what is appropriate for your battery.

The battery should be connected to the BMS in the following order:

  1. Cell Negative
  2. Cell Positive (Be aware that this connection is the most likely for large current to flow, and therefore be prepared to unplug if necessary)
  3. 0- Cells 9+
  4. 10+ Cells 18+
  5. 19+ Cells 22+
  6. T1, T2, T3, T4

 An example wiring diagram of how the Harmony 32 was wired to the 22 battery cells can be seen below:

Connecting the BMS to VESC Tool

The BMS can be connected to VESC Tool via USB, Wi-Fi, Bluetooth, or CAN. For instructions on how to connect with and navigate VESC Tool please visit https://www.vesclabs.com/category/getting-started/.

  1. Connect the BMS to VESC Tool using one of the mentioned methods.
  2. Ensure the “VBMS32” has been selected from the list of CAN devices.

Configuring the Cell Voltages

  1. Navigate to the “VESC BMS” section from the menu on the left of the screen (on desktop), or by swiping across the screen on a mobile device.
  2. Select the “Charging” tab at the top of the screen.
  3. The default values for “Cell Voltage Empty” and “Cell Voltage Full” are set correctly for Li-Ion or LiPo cells. If you are using another cell chemistry such as LiFePo4, please set the values according to the cell manufacturer’s datasheet.
  4. Press the “Write” button to write the new configuration to the BMS.

Configuring the Number of Cells

The number of cells wired to IC1 and IC2 should be set according to how many cells have been wired to the BMS.
If you are unsure how many cells have been wired to IC1 and IC2, please check your wiring and refer to the example wiring diagrams in the datasheet.

  1. Select the “Charging” tab at the top of the screen.
  2. Set the value of “Cells IC1” to how many cells are wired to IC1 (Cell inputs 1–16). For this battery there are 16 cells on IC1.
  3. Set the value of “Cells IC2” to how many cells are wired to IC2 (Cell inputs 17–32). For this battery there are 6 cells on IC2.
  4. Press the “Write” button to write the new configuration to the BMS.

Configuring the Number of Temperature Sensors

  1. Set the value of “Temperature Sensors” to how many temperature sensors have been wired to the BMS to monitor the cell temperatures. For this project there are 3 temperature sensors connected to the BMS to monitor the cell temperatures. We have also have a fourth wired to T4 however, this is going to be used as an ambient temperature sensor which will be shown on the VESC Dash 35B display. The value we use is therefore 3 otherwise the BMS will also use T4 which could prevent the BMS from operating correctly.
  2. Press the “Write” button to write the new configuration to the BMS.

Applying the Settings

For the settings to be fully applied to the BMS it must be restarted. Go to the terminal-menu at the top of VESC Tool and select “Reboot”. That will disconnect you from the BMS, so you have to reconnect again. Once you are connected all new settings should be in use.

Check the Settings have been Written

  1. Check that the “Stream BMS realtime data” button is activated on the right side of the window (highlighted blue indicates that it is activated).
  2. Navigate to the “BMS Data” section from the menu on the left of the screen (on desktop), or by swiping across the screen on a mobile device.
  3. Under the “Voltages” tab, check that the correct number of cells (22) are being shown.
  4. Check that the voltages shown correspond to the chemistry of cells used.
  5. Under the “Temperatures” tab, check that the correct number of temperature sensors (3) are shown.
  6. Check that the temperatures of the sensors (T1–T3) are reading correctly.

Configuring the Charging Settings

The default values for “Charge Start Voltage” and “Charge End Voltage” are suitable for most LiPo and LiIon cells. For LiFePo4 or other cell chemistries please consult the battery cell datasheet.

The value of “Charger Detection Voltage” should be set appropriately for your battery and charger. In most cases you can set it to 80% of the total battery voltage when the battery is completely empty. So for a 22s battery it can be set to 22 * 2.5 * 0.8 = 44V assuming it is completely empty at 2.5 V per cell.

Note that the charge port always outputs close to 12V with a weak pull-resistor to help certain chargers detect that there is a battery. Therefore “Charger Detection Voltage” should not be set too low as that can cause wakeups from the BMS thinking a charger is plugged in. The “Max Charge Current” should also be set appropriately for your battery and charger.

  1. Navigate to the “VESC BMS” section from the menu on the left of the screen (on desktop), or by swiping across the screen on a mobile device.
  2. Select the “Charging” tab at the top of the screen.
  3. Change “Charger Detection Voltage” to an appropriate value for your battery system and charger. For this battery is is set to 44V.
  4. Change the “Max Charge Current” to an appropriate value for your battery system and charger.
  5. Press the “Write” button to write the new configuration to the BMS.

Configuring the Balancing Settings

The default value for “Max Balance Channels” is set to 5. Depending on how well heat can get away from your BMS compartment, you may want to increase this value to speed up the cell balancing process. However, raising the number of balance channels will generate more heat during balancing. It is important to select an appropriate value to prevent the BMS from overheating, as reaching thermal limits can slow down or interrupt the balancing process.

  1. Select the “Balancing” tab at the top of the screen.
  2. Change “Max Balance Channels” to a value suitable for your BMS enclosure conditions.
    For this battery it was left as the default value of 5.
  3. Press the “Write” button to write the new configuration to the BMS.

Configuring the Power Switch Settings

The power switch works by first pre-charging the output with a constant current of around 800 mA until it reaches 10V below the cell voltage, then it switches on the main switch. How long this takes depends on the input capacitance of your load (such as a motor controller). The setting “Precharge Time Max” sets the maximum allowed time for this process and is set to 3 seconds by default. If the precharge takes longer time than this setting a fault code is generated and the switching sequence is aborted until the switch input is cycled. Make sure that “Precharge Time Max” is set to a long enough time to not generate a fault, while not setting it to an excessively large time. The default value of 3 seconds is good for most loads.

  1. Select the “PSW” tab at the top of the screen.
  2. Change “Precharge Time Max” to a value suitable for your system.
  3. Press the “Write” button to write the new configuration to the BMS.
  4. Navigate to the “BMS Data” section from the menu on the left of the screen (on desktop), or by swiping across the screen on a mobile device.
  5. Find “Status” at the bottom of the table (scroll to the bottom) which should show “PSW_OFF”.
  6. Power on the BMS using the power switch or key.
  7. The “Status” should then change to show “PSW_PCHG” indicating the circuit is being precharged, before changing to “PSW_ON”.
  8. If the “Status” shows “FLT_PCHG”, this indicates that there is a fault and possibly that “Precharge Time Max” should be increased to resolve this. 

Configuring the Over-current Protection Settings

The table below shows the short-circuit current protection settings and the corresponding current they trigger at.
As the shunt resistor is 0.1mOhm on the Harmony 32, 10 mV of voltage correspond to 100 A of current.
Note that it is possible to set the threshold higher than 60 mV in VESC Tool, but doing so is likely to permanently damage the BMS during a short circuit.

  1. Navigate to the “VESC BMS” section from the menu on the left of the screen (on desktop), or by swiping across
    the screen on a mobile device.
  2. Select the “PSW” tab at the top of the screen.
  3. Change “Shortcircuit Protection Threshold” to a value suitable for your system.
    For this battery the value is set to 60 mV.
  4. Press the “Write” button to write the new configuration to the BMS.

Verify the BMS Configuration is Correct by Charging

To verify that the BMS settings have been configured correctly, it is important to plug in the charger and check that everything operates correctly. Please follow these steps in order to ensure safe charging.

Do not plug the charger in if you suspect something has not been configured correctly!
To avoid damage to the device or batteries, as well as the risk of fire or injury, be prepared to unplug the charger immediately if the displayed values are incorrect.
If you notice any unusual signs such as unexpected smells, noises, or excessive heat, disconnect the charger immediately and investigate the cause.

  1. Navigate to the “BMS Data” section from the menu on the left of the screen (on desktop), or by swiping across the screen on a mobile device.
  2. Switch on the the charger and wait for it to be powered on and ready to charge.
  3. Check the polarity of the charger output matches the charger input of the BMS.
  4. Plug the charger output into the charge input of your battery.
  5. In the VESC Tool’s table of values, verify that the “Charge Input Voltage” rises to a level slightly above the “Total Voltage” (typically within 1V).
    Please note the voltage may initially drop as the charger draws some power before then increasing.
  6. Verify that “Input Current BMS IC” displays a negative value, indicating that current is flowing into the battery
    and charging is in progress.
  7. Disconnect the charger from the battery pack.

Configuring the Sleep Mode Settings

By default, “Block Sleep Mode” is set to “True”, which prevents the BMS from going to sleep while it is being configured.
The final step to configuring the BMS is to change this value to “False”. This enables the BMS to sleep when the power switch is not turned on.

  1. Select the “Sleep” tab at the top of the screen.
  2. Change “Block Sleep Mode” to “False”.
  3. Press the “Write” button to write the new configuration to the BMS.

Wiring Guide

The image above is a complete wiring diagram of the TS125 including all VESC Labs components as well as lights, indicators, switches and connectors. The image can be clicked to download a high resolution PDF file.

Before starting to wire all the electronics to each other it is important that each component has been installed onto the bike and has be prepared correctly. 
This includes:

  1. Ensuring the battery cells have been wired to the BMS correctly and that it has been configured correctly.
    Always read your BMS datasheet carefully to correctly wire up and configure a BMS to your specific battery!
  2. The motor encoder has been installed into the motor.
  3. The ADC throttle and brake have been installed onto the handle bars.
  4. The Dash 35B display and buttons have been installed onto the handle bars.

The 39 Pin Automotive connector which comes with the Maxim controllers has 22 AWG cables.
The cables were all extended to reach the individual components on the bike.
Once all the cables were extended they were wrapped in wiring harness / fleece tape which holds all the individual cables neatly together.

  • Ensure none of the cables are under tension and are away from moving mechanical parts.
  • Check the handlebars have full range of motion and does not pull on any cables.

The Maxim has M6 threaded terminals to connect the motor phase cables and battery cables.

Warning: Do not exceed 4Nm when tightening the phase and power connectors. This can cause irreparable damage not covered by the products warranty!

Configuring the Motor Controller

Configuring the Motor Controller

Benjamin recorded a demonstration of the full bike configuration using the new QML package and automatic IPM setup. This makes it possible to configure the motor, inputs, and display without writing any code. If you are still interested in looking at the code it can be downloaded from the GitHub repository here.

Before configuring the motor controller it is important that the rear wheel of the bike is raised off the ground. Also ensure that any moving parts such as the chain, sprockets and wheel are free from obstruction and no wires can get caught in the drivetrain.

Connect to the VESC Tool

The Maxim can be connected to VESC Tool via USB, Wi-Fi, Bluetooth, or CAN.
For instructions on how to connect with and navigate VESC Tool please visit https://www.vesclabs.com/category/getting-started/.

  1. Connect the Maxim to VESC Tool using one of the mentioned methods.
  2. Ensure the “Maxim_120” has been selected from the list of CAN devices.

Updating the Maxim Controller and Dash35B Firmware

All of the devices should be updated to the latest firmware before configuring.
The BMS should not require updating if it was recently updated in the previous steps.

  1. Navigate to the “Firmware” section from the menu on the left of the screen (on desktop), or by swiping across the screen on a mobile device.
  2. Press the “Download Latest” button to update the VESC Tool with all the latest firmware.
  3. Starting with the display, select “VDisp 900” from the list of CAN-Devices.
  4. Press the “Upload Firmware” button to upload the latest firmware.
  5. Wait for the firmware to finish uploading and be confirmed that it has been installed.
  6. Reconnect back to the Dash35B.
  7. Select “STR365 IO” from the list of CAN-Devices.
  8. Press the “Upload Firmware” button to upload the latest firmware.
  9. Wait for the firmware to finish uploading and be confirmed that it has been installed.
  10. Select “Maxim_120” from the list of CAN-Devices.
  11. Press the “Upload Firmware” button to upload the latest firmware.
  12. Wait for the firmware to finish uploading and be confirmed that it has been installed

Installing and Updating the VESC Packages

VESC Packages are applications which run onboard the devices to add extra functions.
Follow the steps below to install the required packages:
 
  1. Navigate to the “VESC Packages” section from the menu.
  2. Press the “Update Archive” button to update the VESC Tool with the latest packages.
  3. Select “VDisp 900” from the list of CAN-Devices.
  4. Select the “Dash35B” package from the list of applications.
  5. Press the “Install” button to install the package onto the display.
  6. Once installed you should see a pop up window confirming the package has been installed.
  7. Select “STR365 IO” from the list of CAN-Devices.
  8. Select the “VL Bike 39P ESP” package from the list of applications.
  9. Press the “Install” button to install the package onto the display.
  10. Select “Maxim_120” from the list of CAN-Devices.
  11. Select the “VL Bike 39P STM” package from the list of applications.
  12. Press the “Install” button to install the package onto the display.

Motor Detection with the new QML UI

On the Welcome & Wizards section there will now be a UI showing for much easier setup of IPM motors. 
The interface will show four tabs: Motor Detection, Input Configuration, Throttle Controls, and Vehicle Info.
These are also available via mobile interface.
 

Before running the motor detection the VESC Tool is required to know the type of encoder fitted, the maximum motor current and the detection current.

These values should be configured depending upon your motor datasheet.
 
It is best detection results for the motor to be free spinning and not attached to the chain.
If you do not it is important that the rear wheel of the bike is raised off the ground.
Ensure that any moving parts such as the chain, sprockets and wheel are free from obstruction and no wires can get caught in the drivetrain.
 
  1. Select “Maxim_120” from the list of CAN-Devices.
  2. Navigate to the “Welcome & Wizards” section from the menu.
  3. There will be a new UI now showing, ensure the “Detect Motor” tab is selected.
  4. Select the VESC Labs ABI Encoder”.
  5. Set the “Motor Current” to 600A.
  6. Set the “Detection Current” to 100A.
  7. Press the “Configure IPM Motor” button and confirm nothing is in the way.
  8. Wait for the motor to stop spinning and the confirmation that the configuration is done.

Configuring the Throttle & Brake Inputs

The throttle and brake can now be configured using the same UI package and going to the input tab. Here the voltages of the twist throttle and thumb lever at there minimum and maximum can be measured and entered in.

  1. Select the “INPUT” tab from the APPUI.
  2. Select the “Poll Voltage” checkbox.
  3. Set “Throttle Min” to 0.05V above the voltage shown on the throttle dial. This ensures that there is some deadband.
  4. Twist the throttle all the way and set “Throttle Max” to the voltage shown on the throttle dial.
  5. Set “Brake Min” to the voltage shown on the brake dial.
  6. Press the brake lever all the way and set “Brake Max” to the voltage shown on the brake dial.
  7. Press the “WRITE” button to save the input configuration.

Configuring the Throttle & Brake Controls

Inside the Controls tab are the settings to configure how the inputs control the motor.
For this project we need to set the control type to current.
The ramping times and input deadband are reduced from the default values. This make the throttle more responsive and maximize the whole range of motion.

  1. Select the “CONTROLS” tab from the APPUI.
  2. Set the “Control Type” to “Current”.
  3. Reduce the “Positive Ramping Time” to “0.2s”.
  4. Reduce the “Negative Ramping Time” to “0.1s”.
  5. Reduce the “Input Deadband” to “5%”.
  6. Press the “WRITE” button to save the configuration.

Test the Throttle and Brake Inputs

At this stage the throttle and brake should be configured and can be tested to see if they control the motor.
Before testing please ensure the wheel of the bike is off the floor or the chain is not attached to the motor.


The vehicle will be in 
neutral power mode which will be displayed on the the Dash 35B display as and “N”.
It must be put into power mode 1, 2 or 3 to enable the throttle and brake.

  1. On the buttons for the Dash 35B press the “+” button.
  2. Check on the display the the power mode has changed to “1”.
  3. Slowly twist the throttle to check it spins the motor. If the motor spins in the wrong direction the direction can be inverted from Motor Settings -> General in VESC Tool.
  4. While the motor is still spinning, press the brake to check it slows / stops the motor.

Configuring the Vehicle Information for Real Time Data

In order for the Maxim and Dash 35B to accurately calculate and show the correct data such as speed and trip information, details about the vehicle must be entered into the VESC Tool. In the vehicles tab we will change the number of motor poles, gear ratio and wheel diameter.
 
  1. Navigate to the “VEHICLE” tab of the configuration UI.
  2. Change the number of Motor Poles” to “8”.
  3. Change the “Gear Ratio” to “8.72”.
  4. Change the “Wheel Diameter” to “600mm”.
  5. Press the “Write” button to save the configuration.
  6. Look at the display and verify that the speed represents an accurate value.

Configuring the Indicator Glow

We’ve introduced a new feature that keeps the indicators softly illuminated at all times, similar to the daytime running lights found on modern motorcycles. This enhances visibility and makes your vehicle easier to spot in daylight. The glow brightness can be configured or turned off to match your preference.

The lights on the bike must be switched on for this the indicator glow to also be on. To turn the light on short press the power button on the Dash 35B buttons which should turn the lights on.