CN114785869B - RS 232-to-one-wire protocol module and conversion method - Google Patents

RS 232-to-one-wire protocol module and conversion method Download PDF

Info

Publication number
CN114785869B
CN114785869B CN202210696058.9A CN202210696058A CN114785869B CN 114785869 B CN114785869 B CN 114785869B CN 202210696058 A CN202210696058 A CN 202210696058A CN 114785869 B CN114785869 B CN 114785869B
Authority
CN
China
Prior art keywords
pin
resistor
interface
module
contact
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.)
Active
Application number
CN202210696058.9A
Other languages
Chinese (zh)
Other versions
CN114785869A (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.)
Kunming 705 Science And Technology Development Co ltd
Shaanxi Zhongshi Intelligent Technology Co ltd
Original Assignee
Kunming 705 Science And Technology Development Co ltd
Shaanxi Zhongshi Intelligent Technology Co ltd
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 Kunming 705 Science And Technology Development Co ltd, Shaanxi Zhongshi Intelligent Technology Co ltd filed Critical Kunming 705 Science And Technology Development Co ltd
Priority to CN202210696058.9A priority Critical patent/CN114785869B/en
Publication of CN114785869A publication Critical patent/CN114785869A/en
Application granted granted Critical
Publication of CN114785869B publication Critical patent/CN114785869B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01KMEASURING TEMPERATURE; MEASURING QUANTITY OF HEAT; THERMALLY-SENSITIVE ELEMENTS NOT OTHERWISE PROVIDED FOR
    • G01K13/00Thermometers specially adapted for specific purposes
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4286Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a handshaking protocol, e.g. RS232C link

Abstract

The invention discloses an RS 232-to-one-wire protocol module and a conversion method thereof, relating to the field of bus interfaces. The system comprises an RS232 interface module, an RS232 interface level conversion module, a control module, a one-wire interface level conversion module and a one-wire interface module; the upper computer sends the temperature signal and the serial number information of the temperature sensor to be simulated to the control module through the RS232 interface module and the RS232 interface level conversion module; the control module comprises a main control board and a power distribution module for supplying power; the main control board receives a signal sent by the RS232 interface level conversion module, analyzes the time sequence of the signal and simulates a temperature signal; the analog temperature signal and the serial number information are transmitted to a one-wire interface module by a one-wire interface level conversion module and then are sent to an external temperature control module; the external temperature control module generates corresponding temperature change. The invention has the advantage that the temperature test can be realized only by inputting the temperature to be simulated on the interface of the upper computer.

Description

RS 232-to-one-wire protocol module and conversion method
Technical Field
The invention belongs to the technical field of bus interfaces, and relates to an RS 232-to-one-wire protocol module and a conversion method thereof.
Background
A single bus (one-wire bus) is a peripheral serial expansion bus technology introduced by DALLAS corporation of america, and unlike a serial data communication method, it uses a single signal line to transmit both a clock and data, and data transmission is bidirectional. The RS232 to one-wire bus interface circuit is a bridge circuit for converting from an RS232 serial interface to one-wire network protocol. As long as the computer or other host equipment has a common RS232 serial interface, the one-wire waveform controlled by strict timing and voltage swing rate can be generated through the circuit, and the communication with the one-wire system device is convenient. The interface circuit receives the instruction and data to be sent, executes one-wire operation, and returns the result to the host.
At present, a plurality of sensors are used when a field simulation test is carried out, and a temperature control plate needs to be accessed frequently every time; when a field simulation experiment is carried out, the temperature of the temperature control module needs to be increased and decreased physically, such as roasting and freezing, so that the process is complicated, the material consumption is high, and potential safety hazards are easily caused.
Disclosure of Invention
The invention provides a module and a conversion method for converting RS232 to one-wire protocol; the circuit module can be switched between a high level and a low level between different working voltage domains.
The invention is realized by the following technical scheme:
an RS232 to one-wire protocol module comprises an RS232 interface module, an RS232 interface level conversion module, a control module, an one-wire interface level conversion module and an one-wire interface module;
the upper computer sends the temperature signal and the serial number information of the temperature sensor to be simulated to the control module through the RS232 interface module and the RS232 interface level conversion module;
the control module comprises a main control board and a power distribution module for supplying power; the main control board receives a signal sent by the RS232 interface level conversion module, analyzes the time sequence of the signal and simulates a temperature signal; the analog temperature signal and the serial number information are transmitted to a one-wire interface module by a one-wire interface level conversion module and then are sent to an external temperature control module; and the external temperature control module generates corresponding temperature change according to the analog temperature signal and the serial number information.
Furthermore, the power distribution module supplies power to the main control board, the RS232 interface module, the RS232 interface level conversion module, the one-wire interface level conversion module and the one-wire interface module, and comprises a 5V power conversion module and a 3.3V power conversion module.
Furthermore, a main control board circuit is arranged on the main control board, and a light emitting diode LED1, a resistor R4 and a light emitting diode LED2 are sequentially connected between a PA11 pin and a PA12 pin of the main control board; the input ends of the resistor R1 and the resistor R4 are connected with the 3.3V power supply conversion module;
the BOOT0 pin of the main control board is connected with a resistor R9 connected with the 3.3V power supply conversion module and a resistor R10 connected with the digital ground;
a resistor R21 and a crystal oscillator X1 which are connected in parallel are arranged between a PD0 pin and a PD1 pin of the main control board, a capacitor C4 and a capacitor C5 are also connected in series at two ends of the crystal oscillator X1, and the connecting ends of the capacitor C4 and the capacitor C5 are both connected with a digital ground;
the SWDCLK pin and the SWDIO pin of the main control board are respectively connected with the third pin and the second pin of the download debugging interface, a resistor R17 is connected between the SWDCLK pin of the main control board and the third pin of the download debugging interface, and a resistor R18 is connected between the SWDIO pin of the main control board and the second pin of the download debugging interface; downloading a first pin of a debugging interface to be connected with a digital ground; a fourth pin of the download debugging interface is connected with the input end of the resistor R1;
the VBAT pin, the VDD _1 pin, the VDD _2 pin, the VDD _3 pin, the VDD _4 pin and the VDDA pin of the main control board are all connected with the input end of a capacitor C12, and the output end of the capacitor C12 is connected with a digital ground; a VBAT pin of the main control board is connected with the 3.3V power supply conversion module; an electrolytic capacitor C6, a capacitor C7, a capacitor C8, a capacitor C9, a capacitor C10 and a capacitor C11 are also connected in parallel at two ends of the capacitor C12; the input end of the capacitor C12 is connected with the input end of the resistor R1;
the VSS _1 pin, the VSS _2 pin, the VSS _3 pin, the VSS _4 pin and the VSSA pin of the main control board are all connected with a digital ground.
Further, the RS232 interface module comprises an interface chip U6 and an RS232 interface; the T1OUT pin of the interface chip U6 is connected with the second pin of the RS232 interface through a resistor R32; the R1IN pin of the interface chip U6 is connected with the third pin of the RS232 interface through a resistor R34; a first pin of the RS232 interface is connected with the 5V power supply conversion module; the fourth pin of the RS232 interface is connected with a digital ground;
a transient suppression diode TVS9 and a transient suppression diode TVS10 which are connected with a digital ground are also connected in series between the second pin and the third pin of the RS232 interface;
the VCC pin, the V + pin and the V-pin of the interface chip U6 are respectively connected with a capacitor C16, a capacitor C19 and a capacitor C20 which are connected with a digital ground; a VCC pin of the interface chip U6 is connected with the 3.3V voltage stabilizing module;
a capacitor C17 is connected between the C1+ pin and the C1-pin of the interface chip U6; a capacitor C21 is connected between the C2+ pin and the C2-pin of the interface chip U6; the T2IN pin of the interface chip U6 is connected with a resistor R38 connected with a digital ground; the R2IN pin of the interface chip U6 is connected with a resistor R39 connected with a digital ground;
the T1IN pin of the interface chip U6 is connected with the RS232 interface level conversion module through a resistor R33; the R1OUT pin of the interface chip U6 is connected with the RS232 interface level conversion module through a resistor R35.
Further, the RS232 interface level conversion module comprises a photoelectric coupler U2 and a photoelectric coupler U3;
a first pin of the photoelectric coupler U2 is connected with the output end of the resistor R13, the input end of the resistor R13 is connected with the 3.3V power supply conversion module, and a second pin of the photoelectric coupler U2 is connected with the output end of the resistor R33; a third pin of the photoelectric coupler U2 is grounded; a fourth pin of the photoelectric coupler U2 is connected with the output end of the resistor R11, the input end of the resistor R11 is connected with the 3.3V power conversion module, and the fourth pin of the photoelectric coupler U2 is connected with the TXD1 pin of the main control board;
a first pin of the photoelectric coupler U3 is connected with the output end of the resistor R14, the input end of the resistor R14 is connected with the 3.3V power supply conversion module, and a second pin of the photoelectric coupler U3 is connected with the output end of the resistor R35; a third pin of the photoelectric coupler U3 is grounded; the fourth pin of optoelectronic coupler U3 is connected with resistance R12 output, and the input and the 3.3V power conversion module of resistance R12 are connected, and optoelectronic coupler U3's fourth pin is connected with the RXD1 pin of main control board.
Furthermore, the one-wire interface level conversion module comprises a resistor R22 and a resistor R24, wherein the second contact is connected with the 5V power conversion module interface, and a triode Q1 connected with a digital ground is connected in series between the resistor R22 and the first contact of the resistor R24; the first contact of the resistor R22 is also connected to the first contact of the resistor R42, and the second contact of the resistor R42 is connected to the transient suppression diode TVS1 connected to the digital ground;
a first contact of the resistor R24 is connected with a second contact of the triode Q3; the third contact of the triode Q3 is connected with the digital ground; the first contact of the triode Q3 is connected with the 18B20 < u > D interface of the main control board through a resistor R44; the first contact of the triode Q3 is also connected with the transient suppression diode TVS3 which is grounded and the first contact of the resistor R27, the second contact of the resistor R27 is connected with the second contact of the triode Q5, the first contact of the triode Q5 is connected with the second contact of the resistor R29, the first contact of the resistor R29 is connected with the second contact of the resistor R27, and the first contact of the resistor R29 is connected with the 3.3V power supply conversion module; the third contact of the triode Q5 is connected with the digital ground;
a second contact of the resistor R29 is connected with a second contact of the triode Q7, and a first contact of the triode Q7 is connected with a second contact of the resistor R42; the third contact of transistor Q7 is connected to digital ground.
A method for converting RS232 to one-wire protocol module includes the following steps:
s1, an upper computer sends a temperature signal and serial number information of a temperature sensor to be simulated to a control module through an RS232 interface module and an RS232 interface level conversion module;
s2, a main control board of the control module receives a signal sent by the RS232 interface level conversion module, analyzes the time sequence of the signal and simulates a temperature signal;
s3, the simulated temperature signal and the serial number information are transmitted to a one-wire interface module by the one-wire interface level conversion module and then are sent to an external temperature control module;
and S4, the external temperature control module generates corresponding temperature change according to the analog temperature signal and the serial number information.
Compared with the prior art, the invention has the following beneficial technical effects:
1. the RS232 interface level conversion circuit and the one-wire interface level conversion circuit in the invention can convert high level and low level between circuit modules in different working voltage domains, thereby facilitating communication of different circuit modules; meanwhile, the device can also play a role in isolating and filtering input signals and output signals; the invention uses the transient suppression diode to protect the internal circuit of the RS232 to one-wire connector module, can prevent the failure of a microprocessor or a singlechip in the circuit on the conversion board caused by static electricity and surge, and can also avoid the influence of unnecessary noise on data and control buses.
2. The main control board receives temperature and serial number information sent by an upper computer through an RS232 interface circuit, simulates 18b20 time sequence through an 18b20 time sequence simulation circuit, transmits the information to an external temperature control module through a one-wire interface circuit, and can realize the function test of the temperature control module only by inputting a temperature value to be simulated on an interface of the upper computer; the operation process is simple and convenient, and the temperature control module is not required to be physically heated or cooled, so that the damage to the tested product caused by the way of fire baking and freezing when the temperature control module is physically heated or cooled is avoided, and the occurrence of potential safety hazard accidents is reduced.
Drawings
FIG. 1 is a schematic diagram of an overall module of the present invention;
FIG. 2 is a circuit diagram of a main control board circuit;
fig. 3 is a circuit diagram of the light emitting diodes LED1 and LED2;
FIG. 4 is a circuit diagram of a download debug interface;
FIG. 5 is a circuit diagram of a 5V power conversion module and a 3.3V power conversion module in a power distribution module;
FIG. 6 is a circuit diagram of an RS232 interface module;
FIG. 7 is a circuit diagram of an RS232 interface level shift module;
fig. 8 is a circuit diagram of the one-wire interface level conversion module and the one-wire interface module.
Detailed Description
The present invention will now be described in further detail with reference to the attached drawings, which are illustrative, but not limiting, of the present invention.
As shown in fig. 1, an RS232 to one-wire protocol module includes an RS232 interface module, an RS232 interface level conversion module, a control module, a one-wire interface level conversion module, and a one-wire interface module;
the upper computer sends the temperature signal and the serial number information of the temperature sensor to be simulated to the control module through the RS232 interface module and the RS232 interface level conversion module;
the control module comprises a main control board and a power distribution module for supplying power; the main control board receives a signal sent by the RS232 interface level conversion module, analyzes the time sequence of the signal and simulates a temperature signal; the simulated temperature signal and the serial number information are transmitted to a one-wire interface module by a one-wire interface level conversion module and then are sent to an external temperature control module; and the external temperature control module generates corresponding temperature change according to the analog temperature signal and the serial number information.
As shown in fig. 5, the power distribution module supplies power to the main control board, the RS232 interface module, the RS232 interface level conversion module, the one-wire interface level conversion module, and the one-wire interface module, and the power distribution module includes a 5V power conversion module and a 3.3V power conversion module, and both the 5V power conversion module and the 3.3V power conversion module adopt the prior art.
As shown in fig. 2 and 3, a main control board circuit is arranged on the main control board, the model of the main control board is STM32F103RCT6, and a light emitting diode LED1, a resistor R4 and a light emitting diode LED2 are sequentially connected between a PA11 pin and a PA12 pin of the main control board; the input ends of the resistor R1 and the resistor R4 are connected with the 3.3V power supply conversion module;
the BOOT0 pin of the main control board is connected with a resistor R9 connected with the 3.3V power supply conversion module and a resistor R10 connected with the digital ground;
a resistor R21 and a crystal oscillator X1 which are connected in parallel are arranged between a PD0 pin and a PD1 pin of the main control board, a capacitor C4 and a capacitor C5 are also connected in series at two ends of the crystal oscillator X1, and the connecting ends of the capacitor C4 and the capacitor C5 are both connected with a digital ground;
as shown in fig. 4, the SWDCLK pin and the SWDIO pin of the main control board are respectively connected to the third pin and the second pin of the download debugging interface, a resistor R17 is connected between the SWDCLK pin of the main control board and the third pin of the download debugging interface, and a resistor R18 is connected between the SWDIO pin of the main control board and the second pin of the download debugging interface; downloading a first pin of a debugging interface to be connected with a digital ground; a fourth pin of the download debugging interface is connected with the input end of the resistor R1;
the VBAT pin, the VDD _1 pin, the VDD _2 pin, the VDD _3 pin, the VDD _4 pin and the VDDA pin of the main control board are all connected with the input end of a capacitor C12, and the output end of the capacitor C12 is connected with a digital ground; a VBAT pin of the main control board is connected with the 3.3V power supply conversion module; an electrolytic capacitor C6, a capacitor C7, a capacitor C8, a capacitor C9, a capacitor C10 and a capacitor C11 are also connected in parallel at two ends of the capacitor C12; the input end of the capacitor C12 is connected with the input end of the resistor R1;
the VSS _1 pin, the VSS _2 pin, the VSS _3 pin, the VSS _4 pin and the VSSA pin of the main control board are all connected with a digital ground.
As shown in fig. 6, the RS232 interface module includes an interface chip U6 and an RS232 interface; the model of the interface chip U6 is TP3232N-SR; the T1OUT pin of the interface chip U6 is connected with the second pin of the RS232 interface through a resistor R32; the R1IN pin of the interface chip U6 is connected with the third pin of the RS232 interface through a resistor R34; a first pin of the RS232 interface is connected with the 5V power supply conversion module; the fourth pin of the RS232 interface is connected with a digital ground;
a transient suppression diode TVS9 and a transient suppression diode TVS10 which are connected with a digital ground are also connected in series between the second pin and the third pin of the RS232 interface; the transient suppression diode is used for surge and electrostatic protection of the main control panel.
The VCC pin, the V + pin and the V-pin of the interface chip U6 are respectively connected with a capacitor C16, a capacitor C19 and a capacitor C20 which are connected with a digital ground; a VCC pin of the interface chip U6 is connected with the 3.3V voltage stabilizing module;
a capacitor C17 is connected between the C1+ pin and the C1-pin of the interface chip U6; a capacitor C21 is connected between the C2+ pin and the C2-pin of the interface chip U6; the T2IN pin of the interface chip U6 is connected with a resistor R38 connected with a digital ground; the R2IN pin of the interface chip U6 is connected with a resistor R39 connected with a digital ground;
the T1IN pin of the interface chip U6 is connected with the RS232 interface level conversion module through a resistor R33; the R1OUT pin of the interface chip U6 is connected with the RS232 interface level conversion module through a resistor R35.
As shown in fig. 6 and 7, the RS232 interface level conversion module includes a photocoupler U2 and a photocoupler U3; the models of the photoelectric couplers U2 and U3 are TLP185;
as shown in fig. 2, a first pin of the photocoupler U2 is connected to an output terminal of the resistor R13, an input terminal of the resistor R13 is connected to the 3.3V power conversion module, and a second pin of the photocoupler U2 is connected to an output terminal of the resistor R33; a third pin of the photoelectric coupler U2 is grounded; a fourth pin of the photoelectric coupler U2 is connected with the output end of the resistor R11, the input end of the resistor R11 is connected with the 3.3V power conversion module, and the fourth pin of the photoelectric coupler U2 is connected with the TXD1 pin of the main control board;
as shown in fig. 2, a first pin of the photoelectric coupler U3 is connected to an output terminal of the resistor R14, an input terminal of the resistor R14 is connected to the 3.3V power conversion module, and a second pin of the photoelectric coupler U3 is connected to an output terminal of the resistor R35; a third pin of the photoelectric coupler U3 is grounded; the fourth pin of the photoelectric coupler U3 is connected with the output end of the resistor R12, the input end of the resistor R12 is connected with the 3.3V power supply conversion module, and the fourth pin of the photoelectric coupler U3 is connected with the RXD1 pin of the main control board.
As shown in fig. 8, the one-wire interface level conversion module includes a resistor R22 and a resistor R24, where the second contact is connected to the 5V power conversion module interface, and a triode Q1 connected to digital ground is connected in series between the first contacts of the resistor R22 and the resistor R24; the first contact of the resistor R22 is also connected to the first contact of the resistor R42, and the second contact of the resistor R42 is connected to the transient suppression diode TVS1 connected to the digital ground;
a first contact of the resistor R24 is connected with a second contact of the triode Q3; the third contact of the triode Q3 is connected with the digital ground; as shown in fig. 2, the first contact of the triode Q3 is connected with the 18b20 _dinterface of the main control board through a resistor R44; the first contact of the triode Q3 is also connected with the transient suppressor TVS3 which is grounded and the first contact of the resistor R27, the second contact of the resistor R27 is connected with the second contact of the triode Q5, the first contact of the triode Q5 is connected with the second contact of the resistor R29, the first contact of the resistor R29 is connected with the second contact of the resistor R27, and the first contact of the resistor R29 is connected with the 3.3V power supply conversion module; the third contact of the triode Q5 is connected with digital ground;
a second contact of the resistor R29 is connected with a second contact of the triode Q7, and a first contact of the triode Q7 is connected with a second contact of the resistor R42; the third contact of transistor Q7 is connected to digital ground.
The invention also discloses a method for converting the RS232 to the one-wire protocol module, which comprises the following specific operation steps:
s1, an upper computer sends a temperature signal and serial number information of a temperature sensor to be simulated to a control module through an RS232 interface module and an RS232 interface level conversion module;
s2, a main control board of the control module receives a signal sent by the RS232 interface level conversion module, analyzes the time sequence of the signal and simulates a temperature signal;
s3, the simulated temperature signal and the serial number information are transmitted to a one-wire interface module by a one-wire interface level conversion module and then are sent to an external temperature control module;
and S4, the external temperature control module generates corresponding temperature change according to the analog temperature signal and the serial number information.
The embodiments given above are preferable examples for implementing the present invention, and the present invention is not limited to the above-described embodiments. Any non-essential addition and replacement made by the technical characteristics of the technical scheme of the invention by a person skilled in the art belong to the protection scope of the invention.

Claims (6)

1. An RS 232-to-one-wire protocol module is characterized by comprising an RS232 interface module, an RS232 interface level conversion module, a control module, an one-wire interface level conversion module and an one-wire interface module;
the upper computer sends the temperature signal and the serial number information of the temperature sensor to be simulated to the control module through the RS232 interface module and the RS232 interface level conversion module;
the control module comprises a main control board and a power distribution module for supplying power; the main control board receives a signal sent by the RS232 interface level conversion module, analyzes the time sequence of the signal and simulates a temperature signal; the simulated temperature signal and the serial number information are transmitted to a one-wire interface module by a one-wire interface level conversion module and then are sent to an external temperature control module; the external temperature control module generates corresponding temperature change according to the analog temperature signal and the serial number information;
the power distribution module supplies power to the main control board, the RS232 interface module, the RS232 interface level conversion module, the one-wire interface level conversion module and the one-wire interface module, and comprises a 5V power conversion module and a 3.3V power conversion module;
the LED driving circuit comprises a main control board, a resistor R1, a resistor R4 and an LED2, wherein a main control board circuit is arranged on the main control board, and the LED1, the resistor R4 and the LED2 are sequentially connected between a PA11 pin and a PA12 pin of the main control board; the input ends of the resistor R1 and the resistor R4 are connected with the 3.3V power supply conversion module;
the BOOT0 pin of the main control board is connected with a resistor R9 connected with the 3.3V power supply conversion module and a resistor R10 connected with the digital ground;
a resistor R21 and a crystal oscillator X1 which are connected in parallel are arranged between a PD0 pin and a PD1 pin of the main control board, a capacitor C4 and a capacitor C5 are also connected in series at two ends of the crystal oscillator X1, and connecting ends of the capacitor C4 and the capacitor C5 are both connected with a digital ground;
the SWDCLK pin and the SWDIO pin of the main control board are respectively connected with the third pin and the second pin of the download debugging interface, a resistor R17 is connected between the SWDCLK pin of the main control board and the third pin of the download debugging interface, and a resistor R18 is connected between the SWDIO pin of the main control board and the second pin of the download debugging interface; downloading a first pin of a debugging interface to be connected with a digital ground; and a fourth pin of the download debugging interface is connected with the input end of the resistor R1.
2. The RS232 to one-wire protocol module according to claim 1, wherein the VBAT pin, the VDD _1 pin, the VDD _2 pin, the VDD _3 pin, the VDD _4 pin, and the VDDA pin of the main control board are all connected to an input terminal of a capacitor C12, and an output terminal of the capacitor C12 is connected to a digital ground; a VBAT pin of the main control board is connected with the 3.3V power supply conversion module; the two ends of the capacitor C12 are also connected with an electrolytic capacitor C6, a capacitor C7, a capacitor C8, a capacitor C9, a capacitor C10 and a capacitor C11 in parallel; the input end of the capacitor C12 is connected with the input end of the resistor R1;
the VSS _1 pin, the VSS _2 pin, the VSS _3 pin, the VSS _4 pin and the VSSA pin of the main control board are all connected with a digital ground.
3. The RS 232-to-one-wire protocol module of claim 1, wherein the RS232 interface module comprises an interface chip U6 and an RS232 interface; the T1OUT pin of the interface chip U6 is connected with the second pin of the RS232 interface through a resistor R32; the R1IN pin of the interface chip U6 is connected with the third pin of the RS232 interface through a resistor R34; a first pin of the RS232 interface is connected with the 5V power supply conversion module; the fourth pin of the RS232 interface is connected with a digital ground;
a transient suppression diode TVS9 and a transient suppression diode TVS10 which are connected with a digital ground are also connected in series between the second pin and the third pin of the RS232 interface;
the VCC pin, the V + pin and the V-pin of the interface chip U6 are respectively connected with a capacitor C16, a capacitor C19 and a capacitor C20 which are connected with digital ground; a VCC pin of the interface chip U6 is connected with the 3.3V voltage stabilizing module;
a capacitor C17 is connected between the C1+ pin and the C1-pin of the interface chip U6; a capacitor C21 is connected between the C2+ pin and the C2-pin of the interface chip U6; the T2IN pin of the interface chip U6 is connected with a resistor R38 connected with a digital ground; the R2IN pin of the interface chip U6 is connected with a resistor R39 connected with a digital ground;
the T1IN pin of the interface chip U6 is connected with the RS232 interface level conversion module through a resistor R33; the R1OUT pin of the interface chip U6 is connected with the RS232 interface level conversion module through a resistor R35.
4. The RS 232-to-one-wire protocol module of claim 1, wherein the RS232 interface level shifter module comprises an optocoupler U2 and an optocoupler U3;
a first pin of the photoelectric coupler U2 is connected with the output end of the resistor R13, the input end of the resistor R13 is connected with the 3.3V power supply conversion module, and a second pin of the photoelectric coupler U2 is connected with the output end of the resistor R33; a third pin of the photoelectric coupler U2 is grounded; a fourth pin of the photoelectric coupler U2 is connected with the output end of the resistor R11, the input end of the resistor R11 is connected with the 3.3V power conversion module, and the fourth pin of the photoelectric coupler U2 is connected with the TXD1 pin of the main control board;
a first pin of the photoelectric coupler U3 is connected with the output end of the resistor R14, the input end of the resistor R14 is connected with the 3.3V power supply conversion module, and a second pin of the photoelectric coupler U3 is connected with the output end of the resistor R35; a third pin of the photoelectric coupler U3 is grounded; the fourth pin of the photoelectric coupler U3 is connected with the output end of the resistor R12, the input end of the resistor R12 is connected with the 3.3V power supply conversion module, and the fourth pin of the photoelectric coupler U3 is connected with the RXD1 pin of the main control board.
5. The RS 232-to-one-wire protocol module according to claim 1, wherein the one-wire interface level conversion module includes a resistor R22 and a resistor R24 connected to the 5V power conversion module interface via a second contact, and a triode Q1 connected to digital ground is connected in series between the resistor R22 and the first contact of the resistor R24; the first contact of the resistor R22 is also connected with the first contact of the resistor R42, and the second contact of the resistor R42 is connected with the digital ground transient suppression diode TVS 1;
a first contact of the resistor R24 is connected with a second contact of the triode Q3; the third contact of the triode Q3 is connected with digital ground; the first contact of the triode Q3 is connected with the 18B20 _Dinterface of the main control board through a resistor R44; the first contact of the triode Q3 is also connected with the transient suppression diode TVS3 which is grounded and the first contact of the resistor R27, the second contact of the resistor R27 is connected with the second contact of the triode Q5, the first contact of the triode Q5 is connected with the second contact of the resistor R29, the first contact of the resistor R29 is connected with the second contact of the resistor R27, and the first contact of the resistor R29 is connected with the 3.3V power supply conversion module; the third contact of the triode Q5 is connected with the digital ground;
a second contact of the resistor R29 is connected with a second contact of the triode Q7, and a first contact of the triode Q7 is connected with a second contact of the resistor R42; the third contact of transistor Q7 is connected to digital ground.
6. A method for converting RS232 to one-wire protocol module according to claim 1, comprising the following specific steps:
s1, an upper computer sends a temperature signal and serial number information of a temperature sensor to be simulated to a control module through an RS232 interface module and an RS232 interface level conversion module;
s2, a main control board of the control module receives a signal sent by the RS232 interface level conversion module, analyzes the time sequence of the signal and simulates a temperature signal;
s3, the simulated temperature signal and the serial number information are transmitted to a one-wire interface module by a one-wire interface level conversion module and then are sent to an external temperature control module;
and S4, the external temperature control module generates corresponding temperature change according to the analog temperature signal and the serial number information.
CN202210696058.9A 2022-06-20 2022-06-20 RS 232-to-one-wire protocol module and conversion method Active CN114785869B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210696058.9A CN114785869B (en) 2022-06-20 2022-06-20 RS 232-to-one-wire protocol module and conversion method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210696058.9A CN114785869B (en) 2022-06-20 2022-06-20 RS 232-to-one-wire protocol module and conversion method

Publications (2)

Publication Number Publication Date
CN114785869A CN114785869A (en) 2022-07-22
CN114785869B true CN114785869B (en) 2022-11-25

Family

ID=82420246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210696058.9A Active CN114785869B (en) 2022-06-20 2022-06-20 RS 232-to-one-wire protocol module and conversion method

Country Status (1)

Country Link
CN (1) CN114785869B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201508473U (en) * 2009-08-20 2010-06-16 饶心 Single-bus intelligent measure and control device
CN102200763A (en) * 2010-03-23 2011-09-28 佳木斯大学 Grain status monitoring system based on fieldbus
CN203324975U (en) * 2013-05-30 2013-12-04 威海诺金传感技术有限公司 Serial communication debugging tool
CN203872196U (en) * 2014-03-19 2014-10-08 顺德职业技术学院 Simple heterogeneous control gateway
CN208636823U (en) * 2018-08-06 2019-03-22 深圳市信方达科技发展股份有限公司 Compound serial port circuit

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100561457C (en) * 2007-10-23 2009-11-18 中兴通讯股份有限公司 A kind of system of RS232/RS485 compatibility interface and method thereof
US9596091B2 (en) * 2014-03-17 2017-03-14 Camgian Microsystems, Corp Multiple sensor data processor interface and relay
CN205353366U (en) * 2015-11-10 2016-06-29 大连辽无二电器有限公司 Signal processing unit and marine navigation radar based on USB interface
CN112351565A (en) * 2020-11-20 2021-02-09 华润微集成电路(无锡)有限公司 Monolithic bus slave circuit structure

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201508473U (en) * 2009-08-20 2010-06-16 饶心 Single-bus intelligent measure and control device
CN102200763A (en) * 2010-03-23 2011-09-28 佳木斯大学 Grain status monitoring system based on fieldbus
CN203324975U (en) * 2013-05-30 2013-12-04 威海诺金传感技术有限公司 Serial communication debugging tool
CN203872196U (en) * 2014-03-19 2014-10-08 顺德职业技术学院 Simple heterogeneous control gateway
CN208636823U (en) * 2018-08-06 2019-03-22 深圳市信方达科技发展股份有限公司 Compound serial port circuit

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
PC机串行口扩展1—WIRE总线设备;季鑫源;《CNKI》;20050715;全文 *

Also Published As

Publication number Publication date
CN114785869A (en) 2022-07-22

Similar Documents

Publication Publication Date Title
CN103616607B (en) Test system of valve base electronic equipment for converter valve
CN106081046A (en) A kind of double remaining aerostatics measure and control device
CN114785869B (en) RS 232-to-one-wire protocol module and conversion method
CN110618949A (en) KVM function card based on LPC bus
CN201156671Y (en) Valve based electronic control apparatus
CN101937031B (en) Electric simulator for star sensor
CN108062283B (en) Interface adapter device for rail transit vehicle-mounted controller
CN109856499A (en) A kind of driving part and its detection method, display device
US20120054392A1 (en) Data read and write device and method for usb ports of 1-wire devices
CN102339582A (en) Indicator light control device
CN103489302B (en) A kind of signals collecting terminal and chamber data acquisition system (DAS)
CN201796248U (en) Universal serial bus (USB)-controller area network (CAN) communication module based on microcontroller
CN103984271A (en) Mine intrinsic safety type controller based on modular technology and control method
CN204697180U (en) Chip main board and television set
CN102495554A (en) Program controlled matrix switch and manufacturing method thereof
CN207731262U (en) A kind of SCM Based universal high speed data transfer test system
CN216622983U (en) Locomotive simulation device and locomotive simulation system
CN213812381U (en) Portable mobile base station and high-speed railway natural disaster monitoring system
CN215266981U (en) USB adapter
CN202837858U (en) Air conditioning controller developing device
CN217789689U (en) Subway RS232 signal branching and conversion monitoring device
CN218350248U (en) Sensor module calibration test system based on CAN communication
CN214202374U (en) Simulator adapter plate
KR100806934B1 (en) Apparatus for inputting digital signal based on VME bus used in nuclear plant safety system and method therefor
CN220730667U (en) Signal simulator of marine lead-through equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 710000 Room 601 605 606 607, Block C, Wangzuo Qujiang, No. 3269, Yanxiang Road, Qujiang New District, Xi'an, Shaanxi

Applicant after: Shaanxi Zhongshi Intelligent Technology Co.,Ltd.

Applicant after: Kunming 705 Science and Technology Development Co.,Ltd.

Address before: 710076 Room 601, building e, gazelle Valley, entrepreneurial R & D Park, Jinye Road, Zhangba street, high tech Zone, Xi'an, Shaanxi Province

Applicant before: Shaanxi Zhongshi Intelligent Technology Co.,Ltd.

Applicant before: Kunming 705 Science and Technology Development Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant