traditional DC motors, but are more difficult to use. Many off-the-shelf products exist for this purpose. For example, there are lots of small BLDCs controllers for RC
airplanes that work really well.
For those wanting to delve more deeply into BLDC control there are also many different micro controllers and other electronic hardware intended for industrial users and
these usually have very good documentation. So far, I have not found any comprehensive descriptions of how to do BLDC control with an Arduino microcontroller. Also, if
you are interested in doing regenerative braking, or using a BLDC for power generation, I have not found many products that are suitable for use with small motors or
much information on how to control a 3-phase generator.
This instructable started out as a demonstration project in a class on real-time computing, and which I continued after the class ended. The idea for the project was to
demonstrate a scale model of a hybrid electric vehicle with flywheel energy storage and regenerative braking. The motors used in the project are small BLDCs
scavenged from broken computer hard drives. This instructable describes how to implement BLDC control with one of these motors, an Arduino microcontroller and Hall-
Effect position sensors, in both motoring and regenerative braking modes. Note that having access to an oscilliscope is extremely helpful, if not essential, to doing this
project. If you don't have access to a scope, I have added some suggestions for how it might be done without one (step 5).
One thing that this project doesn't have that should be included in any practical motor controller is any safety features, such as overcurrent protection. As it is, the worst
thing that can happen is that you burn out the HD motor. However, it would not be too difficult to implement overcurrent protection with the current hardware, and perhaps
I will do it at some point. If you try controlling a larger motor, please do add overcurrent protection, to protect your motor, and for your own safety.
I would like to try using this controller with a larger motor that can do some "real" work, but I don't have a suitable motor yet. I noticed an 86W motor for sale on eBay for
around $40.00 that seems like a good candidate. There's also an RC website called "GoBrushless" that sells kits for putting together your own BLDC. These are not too
expensive and building one is a worthwhile experience. Note that the motors from this web site do not have Hall sensors.
Whew! It was a lot of work to write up this instructable. I hope you find it useful and please post your comments and suggestions.
Remove these ads by
Signing UpStep 1Video
| « Previous Step | Download PDFView All Steps | Next Step » |

















































Can I check it by Sanwa Analog Multitester ?
First, connect the sensor as shown in my instructions, and then move a magnet slowly across the sensor. When the sensor works, you will see the voltage go high when it senses the magnetic field. A refrigerator magnet is useful for this, because it has stripes of magnets and as you move it across the sensor, the voltage will go high-low-high-low...
I am designing a parking sensor and need to use the analogWrite() function to control my sensor as the tone() function is tied up somewhere else.
I was wondering if you could run me through how you altered the frequency of the analogWrite() PWM.
Any help would be greatly appreciated.
TCCR2B = TCCR2B & 0b11111000 | 0x02;
- The default for TIMER2 is "0x04"
- If the code is confusing, check out these links for some help:
-http://arduino.cc/en/Reference/Boolean
-http://arduino.cc/en/Reference/BitwiseAnd
-http://arduino.cc/en/Reference/BitwiseXorNot
-http://arduino.cc/en/Reference/Bitshift
This will work on any 'ATmega' or 'ATtiny' that is supported by Arduino (install ATtiny 'cores' to program them with Arduino 0022 or Arduino 1.0)
I did not figure this stuff out myself. I'm just passing the information onward. Check out this page in the Arduino Playground. It's extremely helpful!
-http://arduino.cc/playground/Main/TimerPWMCheatsheet
Thanks for your interest.
Use an ohmeter to figure out which are the three phases and which is the center tap. The resistance between any two phases should be double the resistance between a phase and the center tap.
As far as getting your motor to spin CW or CCW, please read the instructable carefully, as I believe I put detailed instructions on how to do that. If you still have problems, send another comment.
I'm curious, do you have access to an oscilloscope?
i think that it is better if there were 2 indepenent circuits between the bridge and the battery, one for driving the motor with the pwm control and back emf sensing as well as controlling the transistors in the bridge, and the other for charging the battery with some form of voltage regulation and maybe some charging circuitry designed for the type of battery being used... and using solid state relays to switch between them when the brake is pressed
I´ve got a question. When using regenerative breaking, you are not drawing any current back to the battery, right? and also, for regenerative breaking, are the hall effect sensor necessary?
I am asking you this questions, because I would like to use the energy from the breaking to control the breaking torque and by the way recharge a battery.
Best Regards and thanks again for your work.
I read all paper you gave for understand how BLDC work. Unfortunately, I don't know how to find a driver (like L6234) but for motor with higher power 37V/10A.
regards,
oe