3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

DC Motor Controller for Electric Bicycle

DC Motor Controller for Electric Bicycle
I designed this controller for my Crystalite Sparrow 48V electric bicycle hub motor.  The core function of a DC motor controller is to periodically read the throttle setting and adjust the current being supplied to the motor.  It does this with a technique called pulse-width modulation or PWM (more on this later).  Other functions of the controller include:  1) low-voltage cutoff .. monitor the battery voltage and shut down the motor if the battery voltage is too low .. this protects the battery from over-discharge.   2) over-temperature cutoff .. monitor the temperature of the FET power transistors and shut down the motor if they become too hot .. this protects the FET power transistors.   3) over-current cutoff .. reduce the current to the motor if too much current is being supplied .. this protects both the motor and the the FET power transistors.  4) brake cutoff .. shut down the motor when the brake is applied .. this is a safety feature .. if the user applies brake and throttle, the brakes win.

Note1: This is a relatively advanced instructable.  Don't attempt it if you don't have experience with power electronics.  The voltages and currents used in this project can be dangerous and appropriate safety precautions must be used.  This instructable outlines what I did to make this project, but it is not a substitute for proper safety training in power electronics.  Check with your local community college for availability of classes in your area.

Note2: In addition to the 48V battery voltage, this controller requires a 12V power supply.  If your battery pack consists of 12V cells, then you can just tap 12V from the pack.  This was not possible for my battery pack, so I used a separate DC-to-DC converter to supply the 12V power.  See my other instructable on constructing this DC-to-DC converter.

Note3: This controller is over-designed for this application.  The IRFP4468 FETs are rated for a maximum of 195 Amps (each) at 100V.  This application will typically use less than 10 Amps at 50V.  I have been commuting (10 mile round trip) almost every day for the past 2 months using this controller and it has been trouble free (knock-on-wood :)
 
Remove these adsRemove these ads by Signing Up
 

Step 1Parts List

Parts List
Here is the parts list (with Digikey part numbers) for all the electronic parts.

You will also need:
a) a prototype circuit board (the one I used is from a local electronics surplus store)
b) wire.  I used 30AWG wire for the low current connections and 14, 12 and 10AWG wire for higher current connections.
c) 1/8" heat shrink tubing (about 2" in length)
d) two 6-32 x 1" screws
e) 4 x insulating pads for the FETs and power diodes (these can be salvaged from a broken PC power supply)
f) a heat sink for the power section.  (this can be salvaged from a broken PC power supply)
g) an enclosure.  (this can be salvaged from a broken PC power supply)

The following tools are required:
a) a programmer for the microcontroller.  I used an AVR ISP programmer (check EBay)
b) a soldering iron (and solder of course)

The following tools are recommended for debugging:
a) a digital multimetter (DMM) for checking connections, etc.
b) an oscilloscope is handy for checking the PWM waveform, etc.

« Previous StepDownload PDFView All StepsNext Step »
18 comments
Feb 7, 2012. 12:39 AMmyshanks says:
I am looking oout for a complete design and source code to controll a BLDC 250W motor for an e cycle project, battery could be either Lead Acid or Li-Ion of 24V with trottle control and Break cut off. Can any one help me. I am ready to pay professional charges for this project. My mail id is myshanks(at)gmail.com
Jan 7, 2012. 5:37 AMkoylum says:
Which kind battery did you used. Ordinary lead acid battery or NMH or another type battery. And also I will ask the Power of the battery howmany Amper-Hour? And you said 10 miles trip every day is your way stright? You made agood job thanks for sharing this project
Nov 26, 2011. 1:17 AMwobbler says:
Nice to see a design for this. How much current does the board itself take?
Nov 28, 2011. 2:19 AMwobbler says:
Sorry, I phrased my question badly. What I was asking about was the actual current used by the controller board electronics to run, not the current it is capable of controlling. Thanks.
Nov 29, 2011. 8:48 AMwobbler says:
Thanks for this. I was just wondering if it was worth using a linear voltage regulator chip in the 78 series, but I see they are usually max. input of 35-40v so your dc-dc convertor looks like a more appropriate design.
Nov 27, 2011. 4:41 AMendload says:
just so so.
Nov 27, 2011. 2:38 AMprofpat says:
so this is not yet an instructable, but a concept yet on pwm motor controller! good design idea though!
Nov 26, 2011. 6:47 AMdxr13ke says:
Why do they need to be electrically isolated?
Nov 26, 2011. 12:05 PMdxr13ke says:
One could use 2 separate heat sinks if one does not find the isolators.
Nov 26, 2011. 6:49 AMdxr13ke says:
Typo on the notes on image, bottom right: block instead of black
Nov 25, 2011. 8:27 PMBobS says:
You rode the bike for already 2 months, but say the software is not available!

Forgive me, but why then would anybody but a complete expert build this?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
20
Followers
10
Author:scd