CN100382546C - Infrared communication gateway based on CAN network - Google Patents

Infrared communication gateway based on CAN network Download PDF

Info

Publication number
CN100382546C
CN100382546C CNB2005100184792A CN200510018479A CN100382546C CN 100382546 C CN100382546 C CN 100382546C CN B2005100184792 A CNB2005100184792 A CN B2005100184792A CN 200510018479 A CN200510018479 A CN 200510018479A CN 100382546 C CN100382546 C CN 100382546C
Authority
CN
China
Prior art keywords
data
infrared communication
network
infrared
interface
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2005100184792A
Other languages
Chinese (zh)
Other versions
CN1716923A (en
Inventor
黄涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Royelek Electronics Co Ltd
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CNB2005100184792A priority Critical patent/CN100382546C/en
Publication of CN1716923A publication Critical patent/CN1716923A/en
Application granted granted Critical
Publication of CN100382546C publication Critical patent/CN100382546C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Mobile Radio Communication Systems (AREA)
  • Optical Communication System (AREA)

Abstract

The present invention relates to an infrared communication gateway based on a CAN network, which comprises a CAN site network interface, an infrared communication interface and a monolithic computer, wherein the monolithic computer is arranged between a CAN site network interface and the infrared communication interface and converts CAN data protocols to infrared communication data protocols or converts the infrared communication data protocols to the CAN data protocols. The present invention has the advantages that the present invention connects CAN nodes or the CAN network which are not suitable for wire connection through the infrared communication interface, and realizes data transmission between the CAN nodes and a CAN backbone network or the CAN network. The present invention can be used for the connection of vehicle wireless CAN network nodes based on the infrared communication interface, and can transmit and convert the measure and control data of the nodes based on the CAN protocols to the CAN backbone network through the infrared interface. The present invention has the advantages of strong ability of electromagnetic interference prevention, high reliability, low cost, strong directivity, convenient connection and simple use, and can adapt to the requirements of different control modules and car models as needed.

Description

Infrared communication gateway based on the CAN network
Technical field
The present invention relates to network access device, especially for the gateway that connects CAN network access device and infrared communication device.
Background technology
Controller area network network (CAN Controller Area Network) be German Bosch company from the beginning of the eighties for solving a kind of serial data communication agreement that control numerous the Hyundai Motor and the exchanges data between the tester are developed.In September, 1991 PHILIP company formulate and song cloth CAN technical specification 2.0A, B version, 2.0A has provided the CAN message format of definition in CAN technical specification release 1.2 once, 20B has defined two kinds of message formats of the expansion of standard; In November, 1993, International Organization for Standardization was formally issued the ISO11898 standard about the CAN bus, used for standardization, the standardization of CAN bus and had paved road.CAN bus communication medium can be twisted-pair feeder, coaxial cable and optical fiber, and communication distance can reach 10km (5kbps) farthest, and flank speed can reach 1M bps (40m); Replace traditional station address coded system with the data block coding coding mode, define 211 or 1129 different data blocks, allow each node receive the data of designated identification sign indicating number respectively by the method for filtering with the identification code of 11 or 29 bits composition.The CAN bus is an open system, but there is not strictness to follow the seven layer reference model of the open system interconnection of International Organization for Standardization (OSI), for the consideration to real-time and factor such as reduce cost, the CAN bus has only adopted the two-layer of most critical wherein, i.e. physical layer and data link layer.
At present, can only wired connection between each node on the CAN network.
Infrared communication generally adopts the near infrared ray in the infrared band, and wavelength is between 0.75um to 25um.After Infrared Data Association (IRDA) sets up, for the infrared product that guarantees different vendor can obtain best communication effect, the infrared communication agreement is limited to the scope of the optical wavelength that the infrared data communication is adopted within the 850nm to 900nm, but because ultrared wavelength is shorter, diffracting power to barrier is poor, so be more suitable for being applied in the occasion that needs short-distance wireless communication, carry out point-to-point straight line transfer of data.That infrared communication has is with low cost, easy to connect, be simple and easy to and the characteristics of compact conformation, therefore in small-sized mobile device, obtained to use widely.1993, initiate to have set up (the Infrared Data Association of Infrared Data Association by companies more than 20 such as HP, COMPAQ, INTEL, be called for short IRDA), on June 28th, 1993, the kickoff meeting of Infrared Data Association has been attended in representative from 120 multidigits of 50 many enterprises, and just sets up unified infrared communication typical problem and be in agreement.After 1 year, the issue of the infrared data communication standard of first IRDA, i.e. IRDA1.0.
IRDA1.0 abbreviates SIR (Serial InfraRed) as, and it is based on a kind of asynchronous, the semiduplex infrared communication mode that HP-SIR develops.SIR is a support with the asynchronous communication transceiver (UART) of system, by to the compression of the waveform of serial data pulse with the waveform of the light signal electric pulse that received is expanded this coding and decoding process (3/16 EnDec) realize the infrared data transmission.Because be subjected to the restriction of UART communication speed, the highest communication speed of SIR has only 115.2Kbps, the flank speed of everybody the computer serial port known just.1996, IRDA issued the IRDA1.1 standard, and promptly Fast InfraRed abbreviates FIR as.Compare with SIR, because FIR no longer relies on UART, its highest communication speed has had qualitative leap, can reach the level of 4Mbps.FIR has adopted brand-new 4PPM modulation (Pulse Position Modulation), promptly distinguish the data message that is transmitted by the phase place of analyzing pulse, its Principle of Communication and SIR are distinct, but because the speed of FIR below 115.2Kbps still adopts the sort of coding and decoding process of SIR, so it still can carry out communication with the low-speed device of supporting SIR, only when communication the other side also supports FIR, just communication speed is risen to higher level.
Summary of the invention
Technical problem to be solved by this invention is: a kind of infrared communication gateway based on the CAN network is provided, it can will be not suitable for the CAN node or the CAN network of wired connection, couple together by the infrared communication interface, and the wireless data transmission between realization CAN node and CAN backbone network or the CAN network.
The present invention solves the problems of the technologies described above the technical scheme that is adopted:
Based on the infrared communication gateway of CAN network, it comprises: CAN field network interface, infrared communication interface, single-chip microcomputer; Single-chip microcomputer is arranged between CAN field network interface and the infrared communication interface;
Described CAN field network interface is for receiving, send the network interface of CAN protocol data;
Described infrared communication interface is for receiving, send the communication interface of infrared communication protocol data;
Described single-chip microcomputer is the single-chip microcomputer that converts the CAN protocol data to the infrared communication protocol data or the infrared communication protocol data transaction is become the CAN protocol data.
This gateway working method is: the CAN field network interface of gateway is realized the transmission and the verification of the CAN packet of CAN node or other CAN network, and give single-chip microcomputer with packet, single-chip microcomputer carries out the infrared communication protocol encapsulation with the CAN protocol analysis and to data, sends out by the infrared communication interface then.Perhaps, accept the infrared data based on the CAN agreement of Radio infrared CAN node or the transmission of other CAN network by the infrared communication interface of gateway, by single-chip microcomputer it is carried out verification and unpack after be converted to standard CAN field network data, send on CAN node or the CAN network by CAN field network interface again.
The present invention has following advantage: it can couple together by the infrared communication interface being not suitable for the CAN node or the CAN network of wired connection, and realizes the transfer of data between this CAN node and CAN backbone network or the CAN network.Can be used for connecting onboard wireless CAN network node, such node can be transmitted and be transformed into the CAN backbone network based on the measuring and control data of CAN agreement by infrared interface based on the infrared communication interface.Its anti-electromagnetic interference capability is strong; The reliability height; With low cost; High directivity; Easy to connect; Be simple and easy to use; Can adapt to the requirement of different control module and vehicle as required.
Description of drawings
Fig. 1 is the block diagram of the main system configuration of the embodiment of the invention
Fig. 2 is CAN field network interface structure figure
Fig. 3 is Infrared Wireless Communication interface structure figure
Fig. 4 is the system configuration block diagram of embodiment of the invention user mode
Fig. 5 is CAN field network interface principle figure
Fig. 6 is Infrared Wireless Communication interface and embedding protocol converter schematic diagram
Fig. 7 is CAN protocol detection and conversion program flow chart
Fig. 8 is that infrared protocol detects and the conversion program flow chart
Fig. 9 is the CAN data frame format
Figure 10 is infrared coding figure
Figure 11 is infrared decoding figure
Embodiment
Embodiment of the invention gateway as shown in Figure 1, it comprises: CAN field network interface, infrared communication interface, single-chip microcomputer (protocol converter); Single-chip microcomputer is arranged between CAN field network interface and the infrared communication interface, and single-chip microcomputer is an embedded scm.
Described CAN field network interface is for receiving, send the network interface of CAN protocol data;
Described infrared communication interface is for receiving, send the communication interface of infrared communication protocol data;
Described single-chip microcomputer is the single-chip microcomputer that converts the CAN protocol data to the infrared communication protocol data or the infrared communication protocol data transaction is become the CAN protocol data.
Described CAN field network interface comprises the interface circuit that network packet receives, sends as shown in Figure 2; The data that receive or transmit are carried out the buffer circuit of anti-interference process; Receive, transmit the field network protocol encoding and decoding interface circuit of CAN2.0A/B normal data bag.
Described Infrared Wireless Communication interface comprises the physical layer interface circuit of reception, transmission infrared signal as shown in Figure 3; The coding-decoding circuit of IFRD1.1 protocol data; The clock of infrared interface and control circuit.Described embedded scm comprises: data and program storage, peripheral interface circuit, embedded OS, protocol conversion and encoding and decoding software systems.
Embodiment of the invention user mode as shown in Figure 4, it is CAN node and the CAN node bus network connection device by infrared communication.
Certainly, also can couple together between the CAN bus network by the mode of embodiment of the invention gateway with infrared communication.
As shown in Figure 5, on-the-spot subnet interface circuit U 11 adopts the 82C250 chip, and on-the-spot subnet interface buffer circuit U8, U9 adopt 6N 137 chips, and CAN protocol chip U5 adopts the SJA1000 chip.Workflow is as follows: gateway can transmit data at any one time by arbitrary node on CAN network interface and the CAN bus, do not conflict for guaranteeing that data transmit between this many host nodes, the CAN controller carries out bus access according to priority, any moment has only the unique node (this moment, this node was a host node) that obtains bus control right could send data on bus, guarantees the flexibility of communication; The short frame of The data sends, and data length mostly is 8 bytes most, can satisfy the requirement of control command, data in the common automobile, and this short frame transmits the real-time that has guaranteed communication; The CAN agreement adopts the CRC check and the strong error processing capacity is provided, and has guaranteed reliability of data communication.The maximum characteristics of CAN agreement are to have abolished traditional station address coding, and the communicating data block in generation is encoded, and the identification code of data block can be made up of 11 or 29 bits, so definable 211 or 229 different data blocks.
As shown in Figure 6, infrared receiving/transmission interface U14 adopts TM4100/TR2, and infrared protocol coding-decoding circuit U9 adopts MCP2120.Workflow is as follows: by the infrared communication data that TM4100/TR2 acceptance is sent by infrared CAN node, and this data-interface and IrDA1.2 compatibility, transmission rate can reach 115.2kbps.Send these data to MCP2120, data are carried out simple verification and decoding, send embedded protocol converter then to by MCP2120.Perhaps, receive the packet that protocol converter sends, and asynchronous continuous data flow is encoded, make each data bit can both convert the pulse that meets infrared standard to, and transmit a TM4100/TR2, send to corresponding infrared CAN node by it by MCP2120.
As shown in Figure 6, embedded protocol converter is made up of CPU (U1), program storage (U3) and data storage (U4).
CAN agreement monitoring and conversion work flow process be as shown in Figure 7: after gateways and starting is finished initialization, search for remote server in local area network (LAN) inside according to given operational factor, and set up network with it and connect, the data of CAN bus are converted to the data of network format, according to regularly sending with two kinds of data-transmission modes of burst, simultaneously remote monitoring data and operational order are converted to the CAN bus format, are dealt on the CAN bus.Finish the format conversion of data and order.
Infrared protocol monitoring and conversion work flow process be as shown in Figure 8: adopt interrupt mode to realize data communication.System initial state is set to wait for the state that receives data that when data were come, system directly got off Data Receiving.If the transmission data are then given control signal of infrared transmission module by fault diagnosis system, just begin to send data then.Perhaps, receive with the sign log-on data by interrupting, the size of specified data and initial address then, and data are deposited in the memory of appointment according to certain form.Data format is the size of data counter of two bytes, after connect data, connect the verification of a byte again.Consider the passivity that receives data in the real work, our system initial state is set to wait for the state that receives data, with the external interrupt response state of system is changed into the transmission data mode, and we just can realize sending the initiative of data like this.For the ease of the operating state of observing system, we are provided with a LED lamp and come the state of indication mechanism.
CAN/ infrared protocol data transaction is in the following way: Frame carries data from the transmitter to the receiver as shown in Figure 9, and the RTR position is " recessiveness " position, the numeric representation of data length sign indicating number DLC be the DLC value of corresponding data frame; Node on the CAN bus can be in reception, transmission, mistake activation, mistake approval and bus and close this five kinds of states, and wherein back three kinds is the fault state.Any one node is after detecting the bus free time (continuous 7 " recessiveness " position), just can send data, enter transmit status, what at first send is a start of frame bits (" dominance " position), as the synchronizing signal of other all the node transceive data on the bus, other nodes also can send data simultaneously.Sending the arbitration field interval, the every transmission one digit number of node certificate, the testbus state if detected state is consistent with the data bit of transmission, then continues to send the next bit data simultaneously, if what send is " recessiveness " position, and detected be " dominance " when position, show that this node clashes with the node with higher priority, then withdraws from transmission automatically on data/address bus, change accepting state over to, wait for sending data when bus is idle more next time.All be provided with in the interface circuit of each node and send make mistakes counter and the reception counter of makeing mistakes.When node detects mistake in receiving course, receive the counter of makeing mistakes and add 1, send out mismark simultaneously, if receive the message success, then receive the counter of makeing mistakes and subtract 1 (reducing to till 0); When node during in transmit status, send an error flag, then send the counter of makeing mistakes and add 8, and successfully send a message, send the counter of makeing mistakes and subtract 1; When the value of two counters all less than 128 the time, node is in " mistake activation " state, normally transceive data; When the value of any one counter more than or equal to 128 the time, node is in " mistake approval " state, still normal transceive data; When the value of transmitting counter more than or equal to 256 the time, node becomes " bus is closed not busy " state, sends driver and closes the spare time automatically, no longer influences bus, but still can the testbus state.After detecting on the bus 11 continuous " recessiveness " positions and taking place 128 times, two error counters are clear 0, and node is automatically changeb to " mistake activation " state from " bus is closed " state.
The infrared communication encoding and decoding are in the following way: coding as shown in figure 10, if the transmission low level, then TXIR will export the low level of 7 clock cycle, the high level of 3 clock cycle then, 6 remaining clock cycle are low level.If transmission high level, then TXIR whole output low levels (16 clock cycle constitute a bit time) in 16 clock cycle.Decode as shown in figure 11, if the low level of receiving, then RXIR will export the low level of 3 clock cycle, remaining maintenance high level; If receive high level, then RXIR is a high level all in 16 clock cycle, and RX will keep corresponding high or low level in 16 clock cycle.

Claims (3)

1. based on the infrared communication gateway of CAN network, it comprises: CAN field network interface, infrared communication interface is characterized in that: it also comprises single-chip microcomputer; Single-chip microcomputer is arranged between CAN field network interface and the infrared communication interface;
Described CAN field network interface is for receiving, send the network interface of CAN protocol data;
Described infrared communication interface is for receiving, send the communication interface of infrared communication protocol data;
Described single-chip microcomputer is the single-chip microcomputer that converts the CAN protocol data to the infrared communication protocol data or the infrared communication protocol data transaction is become the CAN protocol data.
2. gateway according to claim 1 is characterized in that: single-chip microcomputer is an embedded scm.
3. gateway according to claim 1 is characterized in that: the network interface of the on-the-spot node of network interface that described CAN field network interface is the CAN fieldbus or CAN.
CNB2005100184792A 2005-03-30 2005-03-30 Infrared communication gateway based on CAN network Expired - Fee Related CN100382546C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100184792A CN100382546C (en) 2005-03-30 2005-03-30 Infrared communication gateway based on CAN network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100184792A CN100382546C (en) 2005-03-30 2005-03-30 Infrared communication gateway based on CAN network

Publications (2)

Publication Number Publication Date
CN1716923A CN1716923A (en) 2006-01-04
CN100382546C true CN100382546C (en) 2008-04-16

Family

ID=35822354

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100184792A Expired - Fee Related CN100382546C (en) 2005-03-30 2005-03-30 Infrared communication gateway based on CAN network

Country Status (1)

Country Link
CN (1) CN100382546C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101895549A (en) * 2010-07-21 2010-11-24 中国北车股份有限公司大连电力牵引研发中心 Conversion gateway and conversion method of vehicle communication network data

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103312830A (en) * 2012-03-15 2013-09-18 辽宁省电力有限公司大连供电公司 Device capable of realizing automatic filtering of frame categories and MAC (media access control) addresses
CN105223911A (en) * 2014-06-24 2016-01-06 北车大连电力牵引研发中心有限公司 Track traffic communication system and data processing method
CN110497938A (en) * 2019-08-26 2019-11-26 湖南中车时代通信信号有限公司 A kind of quality real-time monitoring diagnostic method, device and computer readable storage medium for Locomotive Running Monitor System
CN113259216B (en) * 2021-06-29 2021-09-10 微企(天津)信息技术有限公司 CAN bus signal analysis method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000194458A (en) * 1998-12-25 2000-07-14 Rohm Co Ltd Electronic device having irda system communication function, externally mounted communication equipment for adding irda system communication function and its adding method
US20020060625A1 (en) * 1995-11-09 2002-05-23 Vehicle Enhancement Systems, Inc. Apparatus and method for data communication between vehicle and remote data communication terminal
CN1377144A (en) * 2001-03-28 2002-10-30 国际商业机器公司 Bluetooth adaptor for infrared interface and communication method therefor
CN1434609A (en) * 2003-01-21 2003-08-06 武汉理工大学 Embedded in situ bus gateway

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020060625A1 (en) * 1995-11-09 2002-05-23 Vehicle Enhancement Systems, Inc. Apparatus and method for data communication between vehicle and remote data communication terminal
JP2000194458A (en) * 1998-12-25 2000-07-14 Rohm Co Ltd Electronic device having irda system communication function, externally mounted communication equipment for adding irda system communication function and its adding method
CN1377144A (en) * 2001-03-28 2002-10-30 国际商业机器公司 Bluetooth adaptor for infrared interface and communication method therefor
CN1434609A (en) * 2003-01-21 2003-08-06 武汉理工大学 Embedded in situ bus gateway

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
隧道列车运行位置监测系统研究. 程庆,黄河,吴平友.微计算机应用,第25卷第4期. 2004 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101895549A (en) * 2010-07-21 2010-11-24 中国北车股份有限公司大连电力牵引研发中心 Conversion gateway and conversion method of vehicle communication network data
CN101895549B (en) * 2010-07-21 2014-06-11 中国北车股份有限公司大连电力牵引研发中心 Conversion gateway and conversion method of vehicle communication network data

Also Published As

Publication number Publication date
CN1716923A (en) 2006-01-04

Similar Documents

Publication Publication Date Title
CN100382546C (en) Infrared communication gateway based on CAN network
CN103714029B (en) Novel two-line synchronous communication protocol and application
CN101719922B (en) Device and method of protocol conversion between PROFIBUS-DP industrial fieldbus and wireless ZIGBEE
CN101729572B (en) Protocol conversion device between MODBUS industrial field bus and wireless ZIGBEE and method thereof
CN106355873B (en) Internet of things intelligent traffic gateway and system thereof
CN206332860U (en) LoRa gateways
CN102088444A (en) PROFIBUS DP and PROFIBUS PA protocol conversion gateway module
CN102316113B (en) POWERLINK and HDLC protocol conversion equipment and realization method thereof
CN202190284U (en) Protocol converter for CAN bus and SpaceWire bus
CN110187172A (en) A kind of ammeter monitoring system converted based on infrared modulated with wireless communication
CN101106504A (en) Distributed communication system for intelligent independent robot based on CAN bus
CN103823775A (en) Serial port and Internet port smart converter
CN202677599U (en) Self-adapting watt-hour meter collector
CN202711246U (en) Application expanding system with 485 buses and 232 buses
CN102508464A (en) Building device for vehicular sensor network platform
CN110321304A (en) Bus communication system under vehicle environment between FPGA and STM32
CN102881146A (en) Industrial on-site equipment data acquirer of multiple industrial buses
CN202035007U (en) MVB-HDLC gateway based on ARM7
CN210222118U (en) Ammeter monitoring system based on infrared modulation conversion and wireless communication
CN201127024Y (en) Two-way CAN bus and RS-232 serial communication interface
CN208076997U (en) A kind of equipment high in the clouds monitoring management system
CN202889381U (en) Home gateway supporting wireless sensor network
CN102724090A (en) Process field bus (PROFIBUS) DP/PA integrated embedded slave node communication device based on DP controller with integrated 8031 core (DPC31)
CN203070411U (en) Park lot management system based on three-in-one network
CN102023959A (en) Communication conversion bridge set based on USB-HID (universal serial bus-human input device) protocol

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: NINGBO ROYELEK ELECTRONICS CO., LTD.

Free format text: FORMER OWNER: HUANG TAO

Effective date: 20101123

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 315800 ROYELEK ELECTRONICS CO., LTD., NINGBO DEVELOPMENT AREA, VENTURE PARK, NINGBO ECONOMIC AND TECHNOLOGICAL DEVELOPMENT ZONE, NINGBO CITY, ZHEJIANG PROVINCE TO: 315800 NINGBO DEVELOPMENT AREA, VENTURE PARK, NINGBO ECONOMIC AND TECHNOLOGICAL DEVELOPMENT ZONE, NINGBO CITY, ZHEJIANG PROVINCE

TR01 Transfer of patent right

Effective date of registration: 20101123

Address after: 315800 Ningbo Development Zone, Pioneer Park, Ningbo economic and Technological Development Zone, Ningbo, Zhejiang

Patentee after: Ningbo Royelek Electronics Co., Ltd.

Address before: 315800 Zhejiang city of Ningbo province Nuoyike Park Ningbo economic and Technological Development Zone, Ningbo Development Zone Electronics Co. Ltd.

Patentee before: Huang Tao

C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080416

Termination date: 20130330