Jdy40 Arduino Example Best Instant
While there isn't a single "academic paper" that serves as the definitive guide, the following highly-regarded technical resources and tutorials are considered the best documentation for using the JDY-40 wireless module with Arduino. Best Technical Guides & Documentation
Detailed Setup and AT Commands: For a comprehensive technical overview, including how to configure the module via AT commands and its 128 radio channel options, refer to the Simple Wireless Serial Communication guide by Ben Emmett
. This resource is excellent for understanding current draw and power options.
Networking and Broadcast Examples: If you are looking to build a multi-node network (e.g., one hub and multiple remote nodes), Ben Emmett's JDY-40 Wireless Broadcast project provides complete Arduino and Python code examples using JSON formatting for message transmission.
Scientific Application: For a look at how the JDY-40 is used in professional research, the peer-reviewed paper "Wireless Data Acquisition System with Feedback Function" in MDPI details its integration into a data acquisition sensor, highlighting its 3.3V power requirements and energy-efficient sleep modes. Practical Implementation Resources
Video Tutorials: Ralph Bacon’s video tutorial on Wireless Serial Comms and the accompanying GitHub repository
are highly recommended for beginners. These resources demonstrate how to use the Go to product viewer dialog for this item.
as a "wireless USB cable" for serial debugging and data transfer.
Datasheets: The JDY-40 Wireless Serial Module PDF on Scribd provides the essential hardware specifications, including its 120-meter transmission range and 2.4GHz operating frequency. Critical Usage Tips Voltage Limitation: Always remember that the
is a 3.3V limited device; applying 5V directly to the VCC or logic pins without a level shifter can damage the module.
Channel Interference: For stable communication between multiple links, it is best to separate their channels by at least 6 to avoid interference.
In the world of wireless Arduino projects, is often hailed as a "silent workhorse" because of its effortless ability to establish long-range, transparent serial communication without the pairing headaches of traditional Bluetooth The Story of the "Ghost Connection"
Imagine building a remote-controlled rover intended to explore a dense backyard garden. Traditional Bluetooth modules like the
might struggle with line-of-sight obstacles or drop the connection if you walk too far away. By switching to a JDY-40, you gain a massive 120-meter range
. Because it uses 2.4GHz RF technology (similar to an NRF24L01 but with a simplified serial interface), it broadcasts to all other JDY-40 modules on its channel automatically. The "best" example of its power is a Hub-and-Spoke sensor network jdy40 arduino example best
. You can have one central "Hub" Arduino in your house and multiple "Remote" nodes (like an Arduino Uno
) scattered in the garden, each monitoring soil moisture. By sending simple JSON messages with a "destination ID," only the intended remote node replies, making it feel like a sophisticated, custom-built network. Best Practice Setup Example
To get the best performance out of your JDY-40, follow this standard serial setup:
The JDY-40 is a compact 2.4GHz wireless transceiver that functions like a wireless serial cable. It is widely used for Arduino projects due to its simplicity, low power consumption (5uA in sleep), and a range of up to 120 meters in open areas. 1. Essential Wiring
The JDY-40 is a 3.3V device. While its serial pins (RX/TX) are often tolerant to 5V Arduino logic, you must power it with 3.3V. JDY-40 Pin Arduino Pin Description VCC Power Supply (2.2V - 3.6V) GND RXD Pin 11 (SoftSerial TX) Serial input to module TXD Pin 10 (SoftSerial RX) Serial output from module SET Pin 9 (or GND for AT) Low (GND): AT Command mode; High: Data mode CS Low: Awake; High: Sleep mode 2. Best Code Example: Transparent Serial
The most common "best" use case is transparent transmission, where data sent to the RX pin of one module instantly appears at the TX pin of another.
#include Use code with caution. Copied to clipboard 3. Essential AT Configuration Commands
To configure the module, pull the SET pin to GND. All commands must end with \r\n (CR+LF).
AT+BAUD: Set the baud rate. Default is 4 (9600). Options range from 1 (1200) to 6 (19200).
AT+RFID: Sets the Wireless ID (0000 to FFFF). Both modules must have the same RFID to talk.
AT+DVID: Sets the Device ID. Useful for identifying specific nodes in a network.
AT+POWE: Adjusts transmit power (0 to 9). 9 is max (+12dBm).
AT+CLSS: Changes operating mode. A0 is standard transparent serial, while C0-C5 are for remote GPIO control. 4. Pro Tips for Better Reliability
Video #257: Serial Wireless Comms for Arduino (et al) - GitHub While there isn't a single "academic paper" that
JDY-040/JDY-041 module. JDY-040 module Serial Wireless transceiver info. PLEASE NOTE: this module is 3v3 limited - don't apply 5v.
Радиомодули JDY-40 2.4G с UART интерфейсом - arduinoLab
The Go to product viewer dialog for this item. is a highly versatile 2.4GHz wireless serial port module that serves as an affordable alternative to the NRF24L01. It is designed for "transparent transmission," essentially acting as a wireless USB cable between microcontrollers like the Arduino. 1. Key Specifications & Performance Range: Up to 120 meters (line-of-sight).
Operating Voltage: 2.2V to 3.6V (Note: 5V may damage the module; use a voltage regulator if needed).
Working Current: ~40mA (TX), ~24mA (RX), and an ultra-low <5µA in sleep mode. Frequency: 2.4 GHz ISM Band. Interface: Standard TTL Serial port. 2. Pinout Configuration
has a 14-pin layout, though standard communication only requires a few.
Video #257: Serial Wireless Comms for Arduino (et al) - GitHub
JDY-040/JDY-041 module. JDY-040 module Serial Wireless transceiver info. PLEASE NOTE: this module is 3v3 limited - don't apply 5v. Simple Wireless Serial Communication - - Notes To Self
What is the JDY-40?
The JDY-40 is a 2.4GHz wireless transceiver designed for transparent serial transmission. Its key features include:
- Range: ~50-100 meters (line of sight)
- Voltage: 2.2V – 3.6V (do not use 5V logic without a level shifter)
- Interface: UART (9600bps default)
- Mode: Point-to-point or broadcast
Because it works over UART, you can use Serial.print() to send data wirelessly.
Why is the JDY-40 better than nRF24L01 for beginners?
| Feature | JDY-40 | nRF24L01 | | :--- | :--- | :--- | | Wiring | VCC, GND, TX, RX | 8 pins, complex SPI | | Library | None (Serial) | RF24 (complex) | | Configuration | AT commands over Serial | Registers via SPI | | Reliability | Very stable | Prone to noise/power issues |
1. Wireless Sensor Node (Low Power)
Send temperature every 60 seconds, then sleep the Arduino + JDY-40.
// Send data, then enter deep sleep
jdy40.println("SENSOR:OK");
delay(10);
// Put JDY-40 to sleep via AT command
pinMode(4, OUTPUT);
digitalWrite(4, LOW);
jdy40.println("AT+SLEEP=2"); // Deep sleep
delay(50);
// Now sleep the Arduino (using LowPower library)
Troubleshooting: The "Best" Debugging Steps
If your JDY-40 isn't working, follow this checklist:
- Set both modules to the same baud rate. (Verify with
AT+BAUD). - Check voltage. At 3.0V, range is 10m. At 3.3V, range is 50m+. At 5V, magic smoke.
- Antenna proximity. Do not bend the PCB trace antenna directly against metal or a ground plane.
- SoftwareSerial timing. Do not use
delay()inside a reception loop. Usemillis()non-blocking code. - Buffer overruns. If data is garbled, reduce transmission frequency to < 50 packets/sec.
The Best Basic Example: Serial Transparency
This example turns your Arduino into a wireless extension cord for your PC’s serial monitor. You can type "LED_ON" on Computer A, and it turns on an LED on Computer B. What is the JDY-40
Transmitter Code (Arduino A):
#include <SoftwareSerial.h>// JDY-40 connected to pins 2 (RX) and 3 (TX) SoftwareSerial jdy40(2, 3);
void setup() Serial.begin(9600); // Debugging on PC jdy40.begin(9600); // JDY-40 default baud rate Serial.println("JDY-40 Transmitter Ready");
void loop() // Read from Serial Monitor (PC) if (Serial.available()) String data = Serial.readString(); jdy40.print(data); // Send wirelessly to receiver
Receiver Code (Arduino B):
#include <SoftwareSerial.h>SoftwareSerial jdy40(2, 3); const int ledPin = 13;
void setup() pinMode(ledPin, OUTPUT); Serial.begin(9600); jdy40.begin(9600); Serial.println("JDY-40 Receiver Ready");
void loop() // Read from wireless module if (jdy40.available()) String command = jdy40.readString(); command.trim();
if (command == "LED_ON") digitalWrite(ledPin, HIGH); Serial.println("LED turned ON via wireless"); else if (command == "LED_OFF") digitalWrite(ledPin, LOW); Serial.println("LED turned OFF");
3. Hardware Setup
1. Introduction
Wireless data transmission is fundamental in IoT and embedded systems. While modules like HC-12 (433 MHz) and nRF24L01 (2.4 GHz) are popular, they require significant configuration. The JDY-40 offers a simpler alternative: it appears as a wireless serial cable. Any data sent to its TX/RX pins is transmitted to a paired receiver. This paper documents the minimum working example and characterizes its performance.
Best Example: Wireless Serial Bridge
We will make two Arduinos talk. One sends "Hello JDY!" every second. The other receives and prints it.































