Hello , Welcome to YiBeiIC Chip Mall ! | Register

Home > Solution > Cantransceiverpca82c250chip Lighting Control System Solution And Short-Range Wireless Communication

Cantransceiverpca82c250chip Lighting Control System Solution And Short-Range Wireless Communication

Auth: Date:2020/3/19 Source:网络 Visit:22 Related Key Words: CANtransceiver PCA82C250T PCA82C250T/YM 82C250 A82C250

Summary:Open-loop control technology of light source products easily causes increase in power consumption and environmental pollution,This paper designed a new type of lighting control system,Overcoming relative decentralization,Management is chaotic,Disadvantages of traditional lighting control systems with low automation,While saving energy,Avoid unnecessary waste,Provide a more intelligent environment for people's production and life。PCA82C250T_416_20181206154900.JPG

1.Foreword

At present, China's lighting electricity consumption accounts for20%-30%,The scene controllers and dimming products produced by Smart Lighting Electric Company basically use open-loop control,Turn on the light source and adjust the light output according to the area requirements,This makes it difficult to achieve the most reasonable illumination in the environment,Usually after adjusting an illumination level,No longer changes the illuminance based on the ambient light intensity。This unreasonable method of controlling the light source,Increased power consumption,Cause a lot of pollution。Wireless sensor network technology is one of the most influential technologies in this century,If wireless sensing technology is applied to lighting control systems,Not only will it greatly reduce costs,And save resources,Avoid unnecessary waste。

The lighting control system proposed in this paper mainly uses short-range wireless communication andCANBus technology,Applied to small ambient light source lighting control,Wireless communication base station。Wireless communication slave station and terminal node。This solution is suitable for small environment light source control,Overcoming low automation。Management is chaotic。Disadvantages of Controlling Relatively Decentralized Traditional Lighting Control Systems,Provide a smarter environment for people's lives。

2.Principle and technology

This research scheme is mainly applied to short-range wireless communication technology andCANBus technology。among them,Short-range wireless communication technology uses low-power short-range wireless communication technology,usenRF905RF transceiver chip。Wireless communication base stationSTC89C52withnRF905Wireless transceiver composition.STC89C52To change the control chip of the base station,Used to generate control signals,And react to the status returned by the slave,Ensure that the lighting source is working properly;nRF905Wireless transceiver is a base station signal transmitting device,bynRF905Complete the sending of control signals and the receiving of the light source status signal sent from the station。

2.1 Short-range wireless communication

With the continuous development of communication and information technology,Application of short-range wireless communication technology continues to accelerate,Increasingly mature。In a general sense,As long as the two sides of the communication send and receive information via radio waves and the transmission distance is limited to a short range(Tens of meters)Within,Short-range wireless communication。

The working frequency of short-range wireless communication technology isISMFrequency band,No license is required to use this frequency band,Usually only required to transmit no more than a certain power(Usually below1W),As long as it does not interfere with other frequency bands。Common short-range wireless communications are often used in the followingISMFrequency band:27MHzFrequency band;2.4GHzBand and315MHz;433MHzwith868MHzIsoband。

2.2 CANbus

CANBus is GermanBOSCHCompany from80A serial data communication protocol developed in the early years to solve the data exchange between many control and test instruments in modern automobiles,It is a multi-master bus,Communication medium can be twisted pair。Coaxial cable or optical fiber。Communication speed up to1MBPS.CANThe bus has a high communication rate。easy to accomplish。A field bus that has formed international standards and has many characteristics such as high cost performance,Is one of the most promising fieldbuses。

3.Optional components

The equipment used in this solution is mainlyPHILIPSSemiconductor productionPCA89C250transceiver.SJA1000Controller and NorwayNordicthe companynRF905Wireless transceiver。

PCA82C250YesCANController's physical interface,Its main role is:giveBUSProvide differential transmission signals,giveCANController provides differential acceptance signal。The chip uses5VDC power,PCA82C50Designed for automotive high-speed communication applications,meets theISO11898standard。

S J A 1 0 0 0Is aC A NIndependent controller,Usually used in the field of automation,Used to control area network control。

SJA1000And controllerBasic CANThe main difference is thatSJA1000providedPelicanNew working mode,In this mode,CANBus conforms to allCAN2.0Bprotocol。

NorwayNordicthe company'snRF905Chips are mainly used in small areas.nRF905Wireless data communication。Wireless alarm and security system。Wireless monitoring。Wireless unlock。Widely used in many fields such as home automation and toys。

4.System hardware

4.1 nRF905通讯模块nRF905与STC89C52单片机硬件接口如图1所示。

采用PCA82C250芯片的照明控制系统及短距离无线通信介绍

4.2 CAN控制收发器

本方案用到的PCA82C250芯片是为CAN协议配置的物理总线接口,能够为CAN总线提供差动发送能力,为SJA1000提供差动接收能力。

图2为SJA1000与PAC82C250组成的硬件图。

采用PCA82C250芯片的照明控制系统及短距离无线通信介绍

5.系统软件

硬件操作需要通过软件来实现。软件的基本操作包括初始化和常规服务两部分。初始化服务包括SJA1000和nRF905两个芯片的初始化,SJA1000发送和接收的配置,nRF905的发送和接收的配置;常规服务包括:无线通信基站。无线通信从站。无线终端节点之间的通信。

5.1 CAN总线

操作初始化SJA1000芯片,配置SJA_MOD寄存器,进入复位模式,确定验收滤波器模式;配置SJA_CDR0寄存器,选择PeliCAN模式,禁止SJA1000的CLKOUT引脚;配置总线定时寄存器波特率设置为125Kbps,配置输出控制寄存器为正常输出模式,TX0为下拉,TX1为下拉;配置命令寄存器释放接收缓冲器,配置验收滤波寄存器。

5.2 无线数据

操作初始化nRF905,nRF905所有配置都是通过SPI接口进行,SPI接口由5个寄存器组成,只有在掉电模式和Standby模式是激活的。置高PWR_UP,置低TRX_CE使nRF905工作于Standby模式.SPI接口包括5个内部寄存器:状态寄存器.RF配置寄存器。发送地址寄存器。发送有效数据寄存器。接收有效数据寄存器。通过配置RF配置寄存器可使nRF905正常运行。

5.3 CAN总线数据发送CAN发送:

发送缓冲器配置分为描述符区和数据区,描述符区第一个字节是帧信息字节,它说明了帧格式(标准帧格式或扩展帧格式)。远程或数据帧和数据长度。标准帧格式有两个字节的识别码,扩展帧格式有4个字节的识别码,数据长度最长为8个字节,发送缓冲器长13个字节。配置发送缓冲器工作在扩展帧格式,发送数据帧,数据长度为8个字节,识别码与下位机匹配,发送数据为nRF905无线接收的数据。检测状态寄存器,接收状态位为0.发送完成状态位为1且发送缓冲器状态位为1,则将发送缓冲器数据放入TX缓冲器,命令寄存器SJA_CMR发送请求位置1,发送数据。

5.4 CAM总线数据接收CAN接收:

中断寄存器SJA_IR接收中断位置高,开始接收RX缓冲区数据,将数据存入接收缓冲区,存储完成后接收缓冲器位置高释放RX缓冲区;释放仲裁丢失捕捉寄存器和错误捕捉寄存器。

5.5 无线数据发送nRF905发送:

TRX_CE=0,TXEN=0,nRF905处于SPI编程;CSN置低,SPI等待一条指令W_TX_PAYLOAD=“00100000”,写TX有效数据,写操作从字节0开始;发送TX缓存存放数据;CSN置高;CSN置低,SPI等待一条指令,W_TX_ADDRESS=“00100010”,写TX地址,全部写操作从字节0开始;发送TX缓存存放地址;CSN置高;TRX_CE置高开始发送;发送完成后TRX_CE置低。

5.6 无线数据接收nRF905接收:

TRX_CE=1,TXEN=0,nRF905 处于接收状态;DR=1&&TRX_CE==1&&TXEN==0是否为1,判断是否有新数据传入且数据接收完成,TRX_CE=0进入Standby模式;CSN置低,SPI等待一条指令,R_RX_PAYLOAD=“00100100”,读RX有效数据,读操作从字节0开始;CSN置高;TRX_CE=1.

5.7 无线通信基站控制常规服务即无线通信基站工作包括:

在完成对nRF905芯片的初始化后使TXEN和TRX_CE引脚置低,nRF905处于SPI编程,将nRF905所发地址及数据写入缓存,置高TRX_CE和TXEN引脚,发送数据,发送不成功则重新发送,如果成功,置低TRX_CE,等待下一个数据发送。

6.系统测试

将CAN收发器单片机的串行接口与PC机串口相连,利用PC机串口通信程序将数据通过串口发送给CAN接收器,实现CAN节点的收发数据测试。串行通信的参数设置为:串口端口号:

1;波特率:9 6 0 0 b p s;数据位:8位;停止位:1位。

在使用串口时先要打开串口,然后将数据传给CAN节点单片机。发送数据中要包含无线控制器的下位机地址和其他控制信息,如在实验中使用的节点地址为0×00020406.其他控制数据为34.34对应的二进制数据为00110100.

实验表明,本方案给出的无线与有线混合的网络控制系统工作正常。

无线通信基站发送0X34到无线通信从站,从站接收信号后通过C A N总线发送至终端节点,终端节点接收并在数码管显示接收数据,并控制下面LED灯相应的暗灭,显示正常发送RXOK信号通过CAN总线传输至无线通信从站,从站将信号发送至基站,基站接收信号并将数码管置零,等待下一个发送信息。

7.小结

该系统能利用有线与无线网络相结合完成对光源的控制,取得了较好的效果,综合了有线和无线网络的各自优点,使得网络控制成本更低。网络利用率更高。系统智能化更强,便于网络的管理和应用,适合学校。家庭。政府。企业等场所应用,该网络结构的应用将具有可观的社会效益和经济效益.

Finished Product Display:
Part No Manufacturer Supplier InvQty/MOQ Saleprice(No Tax)
NRF905-REEL Nordic Semiconductor 1860/1 $1.7077
Price Gradient Saleprice(No Tax))
1 $2.0493
50 $1.9639
100 $1.9297
500 $1.8785
1000 $1.8443
2000 $1.7931
3000 $1.7077
Add To Cart
PCA82C250T/YM,118 NXP Semiconductors 16002/1 $0.2581
Price Gradient Saleprice(No Tax))
1 $0.2581
Add To Cart
SJA1000T/N1 NXP Semiconductors 2406/1 $1.7686
Price Gradient Saleprice(No Tax))
1 $2.1223
50 $2.0339
100 $1.9985
500 $1.9454
1000 $1.9101
2000 $1.8570
3000 $1.7686
Add To Cart
MCP2551T-I/SN Microchip Technology Inc 2210/1 $0.3093
Price Gradient Saleprice(No Tax))
1 $0.3093
Add To Cart
TJA1050T/CM,118 NXP Semiconductors 5667/1 $0.2672
Price Gradient Saleprice(No Tax))
1 $0.2672
Add To Cart
TJA1040T/CM,118 NXP Semiconductors 62532/1 $0.2222
Price Gradient Saleprice(No Tax))
1 $0.2222
Add To Cart

Solution

Product Index :