MCUs in E-Bikes: driving lights, LED/LCD display and measurements

Ronak Desai, Cypress Semiconductors -June 17, 2013

This article explores design techniques and challenges for implementing an electronic bike (E-Bike) built using a microcontroller or Programmable System on Chip (PSoC). Current E-Bike systems use a microcontroller with external signal conditioning and comparator circuitry to drive the three-phase motor; external ADC and external amplifiers for different sensor inputs; relay driver circuitry for brake light, headlight, and directional lights; LED/ LCD displays; and temperature measurement.

Programmable SOC devices can be used in E-Bike applications as a single-board system for motor control, analog measurement, and direct drive LCD display. Programmable SOCs can also support capacitive sensing technology to replace mechanical buttons on the keypad.  In addition, SOC devices use internal PWM, MUX, and comparators for driving and controlling the three-phase motor, internal ADC and PGA for sensor inputs battery monitoring, and temperature sensing using a temperature sensing device like a thermistor or RTD.  The device can also directly drive the relays for the brake light, headlight, and directional lights, as well as direct drives the LCD display of temperature, battery status, speed, distance travelled, and any error/warning messages.

Using IDE-based tools, all interface and logic can be designed for the SoC. These tools also have readily available component blocks for designing more complex logic such as monitoring a capacitive sensor for the interface, an ADC for analog sensors and other inputs, driving the PWM for a buzzer, DAC, and a segment, character, or graphical LCD display.  Thus, with a programmable SOC, the development and product cost of an E-Bike system can be substantially reduced.


Figure 1 shows the block diagram of a basic E-Bike system:

Microcontroller: The microcontroller is typically used for different sensor input detection (i.e., throttle inputs, temperature sensor, battery input, fuel sensor, obstacle sensors), A/D conversion, output comparison components, and driving and controlling the three-phase brushless automotive motor. An ultra-low power microcontroller is required as an E-Bike is a battery-operated system. The microcontroller is also part of the central locking system, and can be used to communicate with different external devices used in the vehicle. Using a microcontroller whenever a brake is pulled automatically stops the motor spinning and prevents the motor from wearing down the brake pads faster than a standard human-powered bike.

Hub motor/Wheel motor: Typically, a brushless motor is used, either sensored (Hall Effect) or sensorless, for reliable and efficient operation.

Rechargeable Lead Acid/ Lithium Battery: A variety of battery types are used in E-Bike applications, from lead-acid to lithium batteries. The rechargeable lead-acid battery is commonly used in automotive applications.

Display and Keypad: Typically, the LCD display with backlight is used for showing the temperature, battery input, speed, distance traveled, and any error/warning messages.  It can also show levels of pedaling assistance and energy generation. A mechanical button-based keypad is used in automotive applications. A keypad also enables anti-theft capabilities to protect the bike.

Power management: This subsystem provides power to run functional blocks and oversees battery activity. The host microcontroller with comparators and discrete logic can be used to manage a lead-acid battery. This approach also provides safety and critical information about battery to the microcontroller and user.



Currently, 16-bit and 32-bit microcontrollers are used for E-bike systems. The microcontroller controls and manages all the functions and features of the vehicle. Once the user turns the ignition key to start the vehicle, an input goes to the microcontroller so it can start the three-phase brushless automotive motor. The microcontroller receives the various vehicle input signals from the user and moves the vehicle appropriately. The microcontroller drive the three-phase brushless automotive motor as per the speed selected by the user. The speed of the motor will vary and can be controlled as per acceleration and brake sensor input from the user.

The microcontroller uses either internal or external serial EEPROM (I2C/SPI based) for storing data like distance readings. The microcontroller also uses a real-time clock (RTC) to display accurate time on the display. 
Temperature measurements are made using and on-board RTD or thermistor-based temperature sensing device. The E-Bike system can also use an obstacle sensor to get information about nearby vehicles while parking.  A fuel sensor gets information about fuel in the engine, and the microcontroller can monitor the battery input and display it on the LCD display.  Relay driver circuitry is used to switch ON/OFF the brake light, headlight, and directional lights.

The power supply section consists of a rechargeable lead acid or lithium battery as a power source. It must also have provisions for the battery charger. The battery input is down converted to a DC voltage to power the microcontroller and other circuitry. The ignition key enables and disables on-board regulators. The power supply section also has protections like battery, over-current, over-heating, and start-up fail condition protection circuitry. OEMs may also want to provide provisions for charging external devices like cell phones.

Loading comments...

Write a Comment

To comment please Log In