Communication device for automatically judging CAN (Controller Area Network) or RS485 signal
By designing a communication device that automatically determines whether a signal is CAN or RS485, the problem of complex and inflexible existing conversion circuit structures is solved, enabling accurate signal type determination and conversion, and improving the system's integration and stability.
Patent Information
- Application Number
- CN202422993911.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2034-12-05
AI Technical Summary
Existing CAN signal or differential RS-485 signal conversion circuits are complex in structure and lack flexibility, which limits their widespread application.
A communication device for automatically determining CAN or RS485 signals was designed, including signal terminals, voltage conversion circuits, signal differential pressure judgment circuits, CAN signal processing circuits, differential pressure signal receiving and output circuits, and switch control circuits. These circuits enable automatic determination and conversion of signal types.
It achieves accurate signal type identification and conversion into a format easily received by the microcontroller, improving the system's integration and flexibility, and ensures stable and reliable system operation through filtering, decoupling, and voltage regulation structures.
Smart Images

Figure CN223611930U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The utility model belongs to communication device technical field, concretely relates to a communication device of automatic judgment CAN or RS485 signal. BACKGROUND
[0002] In the industry, the independent CAN signal or differential RS-485 signal conversion circuit is generally used, however, these circuits are often complex in structure and lack flexibility, which limits its wide application, therefore, a communication device of automatic judgment CAN or RS485 signal is needed to solve the above problems. CONTENT OF UTILITY MODEL
[0003] The utility model discloses a communication device of automatic judgment CAN or RS485 signal to solve the problem in the background art.
[0004] In order to achieve the above object, the utility model provides the following technical scheme: a communication device of automatic judgment CAN or RS485 signal, including signal receiving end, voltage conversion circuit, U2, U7, U8, signal pressure difference judgment circuit, CAN signal processing circuit, pressure difference signal receiving and output circuit, switch control circuit and P2, the signal receiving end is equipped as P1, the pin 1 and pin 2 of P1 are connected with A+ and A- respectively, the pin 3 of P1 is grounded;
[0005] The voltage conversion circuit includes U4, the pin 1 of U4 is connected with C5, C6 and +5, one end of C5 and C6 is connected with +5, the other end of C5 and C6 is grounded, the pin 2 of U4 is grounded, the pin 3 of U4 is connected with +12 and C4, and C4 is grounded;
[0006] The pin 1, pin 4 and pin 8 of U2 are connected with Tx, R5 and R4 respectively, R5 is connected with Rx, the pin 5 of U2 is connected with placeholder, the pin 3 of U2 is connected with C2 and +5, C2 is connected with +5, the pin 2 of U2 is grounded, C2 is grounded, the pin 6 of U2 is connected with D1 and magnetic bead, the pin 7 of U2 is connected with magnetic bead, two magnetic beads are connected with the two ends of R8 respectively, the pin 4 of U7 is connected with magnetic bead and R8, the pin 3 of U7 is grounded, the pin 2 of U7 is connected with CANH, the pin 1 of U7 is connected with R17, R17 is connected with +5, the pin 3 of U8 is connected with magnetic bead and R8, the pin 4 of U8 is connected with +5, the pin 1 of U8 is connected with CANL, the pin 2 of U8 is connected with R15, and R15 is grounded;
[0007] The signal pressure difference judgment circuit includes U5, U6, Q1 and Q2, the + pin of U5 is connected with R21 and R23, the - pin of U5 is connected with one end of R22 and R24, R23 is grounded, R21 and R22 are connected with A+ and A- respectively, the other end of R24 is connected with U5 and R20, R20 is connected with the - pin of U6, the + pin of U6 is connected with R18 and R19, U6 is connected with PA0, R19 is grounded, R18 is connected with +12, the three pins of Q1 are connected with A+, CANH and PA1, R27 respectively, PA1 and R27 are connected, R27 is grounded; the three pins of Q2 are connected with A-, CANL and PA1, R28 respectively, PA1 and R28 are connected, R28 is grounded;
[0008] The CAN signal processing circuit includes X1, U3 and R4, pin 1 and pin 2 of U3 are connected with Tx and Rx respectively, pin 3, pin 4, pin 5, pin 6, pin 7, pin 11, pin 12, pin 13 and pin 15 of U3 are connected with placeholders respectively, pin 8 of U3 is connected with pin 3 of X1 and C7, pin 9 of U3 is connected with pin 1 of X1 and C8, C7 and C8 are grounded, pin 2 and pin 4 of X1 are grounded, pin 14 of U3 and pin 4 of P4 are connected with R13, pin 16 of U3 and pin 3 of P4 are connected with R16, pin 17 of U3 and pin 2 of P4 are connected with R9, pin 18 of U3 is connected with R6, pin 19 of U3 is connected with one end of R7, pin 20 of U3 is connected with the other end of R7, pin 20 of U3 and R7 are connected with +5 and C3, C3 is grounded, pin 1 of P4 is connected with +12, pin 5 of P4 is grounded;
[0009] The pressure difference signal receiving and output circuit includes U7, pin 1 and pin 2 of U7 are connected with PA0 and PA1 respectively, pin 13 of U7 is connected with one end of C9, pin 13 of U7 and one end of C9 are grounded, pin 14 of U7 is connected with the other end of C9, the other end of C9 and pin 14 of U7 are connected with +5, pin 3, pin 4, pin 5, pin 6, pin 7, pin 8, pin 9, pin 10, pin 11, pin 12 and pin 15 of U7 are connected with placeholders respectively;
[0010] The switch control circuit comprises U1, pin 1 and pin 2 of the U1 are connected with pin A- and pin A+ of R1 respectively, pin 3 of the U1 is connected with A, pin 4, pin 5, pin 6, pin 7, pin 9, pin 10, pin 11, pin 13, pin 14 and pin 15 of the U1 are connected, pin 8 of the U1 is grounded, pin 12 of the U1 is connected with PA1, pin 16 of the U1 is connected with one end of C1 and +5, one end of the C1 is connected with +5, the other end of the C1 is grounded;
[0011] Pin 1 of the P2 is connected with +12, pin 2 of the P2 is connected with one end of R10 and one end of C1, the other end of the C1 is grounded, pin 3 of the P2 is grounded, pin 3 of the P2 is connected with the other end of C1, the other end of the R10 is connected with RS485.
[0012] The communication device is used for applications using CAN communication protocol or RS-485 communication protocol in the electronic industry, is used for automatically receiving and identifying can or differential 485 signals and converting into spi signals and then communicating with other devices.
[0013] As a preferred scheme, the U4 is 78L05, the values of the C4, C5 and C6 are 0.1uF, 1uF and 0.1uF respectively.
[0014] As a preferred scheme, the values of the R4 and R5 are both 1K, the value of the C2 is 0.1uF, and the values of the R8 are all 20Ω.
[0015] As a preferred scheme, the P4 is SPI, the values of the C7 and C8 are both 10pF, the value of the C3 is 0.1uF, the values of the R6 and R7 are both 10K, the value of the R14 is 1K, and the value of the R13 is 33Ω.
[0016] As a preferred scheme, the value of the R1 is 120Ω.
[0017] As a preferred scheme, the value of the R10 is 1K.
[0018] Compared with the prior art, the utility model has the advantages that:
[0019] The utility model discloses a communication device can receive RS-485 signal or CAN signal, and accurate judgment signal type further, it is converted into the format that singlechip is easy to receive and handle, has improved the integration and flexibility of system significantly,
[0020] The utility model discloses, the communication device design has relevant filter, decoupling and voltage stabilizing structure, can reduce the influence of outside, ensure that system operation is stable and reliable. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 It is signal connection end circuit diagram of the utility model;
[0022] Figure 2 It is voltage conversion circuit diagram of the utility model;
[0023] Figure 3 It is circuit wiring diagram of the utility U2;
[0024] Figure 4 It is signal pressure difference judgment circuit diagram of the utility model;
[0025] Figure 5 It is CAN signal processing circuit diagram of the utility model;
[0026] Figure 6 It is circuit diagram of the utility model pressure difference signal receiving and output;
[0027] Figure 7 It is switch control circuit diagram of the utility model;
[0028] Figure 8 It is circuit wiring diagram of the utility P2. DETAILED DESCRIPTION
[0029] The utility model is further described below in combination with examples.
[0030] The following examples are used to illustrate the utility model, but cannot be used to limit the protection scope of the utility model. The conditions in the examples can be further adjusted according to specific conditions, and simple improvement of the method of the utility model under the concept of the utility model belongs to the range of the utility model.
[0031] Please refer to Figures 1-8 The utility model provides a kind of communication device for automatically judging CAN or RS485 signal, including signal connection end, voltage conversion circuit, U2, U7, U8, signal pressure difference judgment circuit, CAN signal processing circuit, pressure difference signal receiving and output circuit, switch control circuit and P2, signal receiving end is set as P1, the pin 1 and pin 2 of P1 are connected with A+ and A- respectively, the pin 3 of P1 is grounded, by setting P1 interface, P1 interface receives signal;
[0032] The voltage conversion circuit includes U4, the pin 1 of U4 is connected with C5, C6 and +5, one end of C5 and C6 is connected with +5, the other end of C5 and C6 is grounded, the pin 2 of U4 is grounded, the pin 3 of U4 is connected with +12 and C4, C4 is grounded, U4 is set as 78L05, the values of C4, C5 and C6 are respectively set as 0.1uF, 1uF and 0.1uF, by setting U4, because U4 is set as a linear voltage regulator, U4 linear voltage regulator is used to generate 5V power supply network required by the system;
[0033] The pin 1, pin 4 and pin 8 of U2 are respectively connected with Tx, R5 and R4, R5 is connected with Rx, the pin 5 of U2 is connected with a placeholder, the pin 3 of U2 is connected with C2 and +5, C2 is connected with +5, the pin 2 of U2 is grounded, C2 is grounded, the pin 6 of U2 is connected with D1 and a magnetic bead, the pin 7 of U2 is connected with a magnetic bead, the two magnetic beads are respectively connected with two ends of R8, the pin 4 of U7 is connected with a magnetic bead and R8, the pin 3 of U7 is grounded, the pin 2 of U7 is connected with CANH, the pin 1 of U7 is connected with R17, R17 is connected with +5, the pin 3 of U8 is connected with a magnetic bead and R8, the pin 4 of U8 is connected with +5, the pin 1 of U8 is connected with CANL, the pin 2 of U8 is connected with R15, R15 is grounded, the values of R4 and R5 are both set as 1K, the value of C2 is set as 0.1uF, the values of R8 are both set as 20Ω;
[0034] The signal pressure difference judgment circuit includes U5, U6, Q1 and Q2, the + pin of U5 is connected with R21 and R23, the - pin of U5 is connected with one end of R22 and R24, R23 is grounded, R21 and R22 are respectively connected with A+ and A-, the other end of R24 is connected with U5 and R20, R20 is connected with the - pin of U6, the + pin of U6 is connected with R18 and R19, U6 is connected with PA0, R19 is grounded, R18 is connected with +12, the three pins of Q1 are respectively connected with A+, CANH and PA1, R27, PA1 and R27 are connected, R27 is grounded; the three pins of Q2 are respectively connected with A-, CANL and PA1, R28, PA1 and R28 are connected, R28 is grounded, by setting U5 and U6, U5 and U6 two comparators judge whether the pressure difference of input signal is greater than 3V;
[0035] The CAN signal processing circuit includes X1, U3 and R4 connection, U3 pin 1 and pin 2 are connected with Tx and Rx respectively, U3 pin 3, pin 4, pin 5, pin 6, pin 7, pin 11, pin 12, pin 13 and pin 15 are connected with placeholder, U3 pin 8 is connected with pin 3 of X1 and C7, U3 pin 9 is connected with pin 1 of X1 and C8, C7 and C8 are grounded, pin 2 and pin 4 of X1 are grounded, U3 pin 14 and pin 4 of P4 are connected with R13, U3 pin 16 and pin 3 of P4 are connected with R16, U3 pin 17 and pin 2 of P4 are connected with R9, U3 pin 18 is connected with R6, U3 pin 19 is connected with one end of R7, U3 pin 20 is connected with the other end of R7, U3 pin 20 and R7 are connected with +5 and C3, C3 is grounded, pin 1 of P4 is connected with +12, pin 5 of P4 is grounded, P4 is set as SPI, the values of C7 and C8 are both set as 10pF, the value of C3 is set as 0.1uF, the values of R6 and R7 are both set as 10K, the value of R14 is set as 1K, the value of R13 is set as 33Ω;
[0036] The differential pressure signal receiving and output circuit includes U7, pin 1 and pin 2 of U7 are connected with PA0 and PA1 respectively, one end of pin 13 of U7 is connected with C9, pin 13 of U7 and one end of C9 are grounded, pin 14 of U7 is connected with the other end of C9, the other end of C9 and pin 14 of U7 are connected with +5, pin 3, pin 4, pin 5, pin 6, pin 7, pin 8, pin 9, pin 10, pin 11, pin 12 and pin 15 of U7 are connected with placeholder;
[0037] The switch control circuit includes U1, by setting PA1, RS485 signal will be transmitted to U1 through PA1,
[0038] Pin 1 and pin 2 of U1 are connected with pin A- and pin A+ of R1 respectively, pin 3 of U1 is connected with A, pin 4, pin 5, pin 6, pin 7, pin 9, pin 10, pin 11, pin 13, pin 14 and pin 15 of U1 are connected, pin 8 of U1 is grounded, pin 12 of U1 is connected with PA1, pin 16 of U1 is connected with one end of C1 and +5, one end of C1 is connected with +5, the other end of C1 is grounded, the value of R1 is set as 120Ω, by setting U1, U1 can convert RS485 signal into single-ended signal;
[0039] Pin 1 of P2 is connected with +12, pin 2 of P2 is connected with one end of R10 and one end of C1, the other end of C1 is grounded, pin 3 of P2 is grounded, pin 3 of P2 is connected with the other end of C1, the other end of R10 is connected with RS485.
[0040] The signal type of CAN signal or RS485 signal is judged by the pressure difference of the signal line; the signal enters which processing circuit is decided by controlling U1 and controlling MOS to be off; the communication device can be connected to any signal of CAN or RS485, and automatically judges and processes.
[0041] The working principle and use flow of the utility model: U4 linear voltage regulator is used to generate 5V power supply network required by system; P1 interface receives signal, and subsequent two comparators of U5 and U6 judge whether the pressure difference of input signal is greater than 3V to give to single-chip microcomputer PA0 port; if the pressure difference of input signal is greater than 3V, it is RS485 signal, and RS485 signal will be transmitted to U1 through PA1, U1 can convert RS485 signal into single-ended signal, and is connected to P2 for single-chip microcomputer communication;
[0042] If the pressure difference of input signal is less than 3V, it is CAN signal, and single-chip microcomputer will pass through PA1 and U1, and open Q1, Q2 connection, input signal to U2, U3, enter CAN signal conversion circuit, enter P4 and carry out SPI communication with single-chip microcomputer.
[0043] Although the embodiments of the utility model have been shown and described, it can be understood by those skilled in the art that various changes, modifications, replacements and variations can be made to these embodiments without departing from the principles and spirits of the utility model, and the scope of the utility model is defined by the appended claims and their equivalents.
Claims
1. A communication device for automatically determining CAN or RS485 signals, comprising a signal terminal, a voltage conversion circuit, U2, U7, U8, a signal differential pressure determination circuit, a CAN signal processing circuit, a differential pressure signal receiving and output circuit, a switch control circuit, and P2, characterized in that: The signal receiving end is P1, the pin 1 and pin 2 of P1 are connected with A+ and A- respectively, the pin 3 of P1 is grounded; The voltage conversion circuit comprises U4, the pin 1 of U4 is connected with C5, C6 and +5, one end of C5 and C6 is connected with +5, the other end of C5 and C6 is grounded, the pin 2 of U4 is grounded, the pin 3 of U4 is connected with +12 and C4, C4 is grounded; The pin 1, pin 4 and pin 8 of U2 are connected with Tx, R5 and R4 respectively, R5 is connected with Rx, the pin 5 of U2 is connected with placeholder, the pin 3 of U2 is connected with C2 and +5, C2 is connected with +5, the pin 2 of U2 is grounded, C2 is grounded, the pin 6 of U2 is connected with D1 and magnetic bead, the pin 7 of U2 is connected with magnetic bead, two magnetic beads are connected with two ends of R8 respectively, the pin 4 of U7 is connected with magnetic bead and R8, the pin 3 of U7 is grounded, the pin 2 of U7 is connected with CANH, the pin 1 of U7 is connected with R17, R17 is connected with +5, the pin 3 of U8 is connected with magnetic bead and R8, the pin 4 of U8 is connected with +5, the pin 1 of U8 is connected with CANL, the pin 2 of U8 is connected with R15, R15 is grounded; The signal differential pressure judgment circuit comprises U5, U6, Q1 and Q2, the + pin of U5 is connected with R21 and R23, the - pin of U5 is connected with R22 and one end of R24, R23 is grounded, R21 and R22 are connected with A+ and A- respectively, the other end of R24 is connected with U5 and R20, R20 is connected with the - pin of U6, the + pin of U6 is connected with R18 and R19, U6 is connected with PA0, R19 is grounded, R18 is connected with +12, three pins of Q1 are connected with A+, CANH and PA1, R27 respectively, PA1 and R27 are connected, R27 is grounded; three pins of Q2 are connected with A-, CANL and PA1, R28 respectively, PA1 and R28 are connected, R28 is grounded; The CAN signal processing circuit includes X1, U3 and R4 connection, pin 1 and pin 2 of U3 are connected with Tx and Rx respectively, pin 3, pin 4, pin 5, pin 6, pin 7, pin 11, pin 12, pin 13 and pin 15 of U3 are connected with placeholder, pin 8 of U3 is connected with pin 3 of X1 and C7, pin 9 of U3 is connected with pin 1 of X1 and C8, C7 and C8 are grounded, pin 2 and pin 4 of X1 are grounded, pin 14 of U3 and pin 4 of P4 are connected with R13, pin 16 of U3 and pin 3 of P4 are connected with R16, pin 17 of U3 and pin 2 of P4 are connected with R9, pin 18 of U3 is connected with R6, pin 19 of U3 is connected with one end of R7, pin 20 of U3 is connected with the other end of R7, pin 20 of U3 and R7 are connected with +5 and C3, C3 is grounded, pin 1 of P4 is connected with +12, pin 5 of P4 is grounded. The differential pressure signal receiving and output circuit includes U7, pin 1 and pin 2 of U7 are connected with PA0 and PA1 respectively, one end of pin 13 of U7 is connected with C9, pin 13 of U7 and one end of C9 are grounded, pin 14 of U7 is connected with the other end of C9, the other end of C9 and pin 14 of U7 are connected with +5, pin 3, pin 4, pin 5, pin 6, pin 7, pin 8, pin 9, pin 10, pin 11, pin 12 and pin 15 of U7 are connected with placeholder; The switch control circuit includes U1, pin 1 and pin 2 of U1 are connected with pin A- and pin A+ of R1 respectively, pin 3 of U1 is connected with A, pin 4, pin 5, pin 6, pin 7, pin 9, pin 10, pin 11, pin 13, pin 14 and pin 15 of U1 are connected, pin 8 of U1 is grounded, pin 12 of U1 is connected with PA1, pin 16 of U1 is connected with one end of C1 and +5, one end of C1 is connected with +5, the other end of C1 is grounded; Pin 1 of P2 is connected with +12, pin 2 of P2 is connected with one end of R10 and one end of C1, the other end of C1 is grounded, pin 3 of P2 is grounded, pin 3 of P2 is connected with the other end of C1, the other end of R10 is connected with RS485.
2. The communication device of automatically judging CAN or RS485 signal according to claim 1, characterized in that: U4 is set as 78L05, the values of C4, C5 and C6 are set as 0.1uF, 1uF and 0.1uF respectively.
3. The communication device of claim 1, wherein: The values of R4 and R5 are set as 1K, the value of C2 is set as 0.1uF, the values of R8 are set as 20Ω.
4. The communication device of claim 1, wherein: P4 is set as SPI, the values of C7 and C8 are set as 10pF, the value of C3 is set as 0.1uF, the values of R6 and R7 are set as 10K, the value of R14 is set as 1K, the value of R13 is set as 33Ω.
5. The communication device of claim 1, wherein: The value of R1 is set as 120Ω.
6. The communication device of automatically judging CAN or RS485 signal according to claim 1, characterized in that: The value of R10 is set as 1K.