How to run BLDC motor using arduino2560

hi all ,

can anyone suggest me code for running BLDC motor using Arduino2560.
I'm using BTN8982(Infineon IC).
can any one suggest me programm.?
its okay if anybody tell me how to generate Three phase PWM using 2560 Arduino.
i need 395Hz minimum frequency.

If you are experienced in electronics, you don't have to ask such questions. Did you see the application circuit for a DC motor, and can you build it yourself?

Otherwise get a motor together with a complete BLDC motor ESC. Circuit details, power supply, feedback etc. all depend on your motor.

Dear Dr,

Thanks for your reply. i may be new to software field but i know electronics very well.
i'm a electronics designer.
i tried many methods but i'm not able to regenerate frequency ore than 50Hz. thats why i'm asking in this portal.

You can use a timer to produce almost any frequency, e.g. using timer1lib. For low frequencies also software timing with millis() or micros() may be sufficient.

Another general question is the type of feedback, typically with hall sensors in BLDC motors. Without such feedback you have to write your own regulator for acceleration of your motor to the desired speed.

Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.,148850.0.html .

Can you post data/spec of the BLDC please?
Usually these motors have built in commutating and driver circuitry.

Any attempt to speed control them with PWM or reduced DC voltage usually compromises their performance and speed regulation.

Tom.. :slight_smile:

i tried many methods but i'm not able to regenerate frequency ore than 50Hz. thats why i'm asking in this portal.

As I've reached several MHz myself on a 16 MHz processor, all I can say is "you must be doing something wrong".

Now if you go and read the sticky as pointed out above, and post the info requested, we may actually ha ve some pointers on what you're doing wrong, and how to do it better.

So that'd be the code you're using, and a schematic of how you've wired those BTN8982 half bridge ICs to your motor and your arduino, and of course which incarnation of arduino you're using.

One input per half-bridge will not allow to drive a BLDC motor. The motor expects positive, none and negative voltages in sequence on each coil. Either you learn much more about driving and controlling BLDC motors or you get a ready-made BLDC motor driver.