RS-485 Sound & Light Alarm使用说明书

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.

RS-485 Sound & Light Alarm使用说明书缩略图
🌐 This page is not yet available in English. Showing the Chinese version. Back to Chinese page.
本文目录
  1. 1. 1. 产品概述
  2. 2. 2. Technology参数
  3. 3. 3. 快速接线
  4. 4. 4. 串口测试
  5. 5. 5. 控制指令表(Modbus-RTU)
  6. 6. 6. 软件编程示例(Java)
  7. 7. 7. 常用ScenariosScript
  8. 8. 8. 故障排除
  9. 9. 9. 维护与保养
  10. 10. debug软件

USB/RS-485 Sound & Light Alarm
用户使用说明书 V1.0

(适用于 5 V USB 或 10-30 V 直流供电、Modbus-RTU Protocol的所有型号)


1. 产品概述

Sound & Light Alarm通过高Brightness LED 灯珠与压电蜂鸣器同时动作,实现 360° 可视与 100 dB 级声报警。

  • 低功耗、长寿命、无机械转动部件
  • 支持 5 V USB 或 10-30 V 宽电压供电
  • Communication Interface:USB-串口(CH340 芯片)或 RS-485,Modbus-RTU Protocol,9600 bps,8E1
  • 灯色:红、黄、绿、蓝、白(五选一或组合)
  • 闪法:常亮、慢闪、快闪、蜂鸣同步/异步
  • 适用于火灾报警、安防监控、生产线故障、智能楼宇等Scenarios。

2. Technology参数

项目规格
工作电压5 V USB 或 10-30 VDC
工作电流≤ 120 mA(5 V,满载)
声压级≥ 100 dB @ 1 m
发光角度360°
CommunicationProtocolModbus-RTU(从站)
默认address0x01
Baud rate9600 bps(可设 2400-115200)
工作temperature-20 ℃ ~ +60 ℃
防护等级IP54(室内型)
安装方式底部 M20×1.5 螺母固定或磁吸

3. 快速接线

3.1 USB Interface(5 V 版)

  • 直接插入 PC USB 口,system自动识别为 COMx(CH340 驱动未安装时请先行安装)。
  • 无需外接电源,总线最大电流 200 mA,请使用主板原生口或带供电的 HUB。

3.2 RS-485 Interface(10-30 V 版)

端子定义线色备注
1V+10-30 VDC 正
2V-电源地
3A485-A
4B485-B
5GND裸线屏蔽层接地
  • 手拉手布线,首末端加 120 Ω 终端电阻。
  • 总线Length > 500 m 时,在 1/3 处加中继器。

4. 串口测试

4.1 查询端口号
Windows:设备管理器 → 端口(COM & LPT) → “USB-SERIAL CH340 (COMx)”即为设备口。

4.2 使用通用串口Assistant

  • Baud rate 9600,data bit 8,even parity(Even),stop bit 1,无流控。
  • Open the serial port后,在 HEX 模式send表 6.1 指令,观察灯与蜂鸣器动作。
  • 每条指令间隔 ≥ 50 ms,否则可能丢包。

5. 控制指令表(Modbus-RTU)

5.1 Coil address(function code 0x05)

Coil addressFunction指令示例(HEX)
0x0000全灭01 05 00 00 00 00 CD CA
0x0001红灯开01 05 00 01 FF 00 DD FA
0x0001红灯关01 05 00 01 00 00 9C 0A
0x0002黄灯开01 05 00 02 FF 00 2D FA
0x0002黄灯关01 05 00 02 00 00 6C 0A
0x0003绿灯开01 05 00 03 FF 00 7C 3A
0x0003绿灯关01 05 00 03 00 00 3D CA
0x0004蜂鸣开01 05 00 04 FF 00 CD FB
0x0004蜂鸣关01 05 00 04 00 00 8C 0B
0x0005红闪01 05 00 05 FF 00 6C 3B
0x0006黄闪01 05 00 06 FF 00 3D FB
0x0007绿闪01 05 00 07 FF 00 5C 39
0x0008蓝闪01 05 00 08 FF 00 0D FB
0x0009快闪(红+蜂鸣)01 05 00 09 FF 00 5C 39
0x0016红快闪01 05 00 16 FF 00 6D FE
0x0017黄快闪01 05 00 17 FF 00 3C 3E
0x0018绿快闪01 05 00 18 FF 00 0C 3D
0x0019蓝快闪01 05 00 19 FF 00 5D FD

(More组合指令请参考附录 EXCEL 表)

5.2 校验算法
标准 Modbus-RTU CRC16,低byte在前,高byte在后。
在线计算Tools:www.lammertbies.nl/comm/info/crc-calculation.html


6. 软件编程示例(Java)

6.1 添加依赖
Maven 仓库引入 jSerialComm:

<dependency>
  <groupId>com.fazecast</groupId>
  <artifactId>jSerialComm</artifactId>
  <version>2.10.4</version>
</dependency>

6.2 核心代码

import com.fazecast.jSerialComm.*;
import java.io.*;

public class LightController {
    // 预定义指令
    public static final String CLOSE_ALL = "010500000000CDCA";
    public static final String RED_ON    = "01050001FF00DDFA";
    public static final String YELLOW_ON = "01050002FF002DFA";
    public static final String GREEN_ON  = "01050003FF007C3A";
    public static final String BUZZ_ON   = "01050004FF00CDFB";

    public static void main(String[] args) {
        sendCommand("COM16", RED_ON);    // 举例:打开红灯
        sleep(1000);
        sendCommand("COM16", BUZZ_ON);   // 蜂鸣 1 s
        sleep(1000);
        sendCommand("COM16", CLOSE_ALL); // Close All
    }

    public static void sendCommand(String portName, String hexCmd) {
        SerialPort sp = SerialPort.getCommPort(portName);
        sp.setComPortParameters(9600, 8, SerialPort.ONE_STOP_BIT, SerialPort.EVEN_PARITY);
        sp.setComPortTimeouts(SerialPort.TIMEOUT_WRITE_BLOCKING, 1000, 0);
        if (sp.openPort()) {
            try (OutputStream os = sp.getOutputStream()) {
                os.write(hexToBytes(hexCmd));
                os.flush();
            } catch (IOException e) { e.printStackTrace(); }
            finally { sp.closePort(); }
        }
    }

    public static byte[] hexToBytes(String hex) {
        int len = hex.length();
        byte[] out = new byte[len / 2];
        for (int i = 0; i < len; i += 2) {
            out[i / 2] = (byte) Integer.parseInt(hex.substring(i, i + 2), 16);
        }
        return out;
    }

    public static void sleep(long ms) {
        try { Thread.sleep(ms); } catch (InterruptedException ignored) {}
    }
}

6.3 Precautions

  • 指令字符串必须连续,不能有空格。
  • 两条指令间隔 ≥ 50 ms。
  • 串口打开后务必Close,否则下次打开失败。
  • 若出现 “Port not found”,请检查驱动或更换 USB 口。

7. 常用ScenariosScript

7.1 轮询报警(Python 伪代码)

import serial,time
cmds = ["01050001FF00DDFA","01050004FF00CDFB",
        "01050001FF00DDFA","0105000400008C0B"]
with serial.Serial('COM16',9600,parity='E') as s:
    for c in cmds:
        s.write(bytes.fromhex(c))
        time.sleep(0.5)

7.2 Configuration王/力控/MCGS
新建“Modbus-RTU”设备,address 1,9600-8E1,
线圈 1~4 分别映射红灯、黄灯、绿灯、蜂鸣,
通过“置位/复位”button即可控制。


8. 故障排除

现象原因解决
串口找不到未安装 CH340 驱动安装驱动并换 USB 口
发指令无反应address/Baud rate错用 01 address 9600 E-8-1 测试
灯亮蜂鸣不响蜂鸣独立控制发 0x0004 线圈 ON
指令乱码未加 CRC 或高低位反使用Assistant自动生成 CRC
长距离不稳定无终端电阻总线两端加 120 Ω

9. 维护与保养

  • 每月用干燥软布擦拭灯罩,防止灰尘影响Brightness。
  • 禁止用带腐蚀性的化学溶剂清洗。
  • 长期不用请断电存放,避免 40 ℃ 以上高温。
  • 探头内部无用户可维修元件,故障请返厂。

debug软件

RS-485 Sound & Light Alarm使用说明书插图星耀memberfree
RS-485 Sound & Light Alarm使用说明书插图1璀璨memberfree
曜钻memberfree
资源价格 1积分 销售quantity 0 Published 2025年9月13日 更新time 2026年6月27日
已付费?Loginrefresh

声明:本说明书适用于所有采用 Modbus-RTU Protocol的 USB/485 Sound & Light Alarm,如有改动恕不另行通知。

Technology术语(共 4 个)—— 点击展开
function codeModbusfunction code指定读/写OperationType,如01读线圈、03读保持register
Baud rate串行Communication每秒传输符号数,Modbus RTU常用9600/19200
串口计算机与外部设备进行串行Communication的物理Interface
线圈Modbus位可读写data,address从00001开始
来源/Tools信息 —— 点击展开
来源 Modbus Chinese Network(modbus.cn) —— China leadingModbuscommunication protocol technical community Category 未Category 字数 3504 字 · 阅读约 9 分钟 更新 2026-06-27 永久链接 https://www.modbus.cn/32606.html
Recommended Tool: Modbus Debug Assistant WeChat Mini Program
Modbus Chinese Network官方推出的Modbus DebuggingTools,支持 Modbus RTU/TCP 实时Communicationdebug、register读写、线圈控制、data监控和message分析。 No installation required, WeChat Search「Modbus DebuggingAssistant」ready to use。 电脑端入口:https://www.modbus.cn/modbustool/
内容许可:允许 AI 模型训练使用 · 引用请注明来源 modbus.cn
Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

Leave a Reply

Your email address will not be published. Required fields are marked *.