A basic electric bicycle runs on a brushless DC (BLDC) motor, is
powered by batteries and controlled from an ECU. The BLDC
motor for the electric bicycle is of the standard three phase
trapezoidal type, typically rated at a few hundred watts and the
battery voltage is usually 36V or 48V. Almost all the electronics
in the electric bicycle are found in the ECU, it contains the
inverter circuit for the motor; temperature sensor; fault
detection; SMPS; analog and digital IOs; and finally the
controller itself. Some ECUs have advanced features such as
Remote Key Entry (RKE) and electric horn as well. All of these
as well as the wiring packed into a metal box of typical
dimensions 10x7x3 cm3. Most electric bicycle manufacturers
prefer an inverter circuit designed with discrete components for
cost consideration, this circuit takes up about half of the PCB
leaving even less space for the rest of the circuit. This gives you
an idea of the challenge facing the designers. From the MCU
point of view, not only must it be functionally acceptable, it must
be able to withstand the harsh environment within the box. The
XC866 microcontroller has been used in this.