My BLDC doesn't work, using a ATMEGA8535 Microcontroller

Status
Not open for further replies.

wiraputra

New Member
Hello,

I would like to ask a question about BLDC controlling here. I have an EMAX CF2822 DC motor and a Hobbypower 30A ESC. I would like to make it spin first, but it just didn't work out. The system wasn't intended for radio control or quadcopter use, it is for another purpose so I connected the ESC pins directly to the microcontroller. The overall scheme is attached here

And the AVR code for the program is as follows, I use Timer1 for PWM mode for the motor control:

(I only include the program after while(1) first. If you want the full code to be uploaded, I will upload it later, but I don't think the problem is in any other part of the code)

while (1)
{
// Place your code here
for(t=0;t<=255;t++)
{
OCR1A=t;
}
}

The problem is after I turned on the power it only beeped. A google search indicated that if the motor only beeps, the ESC doesn't receive a signal.

The main question is, how I get the motor work first, not only beeping but also rotating properly.

Any kind of help are welcomed. Thanks a lot!
 
Hey! i just had similar problem, so what you must do is calibrate ESC first, wich happens by listening ''beeps''
The problem is after I turned on the power it only beeped. A google search indicated that if the motor only beeps, the ESC doesn't receive a signal.

The main question is, how I get the motor work first, not only beeping but also rotating properly.
Try this first: try to find user manual/programming guide for that esc you are using, that helps a lot with programming, and perhaps picture too what esc looks like (is it blue-series hobbyking? i have blue myself and works like charm and easy to program)

BUT, if you can't find manual, what you could try is standard throttle calibration: if you know that your code will and can spin BLDC motor correctly and sends good pwm signal (pwm on-time is btw VERY small wime wich is sent to ESC) turn throttle fully on, THEN power on the esc. Now, after you hear beep from motor, turn esc down to minimun, then after a while, back to full. NOW, esc should have full range of pwm signal from esc and you can rank throttle slowly....very slowly, most escs have safety feature to prevent too much revving.

that's all i can say! hopefully you'll get it running
 
And, if you have any scetch you can use to control servo, use that: pwm signal is good for ESC, just hook esc to micro like you'd control servo
 
according to google, hobbywings esc's use same manner of programming so here ya go, one manual that should the trick
**broken link removed**

edit: welcome to ETO! what i can understand, your code is the problem: it rises too fast and way too big BLDC ESC. try servo scetch other members can help more with code, i have trouble myself too time to time hehe...
 
Last edited:

Hello, thanks a lot for your help. But this motor wasn't used for a RC or quadcopter, do I still need to calibrate it with throttle or servo?
 
Yup, ESC needs to know at least what is the maxinum and minimun range of available PWM pulses sent from transmitter to work right but i can't remember will ESC remember any settings when powered off? i suppose it does because at least mine esc uses atmel something so it should remember. I'm designing currenly POV-clock from hdd motor, and i had to use and calibrate BLDC esc.
So yeah, you need to program that esc for it to work properly
 

Hello! It finally worked! Thanks for your help!
 
anytime here's also circit for '555 that does the job, i only changed 3m3 resistor for 1m2 (1.2megaohm) to cause 50hz signal, tend to work better
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…