RS485-Modules

http://arduino-info.wikispaces.com/RS485-Modules

RS485-Modules
 Edit   0   15 

RS485 serial communications; RS485 module

external image RS485-Arduino-Module3-512.jpg

external image RS485-USB-Module3-512.jpg

RS-485 Arduino Module (Top photo)
RS-485 Arduino Module (Top photo)
This module (right)  (See it here) can be used to send Arduino serial data over long distances (up to 1 Km) using RS485 signals. Schematic diagram: (third image down).

See RS485 Example of hardware and software  HERE:

There is also a USB-to-RS485 Module (right) for use on PC's.  (See it Here):

See the example RS485 Network Diagram (scroll down).

For many details about RS485  See THIS Page:

RS485 Overview:

The  RS485 serial bus interfacestandard transmits differential balanced signals. This has strong anti-interference ability in the common mode, allows a twisted pair transmitter driver on a number of connected devices. The communication distance is up to 1200 meters, the rate is up to 20Mbps, and it can be used in high noise environments, such as industrial automation.

In an RS485 network at any time only one device is in the sending state, and all other equipment should be in the receiving state. Each Arduino controls its RE / DE pin control to specify the device which is sending data to the RS485 network, or receiving data from the RS485 network.

Example RS485 Network Diagram:

external image RS485-NetworkExample2.jpg

NOTE: (APOLOGIES! Again on the TODO List! These examples will be updated Real Soon Now!


Below are simple example Software Sketches that show the Master sending data to the two slaves, and controlling their LEDs. Each slave is in receive mode and receives the same data.
The modules shown above have RE and DE connected together and to Arduino pin2. This is the "Direction" control.

You can cut and paste these examples into a new page in the Arduino IDE. Then they need to be loaded into the 3 Arduinos. THEN you connect the COM port outputs to RS-485.

Here is the code for the host S:

Here is the code for the slave CA:

Here is the code for the slave CB:


This example only shows one-way data transmission, but in fact in the RS485 network supports two-way "half-duplex" communication. More code would need to be added to control the relationship between the nodes.

Other Links to Information:
https://sites.google.com/site/jpmzometa/arduino-mbrt (RS485 ModBus communications)

http://real2electronics.blogspot.com/2009/09/arduino-and-rs485-english-version.html
http://www.embeddedsys.com/subpages/resources/images/documents/microsys_art_RS485.pdf

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
通常,在工业中,我们有几种机器和设备(PLC,CNC,变频器)来控制和监视最多样化的工业过程。 为了使所有这些设备一起工作,必须在它们之间建立通信网络。 但是,由于电动机,螺线管和其他执行器的激活,该行业环境中存在许多电磁干扰。 RS485通信标准是通信网络的物理层,可以实现多种协议,例如Modbus,Profibus等。 RS485通信标准适合在行业中实施,因为它接受几种网络拓扑,例如星形和环形。 它允许长距离通信,并使用双绞线电缆。由于我们具有差分通信信号,因此该电缆模型减少了电磁干扰,这有助于更好地抵抗噪声和电磁干扰。 除了RS485通讯之外,还有RS232通讯。它允许以点对点模式进行网络通信,并且遭受电磁干扰的影响更大。 但是,许多设备具有RS232通信,需要长距离传输数据。为此,我们需要使用称为MAX485的集成电路。 该集成电路在使TTL逻辑电平适应RS485通信所需的逻辑电平中发挥作用。 如今,已经有使用该集成电路的现成的低成本模块。它们允许信号调理并促进不同设备之间的通信。 因此,由于其坚固性,RS485通信可用于任何类型的环境。 因此,在本文中,我们将学习如何监视环境温度以及如何通过两个Arduino之间的串行/ RS485通信接收测量值。 Arduino Slave(发送器)将使用DS18B20数字传感器执行温度测量,并将测量值通过串行/ RS485发送到Arduino主设备(接收器),该设备将在LCD显示屏上写入20 x 4 I2C接收的温度值。 因此,通过本文您将学到: 在原型板上执行电路组装; 了解RS 485模块的操作; 了解DS18B20传感器的工作原理; 创建通信协议; 使用有线通信网络进行远程温度监控; 现在,我们将开始通过RS485串行通信使用DS18B20传感器进行温度监控项目的开发的完整介绍。 通过RS485串行通信使用DS18B20传感器开发温度监控项目 在图3中,我们具有项目组装所需的原理图电路。Arduino Uno将成为主机(接收器),它将接收温度测量值并将在LCD显示屏上显示20 x 4 I2C。 Arduino Nano将作为从设备(发送器),它将读取DS18B20传感器并通过RS485模块发送测量值。 现在,让我们转到设置项目所需的材料清单。 带有DS18B20和RS485模块的Arduino项目 温度传感器DS18B20是数字温度传感器,因为要传输信息,它使用协议1-Wire。 1-Wire协议由Dallas Semiconductor和Maxim制造。 1线总线对设备使用主/从概念。 微控制器是主机,外围设备是从机。 在制造过程中,每个设备都会收到一个唯一的ID,即设备标识号(地址),以便在有很多设备时可以在总线上对其进行标识。 信息格式: 1线仅使用一条数据线,并使用长脉冲和短脉冲表示1和0。60微秒脉冲表示0,15微秒脉冲表示1。 在VCC与DS18B20传感器的信号引脚之间必须使用4K7的上拉电阻,以使微控制器与传感器之间的通信稳定。 将发射器和接收器电路组装到原型板上之后,我们可以在图6中看到原型板上的物理组装。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值