strange problem with 4 ESC's and 4 motors

Hi Guys,

I am building quadcopter and I have strange problem when using 4 ESC's(There are a lot of ESC questions here in the forum but I was unable to find similar to mine)

In general I have 4 ESC and 4 motors /all are the same/ .
I am able to arm them and I am able to start them, but the problem is that they doesn't start and run simultaneously.

I am calling the following code that should speed up the motors:

   int m1CWSpeedMapped = map(m1CWSpeed, 0, 100, 0, 180);
   int m2CCWSpeedMapped = map(m2CCWSpeed, 0, 100, 0, 180);
   int m3CCWSpeedMapped = map(m3CCWSpeed, 0, 100, 0, 180);
   int m4CWSpeedMapped = map(m4CWSpeed, 0, 100, 0, 180);
   
   m1CWServo.write(m1CWSpeedMapped);    
   m2CCWServo.write(m2CCWSpeedMapped);    
   m3CCWServo.write(m3CCWSpeedMapped);    
   m4CWServo.write(m4CWSpeedMapped);

all speeds are the same: m1CWSpeed == m2CCWSpeed == m3CCWSpeed == m4CWSpeed

I am starting with 0 and increase the speed by 1 and when all the speeds goes to 28 only m2CCWServo starts to spins.

when the speeds goes to 29 m1CWServo and m3CCWServo starts to spin but m4CWServo is still not spinning.

Then when I increase the speed to 30 all the motors are spinning but there is a obvious difference in the rpm's of the first motor started m2CCWServo and the last motor started m4CWServo .

In my setup() funcion I am arming the ESC's as this:

void arm()
{ 
   m1CWServo.write(0); 
   delay(3000);   
   m2CCWServo.write(0); 
   delay(3000);      
   m3CCWServo.write(0); 
   delay(3000);      
   m4CWServo.write(0);
   delay(3000);    
}

All 4 motors are the same and all 4 ESC's are the same/no name 30A escs without datasheet or any description except 30A/

I am using Arduino uno R3

Any ideas why this is happening?

Thanks
Anton

Probably you have to calibrate your ESC, i. e., to mark the min and max pulses. In my blog in my signature I explain it but I'm sorry, it's in spanish.

If you need to match different servo limits for each ESC you may find it better to use servo.writeMicroseconds() rather than servo.write which uses degrees.

...R

Both the above two suggestions are recommended.

Your PID feedback loops will sort things out, but calibrate if you can.

Brushless motor speed is a combined effect of Battery voltage and control range. So if each motor ESC is on a separate source they will not run at exactly the same speed on an open loop control. As an earlier post indicated the PID loop will correct for speed discrepancies.

Thank you all for your replies.
The advise to calibrate my ESC's seems reasonable-I didn't know there is such thing like calibrating ESC.
Now I have to find a way to calibrate them without disconnecting everything- because currently I can't.

I didnt understand this:

MarkT:
Your PID feedback loops will sort things out, but calibrate if you can.

What you mean by PID loop and how this can fix my problem?

Also all the motors are using the same battery 11.1V 2200mAh.The BEC 's are powering up small Android device that is USB connected to my Arduino tat is controlling the ESC's.
All the tutorials I found for calibrating the ESC are saying that I should disconnect my USB cable -but I dont know why I should do this?

Also almost all ESC calibration tutorials for arduino are just go to max speed right after connect the power source wait some time and go back to min speed.This looks same to me as arming....

Thanks

We have probably been a bit sloppy with our language. What is really meant is that you calibrate the Arduino to match the ESCs.

All that is necessary is to write a short sketch that slowly increases the speed (i.e. increases the number given to servo.writeMicroseconds) until the motor starts and then you make a not of that number for each motor. Then in your main program you ensure that these numbers are used as the zero point for the appropriate motors. You may need to do the same thing for the maximum speed.

...R

Hi guys,

I spent weeks in this with no luck.
I have calibrated my escs with arduino.
And the motors are still not spinning simultaneously.
I cannot use offset logic because sometimes motor 3 starts to spin first and sometimes
Its motor 1,2 or 4./random/. Also sometimes on low throttle the motors are randomly starting and stopping without sending any commands on arduino.

Any ideas what's wrong- the code is fine-now I am using write milliseconds()?

All 4 BEC,s are connected in parallel so they can provide few amps for the other peripherals I have- can this be a problem?
The BEC s are parallel and power small android device that is USB host for the arduino UNO that is controlling the ESCs.

Thanks
Anton

The method explained by Robin2 is to do "a linear by software". But there is a method to do a real calibrate of ESC, i. e., to assign the min and max values of microseconds pulses to assign the min and max motor velocity.

Translated of my blog, http://cuadricopterodiyarduino.blogspot.com.es/2013/06/esc-parte-2.html

ESC Part 2

As a continuation of Part 1 ESC writing this post to discuss an issue I've had. It's probably obvious to those who come aeromodelling but someone scored themselves in the same situation as me.

I acquired two ESC to go conducting various tests. When the project was foremost went to buy the other two ESC but I found that they were gone. So what line to purchase two very similar units. In principle the only difference is that the former brought the connector to the "Monitoring balanced discharge" and the latter not .

Later testing with four motors and ESC realized that not everyone had the same answer. A pulse having the same speed would and other to another. I was first thinking they were different ESC bought twice but there was no correlation. After many tests , studies and information searching I found the answer and the solution to it . The ESC can be calibrated and in fact will be a routine for a modeler . It is simply tell the ESC the minimum and maximum points for the pulses. With a radio RC blocks corresponding lever taking it to the maximum and minimum travel . I've done with the program of motor control in setting the minimum and maximum 1000 microseconds 2000 microseconds. Taking this process in the same way in all four ESC "problem" disappears. And I looked establishing individual linearizations for each ESC programming in Arduino ...

piXel15 June 2013 , 23:32
How did you configure it from the program ? you can post something about these tasks ?

Cheyenne16 June 2013 , 15:08
Hello pixel.
I think the procedure is the same for all ESC as it is intended to do it directly from a station.
Remove power to the ESC. Carry the signal to the ESC the most , I chose 2000 microseconds. Connect power to the ESC. According models a type of beeps will sound and they hear nothing there to bring the signal to a minimum , I chose 1100 microseconds. They will resound confirmation beeps . Remove power to the ESC and turn it back on for normal use with the new settings.

If you search in Google there is a lot of links explaining how to calibrate ESC's. For example:

http://www.multiwii.com/wiki/index.php?title=ESC_Calibration

Hi ,

as I said -I already callibratedd all ESCs.

I made arduino scatch that writes to the 4 escs 2000 microseconds.
Then I power the esc's and I get 2 fast beeps.
Then I go to 1000 microseconds and I get confirmation-3 beeps for the 3s battery and one longer to indicate the calibration is done.

So my ESC's should be calibrated but they still start randomly and with different speeds.

tonko_lonko:
Hi ,

as I said -I already callibratedd all ESCs.

I made arduino scatch that writes to the 4 escs 2000 microseconds.
Then I power the esc's and I get 2 fast beeps.
Then I go to 1000 microseconds and I get confirmation-3 beeps for the 3s battery and one longer to indicate the calibration is done.

So my ESC's should be calibrated but they still start randomly and with different speeds.

But if you send the same 2000 and 1000 usec values to all four ESCs then you are not calibrating for each unique ESC/Motor which is what is required.

Lefty

Ok, I didn't understand you.
What differences of microseconds there is for every motor when they start to move?

retrolefty:
But if you send the same 2000 and 1000 usec values to all four ESCs then you are not calibrating for each unique ESC/Motor which is what is required.

Lefty

Hi, Thanks for the response but I am not able to understand what you are saying.

I have 4 equal motors and 4 equal ESC's and I want to throttle them the same way when I send each mottor the same pulse - i.e 1100usec.

So why you think I should send different min/max throttles for each motor?

Cheyenne:
Ok, I didn't understand you.
What differences of microseconds there is for every motor when they start to move?

Its random- thats why I can use offsets....
I.e sometimes motor 1 starts at 1050 and motors 2,3,4 starts at 1051, sometimes motor 1,2 starts at 1051 and motors 3,4 starts itself after 2 seconds....randomly :frowning:

There is a simple way to deal with this, or to prove definitely there is a problem.

Focus on a single ESC and the motor it is connected to and stick with that combination.

Write a short sketch that makes that motor start and stop. Does it always start and stop with the same numbers of microseconds? For example if it sometimes starts with (say) 1501 microseconds and always starts with 1507 microseconds then 1507 is the appropriate number.

Try the same thing with each of the ESCs with its motor (and don't mix motors and ESCs later).

Can you identify the number of microseconds that is required to start each motor (you will probably have a different number for each motor).

When you have established reliable starting numbers for each ESC and its motor then try all 4 in the same sketch.

If you can't find a number that reliably starts each motor let us know.

...R

tonko_lonko:
Its random- thats why I can use offsets....
I.e sometimes motor 1 starts at 1050 and motors 2,3,4 starts at 1051, sometimes motor 1,2 starts at 1051 and motors 3,4 starts itself after 2 seconds....randomly :frowning:

Ok, then it isn't a problem in my opinion. A difference of 1 microsecond is very little. A system ESC - brushless motor I think it hasn't more precission at start velocity but I think it is enought.