Path: EDN Asia >> Design Centre >> Consumer Electronics >> Using MCUs in E-Bikes
Consumer Electronics Share print

Using MCUs in E-Bikes

08 Jul 2013  | Ronak Desai

Share this page with your friends

Over-current protection is used to turn off the motor-driving PWMs and thus stop motor operation. The device has comparator-based triggering of PWM Kill signals that can be used to terminate motor-driving when an over-current condition is detected. The input to this block is from the bus current. The cut-off reference to this block is set to the maximum current that can be drawn by the motor. The bus current input is given to the comparator and the cut-off reference, which is configurable, is set by the DAC. The comparator output is set high if the bus current is lower than the reference threshold. The comparator output is connected to the "KILL" signal input of the PWM. When this "KILL" input is high, the PWM output is turned off, thus preventing the motor from being damaged. The implementation of this complete block will be by using PSoC creator components and will not require any firmware written by the designer.

Sensorless motor control
Sensorless motor control does not require Hall sensors but rather uses a back-EMF zero-crossing detection technique to control motor movement. When the motor rotates, each winding generates a voltage known as the back Electromotive Force (Back EMF) that opposes the main voltage supplied to the windings. Back EMF polarity is in the opposite direction of the voltage used for the winding excitation and directly proportional to the motor speed.

Figure 3: PSoC based sensorless motor control.

In figure 3, back EMF signals from the three phases terminate and the DC bus is scaled and routed to the PSoC. The PSoC will switch the terminate input to the comparator using the MUX, and then compare it with the DC bus voltage. Cascaded digital logic will filter out the PWM signal to get the real zero-crossing signal. The microcontroller will decide the commutation according to this information.

An optional current control will be applied to the PWM output control to regulate the motor current. This inner loop is based on a comparator: the feedback bus current is compared with the reference current value that is provided by a 12bit DAC. Changing the DAC output will modify the output current value.

Sensor-based (HALL effect) motor control
Sensor-based brushless motor control uses a Hall sensor input to detect the rotor position and thus control motor movement. It provides Hall sensor inputs to the microcontroller and works as a closed loop system. This is helpful for automatic speed locking for longer drives.

Design challenges
A high-performance, intelligent microcontroller is required with a higher MIPS CPU core, faster ADC (>= 500Ksps @ 10bit), internal Flash and SRAM memory, internal EEPROM, analogue, and digital peripherals to perform key functions like high performance analogue measurement, CAN interface, three phase Motor control, LCD drive, Low power operation, RTC, Interfaces with different external protocols.

The system can have a low-cost front-panel design with different features like buttons and LED/ LCD interfaces. Alternatively, capacitive sensing can be used to implement button, slider and proximity sensors on the front-panel. Meeting capacitive sensing performance requires (i.e., signal-to-noise ratio) with nearby LEDs (PWM-based) on the front panel can be a design challenge for system designer.

Power MOSFET selection with Low Ron and Low gate capacitance is required for driving three-phase motors. Designing the board with high-power MOSFET driver circuitry and handling high on-board current from a battery input is another design challenge for board designers. As this system involves electro-mechanical construction, designing a compact and cost-effective electro-mechanical system can be challenging, as well certifying the final design. Furthermore, the E-Bike system needs to be designed to achieve greater mileage.

Fault detection with a recovery mechanism is required for all automotive applications. A power supply design with battery protection, over-current, overheating, and start-up fail condition protection is required as well.

Developers will also likely want to use a One-Time Programmable (OTP) device to prevent reverse engineering of the firmware by competitors and hackers.

System limitations
Capacitive sensing technology is supported to replace mechanical buttons with a touch-based keypad. This reduces failure due to mechanical buttons and provides better product reliability. CapSense SmartSense components are also supported, which auto tune the sensitivity of capacitive sensing buttons and sliders to eliminate manual tuning by developers. Capacitive sensing also improves waterproofing of the final system.

Implementation of a touchscreen-based design on the front panel instead of an LCD display and keypad will provide a better user interface and flexibility for users. An interface for external devices like iPod/iPhone can be added so the system can communicate to media players across a UART or USB interface to play music, control playlists, and charge devices.

Failure Analysis and Returned Materials: Increasing the number of internal and external interfaces on the board is going to increase the number of ways that an intruder can create havoc on the system. This is one of the single largest limitations of this embedded system.

E-Bike systems used in automotive applications are currently implemented using microcontrollers. PSoC is a combination of a microcontroller and ASIC. Using PSoC Based E-Bike solution one can reduce the complete product cost (by reducing the BOM cost) and project cost in the automotive industry.

About the author
Ronak Desai is with Cypress Semiconductors.

To download the PDF version of this article, click here.

 First Page Previous Page 1 • 2 • 3

Want to more of this to be delivered to you for FREE?

Subscribe to EDN Asia alerts and receive the latest design ideas and product news in your inbox.

Got to make sure you're not a robot. Please enter the code displayed on the right.

Time to activate your subscription - it's easy!

We have sent an activate request to your registerd e-email. Simply click on the link to activate your subscription.

We're doing this to protect your privacy and ensure you successfully receive your e-mail alerts.

Add New Comment
Visitor (To avoid code verification, simply login or register with us. It is fast and free!)
*Verify code:
Tech Impact

Regional Roundup
Control this smart glass with the blink of an eye
K-Glass 2 detects users' eye movements to point the cursor to recognise computer icons or objects in the Internet, and uses winks for commands. The researchers call this interface the "i-Mouse."

GlobalFoundries extends grants to Singapore students
ARM, Tencent Games team up to improve mobile gaming

News | Products | Design Features | Regional Roundup | Tech Impact