Hello all,

I am very much a newbie to RC and quadricopters but I'm working with a group of fellow students on constructing an autonomous quad for a university project. We are currently performing our initial setup.

We do not have an RC transmitter and whilst we could beg/borrow one, we would like to know, first, how to go about calibrating the 4-in-1 ESCs without one. I have read online that it is possible to do this (although the commenter didn't say how) but that it is dangerous since for a first flight you would have no manual override in the event of mis-calibration(s) causing erratic behaviour, however we plan to tether the quad in test flights to overcome such an issue and then fine tune it with/without an RC transmitter (depending on whether we can get our hands on one without purchase).
So, what is the method for performing this calibration through the APM 2.6 in Mission Planner/APMPlanner 2?

One more question:
We would also like to know how to incorporate an Arduino code program into a weypoint Flight Plan in Mission Planner/APMPlanner 2.

A bit more background:

We have built up the frame (except for the landing gear, which will be Araldite-d on soon), mounted the motors, prop savers and props, and connected the electronics to the latest versions of Mission Planner and APMPlanner 2 on the laptop by USB cable, however we have not connected the electronics to the motors.

As soon as the quadricopter has left the ground there must be no further human intervention and it must autonomously carry out a mission to cross a generic flight zone and then enter a target area. It must have a payload release system and must deliver a water payload accurately over an imaginary fire in this target area and then return to launch. Throughout the flight it must be able to stay within a geofence (or if it does exit, it must swiftly and in a stable manner return to the geofenced area) and it must be able to cope with rain and gusts of wind up to 8m/s. Our permitted budget for the entire project is £250 and we are currently JUST on budget.

In terms of components, we have:
3DR (clone) APM 2.6
3DR uBlox LEA-6H GPS with compass
3DR Power Module
3DR (clone) Radio Wireless Telemetry
Turnigy 3S 20C 3300 mAh LiPo battery
Hobbywing 20A Skywalker 20Ax4 UBEC 4-in-1 Brushless ESC
4 Turnigy Aerodrive SK3 - 2830-1020kv Brushless Outrunner Motors
4 10x4.5 Black Rubber Propellers; 2 CW, 2 CCW
4 Prop Savers
'Thermal Knife' circuit as per Bovine Aerospace
Kilner strainer funnel
Custom, self-built aluminium frame
Coat hanger landing gear
3D printed anti-vibration mount as per Omnimac
3D printed GPS stalk mounts as per Omnimac
LED flasher unit

With regards to our second question, we would like the quad to automatically fly by waypoints to the target area, hover and release the water payload. This latter process is controlled by a piece of Arduino code written by Bovine Aerospace and made open to the public. It is this piece of code that we would like to incorporate into the Flight Plan in Mission Planner/APMPlanner 2.

We would be extremely grateful if the members of this community would help us out.

Yours faithfully,

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Skywalker Quattro 20A have the sil chip. So flash them with blheli and adjust the pwm range in the blheli config gui, calibration done and Skywalker esc now run a firmware that is better for multirotors.

    • Ok, I've let the others know, thank you very much for that.

      Do you know what the default throttle settings are for the SQ 20A?
    • Thanks for the tip Crashpilot1000! I'm not in the workshop today but I've messaged the others in my group who are, to make sure that they flash the SQ 20A 4-in-1 ESCs with blheli. When you say adjust the pwm range, how will we know what to adjust it to?
      I'm assuming blheli is APM 2.6 compatible?
      • Hi, if I remember right I set the range 1100 - 2000 us. The PWM standard isn't changed so they will work with arducopter like SimonK etc. I found that my skywalker run best with 400Hz PWM (flashed or unflashed), so look in the missionplaner and set the esc pwm to 400, I think it is 490 default. (note: dji naza also uses 400 hz pwm, so don't expect a degraded flightperformance by doing so)

  • I fly my drone with APM 2.5 and Xbox controller using the Joystick feature in Mission Planner and MAVLink to control it via telemetry only.


    I have had no RC equipment and wanted to setup my drone initially before I decided which RC equipment to purchase.


    I had to modify the ArduCopter version 2.91 code myself to allow for initialization of ESC's. You will have to do the same thing until this features is supported in ArduCopter and Mission Planner or have RC equipment.

    Modify code in System.ino, insert code below into the RTL set_mode() function. I did this because I had to hack a way to trigger the ESC Init function from Mission Planner as I could not trigger it in the normal way via RC controller. I trigger the code by using Mission Planner to tell drone to go into RTL mode where my new code executes. You can use any mode, but this should be done on the bench with no props attached.


    case RTL: #(Below this line, replace all existing code with this below)


    //wait 20 seconds

    for(byte i = 0; i < 20; i++) {

            delay(1000); //1 second


     Serial.printf_P(PSTR("Looping RTL.\n"));


          for(byte i = 0; i < 5; i++) {





          // we want the input to be scaled correctly



        // sanity check - prevent unconfigured radios from outputting

        if(g.rc_3.radio_min >= 1300) {

            g.rc_3.radio_min = g.rc_3.radio_in;




    break; : #(Above this line, replace all existing code with this above)


    You need to be very careful with this setup as I have lost the Telemetry link in the past and so I also implemented failsafe on that link in code. Luckily you no longer have to do that yourself as that feature is now supported in ArduCopter and Mission Planner, but is Disabled by default. You should enable this as using the telemetry link without is dangerous


    You will also need to manually set the trim settings using the Mission Planner. This is a manual and slow process. Here are my setting for example, The THR_MID is set so that I have a level hover when xbox controller joystick is in the middle and can take my hand off it if required.

    THR_MIN = 150

    THR_MID = 530

    THR_MAX = 750


    Also for the trim I changed the code to comment out the auto trim function based on advice from links below.

    In radio.ino, Comment out all code in trim_radio()


    Note: these change were made in an older version of the code 2.91 than current releases so things may have changed.

    Below are links below helped me.

    Joystick control of ArduPlane not working



    Using a Joystick/Gamepad with Ardupilot instead of RC transmitter






    • Thank you, Richard, for such a detailed reply! If one of our members hadn't somehow managed to score an RC transmitter this weekend, we would definitely have taken your very helpful advice! We appreciate the effort and the useful links.
  • Oliver, Gary, thank you for your replies.

    We fully agree and sympathise with the reasons why you have said what you have said and we are certainly aware that catastrophic and even fatal accidents can and do happen (even with a transmitter).

    Whilst we have reached our budget, we are allowed to go a small amount over it so long as we are able to justify the expenditure. I agree with you that we should get a transmitter and we will do our best to get one. Since the safety of everyone concerned is far more important than the specification, that is certainly a good enough justification. It's a shame we didn't realise that a transmitter was such a prerequisite at the start of the project because we would have had plenty of time to get our hands on one, whereas now we only have until mid-June.

    I ordered a Turnigy 9X and the battery for it from HobbyKing earlier today, for my own personal use (which I shall lend to this project) but it was only available in the International Warehouse so will take until pretty well the day of the competition (mid-June) to arrive.

    When I said we 'could beg/borrow' I meant 'could'...in the sense that potentially we might be able to but we really don't know; there is an RC transmitter at university which is used to control a model aircraft within a wind tunnel but whether we would be allowed to borrow it and whether it would have enough channels (like 8) or not is another matter. I shall be asking tonight but due to the Bank Holiday weekend I don't expect to hear back for a few days so we shall know next week.

    I have asked a family friend whether we could borrow the one that they have for their quad but they won't get back to me until next week either.

    Apart from that, none of the people on this course whom we have asked appear to have one of their own, nor do they appear to know anyone else who does from whom we could borrow one.

    With regard to the tethered flight tests, I can certainly understand why they might be dangerous with all sorts of things that could go wrong but if they are performed in a certain way (e.g. in the middle of a large, controlled area of open, flat land, with thick string tethering the quad to the ground and with the laptop controller a long distance away, able to disconnect the radio telemetry the instant that trouble occurs) then the risks can be acceptably mitigated.

    We shall have to raise the issue of not being allowed to interfere with the quad in the event of trouble, with our lecturers because they specified that no human intervention is allowed from the instant the quad has left the ground to the instant it returns to launch at the end of the mission. You're right, if trouble does occur during autonomous flight then we do need to be able to take control in order to try to prevent an incident.

    These important points aside, we would still like to know what the procedure is for calibrating the ESCs (without any props on the motors) using just Mission Planner because in all likelihood we probably won't have a transmitter for at least a week. We understand that it involves changing the parameters but all we know from the copter.ardupilot.com instructions website after that is:

    Connect the ESCs to the Power Module
    Connect the battery to the Power Module
    Listen for beeps
    Disconnect battery
    ESCs are now ready for calibration
    Connect the ESCs to the motors
    Reconnect battery
    Save parameter changes in Mission Planner to the APM 2.6 board

    We know what side of the APM 2.6 we should connect the four sets of pins from the ESCs (as can be seen in the ESC instructions to which I posted a link in a comment earlier today) to but we don't know in what order.

    Also would you be able to give us more advice on the issue of getting an Arduino code program to run in, or in conjunction with, the Flight Plan in Mission Planner?

    I was going to upload a file that shows Bovine Aerospace's code more clearly this evening but unfortunately I haven't had time and won't for another four hours
    • Hi FlyPhi,

      You don't really need a 8 channel transmitter / receiver for this project 5 or more channels will be plenty as you have described it.

      Of course the Turnigy you have on order should work fine if it gets to you in time.

      I would recommend that you check if there is a local RC model flying club and get in touch with them, I think it is very likely you would find them sympathetic to your situation.

      I know if you were near Fort Bragg, CA I would have already loaned you one.

      You actually need the radio for more than tuning the ESCs, tuning PIDs and autotune also require it.

      Further, the code itself requires it in order to even arm and take off, so unless you are going to modify the code and recompile it yourself, you really need a transmitter.

      For your test, you can simply enable auto take off with the transmitter and then hand it to one of your instructors with the admonition not to touch anything or you can just set it down in front of you and watch to make sure that the copter is doing what you expect it to.

      In reality you seriously needed to have time to be able to make several pre-test flights to debug any troubles that turn up - the likelihood of first time out success at your experience level  is not good.

      I don't even think it is at my experience level.

      It seems you may have cut it a bit tight.

      Best of Luck,


    • It will not be possible to calibrate the ESC's without some means of generating the correct servo pulse range using an external device. Theoretically the APM could do it but unfortunately for you, this is not feature in high demand. If you were really stuck for time I could write you a sketch for the APM that would do the job for you...

  • Hi FlyPhi,

    I have to agree with Oliver above, you really need a transmitter to be able to do this safely.

    It is perfectly reasonable to not use the transmitter during an autonomous flight, but not having one available for use in an emergency is a serious safety issue, none of us would even think of doing that.

    Also, you make this entire project much more difficult to undertake without a receiver and transmitter, all of our set up and tuning procedures require them in order to work.

    You can get a passable at least 5 channel 2.4GHZ transmitter and receiver for very little money new (Tactic for instance), but if you check online used you can even get fairly decent ones inexpensively.

    This piece of equipment is mandatory for your project to have any chance of success let alone the safety issues (and your University would be incredibly remiss for even letting you try without an RC connection.

    Best Regards,


This reply was deleted.


DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022
DIY Robocars via Twitter
RT @araffin2: 🏎️ After hours of video editing, I'm happy to share a best of my Twitch videos on learning to race with RL. 🏎️ Each part is…
Oct 13, 2022