Mixer for X-rudder on RC Model Submarines (Mixing Two Servo signals)

Hello Everyone!

I am looking for an arduino (nano) mixer library for RC futaba (or other brand) servo to control X-rudders on RC submarines. I am designing a new RC model submarine based on the SSK French-Spanish Scorpene/S-80 submarine. This type of submarine I am modelling (S-90) has the new submarine X-rudder configuration. The SubModule has an accelerometer connected between the radio RX and the two rudder servos to control the submerged pitch of the submarine.

I was very grateful if someone could assist me programming this software and/or could tell me where can I get that library (V-tail for planes do the same function)

Best regards from Spain, Manuel.

Are you able to read into your Arduino the data from the receiver channels?

...R

Excuse me, I was on trip last days. Yes, I can read the data from the receiver channels in my Arduino Nano. There are some programs about V-tail over there but they produce a lot of noise in the servo actuating arms. All I need is a simple software code to mix both rudder channels to prevent that disturbing noise.

Many thanks for your replay and cheers.

I can read the data from the receiver channels in my Arduino Nano.

Are you using pulseIn() or interrupts ?

There are some programs about V-tail over there

Where is "there" ?

ModelSUB2000:
Yes, I can read the data from the receiver channels in my Arduino Nano.

That is probably the hardest part done.

Can you explain how the mixing is supposed to work. Suppose you get a value of 20% from one input and 70% from the other what should the outputs be? (I just used percentages for illustration because I don't know what actual numbers you get)

...R

Hi All,

Here you can find the link to the V-Tail mixer on the Arduino´s forum:

http://forum.arduino.cc/index.php?topic=37638.0

I use two standard servos and a Futaba transmitter. Servos are connected to rudder by actuating rods in the following sequence:

  1. Dive or surface motion: Both servos proportionally work in opposite direction pushing the rods to have the rudders in X up to dive and X down to control the pitch and surface or dive the submarine

  2. Starboard or portboard motion: Both servos proprotionally worh in the same direction pushing the rods to have the four rudders to the right or left side orientation to control the yaw and turn right or left the submarine

Here attach some explanation photos:

ModelSUB2000:
Here you can find the link to the V-Tail mixer on the Arduino´s forum:

But you did not answer my question, which I thought was a very simple one.

It sounds like, if you get a +20% input from the up-down channel you want both servos to move in opposite directions by 20%.

And if you get +70% from the left-right channel you want both servos to move in the same direction by 70%

So a calculation like this pseudo code may work

xServoPos = upDownVal;
yServoPos = - upDownVal;
xServoPos = xServoPos + leftRightVal;
yservoPos = yServoPos + leftRightVal;

xServo.WriteMicroSeconds(xServoPos);
yServo.WriteMicroseconds(yServoPos);

You probably need to do something to prevent the values adding to a number beyond the range of the servo.

...R

Hi thanks for the code you sent me.

We are reading the channels in the receiver using PWM signal but there is a lot of noise when servos are in waiting condition.

The code we are using now to read channels of the transmitter is the following:

    Lecturas[i] = pulseIn(3, HIGH, 20000);
    
    i = i + 1;    
    
    if (i >= 5){         
      for(a=0; a<5; a++)
    {
      Total=Total+Lecturas[a];
    }    
    
    i = 0;    

    Promedio=(Total/5);

     Serial.println(Promedio);Serial.print("   ");

     valor = map(Promedio, 1090, 1960, 180, 0);

     Serial.println(valor); 

     if(valor>180)
     {
       valor=180;
     }     

     if(valor<0)
     {
       valor=0;
     }
          
     timon_X_1.write(valor);

    }

    Total = 0;

What is your recommendation to read the two servo channels and prevent the servo jittering (or servo noise)?

Many thanks in advance and best regards.

ModelSUB2000:
What is your recommendation to read the two servo channels and prevent the servo jittering (or servo noise)?

You will have to explain what your code snippet is supposed to do. It seems to be making 5 readings and adding them - why? And what else is it trying to do?

Neither am I clear what your problem is? Is it that the input values are showing jitter? OR, is it that the actual servo movements are showing jitter?

...R