RS485 Recorder

From Diustou Wiki
Revision as of 17:21, 15 January 2025 by Yousimaier17 (talk | contribs) (Created page with "{{Product |images=400px |categories= {{Category|RS485}} |brand=Diustou |features= * RS485 Recorder |interfaces= {{Category|RS485}} |relat...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
RS485 Recorder
RS485 Recorder 示意图.png
Information

Categories: RS485

Brand: Diustou

Description
Features
  • RS485 Recorder

Interfaces

RS485

Related products

Product Overview

  • This module is an intelligent storage module that can store data received via the RS485 interface in TXT format onto an SD card, thereby achieving the purpose of recording serial port data. It can be used in scenarios such as environmental monitoring, flow data logging, drone data recording, and various sensor data logging. It can also be paired with microcontroller devices like 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 RS485 interface.
    • Enter USB drive mode via the Type-C interface.
    • Transmit data via the RS485 interface.
  • Onboard control button for switching the module to USB 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 button battery base, supporting RTC for real-time recording of data collection times.
  • Supported Baud Rates: 56000bps – 2Mbps, with a default of 115200.
  • Ability to read files from the TF card without the need for a USB card reader and save them to a specified directory on a computer.
  • Capable of storing files in other formats such as video and audio.
  • Product Dimensions: 56mm*42mm.

Product Description

  • RS485 Recorder 产品说明.png

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.


TTL Recorder ULOG打印模式1.jpg


ULOG Printing Mode

  • Insert the SD card while the power is off, and connect the RS485 Recorder module directly to the USB-to-RS485 serial port module (A-A, B-B; GND connection is not necessary for short-distance transmission). Power the device through a 5.08mm terminal block with 5-32V or via the Type-C interface. Do not press the control button before powering on; the device will enter ULOG printing mode upon powering on. At this point, the red light will flash once, and the blue light will flash rapidly. If the SD card is not inserted when the power is turned on, both the red and blue lights will remain on.
  • After plugging the serial port module into the computer, open the serial port debugging assistant, select the corresponding COM port, and configure it according to the configuration file (follow the diagram below for the first power-on configuration). Once configured, open the serial port, click send, and each successful data transmission will cause the red light on the RS232 Recorder to flash once (the blue light may flash synchronously). If the flashing is abnormal, please check the configuration.

TTL Recorder ULOG打印模式.jpg

RAW Function

  • Open the ulog_config.txt file and modify: [write_raw(0,1)]:0 -> [write_raw(0,1)]:1. After a 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. Set 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 transferred (.txt 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 in the USB drive. You can copy it to the desktop, change the file extension to match that of the transferred file, and open the modified file to check if the content matches the transferred file.

TTL Recorder RAW1.jpg

TTL Recorder RAW2.jpg

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 rapidly. 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.

TTL Recorder U盘2.jpg

RTC Time Setting Mode

  • Insert the SD card and the coin cell battery while the power is off, and connect the RS485 Recorder module directly to the USB-to-RS485 serial port module (A-A, B-B; GND connection is not necessary for short-distance transmission). Press and hold the control button. There are two ways to power on the board:
    • 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 rapidly.
    • 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 115200 baud rate, 8 data bits, 1 stop bit, and no parity. This command sets the time to 11:59:00 on July 27, 2022. A successful configuration will return "Set Time OK: [2022-07-27 11:59:00-xxx]".

TTL Recorder RTC.jpg

Related Software

Precautions

  • When data is being printed or upon power-on, the blue light will flash, and if the red light remains on, do not remove the card or disconnect the power, as this may damage some data.
  • Inserting or removing the SD card should be done while the module is powered off.
  • The RTC settings of the module can only be configured by sending commands through the RS485 port.
  • The module must be connected via 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 approximately 3V.

FAQ

Icon-mail.png Contact Diustou

Our working hours are: 09:00-18:00 (UTC+8 Monday to Saturday)