I want to make a calibration setup for BLDC ESC in the simulink model. I'm using arduino mega (3,9,10,11 pins) and quatro 30Ax4 esc. Normally I can set it to it's max, min, and incrementally increase/decrease duty cycle with transmitter throttle signal by mapping (1000,2000,160,255) and there is no problem. But when I try to map it 0,255 it doesnot work (sounds every 2 seconds like a throttle signal is abnormal).

I need two suggestions;

1. why I cannot map the signal on the full range (0-255).

2. is it possible to make calibration by just sending the max and min values such as shown in the figure instead of using any mapping techniques?



Missing a few information, so I will assume the following: - Using the instruction analogWrite() to send pulses to the ESC. - Not using the Mega pin 4 or 13. - your map() instruction is converting from your receiver pulse length to your analogWrite() function.

ESC require a pulse between 1000uS and 2000uS. Therefore, analogWrite(160) is about a 1280uS pulse. (as per analogWrite() reference note, the PWM frequency is 490Hz) Sending a PWM lower than 125 will send an invalid pulse length.

Some ESC wont arm if the pulse length is off by even a few uS, so it's good to calibrate them when you do a change in your map() function.

Can't help you for your Simulink model

  • $\begingroup$ I wrote the pin numbers you can see them above. I amnot using arduino IDE just simulink. you mean that I cannot use full range (0-255) and my min command should be 125 and also I cannot use switching calibration procedure. right? $\endgroup$
    – lsn
    Mar 12 '19 at 21:42
  • $\begingroup$ Why not using the Servo blocks. It will provide you the right pulse length and higher precision. Sending a PWM value of 255 doesn't send a pulse but keep the line at HIGH. So the highest value you could send is 254. $\endgroup$
    – Kojoe
    Mar 13 '19 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.