11/05/2024

RC Servo Signal Reverse Circuit

If your remote control receiver does not have enough channels, this is a circuit you can use to change the signal direction of the servo.

I preferred Arduino Pro micro because it is small. If you wish, you can also use the existing code with Arduino Nano.
You can use D3 and D5 pins for Arduino Nano instead of pins 3 and 5 on the Pro micro.

 

 


Servo Signal Reverse Code For Arduino:

#include <Servo.h>  // Libraries file  |  Kütüphane dosyası
Servo servoMotor; // Servo nesnesi oluşturuluyor
int RXPin = 3; // Receiver pin  |  Alıcı pin
int kontrol = 1400; // Alıcıdan gelen kontrol değeri
void setup() {
  servoMotor.attach(5); // Servo Pin
  pinMode(RXPin, INPUT); // Receiver pin input  |  Alıcı pin giriş
}
void loop() {
   kontrol = pulseIn(RXPin, HIGH); // Reading the receiver signal  |  Alıcı sinyalinin okunması
   kontrol = map(kontrol, 1000, 2000, 180, 0);
// kontrol = map(kontrol, 1000, 2000, 0, 180);  // Other side  |  Diğer yön
   servoMotor.write(kontrol); // Servo motor kontrol değeri atanıyor
  delay(30);
}


End point adjustment for servo:

The values 180, 0 in the 11th line determine the maximum movement range for the servo. (Max. 180°, min 0°)
If you want to reduce the movement, you can change the 180 value to a smaller value. For example 120, 0

Servo movement direction:
There are two options to determine the appropriate servo direction for you. 0, 180 for current direction or 180, 0 to move in other direction.