Thursday, August 6, 2015

Designing an Ebike BLDC Controller from Scratch

hi guys,
i am noob in this field, planned to design Ebike controller from scratch , why i choosed Controller is, because controller is the heart of the ebike, other parts can be bought easily with our needs, but controller is costly and most doesn't fullfil our needs.

 First i try to understand the controller and its components, without knowing the details and starting a PCB work is like learn swimming in centre of the pacific ocean, so i am always try to explain everything in brief, so noob like me can easily understood.

Name      : 6 FET BLDC Controller
Target     : Simple Ebike controller for BLDC motor (Brushless DC motor)
Motor      : 48V 2000W
Battery    :  1 x 10000 mAh 6S1P  25C 22.2V

Deadline  : 1 year (within August 2016)

From my view, Ebike controller or Controller  for BLDC is common to all, example if we developed one model successfully then we can use it in ebike, cycle, motorbikes, car and lot of application, so we have to progress slow and steady.

Google helped me a lot, and what i understood is, Controller consist of input and output.

Below figure show the components which connect to controller.

Throttle : we increase/decrease the ebike speed using the throttle , which is connected to input of Controller.
Cycle Analyst : it display the speed, temperature of motor, current values, which is connected to input of the controller. (because temperature of motor are got from tememperature senor, which is connected to input of controller)
Battery : it supply the power to the motor, which is connected to the output of the controller
Motor : it is the load, sensorless 2000W BLDC
Temperature sensor : it have to be fitted inside the motor, so we can view the temperature of motor in cycle analst display



Image 2 :


BLDC Motor consist of 7 wires, they're
3 wires for phase,
3 wires for hall sensor,
1 for temeprature sensor we fitted in it.



3 hall sensor wire and 1 temperature sensor wire is connected to input of controller.


Imgae 3 :

 In above figure, all 3 pahse wires of motor (U, V, W) is connected to the output of the controller, as current flow in both direction because of regenerative braking, so we used the double side arrow.


 Image 4 :


 In above image, battery is connected to the output of the controller.

Image 5 :

in above image, throttle is connected to the input of the controller, and cycle analyst is connected to the controller.

Image 5.1 :

Brake signal or voltage needed for regenerative braking, so it must connect to the input of controller and fuse (between controller and battery) is must to protect the controller and motor from overcurrent.


Till now i understood about the components of ebike and its connections, now let us move to the controller.


-----------------
After lot of search on goolge and read from lot of  sites i understood few more things about controller.


In Electronics they're two type of devices/components
1) Active device
2) Passive Device

Active Device change the signal/current by amplification. example : transistors, op.amp

Passive devices change the signal/current by attenuation. example : resitor, capacitor, inductor.

still i not understood lot of these, but i will try to learn and post here, so it may helpful for others.

Here In our schematic, we discuss about "Active devices" only first, once we finalised the active devices, then we have to find a way for passive devices and values.


Image 6 :


Controller input unit :
Input unit consist of rs232/usb and microcontroller.


Microcontroller :
Microcontroller process the hall sensor input data we given and give signal to MOSFET through IGBT Drivers.

rs232/usb :
Microcontroller process any amount of data, but for processing we need to program the microcontroller, for that we have to connect rs232/usb to computer or some external interface to load the program codes into the microcontroller.

Controller output unit :
Contrller output consist of IGBT drivers, Mosfets, Current sensor.


Mosfets :
Mosfets is just a switch , but it can switch at a speed of  20 khz and above.
Battery and BLDC motor is connected through Mosfet that is, mosfet control the voltage/current flow from battery to Motor by switching. (we call as switched mode power supply). When to switch ON and when to switch OFF the Mosfet was guided by Microcontroller through the IGBT drivers .


IGBT driver :
https://en.wikipedia.org/wiki/Gate_driver

Microcontroller decide when to switch ON and OFF the MOSFET and give signal, but the signal current is very low in milliampere (mA) so if we pass the microcontroller signal directly to MOSFET means, due to low signal current, MOSFET switching speed will be very low and switching loss become high, so we use the intermediate circuit called "IGBT Drivers" to amply the current , and then given to the MOSFET, so MOSFET work smoothly in high switching speed.

Current Sensor :
 If the output current from MOSFET crossed certain limit means, Motor will burn or MOSFET will burn, so we have to limit the current values. For limiting the current value first of all we must know the exact current flow through the MOSFET , so we need a current sensors, which give signal to the Microprocessor, which compare the current wuth pre-set value, if it crossed the pre-set value it shutoff the MOSFET, once the current value in less then the pre-set value the it automatically on the MOSFET.


First i planned to start output portion of controller, because Input portion is related to coding, but without the values of output stage we wont code, so i am starting from output portion.


In Progress, Will Update ...!

No comments:

Post a Comment