ماژول رله 4 کانال با رابط TTL/RS485
ماژول رله 4 کانال با رابط TTL/RS485 ماژول رله 4 کانال با رابط TTL/RS485 ماژول رله 4 کانال با رابط TTL/RS485

ماژول رله 4 کانال با رابط TTL/RS485

[MOD-08-005]
گارانتی اصالت و سلامت فیزیکی کالا جزئیات
30 هزار تومان تخفیف اولین خرید با کد HELLO (حداقل خرید 300 هزار تومان)
موجودی: موجود نیست
کد انبار
MOD-08-005
محصولات مرتبط
ماژول رله ماسفت ایزوله FR120N/LR7843/AOD4184
ماژول رله ماسفت ایزوله FR120N/LR7843/AOD4184
امتیاز:
87%
‎45٬300 تومان
ماژول ماسفت قدرت High-Power MOSFET
ماژول ماسفت قدرت High-Power MOSFET
امتیاز:
100%
‎36٬190 تومان

ماژول رله 4 کانال با رابط TTL/RS485 یک ماژول رله چندکاره و قابل اعتماد است که برای برنامه‌های مختلف که نیاز به پروتکل‌های ارتباطی قوی و عملکرد با کارایی بالا دارند، طراحی شده است. این ماژول مجهز به یک میکروکنترلر 8 بیتی و چیپ تبدیل سطح MAX485 است و از پروتکل استاندارد Modbus RTU پشتیبانی می‌کند. این ماژول از طریق رابط‌های RS485 و TTL UART ارتباط برقرار می‌کند و با سرعت پیش‌فرض 9600bps کار می‌کند که قابل تنظیم به 4800 یا 19200bps است. همچنین تنظیمات آن پس از قطع برق حفظ می‌شود. ماژول از دامنه وسیعی از سیگنال‌های ورودی پشتیبانی می‌کند و انواع حالت‌های خروجی رله را برای کارایی انعطاف‌پذیر و مؤثر ارائه می‌دهد.

مشخصات فنی ماژول رله 4 کانال با رابط TTL/RS485

  • میکروکنترلر: میکروکنترلر 8 بیتی داخلی
  • چیپ تبدیل سطح: MAX485
  • پروتکل ارتباطی: Modbus RTU
  • رابط ارتباطی: RS485/TTL UART
  • سرعت ارتباطی: 4800/9600/19200 (پیش‌فرض 9600bps)
  • دامنه سیگنال ورودی اپتوکاپلر: DC 3.3-30V
  • سیگنال خروجی: سیگنال سوئیچ رله (حالت‌های دستی، فلش خاموش، فلش روشن)
  • دامنه آدرس دستگاه: 1-255 (پیش‌فرض 255)
  • مشخصات رله: 5V، 10A/250V AC، 10A/30V DC
  • طول عمر فعال‌سازی رله: 100,000 بار
  • محافظت: محافظت از اضافه‌بار دیودی
  • شاخص‌ها: نشانگر وضعیت سوئیچ رله داخلی
  • ولتاژ تأمین: DC 7-24V (با حفاظت از ورودی معکوس)
  • ابعاد: ابعاد: ---

دستورالعمل‌های Modbus RTU

دستگاه Modbus داده‌ها را از یک ترمینال کنترل خارجی (مانند کامپیوتر میزبان/میکروکنترلر) دریافت کرده و عملیات را انجام می‌دهد. یک دستورالعمل فریم شامل آدرس دستگاه، کد عملکرد، آدرس رجیستر، داده رجیستر و کد بررسی CRC است. اولین بایت آدرس دستگاه است (1-255، پیش‌فرض 255 یا 0xFF)، و دو بایت آخر کد بررسی CRC هستند.

دستورالعمل‌های معمول Modbus RTU عبارتند از:

  • روشن کردن رله شماره 1 (حالت دستی): ارسال: FF 05 00 00 FF 00 99 E4، فیدبک: FF 05 00 00 FF 00 99 E4
  • خاموش کردن رله شماره 1 (حالت دستی): ارسال: FF 05 00 00 00 00 D8 14، فیدبک: FF 05 00 00 00 00 D8 14
  • روشن کردن رله شماره 2 (حالت دستی): ارسال: FF 05 00 01 FF 00 C8 24، فیدبک: FF 05 00 01 FF 00 C8 24
  • خاموش کردنرله شماره 2 (حالت دستی): ارسال: FF 05 00 01 00 00 89 D4، فیدبک: FF 05 00 01 00 00 89 D4
  • روشن کردن همه رله‌ها: ارسال: FF 0F 00 00 00 08 01 FF 30 1D، فیدبک: FF 0F 00 00 00 08 41 D3
  • خاموش کردن همه رله‌ها: ارسال: FF 0F 00 00 00 08 01 00 70 5D، فیدبک: FF 0F 00 00 00 08 41 D3
  • تنظیم آدرس دستگاه به 1: ارسال: 00 10 00 00 00 01 02 00 01 6A 00، فیدبک: 00 10 00 00 00 01 02 00 01 6A 00
  • تنظیم آدرس دستگاه به 255: ارسال: 00 10 00 00 00 01 02 00 FF EB 80، فیدبک: 00 10 00 00 00 01 02 00 FF EB 80

دستورالعمل‌های ساده برای استفاده

  • VCC و GND را به ترمینال‌های مثبت و منفی منبع تغذیه وصل کنید.
  • A+ و B- را به انتهای خروجی ماژول USB به RS485 متصل کنید.
  • نرم‌افزار "Modbus RTU Configuration Tool" را باز کرده، پورت صحیح را انتخاب کرده و سرعت ارتباطی را روی 9600 تنظیم کنید. آدرس را روی 255 تنظیم کرده و "Open Serial Port" را کلیک کنید.
  • با کلیک بر روی "JD1 Open"، رله 1 روشن می‌شود و نشانگر آن روشن می‌شود.

تولید کد بررسی CRC

دستورات Modbus RTU را می‌توان با استفاده از نرم‌افزارهای آماده مانند "Modbus RTU Configuration Tool" ارسال کرد که به‌طور خودکار کد بررسی CRC را تولید می‌کنند. برای تولید دستی کد بررسی CRC، از نرم‌افزارهای دیباگ پورت سریال مانند SSCOM استفاده کنید.

The TTL/RS485 4-Channel Relay Module is a versatile and reliable relay module designed for various applications requiring robust communication protocols and high-efficiency performance. Equipped with an onboard 8-bit MCU and MAX485 level conversion chip, this module supports the standard Modbus RTU protocol and offers communication interfaces through RS485 and TTL UART. It operates at a default baud rate of 9600bps and can be adjusted to 4800 or 19200bps, with settings retained after power-off. The module supports a wide input signal range and offers multiple relay output modes, ensuring flexible and efficient operation.

Specifications of TTL/RS485 4-Channel Relay Module

  • MCU: 8-bit onboard MCU
  • Level Conversion Chip: MAX485
  • Communication Protocol: Modbus RTU
  • Communication Interface: RS485/TTL UART
  • Communication Baud Rate: 4800/9600/19200 (default 9600bps)
  • Optocoupler Input Signal Range: DC 3.3-30V
  • Output Signal: Relay switch signal (manual, flash-off, flash-on modes)
  • Device Address Range: 1-255 (default 255)
  • Relay Specifications: 5V, 10A/250V AC, 10A/30V DC
  • Relay Activation Life: 100,000 times
  • Protection: Diode overflow protection
  • Indicators: Onboard relay switch indicator light
  • Power Supply Voltage: DC 7-24V (with input anti-reverse protection)
  • Dimensions: ---

Modbus RTU Instruction Introduction

The Modbus device receives data from an external control terminal (e.g., host computer/MCU) to execute operations. A frame instruction consists of the device address, function code, register address, register data, and a CRC check code. The first byte is the device address (1-255, default 255 or 0xFF), and the last two bytes are the CRC check code.

Assuming the device address is 255, common Modbus RTU instructions are:

  1. Turn on relay No. 1 (manual mode)

    • Send: FF 05 00 00 FF 00 99 E4

    • Return: FF 05 00 00 FF 00 99 E4

    • Remarks: The 3-4 bytes represent the relay address, and the 5-6 bytes represent data (0xFF00 for on, 0x0000 for off).

  2. Close relay No. 1 (manual mode)

    • Send: FF 05 00 00 00 00 D8 14

    • Return: FF 05 00 00 00 00 D8 14

  3. Turn on relay No. 2 (manual mode)

    • Send: FF 05 00 01 FF 00 C8 24

    • Return: FF 05 00 01 FF 00 C8 24

  4. Close relay No. 2 (manual mode)

    • Send: FF 05 00 01 00 00 89 D4

    • Return: FF 05 00 01 00 00 89 D4

  5. Turn on all relays

    • Send: FF 0F 00 00 00 08 01 FF 30 1D

    • Return: FF 0F 00 00 00 08 41 D3

  6. Close all relays

    • Send: FF 0F 00 00 00 08 01 00 70 5D

    • Return: FF 0F 00 00 00 08 41 D3

  7. Set the device address to 1

    • Send: 00 10 00 00 00 01 02 00 01 6A 00

    • Return: 00 10 00 00 00 01 02 00 01 6A 00

  8. Set the device address to 255

    • Send: 00 10 00 00 00 01 02 00 FF EB 80

    • Return: 00 10 00 00 00 01 02 00 FF EB 80

  9. Read the device address

    • Send: 00 03 00 00 00 01 85 DB

    • Return: 00 03 02 00 FF C5 C4

  10. Read relay status

    • Send: FF 01 00 00 00 08 28 12

    • Return: FF 01 01 01 A1 A0

  11. Read the optocoupler input status

    • Send: FF 02 00 00 00 08 6C 12

    • Return: FF 02 01 01 51 A0

  12. Set the baud rate to 4800

    • Send: FF 10 03 E9 00 01 02 00 02 4A 0C

    • Return: FF 10 03 E9 00 01 C5 A7

  13. Set the baud rate to 9600

    • Send: FF 10 03 E9 00 01 02 00 03 8B CC

    • Return: FF 10 03 E9 00 01 C5 A7

  14. Set the baud rate to 19200

    • Send: FF 10 03 E9 00 01 02 00 04 CA 0E

    • Return: FF 10 03 E9 00 01 C5 A7

  15. Read baud rate

    • Send: FF 03 03 E8 00 01 11 A4

    • Return: FF 03 02 00 04 90 53

  16. Open relay No. 1 (flash mode 2S)

    • Send: FF 10 00 03 00 02 04 00 04 00 14 C5 9F

    • Return: FF 10 00 03 00 02 A4 16

  17. Close relay No. 1 (flash mode 3S)

    • Send: FF 10 00 03 00 02 04 00 02 00 1E A5 99

    • Return: FF 10 00 03 00 02 A4 16

Simple Instructions for Use

  1. Connect VCC and GND to the power supply's positive and negative poles respectively.

  2. Connect A+ and B- to the output end of the USB to RS485 module.

  3. Open the host computer software "Modbus RTU Configuration Tool", select the correct port number and set the baud rate to 9600. Set the address to 255, and click "Open Serial Port".

  4. Click "JD1 Open" to turn on relay 1, and the indicator light of relay 1 will light up.

Generating CRC Check Code

Modbus RTU commands can be sent using ready-made host computer software (e.g., Modbus RTU configuration tool) that automatically generates the CRC check code. To manually generate a CRC check code for testing using serial port debugging software (e.g., SSCOM):

  1. The sending frame composition for turning on/off the relay (manual mode) is: Device address (1Byte) + function code (1Byte) + register address (2Byte) + register data (2Byte) + CRC check code (2Byte)

  2. Assuming the device address is 0xFF, the first 6 bytes of the sent frame are: FF 05 00 00 FF 00

  3. Use a CRC check tool to find the check code for these 6 bytes: CRC Check Tool

  4. Exchange the high and low byte positions of the check calculation result E499 to get the CRC check code 99E4. The complete send frame is: FF 05 00 00 FF 00 99 E4

Send the frame to the Modbus relay module through the serial port debugging software SSCOMV5.13.1

Write Your Own Review
تنها کاربرانی که ثبت نام کرده اند می توانند دیدگاه خود را بنویسند. لطفا وارد شوید یا یک حساب کاربری ایجاد کنید
پرسش و پاسخ
سوالی پرسیده نشده است
برای ثبت پرسش خود، لازم است ابتدا وارد سایت شوید