The HY-S301 is a wireless RF transmitter and receiver module designed for low-power communication at a frequency of 433 MHz. It is widely used in remote control applications, such as wireless doorbells, home automation systems, and remote-controlled toys. Its compact design and ease of integration make it a popular choice for hobbyists and professionals working on wireless communication projects.
Parameter | Value |
---|---|
Operating Frequency | 433 MHz |
Operating Voltage | 3.3V - 5V |
Transmitter Current | ≤ 10 mA |
Receiver Current | ≤ 5.5 mA |
Transmission Distance | Up to 100 meters (line of sight) |
Modulation Type | Amplitude Shift Keying (ASK) |
Data Rate | Up to 10 kbps |
Operating Temperature | -20°C to +70°C |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply input (3.3V - 5V) |
2 | DATA | Data input pin for transmitting signals |
3 | GND | Ground connection |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply input (3.3V - 5V) |
2 | DATA | Data output pin for receiving signals |
3 | GND | Ground connection |
VCC
pin of both the transmitter and receiver modules to a 3.3V or 5V power source. Ensure the GND
pins are connected to the ground of the circuit.DATA
pin to the data output of a microcontroller or a signal source.DATA
pin to the data input of a microcontroller or a decoding circuit.Below is an example of how to use the HY-S301 with an Arduino UNO to send and receive data.
#include <VirtualWire.h> // Include the VirtualWire library
void setup() {
vw_set_tx_pin(12); // Set pin 12 as the transmitter data pin
vw_setup(2000); // Set the transmission speed to 2000 bps
}
void loop() {
const char *msg = "Hello, World!"; // Message to send
vw_send((uint8_t *)msg, strlen(msg)); // Send the message
vw_wait_tx(); // Wait for the transmission to complete
delay(1000); // Wait 1 second before sending the next message
}
#include <VirtualWire.h> // Include the VirtualWire library
void setup() {
Serial.begin(9600); // Initialize serial communication
vw_set_rx_pin(11); // Set pin 11 as the receiver data pin
vw_setup(2000); // Set the transmission speed to 2000 bps
vw_rx_start(); // Start the receiver
}
void loop() {
uint8_t buf[VW_MAX_MESSAGE_LEN]; // Buffer to store received messages
uint8_t buflen = VW_MAX_MESSAGE_LEN;
if (vw_get_message(buf, &buflen)) { // Check if a message is received
Serial.print("Received: ");
for (int i = 0; i < buflen; i++) {
Serial.print((char)buf[i]); // Print the received message
}
Serial.println();
}
}
No Signal Received
VCC
and GND
pins are properly connected.Short Transmission Range
Data Corruption
Q: Can the HY-S301 operate at a different frequency?
A: No, the HY-S301 is designed to operate specifically at 433 MHz.
Q: What is the maximum range of the HY-S301?
A: The module can achieve a range of up to 100 meters in an open, line-of-sight environment.
Q: Can I use the HY-S301 with a 3.3V microcontroller?
A: Yes, the module supports an operating voltage range of 3.3V to 5V, making it compatible with 3.3V microcontrollers.
Q: Do I need an external antenna?
A: While the module can work without an external antenna, adding a 17 cm wire as an antenna significantly improves range and signal quality.