CN212159924U - Portable RS485 communication tester - Google Patents

Portable RS485 communication tester Download PDF

Info

Publication number
CN212159924U
CN212159924U CN202020661060.9U CN202020661060U CN212159924U CN 212159924 U CN212159924 U CN 212159924U CN 202020661060 U CN202020661060 U CN 202020661060U CN 212159924 U CN212159924 U CN 212159924U
Authority
CN
China
Prior art keywords
communication
resistor
controller
voltage
lithium battery
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
CN202020661060.9U
Other languages
Chinese (zh)
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.)
Guangdong Nedfon Indoor Air System Technology Co Ltd
Original Assignee
Guangdong Nedfon Indoor Air System 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 Guangdong Nedfon Indoor Air System Technology Co Ltd filed Critical Guangdong Nedfon Indoor Air System Technology Co Ltd
Priority to CN202020661060.9U priority Critical patent/CN212159924U/en
Application granted granted Critical
Publication of CN212159924U publication Critical patent/CN212159924U/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Telephone Function (AREA)

Abstract

The utility model discloses a portable RS485 communication tester, include: the power supply state indicating lamp is controlled to flicker by the controller through detecting whether the power supply voltage is lower than a set threshold value by using the voltage detection circuit and sending a low voltage signal to the controller; utilize the controller to pass through RS485 communication interface circuit receives external equipment's response order and control communication status indicator lamp scintillation, the controller acquires external equipment's communication parameter sends and shows to the display screen, for prior art, the utility model discloses communication state and the power state to test communication process are visual, avoid RS485 communication tester trouble itself to influence the accuracy of test result, improve efficiency of software testing.

Description

Portable RS485 communication tester
Technical Field
The utility model belongs to the technical field of the communication test and specifically relates to a portable RS485 communication tester is related to.
Background
The RS485/MODBUS communication network is a popular step network mode for industrial control at present, and is characterized by simple and convenient implementation and a plurality of supporting instruments and equipment, all the equipment must be tested and communicated before networking communication, the external equipment is often connected with a computer by using a 485 switching port for testing the communication equipment, and the communication parameters of each equipment are adjusted by using the computer to realize the networking of the equipment.
When networking of each device is achieved by using a computer, because the computer only displays a final test result, if communication fails due to the fault problems such as faults of a communication wire or a 485 switching port, a tester is often difficult to find reasons, and the testing efficiency is affected.
SUMMERY OF THE UTILITY MODEL
An object of the utility model is to overcome prior art's shortcoming and not enough, provide a show communication state and power state's portable RS485 communication tester, reduce the accuracy that testing instrument trouble influences the communication test result.
The utility model discloses a realize through following technical scheme: a portable RS485 communication tester, comprising: the device comprises an indicator lamp, a controller, a display screen, an RS485 communication interface circuit, a power supply and a voltage detection circuit; the indicator lamp comprises a communication state indicator lamp and a power state indicator lamp, the controller is respectively connected with the communication state indicator lamp, the power state indicator lamp, the RS485 communication interface circuit and the voltage detection circuit, and the power supply is respectively connected with the indicator lamp, the controller, the display screen, the RS485 communication interface circuit and the voltage detection circuit;
the voltage detection circuit is used for detecting whether the power supply voltage is lower than a set threshold value or not, and sending a low-voltage signal to the controller to enable the controller to control the power supply state indicator lamp to flicker;
the controller receives a response command of external equipment through the RS485 communication interface circuit and controls the communication state indicator lamp to flicker, and the controller acquires communication parameters of the external equipment and sends the communication parameters to the display screen for displaying.
Optionally, the RS485 communication interface circuit includes: the device comprises an SP3485 communication chip, a first resistor, a second resistor and a third resistor;
a signal input and output in-phase end a of the SP3485 communication chip is connected with one end of a first resistor, a signal input and output inverting end B of the SP3485 communication chip is connected with one end of a second resistor, the other ends of the first resistor and the second resistor are respectively connected with external equipment, and the signal input and output in-phase end a of the SP3485 communication chip is connected with the signal input and output inverting end B of the SP3485 communication chip through a third resistor;
the power supply input end VCC of the SP3485 communication chip is connected with a power supply;
receiver output enabling end of SP3485 communication chip
Figure BDA0002467773560000021
Connected with the driver output enable terminal DE of the SP3485 communication chip, and the receiver output enable terminal DE of the SP3485 communication chip
Figure BDA0002467773560000022
The driver output enable terminal DE, the receiver output terminal RO and the driver input terminal DI are connected to the controller, respectively.
Optionally, the power supply circuit includes a lithium battery, a first resistor, a second resistor, a first capacitor, a lithium battery protection chip DW01K, a charge-discharge protection chip 8205A, and a voltage reduction circuit;
the positive electrode of the lithium battery is connected with the positive power supply input end VDD of the lithium battery protection chip DW01K through a first resistor, and the negative electrode of the lithium battery is respectively connected with the negative power supply input end VSS of the lithium battery protection chip DW01K and the first source terminal S1 of the charge-discharge protection chip 8205A;
a positive power supply input end VDD of the lithium battery protection chip DW01K is connected to a negative power supply input end VSS through a first capacitor, a discharge controller FET threshold connection end OD of the lithium battery protection chip DW01K is connected to a first gate end G1 of the charge-discharge protection chip 8205A, and a charge control FEL threshold connection end OC of the lithium battery protection chip DW01K is connected to a second gate end G2 of the charge-discharge protection chip 8205A; the current sensing input end CSI of the lithium battery protection chip DW01K is connected with a second source end S2 of the charge-discharge protection chip 8205A through the second resistor;
the voltage reduction circuit is connected with the anode of the lithium battery and used for converting the voltage of the lithium battery into 3.3V voltage.
Optionally, the power supply circuit further includes a charging interface and a third resistor, the charging interface includes a positive interface and a negative interface, the positive interface is connected to the positive electrode of the lithium battery, and the negative interface is respectively connected to the S2 end of the charging and discharging protection chip 8205A and one end of the third resistor; the other end of the third resistor is grounded.
Optionally, the voltage detection circuit includes a first voltage-dividing resistor and a second voltage-dividing resistor, one end of the first voltage-dividing resistor is connected to the positive electrode of the lithium battery, one end of the second voltage-dividing resistor is grounded, and the other end of the second voltage-dividing resistor is connected to the first voltage-dividing resistor and the controller, respectively.
Optionally, the system further comprises a key, wherein the key is connected with the controller and used for sending a detection starting instruction to the controller.
Optionally, the keys are m × n key matrixes, one end of each key unit is connected to a corresponding row line, and the other end of each key unit is connected to a corresponding column line; each row line and column line of the key matrix are connected with a resistor in series and connected with the controller; where m is the number of rows and n is the number of columns.
Optionally, the controller further comprises a buzzer circuit, and the buzzer circuit is connected with the controller and used for receiving a buzzer instruction of the controller and sending out a buzzer prompt tone.
Optionally, the RS485 communication interface circuit further includes a communication interface, and the communication interface is provided with 4 connection terminals, wherein two connection terminals are connected to the signal input/output in-phase terminal a of the SP3485 communication chip, and two connection terminals are connected to the signal input/output out-of-phase terminal B of the SP3485 communication chip
In the embodiment of the application, the portable RS485 communication tester detects whether the power supply voltage is lower than a set threshold value by using a voltage detection circuit, and sends a low-voltage signal to the controller, so that the controller controls the power supply status indicator lamp to flash; utilize the controller to pass through RS485 communication interface circuit receives external equipment's response order and control communication status indicator lamp scintillation, the controller acquires external equipment's communication parameter sends and shows to the display screen, has realized the visual of communication state and the power state of test communication process, avoids RS485 communication tester trouble itself to influence the accuracy of test result, improves efficiency of software testing
For a better understanding and an implementation, the present invention is described in detail below with reference to the accompanying drawings.
Drawings
Fig. 1 is a schematic diagram of a portable RS485 communication tester according to an exemplary embodiment of the present invention;
fig. 2 is a circuit diagram of an RS485 communication interface circuit 4 in an exemplary embodiment of the invention;
fig. 3 is a circuit diagram of the power supply 5 in an exemplary embodiment of the invention;
fig. 4 is a circuit diagram of a voltage step-down circuit in an exemplary embodiment of the invention;
fig. 5 is a circuit diagram of the voltage detection circuit 6 in an exemplary embodiment of the invention;
fig. 6 is a schematic structural diagram of a key in an exemplary embodiment of the present invention;
fig. 7 is a schematic diagram of a portable RS485 communication tester according to an exemplary embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
It should be understood that the embodiments described are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the embodiments in the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims. In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not necessarily used to describe a particular order or sequence, nor are they to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
In addition, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Referring to fig. 1, the utility model provides a portable RS485 communication tester, includes: the device comprises an indicator lamp 1, a controller 2, a display screen 3, an RS485 communication interface circuit 4, a power supply 5 and a voltage detection circuit 6; the indicator lamp 1 comprises a communication state indicator lamp 11 and a power state indicator lamp 12, the controller 2 is respectively connected with the communication state indicator lamp 11, the power state indicator lamp 12, the RS485 communication interface circuit 4, a power supply 5 and the voltage detection circuit 5, and the power supply 5 is respectively connected with the indicator lamp 1, the display screen 3, the RS485 communication interface circuit 4 and the voltage detection circuit 6;
the voltage detection circuit 6 is configured to detect whether the power supply voltage is lower than a set threshold, and send a low voltage signal to the controller 2, so that the controller 2 controls the power status indicator 12 to blink.
The controller 2 receives a response command of an external device through the RS485 communication interface circuit 4 and controls the communication state indicator lamp 11 to flicker, and the controller 2 acquires communication parameters of the external device and sends the communication parameters to the display screen 3 for displaying.
The indicator light 1 may be an LED light, and the communication status indicator light and the power status indicator light may be LEDs of different colors, wherein the LED may be a plug-in type or a patch type.
The indicator light 1 may blink gradually in the form of a breathing light, or may be in a constantly lit state.
The communication status indicator lamp may be a yellow LED, and the yellow communication status indicator lamp 11 is blinked when the controller 2 receives a response command from an external device.
The power state indicator lamp 11 may be a single-color LED, and is lit when the power voltage is lower than a set threshold value, or may be a double-color LED, and displays the power voltage state by switching the colors of the two LEDs, or may be two single-color LEDs, one of which is a charging indicator lamp and the other is a full-power indicator lamp, and when the charging indicator lamp gradually flashes in the form of a breathing lamp, it indicates that the power voltage is insufficient and needs to be charged, and when the full-power indicator lamp is normally lit, it indicates that the power voltage is normal.
For example, the charge indicator lamp can be the red light, full charge indicator lamp can be the green light, when controller 2 acquires low voltage signal, control the red light with breathe the lamp form and twinkle gradually, the suggestion portable RS485 communication tester needs to charge, when controller 2 does not acquire low voltage signal, control the green light is bright constantly.
The controller 2 is a core unit of the portable RS485 communication tester, and can be used to implement functions such as battery voltage detection, logic judgment and data operation processing, communication and output display control, and the controller 2 may be a single chip microcomputer, and in one example, the controller may be a single chip microcomputer of the model STM32F 030.
The display 3 may be a cathode ray tube display (CRT), a Plasma Display Panel (PDP) or a Liquid Crystal Display (LCD), and in the present embodiment, the display 3 is a liquid crystal display.
The display 3 can be used for displaying communication parameters of the external device RS485, such as displaying an address of the external device, a communication baud rate, data bits, check bits and stop bits. When there is a key, it can also be used to display the key value input by keyboard and the display value of external device returning to running state. The liquid crystal display screen is a 128-by-64 liquid crystal lattice screen and is green backlight, and characters displayed on the screen can be clearly seen in any environment. When the portable RS485 communication tester is in a working state, the lCD liquid crystal screen green backlight is on, and when the portable RS485 communication tester is in a standby state, the backlight is off.
The response command of the external device may be a response signal sent by the external device after receiving the request command sent by the controller, and in this embodiment of the present application, the request command and the response command are defined according to a Modbus protocol.
The Modbus protocol is the application layer messaging protocol at layer 7 of the OSI model, which provides client/server communication between devices connected to different types of bus networks, and since 1979 it has served as a de facto standard for industrial serial links enabling thousands of industrial automation devices and instruments to communicate, the Modbus protocol is a request/response protocol and provides services specified by function codes, asynchronous serial transmission can be achieved via TCP/IP over ethernet, and various media such as EIA/TIA-232-F, EIA-422, EIA/TIA-485-a, fiber optics, etc.
Specifically, the request command includes an additional address, a function code, data, and an error check, wherein the additional address: i.e., an external device default address (which may be modified and permanently stored by device hardware or software), the protocol standard defines its address range to be in the general address range of 01 to 254.
Function code: the protocol standards define common function code functions, respectively, such as:
"03": representing reading a plurality of register data of an external device;
"06": indicating writing external device single register data;
"16": representing writing a plurality of register data of an external device;
data: i.e. the first address of the register of the external device to be operated and the number of registers to be operated. The data protocol standard has a clear data protocol format, and the RS485 communication data only conforms to the protocol standard.
Error checking: RS485 communication generally adopts a Modbus RTU communication standard protocol, and an RTU mode adopts a 16-bit CRC check mode.
In one example, the request command format is as follows:
table 1 request command format
Figure BDA0002467773560000061
The reply command format is as follows in table 2:
table 2 answer command format
Figure BDA0002467773560000062
For example:
the controller sends a request command:
0x01 0x03 0x00 0x05 0x00 0x0A oxD5 0xCC
namely: the controller reads data of consecutive 10 registers starting from the register address 0005 unit address to an external device with an address code of 0001, and the last two bytes of data "oxD 50 xCC" is a CRC check value starting from the first data to the last data, i.e., "0 x 010 x 030 x 000 x 050 x 000 x 0A".
The external device returns a response command:
if the address code of the external equipment is 0001 and the communication baud rate of the external equipment is consistent with that of the transmitted data, corresponding numerical values are returned according to the format of a table 2:
such as: 0x 010 x 030 x 140 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 000 x 240 x 92.
Namely: the external device address is 0001, 20 data are returned, starting from the location with the register address of 0005, the data are 0 or other data (the data is the default data of the external device, here we assume to be 00), and the check code of the returned data is high byte "0 x 24", and low byte "0 x 92".
In the embodiment of the application, the portable RS485 communication tester detects whether the power supply voltage is lower than a set threshold value by using a voltage detection circuit, and sends a low-voltage signal to the controller, so that the controller controls the power supply status indicator lamp to flash; utilize the controller to pass through RS485 communication interface circuit receives external equipment's response order and control communication status indicator lamp scintillation, the controller acquires external equipment's communication parameter sends and shows to the display screen, has realized the visual of communication state and the power state of test communication process, avoids RS485 communication tester trouble itself to influence the accuracy of test result, improves efficiency of software testing.
In an exemplary embodiment, the RS485 communication interface circuit includes: the device comprises an SP3485 communication chip, a first resistor and a second resistor;
a signal input and output in-phase end A of the SP3485 communication chip is connected with one end of a first resistor, a signal input and output out-of-phase end B of the SP3485 communication chip is connected with one end of a second resistor, and the other ends of the first resistor and the second resistor are respectively connected with external equipment;
the power supply input end VCC of the SP3485 communication chip is connected with a power supply;
receiver output enabling end of SP3485 communication chip
Figure BDA0002467773560000072
Connected with the driver output enable terminal DE of the SP3485 communication chip, and the receiver output enable terminal DE of the SP3485 communication chip
Figure BDA0002467773560000073
The driver output enable terminal DE, the receiver output terminal RO and the driver input terminal DI are connected to the controller, respectively.
In an exemplary embodiment, the RS485 communication interface circuit further includes a communication interface, and the communication interface is provided with 4 connection terminals, where two connection terminals are connected to the signal input/output in-phase terminal a of the SP3485 communication chip, and two connection terminals are connected to the signal input/output out-of-phase terminal B of the SP3485 communication chip.
As shown in fig. 2, in an exemplary embodiment, the RS485 communication interface circuit includes: the device comprises a communication interface, an SP3485 communication chip, resistors R16-R21 and a capacitor C14;
4 wiring terminals are arranged on the communication interface;
the signal input and output in-phase end A of the SP3485 communication chip is connected with the signal input and output out-phase end B of the SP3485 communication chip through a resistor R19, the signal input and output in-phase end A of the SP3485 communication chip is respectively connected with one end of a resistor R18 and one end of a resistor R21, the signal input and output out-phase end B of the SP3485 communication chip is respectively connected with one end of a resistor R17 and one end of a resistor R20, the other end of the resistor R17 is grounded, the other end of the resistor R18 is connected with a 3.3V power supply, and the other end of the resistor R20 is respectively connected with two wiring terminals on the communication interface; the other end of the resistor R21 is connected with the other two terminals on the communication interface.
The power supply input end VCC of the SP3485 communication chip is connected with a 3.3V power supply, and the power supply input end VCC of the SP3485 communication chip is grounded through a capacitor C14;
receiver output enabling end of SP3485 communication chip
Figure BDA0002467773560000071
The output enable end DE of the driver of the SP3485 communication chip is connected to serve as a 485ENB end, the output end RO of the receiver of the SP3485 communication chip is used as a 485RXD end, the input end DI of the driver of the SP3485 communication chip is used as a 485TXD end, the 485ENB end, the 485RXD end and the 485TXD end are respectively connected with corresponding IO ports of the single chip microcomputer, and the 485ENB end is grounded through a resistor R16.
The grounding end GND of the SP3485 communication chip is grounded.
Wherein, the resistances of the resistors R16-R21 are respectively: 22K Ω, 120 Ω, 6.2 Ω and 6.2 Ω, and the capacitance value of the capacitor C14 is 0.1 uf.
In an exemplary embodiment, the power circuit includes a lithium battery, a first resistor, a second resistor, a first capacitor, a lithium battery protection chip DW01K, a charge and discharge protection chip 8205A, and a voltage reduction circuit;
the positive electrode of the lithium battery is connected with the positive power supply input end VDD of the lithium battery protection chip DW01K through a first resistor, and the negative electrode of the lithium battery is respectively connected with the negative power supply input end VSS of the lithium battery protection chip DW01K and the first source terminal S1 of the charge-discharge protection chip 8205A;
a positive power supply input end VDD of the lithium battery protection chip DW01K is connected to a negative power supply input end VSS through a first capacitor, a discharge controller FET threshold connection end OD of the lithium battery protection chip DW01K is connected to a first gate end G1 of the charge-discharge protection chip 8205A, and a charge control FEL threshold connection end OC of the lithium battery protection chip DW01K is connected to a second gate end G2 of the charge-discharge protection chip 8205A; the current sensing input end CSI of the lithium battery protection chip DW01K is connected with a second source end S2 of the charge-discharge protection chip 8205A through the second resistor;
the voltage reduction circuit is connected with the anode of the lithium battery and used for converting the voltage of the lithium battery into 3.3V voltage.
The lithium battery protection chip DW01K and the charge-discharge protection chip 8205A are used for protecting the lithium battery, so that the service life of the lithium battery is prevented from being shortened or damaged due to overcharge, overdischarge and overlarge current.
In an exemplary embodiment, the power circuit further includes a charging interface and a third resistor, the charging interface includes a positive interface and a negative interface, the positive interface is connected to a positive electrode of the lithium battery, and the negative interface is respectively connected to an S2 terminal of the charging and discharging protection chip 8205A and one end of the third resistor; the other end of the third resistor is grounded.
Preferably, the controller 2 is further configured to detect whether the charging interface is charged, control the charging indicator light to be normally on when the lithium battery is charged, and close the charging indicator light and control the full-charge indicator light to be normally on when the lithium battery is fully charged.
In an exemplary embodiment, the power circuit further includes a schottky diode disposed between the positive interface and the positive electrode of the lithium battery, the positive electrode of the schottky diode is connected to the positive interface, and the negative electrode of the schottky diode is connected to the positive electrode of the lithium battery.
The barrier (barrier) rectifying effect generated by the contact of metal and semiconductor surface is used, and this contact surface is called "metal semiconductor junction", and its full name is Schottky barrier diode, and is abbreviated as Schottky diode. The schottky diode can be of a plug-in type or a patch type, and preferably, the schottky diode is a patch type schottky diode with the model number SS 34.
A forward large-current Schottky diode is arranged at an anode interface of the battery for preventing reverse connection of input voltage during charging and protecting a circuit.
As shown in fig. 3, in an exemplary embodiment, the power circuit includes a lithium battery BAT, a first resistor R1, a second resistor R2, a third resistor R3, a first capacitor C5, a lithium battery protection chip DW01K, a schottky diode SS34, a charging interface, a charging and discharging protection chip 8205A, and a voltage reduction circuit;
the lithium battery BAT is a 3.7V lithium battery;
the positive electrode of the lithium battery BAT is connected with the positive power supply input end VDD of the lithium battery protection chip DW01K through a first resistor R1, and the negative electrode of the lithium battery BAT is respectively connected with the negative power supply input end VSS of the lithium battery protection chip DW01K and a first source terminal S1 of the charge-discharge protection chip 8205A;
a positive power supply input end VDD of the lithium battery protection chip DW01K is connected to a negative power supply input end VSS through a first capacitor, a discharge controller FET threshold connection end OD of the lithium battery protection chip DW01K is connected to a first gate end G1 of the charge-discharge protection chip 8205A, and a charge control FEL threshold connection end OC of the lithium battery protection chip DW01K is connected to a second gate end G2 of the charge-discharge protection chip 8205A; the current sensing input end CSI of the lithium battery protection chip DW01K is connected with a second source terminal S2 of the charge-discharge protection chip 8205A through the second resistor R2;
the Schottky diode is a patch type Schottky diode with the model number of SS34, the Schottky diode is arranged between the positive electrode interface and the positive electrode of the lithium battery, the positive electrode of the Schottky diode is connected with the positive electrode interface, and the negative electrode of the Schottky diode is connected with the positive electrode of the lithium battery.
The charging interface comprises a positive electrode interface BAT + and a negative electrode interface BAT-, the positive electrode interface BAT + is connected with the positive electrode of the lithium battery, and the negative electrode interface BAT-is respectively connected with the S2 end of the charging and discharging protection chip 8205A and one end of a third resistor R3; the other end of the third resistor R3 is grounded;
the voltage reduction circuit is connected with the anode of the lithium battery and used for converting the voltage of the lithium battery into 3.3V voltage.
The resistances of the resistors R1-R3 are 100 omega, 1K omega and 0 omega respectively.
The resistor R3 is used to isolate the power ground of the whole circuit board and avoid the mutual interference between the analog ground and the digital ground.
The power supply circuit has the functions of overcharge voltage, overdischarge voltage, overcurrent, output short circuit protection and anti-charge reverse protection for the lithium battery.
Referring to fig. 4, in an exemplary embodiment, the voltage reducing circuit includes an LDO voltage regulator YL33, a first electrolytic capacitor C1, a second electrolytic capacitor C4, a first filter capacitor C2, and a second filter capacitor C3;
the input end of the LDO voltage stabilizer YL33 is respectively connected with the output end of the power supply circuit and the positive electrode of a first electrolytic capacitor C1, the input end of the LDO voltage stabilizer YL33 is grounded through the first filter capacitor C2, the output end of the LDO voltage stabilizer YL33 is connected with the positive electrode of a second electrolytic capacitor C4, and the output end of the LDO voltage stabilizer YL33 is grounded through a second filter capacitor C3;
the negative electrode of the first electrolytic capacitor C1 is grounded with the negative electrode of the second electrolytic capacitor C4.
The voltage reduction circuit is simple in structure and low in power consumption, and the voltage of the battery is reduced and then maintained at 3.3V to supply power to the portable RS485 communication tester.
In an exemplary embodiment, the voltage detection circuit includes a first voltage-dividing resistor and a second voltage-dividing resistor, one end of the first voltage-dividing resistor is connected to the positive electrode of the lithium battery, one end of the second voltage-dividing resistor is grounded, and the other end of the second voltage-dividing resistor is connected to the first voltage-dividing resistor and the controller, respectively.
Specifically, referring to fig. 5, the voltage detection circuit includes a first voltage-dividing resistor R8, a second voltage-dividing resistor R9, and a capacitor C8, one end of the first voltage-dividing resistor R8 is connected to the positive electrode VBAT + of the lithium battery, one end of the second voltage-dividing resistor R9 is grounded, the other end of the second voltage-dividing resistor R9 is connected to one end of the first voltage-dividing resistor R8 and one end of the capacitor C8, and the other end of the capacitor C8 is grounded.
And the voltage at two ends of the second voltage-dividing resistor R9 is input to the corresponding IO port of the controller 1 as the detection voltage VBAT _ JC.
The resistance values of the first divider resistor R8 and the second divider resistor R9 are 330K Ω and 510K Ω respectively, and the capacitance value of the capacitor C8 is 0.1 uf.
The controller passes through voltage detection circuit is right the voltage of lithium cell detects, when the battery voltage was crossed 3.5V, control power status indicator lamp scintillation, voltage detection circuit simple structure, the practicality is high.
In an exemplary embodiment, the mobile terminal further comprises a key, wherein the key is connected with the controller and used for sending a starting detection instruction to the controller.
Preferably, the keys are m × n key matrixes, one end of each key unit is connected to a corresponding row line, and the other end of each key unit is connected to a corresponding column line; each row line and column line of the key matrix are connected with a resistor in series and connected with the controller; where m is the number of rows and n is the number of columns.
The keys can be used for inputting commands to control external equipment and modify parameters such as addresses of the external equipment and communication baud rates, point-to-point machine-by-machine debugging is achieved, so that the engineering system can be debugged machine-by-machine during networking debugging and address codes are distributed, and when the whole set of system is debugged in a networking mode, information such as addresses, positions and parameters of the equipment to be debugged can be accurately mastered on the upper computer.
In one example, where m is 5 and n is 4, the key elements S0-S19 are arranged as shown in FIG. 6, with KB _ ROW0-KB _ ROW4 being ROW lines and KB _ COL0-KB _ COL 3 being column lines.
The key adopts the matrix key design, furthest has saved the IO mouth resource of singlechip to, through having established ties input resistance on the key input IO mouth, the interference killing feature of reinforcing equipment.
In an exemplary embodiment, the controller further comprises a buzzer circuit, wherein the buzzer circuit is connected with the controller and is used for receiving a buzzer instruction of the controller and sending out a buzzer prompt tone.
For example, when the key input is effective, a buzzing prompt tone of 'dripping' is sent out, and when the portable RS485 communication tester exits the working mode and enters the standby mode, three sounds of 'dripping, dripping and dripping' are sent out to prompt the portable RS485 communication tester to enter the standby state.
As shown in fig. 7, the working process of the portable RS485 communication tester is as follows:
according to "parameter reading" button, handheld tester according to the Modbus protocol standard, automatic generation reads the command data of peripheral equipment, if: 0x 010 x 030 x 000 x 050 x 000 x0A oxD 50 xCC, sending the data to external equipment at 9600bit/s baud rate to request to read 10 register data values with the register address of 0005 beginning, if the external equipment does not answer the data, the portable RS485 communication tester does not receive the answer data, restarting the data transmission again, but automatically changing the baud rate of the sent data into 4800bit/s to resend the data. The baud rate cycle sequence of the data sent by the portable RS485 communication tester is as follows: 9600bit/s, 1200bit/s, 2400bit/s, 4800bit/s, 19200bit/s, 600bit/s, 38400 bit/s. If the external device still does not answer the signal, then the command starting with the second address code of 0002 repeats the above sequence to perform the round search parameter. Generally, factory equipment address codes set a default address code through hardware or a dial switch or software, and the default address codes of the equipment are numbers which sequentially increase from 01.
When the external equipment receives the data to make response, the portable RS485 communication tester receives the response data to automatically check, and after the response data are correct, the external equipment is displayed on the LCD screen: the system comprises an address code, a communication baud rate, a check bit and a stop bit, and is recorded by testers, so that the system is favorable for setting parameters of an upper computer software platform during joint debugging of engineering. When the external equipment returns data, the communication state indicator lamp on the tester quickly flickers.
In this application embodiment, only need with external equipment's RS485 communication interface use 2 core communication cable with the RS485 communication interface butt joint of portable RS485 communication tester can test its communication for the external equipment circular telegram to its external equipment function of accessible portable RS485 communication tester input command test, the installation and debugging personnel of being convenient for carry and use, practical value is high.
The present invention is not limited to the above embodiment, and if various modifications or variations of the present invention do not depart from the spirit and scope of the present invention, they are intended to be covered if they fall within the scope of the claims and the equivalent technology of the present invention.

Claims (9)

1. A portable RS485 communication tester, characterized by that includes: the device comprises an indicator lamp, a controller, a display screen, an RS485 communication interface circuit, a power supply and a voltage detection circuit; the indicator lamp comprises a communication state indicator lamp and a power state indicator lamp, the controller is respectively connected with the communication state indicator lamp, the power state indicator lamp, the RS485 communication interface circuit and the voltage detection circuit, and the power supply is respectively connected with the indicator lamp, the controller, the display screen, the RS485 communication interface circuit and the voltage detection circuit;
the voltage detection circuit is used for detecting whether the power supply voltage is lower than a set threshold value or not, and sending a low-voltage signal to the controller to enable the controller to control the power supply state indicator lamp to flicker;
the controller receives a response command of external equipment through the RS485 communication interface circuit and controls the communication state indicator lamp to flicker, and the controller acquires communication parameters of the external equipment and sends the communication parameters to the display screen for displaying.
2. The portable RS485 communication tester according to claim 1, wherein: the RS485 communication interface circuit comprises: the device comprises an SP3485 communication chip, a first resistor, a second resistor and a third resistor;
a signal input and output in-phase end a of the SP3485 communication chip is connected with one end of a first resistor, a signal input and output inverting end B of the SP3485 communication chip is connected with one end of a second resistor, the other ends of the first resistor and the second resistor are respectively connected with external equipment, and the signal input and output in-phase end a of the SP3485 communication chip is connected with the signal input and output inverting end B of the SP3485 communication chip through a third resistor;
the power supply input end VCC of the SP3485 communication chip is connected with a power supply;
receiver output enabling end of SP3485 communication chip
Figure FDA0002467773550000011
Connected with the driver output enable terminal DE of the SP3485 communication chip, and the receiver output enable terminal DE of the SP3485 communication chip
Figure FDA0002467773550000012
The driver output enable terminal DE, the receiver output terminal RO, and the driver input terminal DI are connected to the controller, respectively.
3. The portable RS485 communication tester according to claim 1, wherein: the power supply circuit comprises a lithium battery, a first resistor, a second resistor, a first capacitor, a lithium battery protection chip DW01K, a charge-discharge protection chip 8205A and a voltage reduction circuit;
the positive electrode of the lithium battery is connected with the positive power supply input end VDD of the lithium battery protection chip DW01K through a first resistor, and the negative electrode of the lithium battery is respectively connected with the negative power supply input end VSS of the lithium battery protection chip DW01K and the first source terminal S1 of the charge-discharge protection chip 8205A;
a positive power supply input end VDD of the lithium battery protection chip DW01K is connected to a negative power supply input end VSS through a first capacitor, a discharge controller FET threshold connection end OD of the lithium battery protection chip DW01K is connected to a first gate end G1 of the charge-discharge protection chip 8205A, and a charge control FEL threshold connection end OC of the lithium battery protection chip DW01K is connected to a second gate end G2 of the charge-discharge protection chip 8205A; the current sensing input end CSI of the lithium battery protection chip DW01K is connected with a second source end S2 of the charge-discharge protection chip 8205A through the second resistor;
the voltage reduction circuit is connected with the anode of the lithium battery and used for converting the voltage of the lithium battery into 3.3V voltage.
4. The portable RS485 communication tester according to claim 3, wherein: the power supply circuit further comprises a charging interface and a third resistor, wherein the charging interface comprises a positive electrode interface and a negative electrode interface, the positive electrode interface is connected with a positive electrode of the lithium battery, and the negative electrode interface is respectively connected with an S2 end of the charging and discharging protection chip 8205A and one end of the third resistor; the other end of the third resistor is grounded.
5. The portable RS485 communication tester according to claim 3, wherein: the voltage detection circuit comprises a first voltage-dividing resistor and a second voltage-dividing resistor, wherein one end of the first voltage-dividing resistor is connected with the anode of the lithium battery, one end of the second voltage-dividing resistor is grounded, and the other end of the second voltage-dividing resistor is respectively connected with the first voltage-dividing resistor and the controller.
6. The portable RS485 communication tester according to claim 1, wherein: the device also comprises a key, wherein the key is connected with the controller and used for sending a detection starting instruction to the controller.
7. The portable RS485 communication tester according to claim 6, wherein: the keys are m multiplied by n key matrixes, one end of each key unit is connected to the corresponding row line, and the other end of each key unit is connected to the corresponding column line; each row line and column line of the key matrix are connected with a resistor in series and connected with the controller; where m is the number of rows and n is the number of columns.
8. The portable RS485 communication tester according to claim 1, wherein: the buzzer circuit is connected with the controller and used for receiving a buzzing instruction of the controller and sending a buzzing prompt tone.
9. The portable RS485 communication tester according to claim 2, wherein: the RS485 communication interface circuit further comprises a communication interface, wherein 4 wiring terminals are arranged on the communication interface, two wiring terminals are connected with a signal input and output in-phase end A of the SP3485 communication chip, and two wiring terminals are connected with a signal input and output out-of-phase end B of the SP3485 communication chip.
CN202020661060.9U 2020-04-26 2020-04-26 Portable RS485 communication tester Active CN212159924U (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202020661060.9U CN212159924U (en) 2020-04-26 2020-04-26 Portable RS485 communication tester

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202020661060.9U CN212159924U (en) 2020-04-26 2020-04-26 Portable RS485 communication tester

Publications (1)

Publication Number Publication Date
CN212159924U true CN212159924U (en) 2020-12-15

Family

ID=73724464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202020661060.9U Active CN212159924U (en) 2020-04-26 2020-04-26 Portable RS485 communication tester

Country Status (1)

Country Link
CN (1) CN212159924U (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116661865A (en) * 2023-07-26 2023-08-29 深圳大学 Register management method, device, terminal equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116661865A (en) * 2023-07-26 2023-08-29 深圳大学 Register management method, device, terminal equipment and storage medium
CN116661865B (en) * 2023-07-26 2023-12-08 深圳大学 Register management method, device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
CN212159924U (en) Portable RS485 communication tester
CN201819962U (en) Intelligent cable checker
CN107878243A (en) A kind of battery management system and method
CN105954623B (en) A kind of regulating and measuring system and its test method of universal frequency source class plug-in unit
CN104898009B (en) Detection equipment and detection method for online sensing equipment
CN204807649U (en) Tester
CN105182107A (en) Detection device, system and method
CN205404719U (en) Mutual -inductor common return multipoint earthing detector
CN110672984A (en) Portable direct current system ground fault detection device
CN206162499U (en) Data transmission device's indicator lamp circuit
CN211457129U (en) Portable electric power communication channel test terminal
CN209764976U (en) Electric connector detector
CN214253212U (en) Novel serial port communication tester suitable for photovoltaic conflux case measurement and control equipment uses
CN215641726U (en) Simple test tool for battery management system
CN219107078U (en) Connector with display function
CN113589202B (en) Detection circuit and detection device for charging interface
CN104009521A (en) Battery electric quantity detecting and displaying device
CN218450153U (en) Offline vehicle bus detection device
CN217335057U (en) Power supply battery detection protection circuit and terminal equipment
CN212364381U (en) Direct-current high-voltage generator
CN219590488U (en) Antistatic grounding monitoring device
CN220964314U (en) Protection circuit and power supply system
CN216079354U (en) Monitoring terminal for tracing leakage of gas pipeline
CN213275918U (en) Mini-type subscriber line checking and testing tool for communication
CN201215576Y (en) Automobile and motorcycle main cable automatic detection platform

Legal Events

Date Code Title Description
GR01 Patent grant
GR01 Patent grant