Cycle analyst and RC controller setup

The Guide will not be much help in this particular area...

Unfortunately, I do not have experience with RC ESCs and we don't have any threads discussing the exact details of setting up the V3 for specific controllers. Queries of Castle Creations for PWM ranges for their controllers have met with no response.

For these reasons, there are no details in the Guide to clarify RC ESC setup. Sorry about that.

What is needed here is an assist from one of the members who have some real knowledge of the ESC and have actually done a CC/V3 setup.
 
Hopefully someone will pitch in and you could also add the info to the manual, it is relevant to any RC controller.
I would have really like to see the a diagram similar to "Voltage Range Mapping - Operator Throttle Output (ThrI) to Controller Input (ThrO)" (page 25 of the manual) for when ThrO -> Output Mode = R/C Pulse.

Avner.
 
ferret said:
I would have really like to see the a diagram similar to "Voltage Range Mapping - Operator Throttle Output (ThrI) to Controller Input (ThrO)" (page 25 of the manual) for when ThrO -> Output Mode = R/C Pulse.
The diagram would be exactly the same except that the ThrOut Y-axis would be re-labeled as 'Pulse Width (msec)'. Varying the throttle input voltage just scales the output pulse width - normally though the MinOut to MaxOut pulse width range but changing to the BrakeOut pulse width when brakes are applied. This is essentially what a servo tester does - changing the voltage from the pot to a variable pulse width.

ferret said:
I assume I would need to calibrate the controller afterwards?
I think not - I believe making the min/max settings is the calibration.

Here's a SWAG for setting this up:
  • As I understand it, the controller is normally put into calibration mode and transmitter pulse widths are dialed up in the high or low throttle positions until the controller signals the pulse width is at its detectable max or min setting respectively. This is supposition on my part, but this procedure appears to 'calibrate' the transmitter to the ESC, not the ESC to the transmitter, and so should form the basis for 'calibrating' the CA instead of the transmitter -- aka 'setting up MinOut and MaxOut'.

    The unknown here is what the CC ESC wants to see for fixed throttle endpoints. This is ESC-dependent. Moreover, some ESCs appear to fault when the pulse width goes out of range (e.g. 0ms -- so during the setup process, you may not be able to start with MinOut = 0ms or the ESC might have a hissy fit).

    So - I would guess the idea would be to put the CC ESC in 'calibrate high' mode, set ThrOut->MinOut to 0ms, then slowly dial up the throttle until the ESC beeps/blinks/whatever to indicate the high throttle pulse width has been reached. Then advance the ESC to 'calibrate low' mode and repeat the procedure. If the ESC faults, adjust MinOut upward until the procedure proceeds successfully without the ECS having a 'throttle out of range' or 'missing throttle signal' pulse width issue. As with the voltage case, jiggling the min/max pulse widths down/up a bit to bracket a slightly larger pulse width range will ensure the ESC actually turns off at min and reaches full power at max (maybe a few percent of the 'max minus min' difference).

    Again, this is just a guess of how I might undertake this - presented only in case posts with real ESC knowledge aren't forthcoming....

If we get some good feedback or procedures in this thread, I will add them to the Guide. :D
 
I found out what caused some of my confusion.
I have been using the setup utility for making my settings. When I changed the output mode to RC pulse, the Min/Max Throttle Output fields stay in V units and have not changed to mS.
On the CA itself, I now see, the did change.

A quick search on servo control gave this:

"A period of 1.5ms tells the servo circuitry "center". Period of 0.5ms or 2.5ms sends the servo fully CW or CCW."

Avner.
 
ferret said:
When I changed the output mode to RC pulse, the Min/Max Throttle Output fields stay in V units and have not changed to mS.
Okay - this is wrong. Unfortunately, this slipped by and no one reported it earlier.
I just fixed it in 3.1 and we'll get the same Setup Utility fix into 3.02.
Thanks for the catch on this. :D

ferret said:
A quick search on servo control gave this:

"A period of 1.5ms tells the servo circuitry "center". Period of 0.5ms or 2.5ms sends the servo fully CW or CCW."

Ya - here's a little more detailed description: Pololu - Servo control interface in detail

Pulse width

The pulse width is generally the most important part of the interface, and that is what we intentionally vary to change the command to the servo. The general idea is simple: a pulse width of 1.5 ms is what we consider “neutral”; increasing the pulse width will make the servo go one way, and decreasing the pulse width will make the servo go the other way. However, there are a few points you should keep in mind:

  • The neutral point is not necessarily the middle of the servo’s absolute maximum range. For instance, a servo that is capable of 180 degrees of movement might have the output at the 100-degree point for a 1.5 ms input pulse. In that case, the available range would be 80 degrees to one side of neutral and 100 degrees to the other. The pulse width that corresponds to the middle of the available range will vary from servo to servo, even for servos that are of the same model, so if you care about getting the most range you can and having neutral mean the middle of that range, you will have to calibrate your system for each servo.
  • There is no standard correspondence between the pulse width and the servo position. Generally speaking, moving from 1.0 ms to 2.0 ms will yield about 90 degrees of servo movement, but that pulse width range could correspond to 100 degrees on one servo and 80 degrees on another servo. This means that any servo controller or servo control library you might use that makes any claims about absolute degrees is hiding something from you (or designed by someone who doesn’t really understand the interface). If you change servos in your design, you might have to make corresponding changes in the range of pulses you send to it, so if you are doing your own servo pulse generation, it’s a good practice to have the neutral point and range of your servo parametrized in your code. (I’ll cover more on that in a future post.)
  • Similarly, there is no standard minimum and maximum pulse width. If you keep making the pulses wider or narrower, servos will keep moving farther and farther from neutral until they hit their mechanical limits and possibly destroy themselves. This usually isn’t an issue with RC applications since only about half of the mechanical range is ever used, but if you want to use the full range, you have to calibrate for it and be careful to avoid crashing the servo into its limit.
  • The direction that a servo turns for increasing pulse widths is not standardized, either (also, it’s usually not specified). In my diagram to the right, I show the output moving clockwise as the pulse width increases, but that could easily be the other way around. We can expect the correspondence to stay consistent between different units of the same servo model, but the direction of servo travel is yet another thing you should be able to change in your design without a lot of effort so that you have the option of changing servo models.
  • The servo control interface is an analog interface. The signals look digital because we have square waveforms and we use digital microcontroller outputs to create them, but because what matters is the infinitely variable time that the pulse is high, the signal is analog, and any slight jitter in the pulse width will cause corresponding twitching in the servo output.
  • Although we can use some pulse width modulation (PWM) hardware modules in microcontrollers to generate servo control signals, and we are changing (modulating) the pulse width, it’s not good to call the signals PWM signals because that implies the relevance of the duty cycle, which is the percentage of on (high) time of the signal. As we will see next, the frequency of the pulse train does not affect the servo position if the pulse width stays the same, so changing the duty cycle does not necessarily affect the servo position. Similarly, we could keep the duty cycle constant by stretching out both t and T by the same proportional amount, and the servo position would change since the pulse width had changed.

Pulse period

The typical pulse period is around 20 ms, which corresponds to a frequency of 50 Hz. One immediate ramification of the pulse rate is that it gives you an upper bound on how quickly you can give the servo new commands. Most servos can handle substantially faster pulse rates, and some special servos are designed to support pulse frequencies of several hundred hertz
In any case - the point being that the 'standard' midpoint seems to be 1.5ms, but the endpoints vary from unit to unit and some tuning is necessary. The article above describes general limits of 1.0 - 2.0ms while your reference called out 0.5 - 2.5ms. Beyond that, the exact procedure for a setting up a particular unit (e.g. Castle Creations Edge) is likely to vary as well (LED flashing, beeping, etc).
 
Dug this up from Castle's setup software documentation:
Use this drop-down box to select what type of throttle control you would like to use.  Different vehicle choices will enable different options; for example, Auto-Calibrate mode is not available for helicopters.  Auto-Calibrate and Fixed-Endpoint mode both increase power to the motor as the throttle signal gets higher.  Governor Mode will use the throttle signal to establish how fast the motor should be spinning.  The ESC will attempt to hold it, or govern it, at that speed.

Auto-Calibrate Endpoints
Auto-Calibrate mode will 'learn' your transmitter's end-points automatically, so you should always have the highest resolution possible for your throttle stick.  After arming the controller, you must go to full-throttle on the ground so the ESC can learn this value before take-off.

Fixed-Endpoints
Fixed-Endpoints will set zero-throttle and full-throttle points to fixed values so that the ESC does not have to learn from your transmitter. If you are using this mode, you will most likely want to change the EPA settings on your transmitter to allow full throttle resolution with the throttle stick.  To do this, turn on your TX and set normal mode in the transmitter for a linear throttle curve (0,25,50,75,100). Bring your high side and low side endpoints on your throttle channel down to 25%, plug in the battery pack with the throttle stick at full (it won't start up), then bring your high endpoint back out towards (and sometimes past) 100% until you hear a single tone. Next, bring your throttle stick down to the bottom position and bring the endpoint out from 25% out towards (and possibly past) 100% until you hear the ESC arm. Unplug the battery pack, wait a few seconds, then plug back in and verify that the throttle is working properly.

The 'Vehicle Type' box allows you to select the type of vehicle you are running. Castle Link will use the vehicle type to determine which throttle options make sense for your application.

Airplane
This is used to select a fixed wing aircraft type. This type of vehicle typically has fairly fast throttle response and does not have a slow initial throttle ramp. Endpoints with Auto-Calibrate: ESC will automatically match your radio endpoints after the first full throttle event. Be sure to go to full throttle prior to takeoff so that the ESC can learn the position of full throttle. Endpoints with Fixed Throttle: < 1.3ms Arm/Motor Off/Brake, > 1.8ms Full Throttle

Avner.
 
I had a discussion with Justin yesterday about this thread/topic and he suggested that settings of 1ms and 2ms for MinOut and MaxOut respectively would work well in most situations.

He also observed that except for PassThru Throttle mode, a little slop in the exact Throttle Out settings is harmless since the PID controllers will force the proper signal excursions as required to achieve the proper results. So - for the feedback modes a little extra controller input 'dead zone' actually becomes invisible from the user perspective. Since Current Throttle is the usual choice for smoother throttle control, this reduces the importance of precisely matching of the CA to the controller min/max pulse widths.

There are a number of YouTube vids on setting up CC controllers using the linear curve/fixed endpoint technique. Seemed straightforward, but the devil is in the details... :)
 
Got things running yesterday!

Edge HV controller settings:
Airplane, Fixed-Endpoints

CA Setting:
Min Throttle Output 1.2 mS
Max Throttle Output 1.7 mS

To find the proper CA settings, I initially used Min Throttle Output 0.5 mS, Max Throttle Output 2.5 mS.
Then monitored Throttle Output and saw that the motor started moving then it reached 1.2 mS and max RPM at 1.7 mS.

Avner.
 
Back
Top