Maker Pro
Custom

Electric Scooter Controller

Share
banner

This project guides on how to accomplish Electric Scooter Controller. It describes the implemented logic, the HVPAK SLG47115’s application and the obtained results of a typical scooter controller.

Implementation and Configuration of Electric Scooter Controller



The implementation of the Electric Scooter Controller is based on the HVPAK SLG47115V. This CMIC contains internal Analog Comparators, PWM controllers, and High-Voltage Integrated H-Bridge/dual Half-Bridge functionality that can be used as a pre-driver for the DC motor with internal speed regulation, based on the user selection and throttle position.

The driving mode configuration, which determines the maximum allowed speed for the DC motor, is implemented with the internal ripple counter and the programmable delay/edge detector, as it is shown in Figure 4 in the Go Configure Software Hub. The complete design file can be found here.

As an electric vehicle, the electric scooter is a battery-powered vehicle designed for convenient and eco-friendly personal transportation. Classified as a form of micro mobility, they are designed with a large center platform on which the rider stands.

It is generally based on an electric motor normally placed on the front wheel that is electronically controlled by a central device located on the user’s front control panel. The brake system includes disc brakes on the rear wheel and the electric motor lock can also be used as an additional brake.

A typical scooter diagram is shown in Figure 1, where the main components are indicated.

The entire scooter control is implemented in the front panel, where power button is located, the measured speed is shown, the drive modes can be selected and some other options like turning on the headlight can be selected.

Electric scooters are usually designed to have three different driving modes with a trade-off between battery life and maximum speed. These modes are user selectable on the front panel.

The Eco drive mode is defined as the lowest speed mode. It usually reaches 10–15 km/h depending on the scooter model and is designed for energy saving and beginners.

The standard mode, or Drive, has a top speed of 15–20 km/h and it is the recommended mode for driving in urban environments.

The Sport mode is the fastest. The top speed is limited to the maximum of the scooter (20–25 km/h typically) and is the least efficient mode in terms of battery life.

All these modes are selected by pressing the button located on the front panel on the handlebars by the driver.

In the same place, the throttle and brake lever are placed. The throttle is based on a potentiometer, so its voltage output is proportional to the user’s desired speed. The brake lever moves the disc brake and, also, electronically activates the brake light located at the rear of the scooter.


Scooter Controller Design Diagram And Schematic

The Electric Scooter Controller described and implemented in this article is based on the block diagram shown in Figure 2.

A DC motor is the main actuator to be controlled. To do this, the internal HV GPIOs of the SLG47115 are configured as a double half — bridge to work as a pre-driver for external FET’s that drive the motor. These pins, as the motor output controllers, define whether the motor moves forward, brake or is at coast mode.

The pins are managed with the internal HV Out control module of the HVPAK IC, which is controlled by the implemented internal logic based on the speed sensor output (the speed feedback) and the throttle position. This control also uses a PWM, generated with one of the internals PWM modules of the HVPAK IC, and the analog comparators connected to the actual speed, throttle position and speed limit signals. The varying duty cycle of the PWM is used to regulate the motor speed.

To set the maximum speed determined by the driving mode selected by the user, the second PWM module is applied. A PWM signal with different duty cycle is generated by means of the user selection, and it is then filtered with an external low-pass filter, thus obtaining a voltage reference signal related to the maximum speed that is used for the speed regulation.

All the scooter motion, including the internal logic and the PWM regulation, depends on the brake input signal. When it is enabled, the entire motion logic is disabled by the brake control and the corresponding light indicator is enabled.

The driving mode is selected by the user, with an external button and the corresponding deglitch filter generating edges that allow the system to switch between the different options.

The diagram shown in Figure 2 is represented, considering the required external components, in the schematic circuit shown in Figure 3.

Implementation and Configuration of Electric Scooter Controller


The implementation of the Electric Scooter Controller is based on the HVPAK SLG47115V. This CMIC contains internal Analog Comparators, PWM controllers, and High-Voltage Integrated H-Bridge/dual Half-Bridge functionality that can be used as a pre-driver for the DC motor with internal speed regulation, based on the user selection and throttle position.

The driving mode configuration, which determines the maximum allowed speed for the DC motor, is implemented with the internal ripple counter and the programmable delay/edge detector, as it is shown in Figure 4 in the Go Configure Software Hub. The complete design file can be found here.

When a falling edge is detected by the P DLY module, the ripple counter increments its output, which is configured to vary between 0 and 2 (corresponding to ECO, Drive, and Sport modes respectively). The ECO mode is particularly detected with the 2-bit LUT1 output, which is used for speed control as it is described later.

The configuration of the ripple counter is shown in Figure 5.

The speed regulation stage of the controller is implemented by using the internal logic and analog comparators with external reference, as in Figure 6.

The throttle (an external potentiometer) and the speed limit signal are connected to analog comparators ACMP0H and ACMP1H and compared with the speed sensor output connected to PIN 19. The ACMP0H monitors the actual speed versus the speed limit (established by the user selected driving mode) while the ACMP1H controls the actual speed versus the throttle position. Both comparisons, with the corresponding logic implemented with 2-bit LUT0, determine if the DC motor speed must be increased or decreased.

2-bit LUT0 is configured to increment the DC motor speed when it is necessary only. That is, the speed will go high if the current speed (obtained from the sensor output) is lower than the required by the throttle position and if it is lower than the speed limit. If actual speed is higher than the throttle position, or it is over the speed limit, the 2-bit LUT0 output will be low, to reduce the motor speed.

As mentioned in previous sections, the DC motor control signals are generated and regulated by a PWM connected to the HV GPIOs of the HVPAK configured as half bridge. This configuration is required to obtain the desired voltage with a high current output which is to be used as the pre-driver signal for the motor FET based driver. To obtain higher current drive capability, both half bridge legs are used in parallel.

Also, as the HV GPIO outputs are not used for direct motor driving, the slew rate of HV OUT Control module is configured in fast mode. The HV GPIO ports connections, and its configuration, are shown in Figure 7 and Figure 8.