CN114785869A - 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
CN114785869A
CN114785869A CN202210696058.9A CN202210696058A CN114785869A CN 114785869 A CN114785869 A CN 114785869A CN 202210696058 A CN202210696058 A CN 202210696058A CN 114785869 A CN114785869 A CN 114785869A
Authority
CN
China
Prior art keywords
pin
resistor
module
interface
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.)
Granted
Application number
CN202210696058.9A
Other languages
Chinese (zh)
Other versions
CN114785869B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Communication Control (AREA)

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 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. 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 protocols. As long as a computer or other host equipment has a common RS232 serial interface, a one-wire waveform controlled by strict timing and voltage slew rate can be generated through the circuit, and communication with a one-wire system device is facilitated. 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 for converting RS232 to one-wire protocol and a conversion method thereof; the conversion between high level and low level can be carried out between circuit modules in different working voltage domains.
The invention is realized by the following technical scheme:
an RS 232-to-one-wire protocol module 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 temperature signals and 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.
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 R1, 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 both 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, two ends of a crystal oscillator X1 are also connected in series with a capacitor C4 and a capacitor C5, and the connection 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 a capacitor C12 is connected with 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 in parallel with an electrolytic capacitor C6, a capacitor C7, a capacitor C8, a capacitor C9, a capacitor C10 and a capacitor C11; the input end of the capacitor C12 is connected with the input end of the resistor R1;
the pin VSS _1, pin VSS _2, pin VSS _3, pin VSS _4 and pin VSSA of the main control board are all connected to 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 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; the 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 a C2+ pin and a 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 pin R2IN 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 includes a photocoupler U2 and a photocoupler 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; the 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 supply conversion module, and a fourth pin of the photoelectric coupler U2 is connected with a 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; the 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.
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 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 transistor Q3; the third contact of transistor Q3 is connected to digital ground; the first contact of the triode Q3 is connected with the 18B20_ D interface of the main control board through a resistor R44; the first contact of the triode Q3 is further connected with the transient suppression diode TVS3 connected to the ground 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 conversion module; the third contact of transistor Q5 is connected to digital ground;
a second contact of the resistor R29 is connected to a second contact of the transistor Q7, and a first contact of the transistor Q7 is connected to 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, the main control board of the control module receives the signal sent by the RS232 interface level conversion module, analyzes the time sequence and simulates a temperature signal;
s3, transmitting the simulated temperature signal and the serial number information to a one-wire interface module by the one-wire interface level conversion module, and then transmitting 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 light emitting diode LED1 and light emitting diode LED 2;
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 more fully hereinafter with reference to the accompanying drawings, in which the invention is shown by way of illustration and not by way of limitation.
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, 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.
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 R1, 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 both 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, two ends of a crystal oscillator X1 are also connected in series with a capacitor C4 and a capacitor C5, and the connection 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;
a VBAT pin, a VDD _1 pin, a VDD _2 pin, a VDD _3 pin, a VDD _4 pin and a VDDA pin of the main control board are all connected with the input end of a capacitor C12, and the output end of a capacitor C12 is connected with 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 in parallel with an electrolytic capacitor C6, a capacitor C7, a capacitor C8, a capacitor C9, a capacitor C10 and a capacitor C11; 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 TP 3232N-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 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; the VCC pin of the interface chip U6 is connected with the 3.3V voltage stabilizing module;
a capacitor C17 is connected between a C1+ pin and a C1-pin of the interface chip U6; a capacitor C21 is connected between a C2+ pin and a 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 pin R2IN 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 model of the photocoupler U2 and the photocoupler U3 is TLP 185;
as shown in fig. 2, a first pin of the photoelectric coupler 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 photoelectric coupler 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 supply conversion module, and a fourth pin of the photoelectric coupler U2 is connected with a TXD1 pin of the main control board;
as shown in fig. 2, a first pin of the photocoupler 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 photocoupler U3 is connected to an output terminal of the resistor R35; the 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 digital ground connected triode Q1 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 transistor Q3; the third contact of the transistor Q3 is connected to digital ground; as shown in fig. 2, the first contact of the transistor Q3 is connected to the 18B20_ 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 connected to the ground 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 conversion module; the third contact of transistor Q5 is connected to digital ground;
a second contact of the resistor R29 is connected with a second contact of the transistor Q7, and a first contact of the transistor 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, the main control board of the control module receives the signal sent by the RS232 interface level conversion module, analyzes the time sequence and simulates the temperature signal;
s3, transmitting the simulated temperature signal and the serial number information to a one-wire interface module by the one-wire interface level conversion module, and then transmitting 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 (7)

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 temperature signals and 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.
2. The RS232 to one-wire protocol module according to claim 1, wherein the power distribution module supplies power to the main control board, the RS232 interface module, the RS232 interface level shifter module, the one-wire interface level shifter module, and the one-wire interface module, and the power distribution module includes a 5V power source shifter module and a 3.3V power source shifter module.
3. The RS 232-to-one-wire protocol module according to claim 1, wherein a main control board circuit is provided on the main control board, and a Light Emitting Diode (LED) 1, a resistor R1, a resistor R4, and a Light Emitting Diode (LED) 2 are sequentially connected between a pin PA11 and a pin PA12 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, two ends of the crystal oscillator X1 are also connected with a capacitor C4 and a capacitor C5 in series, 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; a fourth pin of the download debugging interface is connected with the input end of the resistor R1;
a VBAT pin, a VDD _1 pin, a VDD _2 pin, a VDD _3 pin, a VDD _4 pin and a VDDA pin of the main control board are all connected with the input end of a capacitor C12, and the output end of a capacitor C12 is connected with 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 in parallel with an electrolytic capacitor C6, a capacitor C7, a capacitor C8, a capacitor C9, a capacitor C10 and a capacitor C11; the input end of the capacitor C12 is connected with the input end of the resistor R1;
the pin VSS _1, pin VSS _2, pin VSS _3, pin VSS _4 and pin VSSA of the main control board are all connected to digital ground.
4. 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 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; the 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 pin R2IN 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.
5. The RS232 to one-wire protocol module according to claim 1, wherein the RS232 interface level shifter module comprises an opto-coupler U2 and an opto-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 supply conversion module, and a fourth pin of the photoelectric coupler U2 is connected with a 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; the third pin of the photoelectric coupler U3 is grounded; a 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 a fourth pin of the photoelectric coupler U3 is connected with the RXD1 pin of the main control board.
6. The RS232 to one-wire protocol module according to claim 1, wherein the one-wire interface level shifter module includes a resistor R22 and a resistor R24 connected to the 5V power conversion module interface via the second contact, a digital ground connected transistor Q1 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 transistor Q3 is connected to digital ground; the first contact of the triode Q3 is connected with the 18B20_ D interface of the main control board through a resistor R44; the first contact of the triode Q3 is further connected with the transient suppression diode TVS3 connected to the ground 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 conversion module; the third contact of transistor Q5 is connected to digital ground;
a second contact of the resistor R29 is connected to a second contact of the transistor Q7, and a first contact of the transistor Q7 is connected to a second contact of the resistor R42; the third contact of transistor Q7 is coupled to digital ground.
7. A method for converting RS232 to one-wire protocol module is characterized by comprising 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, the main control board of the control module receives the signal sent by the RS232 interface level conversion module, analyzes the time sequence and simulates a temperature signal;
s3, transmitting the simulated temperature signal and the serial number information to a one-wire interface module by the one-wire interface level conversion module, and then transmitting 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 true CN114785869A (en) 2022-07-22
CN114785869B 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 (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140557A (en) * 2007-10-23 2008-03-12 中兴通讯股份有限公司 System and method of RS232/RS48 compatibility interface
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
US20150341179A1 (en) * 2014-03-17 2015-11-26 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
CN208636823U (en) * 2018-08-06 2019-03-22 深圳市信方达科技发展股份有限公司 Compound serial port circuit
WO2022105248A1 (en) * 2020-11-20 2022-05-27 华润微集成电路(无锡)有限公司 Single-chip bus slave circuit structure

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140557A (en) * 2007-10-23 2008-03-12 中兴通讯股份有限公司 System and method of RS232/RS48 compatibility interface
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
US20150341179A1 (en) * 2014-03-17 2015-11-26 Camgian Microsystems Corp. Multiple Sensor Data Processor Interface and Relay
CN203872196U (en) * 2014-03-19 2014-10-08 顺德职业技术学院 Simple heterogeneous control gateway
CN205353366U (en) * 2015-11-10 2016-06-29 大连辽无二电器有限公司 Signal processing unit and marine navigation radar based on USB interface
CN208636823U (en) * 2018-08-06 2019-03-22 深圳市信方达科技发展股份有限公司 Compound serial port circuit
WO2022105248A1 (en) * 2020-11-20 2022-05-27 华润微集成电路(无锡)有限公司 Single-chip bus slave circuit structure

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
CN114785869B (en) 2022-11-25

Similar Documents

Publication Publication Date Title
CN103616607B (en) Test system of valve base electronic equipment for converter valve
CN105510811A (en) Switch matrix test system based on bus transfer
CN114785869B (en) RS 232-to-one-wire protocol module and conversion method
CN107515341B (en) Test board
US20120054392A1 (en) Data read and write device and method for usb ports of 1-wire devices
CN101424739A (en) Radar system interface card based on FPGA
CN105319453B (en) A kind of environment protection digital Acquisition Instrument test device and system
CN218547284U (en) Monitoring device for testing system working state
CN115508749A (en) Intermittent fault acquisition and test device and method for aviation assembly connector
CN201796248U (en) Universal serial bus (USB)-controller area network (CAN) communication module based on microcontroller
CN112799989B (en) Interface switching circuit and communication device
CN204697180U (en) Chip main board and television set
CN209401292U (en) Protection circuit, driving device and liquid crystal display device
CN102495554A (en) Program controlled matrix switch and manufacturing method thereof
CN216622983U (en) Locomotive simulation device and locomotive simulation system
CN101290607A (en) Chip debugging interface device
CN105403262B (en) Flow monitor
CN218350248U (en) Sensor module calibration test system based on CAN communication
CN215266981U (en) USB adapter
CN104345716A (en) Method for realizing satellite power control and modularized plug-and-play of distribution unit
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
CN213812381U (en) Portable mobile base station and high-speed railway natural disaster monitoring system
CN213960076U (en) Unmanned aerial vehicle data link transmission quality test equipment
CN218162483U (en) Remote IIC communication circuit for unmanned aerial vehicle

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