Difference between revisions of "RS232 Recorder"
From Diustou Wiki
Yousimaier17 (talk | contribs) (Created page with "{{Product |images=400px |categories= {{Category|RS232}} |brand=Diustou |features= * RS232 Recorder |interfaces= {{Category|RS232}} |relat...") |
Yousimaier17 (talk | contribs) |
||
Line 33: | Line 33: | ||
== Product Illustration == | == Product Illustration == | ||
− | *[[File:RS232 Recorder_产品说明.png| | + | *[[File:RS232 Recorder_产品说明.png|1000px]] |
== Usage Instructions == | == Usage Instructions == |
Latest revision as of 17:51, 6 February 2025
| ||||||||||||||||||||||
| ||||||||||||||||||||||
| ||||||||||||||||||||||
|
Contents
Product Overview
- This module is an intelligent storage module that can store data received via the RS232 interface in TXT format onto an SD card, thereby achieving the purpose of recording serial port data. It can be used for environmental monitoring, flow data recording, drone data recording, and various sensor data recording scenarios. It can also be paired with microcontroller devices such as Arduino, Raspberry Pi, STM32, etc., for development, debugging, and product testing.
Product Description
- Power Supply Voltage: 5V-32V. It can be powered via a Type-C interface or a 5.08mm terminal block.
- Onboard Type-C interface and RS232 interface.
- Enter USB flash drive mode via the Type-C interface.
- Transmit data via the RS232 interface.
- Onboard control button for switching the module to USB flash drive mode and RTC time setting mode.
- Onboard dual LED indicators to display the system's working status.
- Onboard Micro SD card slot, supporting FAT32 and EXFAT formats, with a maximum capacity of 128GB.
- Onboard CR1220 coin cell battery holder, supporting RTC for real-time recording of data collection time.
- Supported Baud Rates: 56000bps – 2Mbps, with a default of 115200.
- Read files from the TF card without the need for a USB card reader and save them to a specified directory on the computer.
- Capable of storing files in other formats such as video and audio.
- Product Size: 61mm*42mm
Product Illustration
Usage Instructions
- When the board is powered on for the first time (i.e., there is no ulog_config.txt on the SD card) or if the file format is incorrect, a new ulog_config.txt configuration file will be automatically created upon power-up.
Contents of ulog_config.txt:(Do not change the order, do not add spaces afterward, do not alter the preceding characters; except for the baud rate, other settings can be modified with the values specified in parentheses.) [ulog_fw]:220620A # Current version number [write_raw(0,1)]:0 # Whether to write RAW data to the SD card, i.e., whether to generate a .bin file. Set to 0 to not save, default is 0. [write_time(0,1)]:1 # Whether to write time-stamped data to the SD card, i.e., whether to generate a .txt file. Set to 1 to save, default is 1. [uart_baud]:1500000 # Baud rate [uart_dataLength(8,9)]:8 # Data length [uart_Direction(MSB,LSB)]:LSB # Least Significant Bit first or Most Significant Bit first [uart_Parity(None,Even,Odd)]:None # Parity bit [uart_stopBit(1,2)]:1 # Stop bit
- Each time the board powers on and enters ULOG printing mode, a new uart_log00000.txt file will be automatically created on the SD card to receive data from the serial port. The number 00000 will increment upwards.
ULOG Printing Mode
- Insert the SD card while the power is off, and connect the RS232 Recorder module directly to a USB-to-RS232 serial module (2nd pin (TXD) to TXD, 3rd pin (RXD) to RXD, 5th pin (GND) to GND; if it doesn't work, try a crossed connection). Power the module through the 5.08mm terminal block with 5-32V or via the Type-C interface. Do not press the control button before powering on; powering on will enter ULOG printing mode. At this point, the red light will flash once, and the blue light will flash quickly. If the SD card is not inserted when powering on, both the red and blue lights will remain on.
- After plugging the serial module into the computer, open the serial port debugging assistant, select the corresponding COM port, and configure it according to the configuration file (configure it as shown in the figure below for the first power-on). After configuring, open the serial port, click send, and each time data is successfully sent, the red light on the RS232 Recorder will flash once (the blue light may flash synchronously). If the flashing is abnormal, please check the configuration.
RAW Function
- Open the ulog_config.txt file and modify: [write_raw(0,1)]:0 -> [write_raw(0,1)]:1. After successful modification, in addition to storing the received data in the uart_log0000x.txt file, the module will also create a uart_log0000x.bin file on the SD card, which contains no timestamps and only the raw received data.
- Testing: Save the modified ulog_config.txt file, power on to enter ULOG printing mode. After setting the corresponding values in the serial port assistant, open the serial port (the same as in the configuration file), click to open a file, select the file/image to be transmitted (.txt format or .jpg format, other formats are also acceptable), and then send the file. After sending, enter USB drive mode, and you will notice that there is an additional .bin file on the USB drive. You can copy it to the desktop, change the file extension to match the transmitted file, and open the modified file to check if the content matches the transmitted file.
USB Drive Mode
- Insert the SD card while the power is off, press and hold the control button, insert the Type-C data cable, release the button after the board powers on, and enter USB drive mode. At this point, the red light will enter a breathing light state, and the blue light will flash quickly. After the blue light goes out, the USB drive will appear on the PC.
- After entering USB drive mode, you can view the contents of the SD card through "My Computer" -> USB drive without the need for a USB card reader or inserting/removing the SD card.
RTC Time Setting Mode
- Insert the SD card and button battery while the power is off, and connect the RS232 Recorder module directly to a USB-to-RS232 serial module (2nd pin (TXD) to TXD, 3rd pin (RXD) to RXD, 5th pin (GND) to GND; if it doesn't work, try a crossed connection). Press and hold the control button. There are two ways to power on:
- Insert the Type-C data cable, release the button after the board powers on, and enter RTC time setting mode. At this point, the red light will enter a breathing light state, and the blue light will flash quickly.
- Power through the 5.08mm terminal block, release the button after the board powers on, and enter RTC time setting mode. At this point, the red light will enter a breathing light state, and the blue light will remain off.
- Open the serial port debugging assistant and send the AT+22+07+27+11+59+00 command to set the time with a configuration of baud rate 115200, 8 data bits, 1 stop bit, no parity. This command sets the time to 2022-07-27 11:59:00. If the configuration is successful, it will return "Set Time OK: [2022-07-27 11:59:00-xxx]".
Related Software
Precautions
- When there is printing or upon power-up, the blue light will flash. Do not remove the card or disconnect the power when the red light is constantly on, as this may damage some data.
- Insertion and removal of the SD card should be done when the module is powered off.
- The RTC settings of the module can only be configured by sending commands through the RS232 port.
- The module must be connected with a Type-C cable to enter USB drive mode.
- To maintain the RTC clock after power loss, an RTC battery must be installed, with a battery voltage of around 3V.
FAQ
|