How to make a low power change over circuit(urgent......), for Arduino.

Thread Starter

Umindu

Joined Sep 1, 2015
25
I appreciate the effort that you put into making the diagram, but I still don't quite understand what is going on. I'll just let other folks who are more conversant with RC receivers and hobby servos help you from here.
any way show me a schematic of a change over circuit sir .any way
 

jayanthd

Joined Jul 4, 2015
945
From the RC receiver to Changeover circuit there are three wires, 2 black and 1 red. I understand that the black wires are signal lines from RC receiver. I also understand that you want to connect either servos or rc receiver to Arduino at one time. Now what is the red wire between RC receiver and Change-Over circuit ?

I also know that servos have three wires. Two power supply wires and one signal wire. So, you are only switching the signal wires of the servo and connecting it to Arduino to provide the required pulses to turn the servos.

I can write a code for you using Arduino but I want to know whether you want to use Analog Switcher or Relay. If you decide this I will design a circuit for you and I will write an Arduino code for you.

Edit

This is the circuit I made for you. It uses Relay to connect either RC Receiver or Servos to Arduino. If you want to use Analog Switcher then you have to mention the IC you want to use.

ChangeOverCircuit.png
 
Last edited:

jayanthd

Joined Jul 4, 2015
945
I guess you will use analogWrite() function to control the Servos. For this you have to use PWM pins. I think you made a mistake in your circuit. Pins 9 and 10 are PWM pins. You have to use pins 9 and 10 for Servos and not pins 8 and 9. Pin 8 doesn't have PWM functionality.

Only pins marked with tilde have PWM functionality.
 

Thread Starter

Umindu

Joined Sep 1, 2015
25
I guess you will use analogWrite() function to control the Servos. For this you have to use PWM pins. I think you made a mistake in your circuit. Pins 9 and 10 are PWM pins. You have to use pins 9 and 10 for Servos and not pins 8 and 9. Pin 8 doesn't have PWM functionality.

Only pins marked with tilde have PWM functionality.
absolutely sir ur totally right sir the red wire which is called aux is to power up the change over circuit so it will change from servo to receiver to arduino to receiver i already have a code.i am currently making a mpu 6050 gyro based stabilizer so the change over circuit is for this so when i turn ON the change over circuit by the spare aux channel of the Rc receiver the change arduino to servo will be done so the plane i make will be fully stabilized by the gyro so when i need manual control i can turn off the change over circuit and go manual mode. i think the relay idea is good but the analog one is also good can you make both of them separately(schematic) if you don't mind and yes here is the code i use for my project of STABILIZATION


#include <Wire.h>
#include <Servo.h>

const int MPU=0x68; // I2C address of the MPU-6050

int16_t GyX, GyY; //Variabile int a 16bit

Servo ServoMot_X;
Servo ServoMot_Y;

void setup(){
Wire.begin();
Wire.beginTransmission(MPU);
Wire.write(0x6B); // PWR_MGMT_1 register
Wire.write(0); // set to zero (wakes up the MPU-6050)
Wire.endTransmission(true);

ServoMot_X.attach(8);
ServoMot_Y.attach(9);
Serial.begin(9600);
}
void loop(){
Wire.beginTransmission(MPU);
Wire.write(0x3B); // starting with register 0x3B (ACCEL_XOUT_H)
Wire.endTransmission(false);
Wire.requestFrom(MPU,14,true); // request a total of 14 registers

GyX=Wire.read()<<8|Wire.read(); // 0x43 (GYRO_XOUT_H) & 0x44 (GYRO_XOUT_L)
GyY=Wire.read()<<8|Wire.read(); // 0x45 (GYRO_YOUT_H) & 0x46 (GYRO_YOUT_L)

int PosServo_X = map(GyX, -16000, 16000, 0, 179);
int PosServo_Y = map(GyY, -16000, 16000, 0, 179);
ServoMot_X.write(PosServo_X);
ServoMot_Y.write(PosServo_Y);

Serial.println("Giroscopio");
Serial.print("Asse X : "); Serial.println(PosServo_X);
Serial.print("Asse Y : "); Serial.println(PosServo_Y);
Serial.println(" ");
delay(100);
}
 

jayanthd

Joined Jul 4, 2015
945
When Servos are connected to Arduino then the pins are configured as output pins. When RC Receiver connect to Arduino do they communicate using UART (software UART) pins or do they use digital IO pins ? If any pin is used by the RC Receiver is used as input when RC receiver is connected to Arduino then they have to be configured as input pin(s).

Give me one or two days. I will try to find the right Analog Switcher and make the circuit.
 

Thread Starter

Umindu

Joined Sep 1, 2015
25
When Servos are connected to Arduino then the pins are configured as output pins. When RC Receiver connect to Arduino do they communicate using UART (software UART) pins or do they use digital IO pins ? If any pin is used by the RC Receiver is used as input when RC receiver is connected to Arduino then they have to be configured as input pin(s).

Give me one or two days. I will try to find the right Analog Switcher and make the circuit.
no sir the rc receiver is not connected to arduino only the servos are connected to arduino to be precise the signal wires are only connected.the change over circuit is there to switch the signal wires(aileron and elevator)to arduino to Rc Receiver only can you make a circuit like that.and the aux channel must work as a switch for changing over as wellProg_GY-521_Servo_BreadBoard.png
 

jayanthd

Joined Jul 4, 2015
945
Do you mean when relay turns ON servos are disconnected from Arduino and alerion connects to elevator ?

When relay turns OFF Servos connect to Arduino ?
 

blocco a spirale

Joined Jun 18, 2008
1,546
He means that he wants to switch the servo control signals between the receiver (for remote control) or arduino (for auto-pilot).

The switching is to be controlled from a spare on/off channel on the receiver.
 

Thread Starter

Umindu

Joined Sep 1, 2015
25
If the assumption is that the auxiliary channel is a relay contact, the transistor is not necessary as the relay linked to in post#1 has a 5V coil and only draws 21mA and the 12V version only requires 8mA.

Umindu, what type of output is the auxiliary channel?
I really dont know what type of output is auxilliary channel sir but is has 3 wires 1 signal wire and positive and ground wires
 

blocco a spirale

Joined Jun 18, 2008
1,546
I really dont know what type of output is auxilliary channel sir but is has 3 wires 1 signal wire and positive and ground wires
You need to find out what the auxiliary output is, otherwise it is impossible to design the change-over circuit. You also need to know the current capability of the output.

This information should be in the specifications for the receiver.
 
Last edited:

Thread Starter

Umindu

Joined Sep 1, 2015
25
Top