An RC (Radio Control) Receiver Module is an essential component in remote control systems. It is designed to receive radio signals transmitted by an RC transmitter and convert them into electrical signals that can be used to control various functions of a remote-controlled device, such as a car, boat, drone, or airplane. These modules are widely used in hobbyist projects, robotics, and in the development of autonomous systems.
Pin Number | Description | Notes |
---|---|---|
1 | Ground (GND) | Connect to system ground |
2 | Power (VCC) | Typically 4.8V to 6V |
3-n | Channel Outputs (CH1, CH2...) | PWM signal outputs for each channel |
n+1 | Battery Input (BAT) | Optional, for direct battery input |
n+2 | Bind (BIND) | Used for pairing with a transmitter |
Below is an example of how to read PWM signals from an RC Receiver using an Arduino UNO:
#include <Servo.h>
Servo myServo; // Create servo object to control a servo
// This pin must be an interrupt-capable pin
const int receiverPin = 2;
volatile int pulseLength;
void setup() {
myServo.attach(9); // Attaches the servo on pin 9 to the servo object
pinMode(receiverPin, INPUT);
attachInterrupt(digitalPinToInterrupt(receiverPin), pulseWidth, CHANGE);
}
void loop() {
int servoPosition = map(pulseLength, 1000, 2000, 0, 180);
myServo.write(servoPosition);
}
void pulseWidth() {
if (digitalRead(receiverPin) == HIGH) {
// Record the start time of the pulse
pulseLength = micros();
} else {
// Calculate the pulse length
pulseLength = micros() - pulseLength;
}
}
Note: The pulseWidth
function is an interrupt service routine (ISR) that measures the width of the incoming PWM pulses. The map
function is then used to convert this pulse width into a servo position.
Remember to adjust the map
function parameters (1000, 2000, 0, 180
) to match the specific pulse width range of your RC receiver and the angle range of your servo.