Calibration of 4-in-1 Hobbywing Skywalker Quattro 20A ESC WITHOUT RC Transmitter

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,

Views: 3875

Reply to This

Replies to This Discussion

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.
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?
Thank you James for the really helpful reply.

Ah I didn't notice that about the default throttle settings, maybe someone online like Richard (the commenter who posted the code mod for Mission Planner to enable ESC initialisation) would know what they are. Thankfully we now have an RC transmitter to work with so this shouldn't be a problem anymore.

The change I was referring to was the low voltage cut off; since the APM 2.6 has that failsafe set to Return to Launch, there's no need to have the low voltage cut off setting on the ESCs activated, which would shut down the motors gradually or immediately, depending on what it was set to. I'm not sure though if there are other changes that would need to be made according to those notes because I haven't got a copy of the ESC instructions handy.

Thanks for clarifying the calibration point and the ebay link was helpful, I took your advice and ordered one from Hurricane Models for my own personal quadricopter project.

Oh, I'd thought they required different modules connected inside them after reading an article where a guy turned a PS3 controller into an RC transmitter but if you can do it with firmware alone that makes it a lot easier. Yeah that's what I'd heard regarding the responsiveness of such a controller.

Yeah I read some of the old wiki and saw that but someone I was talking to in another group here at University said that take-off and motor arming could be achieved through Mission Planner and via MAVLink, where you choose a particular setting with a delay timer and save this to the APM, disconnect the APM from the laptop, stand a safe distance away and wait for the timer to count down, at which point the quad arms the motors and takes off automatically. Thanks for the link, that helps - someone commented on it that they weren't entirely sure how those who said it was possible had gone about enabling it and I'm in the same boat!

Yup that's what it is. Obviously in our case it's not release at a certain altitude but once a particular waypoint (the target area) has been reached.

What you describe as far as you understand is exactly what we plan to do. We have three leads coming from the Thermal Knife circuit, a ground lead, a 5V lead and a lead for a digital output pin. I presume that ground -> a negative pin, 5V -> a positive pin, and digital output pin -> an 's' signal pin?

Another friend was saying that I could set a 'channel' in Mission Planner to turn on for a set period of time through a particular pin number between 2 and 12 when the quad has reached the target area waypoint. Does that make any sense to you? If so, where do I find these 'channels' in Mission Planner?

No worries, your response was incredibly helpful!

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)

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?


It looks like things are a bit easier for you now you have a transmitter/Receiver. I had a play with an APM here on my desk (connected to nothing but my USB) running AC3.15 default params and can confirm that Auto missions are possible without RC. The application of the throttle does seem to be required to initiate the auto mission but this is easily achieved by running very short script after arming:


Basically this just simulates you raising the throttle (ch3) a bit for one second then dropping it back to zero (default throttle calibration on APM is 1100). Using MP in tuning mode and graphing the motor outputs, I can see the the APM arms and attempts to launch on its mission. It also responds appropriately to a mode change to LAND and disarms. If you need to demonstrate your system working with no input from your RC transmitter then this is doable (though obviously if you have one then having it on standby is advisable!)

Your thermal knife device sounds interesting. I presume it is arranged so that the weight of the load applies tension in the rope across the 'blade' such that as soon as it is activated, the rope is melted through and the load released. You need to be careful how you connect this device as it sounds like it could consume some reasonable current. I would not connect it directly to your APM. Do you have the specs of the knife (voltage/current of input/output)? Depending on the voltage range it operates over, you may be able to connect it either directly to your battery or to a BEC (possibly on one of your ESC's). The current requirement will also affect how you set this up. 

Arducopter allows you to automate various commands at way points in an auto mission. In your case it looks like you need to alter the digital state of an output pin (does your thermal knife become active on a high-5V or low-0V signal?). Arducopter is already set up to do this for the purpose of operating a camera shutter (ie take a picture) On the 'Flight Plan' screen in MP you can define your mission. After reaching a waypoint you can define a command DO_DIGICAM_CONTROL This will cause the A9 pin to go high (5V) for a set period and hopefully activate your thermal knife. You need to configure your 'Camera Shutter' on the gimbal setup page (Initial Setup>>Optional Hardware). Set it to 'relay' and set the duration as described here:

There are other options for servo type PWM outputs on other pins but I do not believe that this is what you want.

Feel free to ask questions if anything is not clear

Thanks James, yes apparently it was a synch for my colleagues to calibrate the ESCs with the RC transmitter and receiver yesterday, which is great news for us.
Interesting, thank you for the script that's really helpful. What I don't quite understand is where do we put this script in Mission Planner in order for it to work? Yes we do have to demonstrate a fully autonomous flight and any interference with an RC transmitter will mean automatic forfeit so I'm sure we'll run the mission with this script (but with an RC transmitter to hand, of course, in case something should go wrong).

Ah, no it's not rigged up in the same way that it is for Bovine Aerospace; we're using the heated Nichrome wire (the 'knife blade') to burn a small hole at the bottom of a water balloon filled with water, which sits inside the funnel. This is analogous to popping the balloon with a needle, through Sellotape stuck to the balloon wall; the air (or in our case, water) rushes out in a thin, directed stream, but the balloon essentially maintains its structure and stays in one piece. The wire only needs to be heated for about 3 seconds for this to occur. The 6V max rated reed relay switch in the circuit is activated by the 5V signal from the APM and allows the current from the 9V PP3 to flow through the Nichrome wire, heating it up. I have a circuit diagram of this, which is basically the same as the one on Bovine Aerospace's website. A doctor in Electronic Engineering at my University suggested that I use a optical couple to send the signal to the reed relay switch and thus isolate the Thermal Knife circuit from the APM. However, Bovine Aerospace connect their circuit directly to their Arduino and don't appear to have had any issues with it (although our circuit's battery does have 3 more volts than theirs). I could probably still do this with the time I have left but it depends on whether I can get the extra components in time.

Yeah that sounds about right and thank you again for the link - so is that the only way of changing the digital state of the output pin or are there other commands that I can set?
Is there no facility in Mission Planner that allows you to just tell a particular pin to go high once a waypoint has been reached?

Thanks so much for all your help!

James, would this work? Sounds like a good idea for something that requires more than 5V, although whilst the reed relay switch in the Thermal Knife circuit doesn't require more than 5V, the PP3 battery would then put 9V through the circuit, which would probably be directly connected to the APM...

The script is a plain text file with a .py extension. You can load and run scripts from the 'Scripts' Tab on the 'Flight Data' page. I have not done a lot of scripting but it may be possible to set auto mode, arm the copter and bump the throttle all from the script.

I found the circuit diagram for the 'knife' here:

If you have this circuit built already then you can hook it up the same way they have. Note that the 5v power for the relay is SHARED by the Arduino and does not pass through it.  Also the knife itself has a separate power supply (perhaps you could use a 9v battery?).

If you have not made this circuit yet then I would suggest perhaps using a single mosfet as the switching element rather than the relay. This will simplify the circuit. You do not mention the current draw of the 'knife' part of the circuit. Do you know the gauge/length of the nicrome wire you are using?

I am not sure if there are any other options for changing the state of a digital pin in AC but I do not think so. It relatively straight forward to do in code though. Is there any reason that the method I described is not suited to your task?

This relates to the on board relay on the old APM1. The method I gave you should work just fine to activate your knife circuit using either the relay in the circuit you referenced or using a mosfet

Ah right, ok well I copied and pasted the script that you wrote in your comment above into Notepad, saved it as a .py file and then uploaded it to Mission Planner as you said to. Was I then supposed to click on 'Run Script' ? Do I need to take any further steps after this to ensure that this is what the APM will read?

Yup that's it! My apologies, I'm afraid my electronics knowledge isn't as good as it should be (and of course voltage doesn't go through but across a component...silly me). I've already put the circuit together on a stripboard (with no end of the problem of the copper trace detaching from the board) and yes that is what I'm doing, I'm using the 5V from the APM to close the switch in the reed relay, which allows the current from the 9V PP3 battery to flow through an inch length of 30SWG Nichrome wire, which has a resistance of about 14 Ohms/metre. I spoke with a doctor in electronics at my University today and he reassured me that the circuit as it is, is isolated from the APM so the 9V won't reach it and fry it - phew! I suppose using Ohm's Law that the current draw of the Nichrome wire will be roughly 9 / 1.7 mOhms = 5.3 kA ?

Ah no, no don't worry the method you suggested sounds great I was just curious! Maybe it's better not to be, after all that 'killed the cat'... ;)

ah I see so the current board doesn't actually have a relay on it then? Yeah I think it will work swell, just sorting it out now :) Thank you so much once again!

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service