Debugging Millimeter-Wave Radar Sensor with the RainbowLink V2 USB Protocol Converter

The RainbowLink V2 USB Protocol Converter is a compact and practical desktop tool that integrates multiple communication interfaces into a single device: 1× isolated RS485, 1× isolated RS232 and 2× TTL channels. In addition, it provides 12V, 5V, and 3.3V outputs directly from USB, allowing it to power external devices during debugging. The lever-style quick-connect terminals simplify wiring without requiring tools.

 

 

This evaluation focuses on four aspects:

- Basic functionality: Smooth PC recognition and independent channel operation
- Core communication: TTL loopback test and RS485 dual-device test both successful
- Power output: Stable and precise triple-voltage output
- Real application: Successfully connected and configured the C4001 mmWave sensor, enabling real-time data acquisition and confirming its effectiveness as a multi-protocol converter with integrated power output.

 

Phase 1: Basic Power-On and Device Recognition

This step verifies that the device powers correctly and is recognized by the system.
1. Connect to the Computer: Use the included USB cable to connect the RainbowLink to a USB port (USB 3.0 or Type-C recommended for stable power).
2. Check Indicator Lights: The power indicator should light up after connection. The data indicators may flash briefly, which is normal.
3. Verify Device Recognition (Driver-free experience)
   - For Windows users: Right-click "This PC" → Select "Manage" → Open "Device Manager" → Expand "Ports (COM & LPT)"
   - Four new COM ports should appear, each corresponding to one of the RainbowLink’s communication channels: RS485, RS232, TTL-A, TTL-B. If visible, the device is operating in plug-and-play mode.
   - Note: If the device appears as an unknown device with a yellow warning icon, you may need to download and install the driver from the official DFRobot website.
 

 

Phase 2: Core Communication Testing

This section primarily verifies whether each communication interface can correctly transmit and receive data.
1. TTL Loopback Test: The TTL channel is the easiest to test and can be used to verify basic serial communication functionality.
   - Hardware: one jumper wire
   - Connection: Locate the TTL-1 (C) header and short the TX and RX pins using a jumper wire.
   - Software Setup: Open a serial terminal tool (e.g., SSCOM, Putty). In this test, I used the Arduino IDE Serial Monitor.
      · Select the COM port (COM41 as shown above) corresponding to TTL-1 (C).
      · Set the baud rate (e.g., 9600), data bits to 8, stop bits to 1, and parity to None.
      · Open the serial port.
      · Enter any text in the send field (for example, "Hello RainbowLink") and click Send.
- Verification: If the exact same characters immediately appear in the receive window, the TTL channel’s transmit and receive functions are operating correctly. This confirms a successful loopback test.
- Repeat: Repeat the same procedure to test the TTL-B channel.
 

 

2. RS485 Communication Test: RS485 uses differential signaling and requires two devices for communication. It cannot be tested by simply shorting TX and RX.
   - Hardware: Another USB-to-RS485 converter module is required.
   - Connection:
      · A(+) → A(+)
      · B(-) → B(-)
      · GND → GND
   - Software Setup: 
      · Open two serial terminal windows
      · Select the RainbowLink RS485 COM port in one window and the second USB-to-RS485 module’s COM port in the other.
      · Set the same baud rate (e.g., 9600) in both windows and open the serial ports.
   - Test: Send data from one terminal and confirm reception on the other. Repeat in reverse.
   - Advanced Testing: For industrial protocol validation, Modbus testing tools such as Modbus Slave and Modbus Poll can be used to simulate master-slave communication.
 

The 6-in-1 multi-functional serial converter supports USB-TTL, USB-RS232, USB-RS485, TTL-RS232, TTL-RS485, and RS232-RS485 conversions. In this test, the USB-RS485 function is used.

 

Phase 3: Power Output Capability Testing

One of the key features of RainbowLink V2 is its external power supply functionality.
1. Required Tools
   - Multimeter
   - Optional: Electronic load 
   - Or small 12V/5V/3.3V devices (fan, LED module, development board)
2. 12V Output Test
   - Connect the multimeter’s red probe to the 12V terminal and the black probe to GND.
   - The measured voltage should be around 12V.
   - When a 12V load (e.g., a small fan) is connected, check whether the voltage remains stable. The RainbowLink provides a 12V output rated at 800 mA with overload protection.
3. 5V and 3.3V Output Test
   - 5V output: up to 2A (via Type-C input)
   - 3.3V output: up to 200mA
 

Powered by the laptop USB port

 

Phase 4: Debugging the C4001 24GHz Millimeter-Wave Presence Sensor

The C4001 24GHz mmWave sensor uses UART communication (TTL level) and supports both 3.3V and 5V power supply.


Key Capabilities

- Motion detection up to 25 meters. 
- Static presence detection up to 16 meters
- Distance measurement (up to 25m)
- Speed detection (0.1–10 m/s)
- UART communication interface
- Compared to PIR sensors, millimeter-wave sensors are not affected by temperature, light, or airflow, and can detect stationary individuals.

 

RainbowLink Debugging mmWave Presence Sensor Operation Manual

Note: Currently only the Chinese version is available. An English version will be updated later if released.


Step 1: Hardware Connection

1. Connect to the RainbowLink
   - Sensor VIN → 5V output
   - Sensor GND → GND
   - Sensor TX → TTL RX
   - Sensor RX → TTL TX
2. Connect RainbowLink to the computer and identify the corresponding TTL COM port.
 

 

Step 2: Serial Tool Configuration

1. Open the Arduino IDE Serial Monitor, or a serial terminal such as PuTTY or CoolTerm.
2. Select the correct COM port, set the baud rate to 115200.
3. Set the line ending format to “Both NL & CR”, which sends both a newline and a carriage return as required by the command format in the documentation.
 

 

Step 3: Command Interaction (Send Command and Receive data)

The sensor operates in two modes: Configuration Mode and Run Mode.


1. Enter Configuration Mode (Required Before Changing Parameters)
   - Step: Type sensorStop in the serial terminal and send the command.
   - Expected Result: The sensor stops reporting data and returns the prompt DFRobot:/>, indicating that it has entered configuration mode and is ready to receive commands.

 

2. Try Common Configuration Commands (Example: Adjust Detection Range)
   - Check the current detection range: Send getRange. You should receive a response similar to: Response 0.6 6
   - Modify the detection range: Send setRange 0.6 12. This sets the minimum detection distance to 0.6 m and the maximum to 12 m.
   - Successful response: If the command is accepted, the module will return: Done

 

3. Save the Configuration and Restart (Important)
After completing all configuration changes, run the following commands in order:
   - Save the configuration to flash memory: Send: saveConfig
   - Restart the sensor module: Send: resetSystem

 

4. View Automatic Data Reports
After rebooting, the sensor enters run mode by default. You will see ASCII data frames in the serial monitor that start with $ and end with , for example: $DFHPD,par1,par2,par3,par4 (If human presence is detected, the output may look like: $DFHPD,1,,,*)

 

 

Debugging Notes

- Command format: Strictly follow the document. Use a space to separate the command and parameters. Each command must end with a carriage return and line feed (newline). In the serial monitor, select "Send with newline (NL)" or "CR+LF".
- Timing requirement: According to the document, parameter read/write operations are only allowed 15 seconds after power-on. You must send sensorStop before performing any configuration.
- Baud rate trap: If you modify the baud rate (setUart) and then save + reboot, your serial monitor must also be changed to the new baud rate to communicate again. Important: Do NOT set it to a value higher than 115200, otherwise you may become unable to connect.

 

 

DEMO Video

 

 

Source: DFRobot Chinese Community
Author: 云天
Original post: https://mc.dfrobot.com.cn/thread-399349-1-1.html

License
All Rights
Reserved
licensBg
0