Finding it difficult to understand switch programming.

Hi everyone..

I'm building a DJI F550 multi-rotor and am using a JR 9503 Radio..

In regards to assigning switches to perform certain functions, I'm a bit stuck.

I've been watching videos online on how to do stuff and although I can follow someone else's instructions I have no idea why things are the way they are

Like for example why is it that switches have 'end points' and numeric values? Whats an end point anyway? Why aren't they just ON and OFF? Why do I have to set values like 62% and 100% etc, what's all
that about and why? Why percentages?

As you can see, I have NO CLUE about how to set switches to do stuff like 'return to home' 'home lock' etc? It's because I don't understand the behavior of the switches..

Can anyone shed some light on all of this for me?


-Frank
 

Bartman

Welcome to MultiRotorForums.com!!
a lot of the adjustments came from aircraft and helicopters with mechanical linkages. before computer radios, if a plane rolled left constantly you'd use the trims to make it fly level. if you were ambitious you'd maybe tweak the mechanical linkages to make it fly straight with the trims centered. but that was it, trim or linkage adjustments.

with computer radios you can have an aileron that is out of whack by 1/8 of an inch and just use the settings in the radio to make it better. even better, you can adjust each individual servo to do exactly what you want them to do. it's not ideal to build sloppy and use the radios to make things fly straight but it gives you an idea as to what can be done with all of those adjustments.

with your NAZA, use the end point adjustments and keep in mind there are only a few combinations with the JR9503 channels that will work with your NAZA. I just happened to set one up last night so I can tell you to use channel 6 for the flight mode and channel 7 for the IOC control (if you choose to set it up). Assign channel 6 to AUX2 SW and channel 7 to FLAP SW.

AUX2 SW is above the right stick
FLAP SW is above at the opt left corner.
both are three position switches.

To access the DeviceSEL menu to make these selections, hold the roll thing on the right down as you turn on the power then scroll to the DeviceSEL option.
 

Bartman

Welcome to MultiRotorForums.com!!
If you want to have camera tilt control use channel 8 and assign it to the FLAP LV, that's the slider on the back left corner of the radio.
 

Frank,
Think of it this way: your transmitter *can* send values from -100 to +100. These are the proportional channels, and basically all channels are proportional (not entirely true, but for the most part). On the receiving end of that signal, the device can interpret those numbers however it chooses. You didn't mention what you are controlling with your transmitter, and that is really the key piece. All you are doing is configuring the JR transmitter to send values to the device you are controlling in the ranges that it expects. Below are some examples and I'm going to use the DJI Naza as an example only because you mentioned it is a DJI F550.

If the device is a simple On/Off, then more than likely it will treat ON as one end of the range, and OFF as the other. But the device can be designed however they want. For example, in the case of an simple ON/OFF, they could make any number less than -80 be OFF, and any number above +80 be ON, and in between nothing changes (maintains the old). Or they could design it to be less than 0 is ON, and larger or equal to 0 be OFF.

Then you can get into 3-states where the device basically divides up the -100 to +100 range into three equal sections. Once the value crosses over one threshold, it interprets the command as "STATE 1", then the next range is "STATE 2", and then the next range is "STATE 3". In this case, any number in the range is fair game and will be assigned to one of those 3 modes.

But then you get into complex multi-states such as the DJI Naza Flight Mode input. This is an example where you MUST use endpoint values because of how they defined the ranges. For whatever reasons DJI had, they broke up the -100 to +100 region into 7 regions. They basically said the lower and upper 10% are "no mans land" and the Naza will behave unpredictably. Then it divided up the rest of the range into 5 equal parts: MANual, FailSafe, ATTitude, FailSfe, and GPS. Because you are probably assigning this mode input to a 3-position switch, you need to ensure all three positions correspond to one of those acceptable ranges. So for this control you'll need to set the endpoints of this channel to limit the range say from -90 to +90. That way when the 3-position switch is and one end, it corresponds to -90 which then translates to MANual mode (as an example), and at the other end it will transmit +90 which is then translated to GPS, and the middle postion of the switch will pick the mid-way value and transmit a 0, which the Naza will then translate to ATTitude.

Then to complicate things even more, now you need to some how get the transmitter to send a value that will force the Naza to go into FailSafe mode. But with a three position switch you can't get there. More importantly, you'll probably want it to be on a totally different switch so that you don't go into FailSafe when trying turn GPS on or off. So how do you solve this? Lots of people assign a different switch to turning FailSafe On, and they do it by overriding the output of the 3-position mode switch I described above. In my example above, to get the Naza to get into FailSafe mode you would need an input of roughly -45 or +45 to get it into those regions in between MAN, ATT, and GPS.

Another reason for the need for Endpoint definition is to protect the hardware. For example, you may have a gimbal that only has 90 degrees of free movement. The servo on that gimbal might put the gimbal at one end of the motion range with a command of -50, then move the servo to the other end of the range might be +75. If you were to command the gimbal servo to +100 for an extensive period of time, you might burn up the servo, so you tell the transmitter to limit the range of that command to -50 to +75, and you'll save the servo's life.

I hope some of this makes sense. If not, please reply and ask for more details or better explanations. The more information or specifics you provide, the easier it is for us to reply and help you along.
 

deluge2

Member
Frank,
Think of it this way: your transmitter *can* send values from -100 to +100. These are the proportional channels,

<snip>

But then you get into complex multi-states such as the DJI Naza Flight Mode input. This is an example where you MUST use endpoint values because of how they defined the ranges. For whatever reasons DJI had, they broke up the -100 to +100 region into 7 regions. They basically said the lower and upper 10% are "no mans land" and the Naza will behave unpredictably. Then it divided up the rest of the range into 5 equal parts: MANual, FailSafe, ATTitude, FailSfe, and GPS. Because you are probably assigning this mode input to a 3-position switch, you need to ensure all three positions correspond to one of those acceptable ranges. So for this control you'll need to set the endpoints of this channel to limit the range say from -90 to +90. That way when the 3-position switch is and one end, it corresponds to -90 which then translates to MANual mode (as an example), and at the other end it will transmit +90 which is then translated to GPS, and the middle postion of the switch will pick the mid-way value and transmit a 0, which the Naza will then translate to ATTitude.

Then to complicate things even more, now you need to some how get the transmitter to send a value that will force the Naza to go into FailSafe mode. But with a three position switch you can't get there. More importantly, you'll probably want it to be on a totally different switch so that you don't go into FailSafe when trying turn GPS on or off. So how do you solve this? Lots of people assign a different switch to turning FailSafe On, and they do it by overriding the output of the 3-position mode switch I described above. In my example above, to get the Naza to get into FailSafe mode you would need an input of roughly -45 or +45 to get it into those regions in between MAN, ATT, and GPS.

<snip>

I hope some of this makes sense. If not, please reply and ask for more details or better explanations. The more information or specifics you provide, the easier it is for us to reply and help you along.


Thanks very much for this very clear explanation. I wonder if you could expand a bit on how exactly to add the failsafe to the example you describe above. How does one configure a separate 2-position switch so that it will trigger FailSafe mode, regardless of the position of the 'other' 3-position switch (MAN, ATTI,GPS)? You mention adding or subtracting ~45 units, but it's not clear (to me anyway) how you specify the appropriate change in value, based on the position of the other switch. I've seen configuration videos and clearly it can be done, but no one has explained it in sufficient detail for a noob like me...

Steve

PS: I seem to recall that this can be done in a way that consumes two channels, or in a different (better?) way that only uses one channel (perhaps depending upon the features of the particular transmitter). In my case I have a Futaba 14sg coming that i'm sure has a full set of such programming features.
 

Good question Steve. The reason why I didn't get into that detail in the original post was because Frank was talking about a JR 9503 radio which I know nothing about. My experience has been with Futaba, so I can elaborate here a bit for you.

Before I do, let me address your PS statement. Doing one channel or two channels is not a function of the transmitter, but one of the Flight Computer. It always boils down to getting the data from your hands into the FC in whatever method it needs. On the DJI Naza there is only one input (the "U" input) that can drive Failsafe, so you need to "mix" the two switches. On the DJI Wookong, besides being able to drive the FC into Failsafe via the "U" input, you can also use the "X3" input to trigger a Return To Home (at the cost of loosing your battery monitoring function).

So back to "mixing". I'm including a good video I found on youtube, but I'll try to summarize. Under "PROG MIX", create a mix of the "U" channel to itself. For example, on my Futaba 8FG I have the "U" channel mapped to "AUX7". So I create a mix of AUX7->AUX7. You "enable" this mix by whichever 2-position switch you are wanting to force Failsafe with. With the program graph displayed, you will see how your "U" channel 3-position control moves from left to right as you flip the switch through it's 3 positions. What you'll want to do is pick a number to add or subtract for each of those position using a POINT curve. So one the 3-position switch is in position 1 and normally outputting -90, for example, I add 45 by putting a 45 value. Then with the switch moved to the middle, now it normally outputs zero, and I also add 45. Then with the position moved to position 3 and normally outputting +90, I subtract 45. Now, regardless of your 3-position switch, your 2-position will drive it into Failsafe. I'm sure this sounds very confusing, and it's probably best to watch the video.

http://www.youtube.com/watch?v=ck3tu-4UVgg
http://www.youtube.com/watch?v=SmDehc5PEUQ
 

I'm beginning to understand it all.. Thanks everyone! I think I need to set all this up just to clearly get my head around it :)

-Frank
 

Frank, that's exactly how I learned it. The Futaba manual had much to be desired of, so I just created setups and played with the inputs, watched some youtube videos, and it started to sink in. Do double and triple check all of your switches and outputs and make sure you know what controls what, and maybe even label your transmitter with positions, such as "HOME", "CRS", "GPS", "MAN", etc.
 

>> For whatever reasons DJI had, they broke up the -100 to +100 region into 7 regions. They basically said the lower and upper 10% are "no mans land" and the Naza will behave unpredictably. Then it divided up the rest of the range into 5 equal parts: MANual, FailSafe, ATTitude, FailSfe, and GPS.

Could you elaborate on that please??

What defines a 'region'? And what do you mean by 'divided the rest of the *range* into 5 equal parts? The range and region of what? A channel? A switch?

So far I'm interpreting all this as channels.. So you have a channel right, and a channel has a range of 0% to 100%, a channel can then be assigned to a switch and whatever value you allocate to the position on the switch (eg: middle of a 3 position switch is 70%) will correspond to the value that the manufacturer of the device has assigned to the device's function?

After watching you tube videos I understand that in a mechanical world with servos that you need values ranging from 0% to 100% so that you can determine how far a servo throws it's arm? So 100% it throws the arm as far as possible and you may not want that you you would set it to less, say 90%.. Is this all correct?

What I'm struggling to understand is where the percentage values come in, in an electronic/digital wordl such as the Naza on a Multicopter.. There are no mechanical servos and yet the radio's toggle switches still send values ranging from 0% to 100% to switch things on and off.. Why can't everything be as you said, 0% is on and 100% is off? Aren't all the Naza functions really just on/off functions? ATT mode on, ATT mode OFF, GPS ATT On, OFF, Return to home ON, OFF etc..

Now if we're talking gimbal control, I do understand how a toggle switch may need values. If I were to assign a 2 position toggle switch (not that I would) to point the gimbal front or down, I would need 0% to 100% values to determine where front and down actually is am I right?

Sorry for being confused.. You did explain it well I'm just too much of a newbie.


-Frank
 

Bartman

Welcome to MultiRotorForums.com!!
Frank,

Have you been able to set the channel and switch assignments in your 9503 the way I described above?

The functions are either on or off but they're not used more than one at a time (usually). So the functions are combined into one three way switch (Manual-Attitude-GPS PH) to minimize the number of channels you'll need on your radio. There's no sense in requiring three channels where one can do the job. They could have put the failsafe function onto its own switch instead of requiring mixing but it's not likely to change so we might as well just accept it. Mixing another channel to activate failsafe is confusing but once it's set up it works pretty well.

Once your channel and switch assignments are correct, open up the NAZA Assistant software, plug a flight battery into the heli and connect the USB to the VU. Go to the page in the assistant that shows the 5 section graphic for Manual-Failsafe-Atti-Failsafe-GPS. Open the menu item for End Point Adjustments for Channel 6 (Flaps in the 9503) and move the three position switch. The indicator on the graph should move. It may not stop on one of the five boxes but it should jump around. Set the three positon switch either full up or full down and then scroll the value in the radio display, the indicator on the graph in the Assistant should move as you scroll. When the box turns blue, move the three position switch all the way in the other direction and scroll again until the box at the other end of the graph turns blue.

Take it slowly, one sentence at a time and it should start to work for you.

Bart
 

What defines a 'region'? And what do you mean by 'divided the rest of the *range* into 5 equal parts? The range and region of what? A channel? A switch?
One channel can have any numeric value from lower end all the way up to the upper end. I was using "-100 to +100" only because the Futaba transmitter defines its outputs that way. But you could say that it is "0% to 100%" for that matter as well. It's just a way of saying "nothing" to "all the way".
So the transmitter can output on ONE channel any value from "nothing" to "all the way", or "0 to 100", however you choose to picture it in your mind. You can associate that out channel, or output, to one switch (which is the typical way of doing it), or have it be a combination if switches (which is called mix, or you can also have logical statements, all depending on the capabilities of your radio).
The device (the Naza in this case), interprets those numbers to determine the mode, and it assigns a range of acceptable numbers for each mode. As Bart stated, you want to use the Naza Assistant Software to "nudge" the numbers so that each switch position ends up transmitting a number to the Naza within the acceptable range of numbers for the mode you want. So using your numbers (totally as an example), 0 to 5 might be undefined, 5 to 20 = GPS, 20 to 35 = FailSafe, 35 to 65 = ATT, 65 to 80 = FailSafe, 80 to 95 = MAN, and 95 to 100 is undefined. That's what I meant by "regions" or "ranges".


So far I'm interpreting all this as channels.. So you have a channel right, and a channel has a range of 0% to 100%, a channel can then be assigned to a switch and whatever value you allocate to the position on the switch (eg: middle of a 3 position switch is 70%) will correspond to the value that the manufacturer of the device has assigned to the device's function?
As Bart said, this is all in one channel because you don't want to use up valuable channels, of which you are limited to based on your transmitter. Also, there's no reason to use multiple channels because each Flight Mode, for example, excludes the other. You can't be in GPS and MANual at the same time. So using one channel means you would only be activating one or the other, and not both at the same time.


After watching you tube videos I understand that in a mechanical world with servos that you need values ranging from 0% to 100% so that you can determine how far a servo throws it's arm? So 100% it throws the arm as far as possible and you may not want that you you would set it to less, say 90%.. Is this all correct?
Yes, that is correct.


What I'm struggling to understand is where the percentage values come in, in an electronic/digital wordl such as the Naza on a Multicopter.. There are no mechanical servos and yet the radio's toggle switches still send values ranging from 0% to 100% to switch things on and off.. Why can't everything be as you said, 0% is on and 100% is off? Aren't all the Naza functions really just on/off functions? ATT mode on, ATT mode OFF, GPS ATT On, OFF, Return to home ON, OFF etc...
Yes, and no. As stated above, each mode is a simple On/Off, but you can't have several of them On at the same time. And if you assigned a channel for each on/off function, you'd use up lots of channels, and we don't have that luxury when transmitters are limited to 7, or 8, or 14 channels.
As Bart stated, this is an evolving technology. The Naza was designed to work with the existing pulse modulated width signals of the thousands of transmitters that people already had in their home. And DJI isn't in the transmitter/receiver business, so it had to make itself work with what was out there, which in turn is designed to work with mechanical systems as well.


Now if we're talking gimbal control, I do understand how a toggle switch may need values. If I were to assign a 2 position toggle switch (not that I would) to point the gimbal front or down, I would need 0% to 100% values to determine where front and down actually is am I right?
Yes, but what if you wanted "part way down"? Again, goes back to why you want ranges of number (i.e. 0 to 100), instead of FWD/DOWN. So 90% might mean mostly forward, but a little down.


Sorry for being confused.. You did explain it well I'm just too much of a newbie.
No worries! That's what we're here for. And I'm hoping I didn't confuse you more.
As Bart said, take it slowly one sentence at a time.
 
Last edited by a moderator:

On the DJI Wookong, besides being able to drive the FC into Failsafe via the "U" input, you can also use the "X3" input to trigger a Return To Home (at the cost of loosing your battery monitoring function).
I don't know what I was thinking at the time I wrote this above. X3 isn't used for the battery monitoring function; that's X1. Please disregard that statement.
 

Top