Multi-channel programmable automatic control circuit and electronic equipment
By adopting a single-chip microcomputer main control module and a multi-channel automated control circuit, the problems of high cost and large size of PLC controllers have been solved, realizing the miniaturization of the controller and improving economic efficiency.
Patent Information
- Application Number
- CN202422880718.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2034-11-26
AI Technical Summary
Existing PLC controllers are expensive and bulky in automated testing equipment, resulting in unnecessary waste of resources. It is necessary to reduce their cost and footprint to improve economic efficiency.
A microcontroller is used as the main control module to replace the PLC. A multi-channel programmable automation control circuit is designed, including a microcontroller main control module, a digital input module, an analog input module, a keyboard module, a communication module, an analog output module, a digital output module, a data storage module, and a display module. The channels are expanded through multi-channel design and address selection module.
The controller size has been significantly reduced, lowering economic costs. The multi-channel design expands the number of channels, enabling flexible channel expansion and non-interfering communication.
Smart Images

Figure CN223692658U_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of controllers, and particularly relates to a multi-channel programmable automation control circuit and an electronic device. BACKGROUND
[0002] In the field of automatic test equipment, a controller plays a vital role as a core component programmed by a user. At present, a PLC (Programmable Logic Controller) is often used as a control center of automatic equipment due to its stability and flexibility. However, the PLC is usually high in cost and large in size as a master controller, and mainly used for realizing automatic control output IO and input IO detection. If the PLC is used to realize the above functions, it is obviously a waste of resources and causes unnecessary cost waste.
[0003] Therefore, how to reduce the cost and floor area of the controller for realizing automatic control output IO and input IO detection and improve economic benefits is a technical problem to be solved. CONTENT OF THE INVENTION
[0004] In order to overcome the defects of the prior art, the present application provides a multi-channel programmable automation control circuit and an electronic device.
[0005] The technical scheme adopted by the present application to solve the technical problem is:
[0006] In a first aspect, the present application provides a multi-channel programmable automation control circuit, which comprises a single-chip microcomputer master control module, a digital input module, an analog input module, a keyboard module, a communication module, an analog output module, a digital output module, a data storage module and a display module.
[0007] A first end of the single-chip microcomputer master control module is connected to an output end of the digital input module, and a second end of the single-chip microcomputer master control module is connected to an input end of the digital output module.
[0008] A third end of the single-chip microcomputer master control module is connected to an output end of the analog input module, and a fourth end of the single-chip microcomputer master control module is connected to an input end of the analog output module.
[0009] A fifth end of the single-chip microcomputer master control module is connected to one end of the communication module, and the other end of the communication module is connected to an external host computer, so that the single-chip microcomputer master control module transmits and receives data with the host computer through the communication module.
[0010] The sixth end of the single-chip microcomputer master module is connected with the output end of the keyboard module, for adjusting the control program in the single-chip microcomputer master module according to the control signal of the keyboard module;
[0011] The seventh end of the single-chip microcomputer master module is connected with one end of the data storage module, and the eighth end of the single-chip microcomputer master module is connected with the input end of the display module.
[0012] Optionally, the analog input module comprises an analog input unit and an analog channel selection unit;
[0013] The output end of the analog input unit is connected with one end of the analog channel selection unit, for inputting the analog signal sent by the analog input unit to the single-chip microcomputer through the analog channel selection unit;
[0014] The other end of the analog channel selection unit is connected with the third end of the single-chip microcomputer master module, for switching the channel in the analog channel selection unit according to the channel control signal sent by the single-chip microcomputer master module, so as to detect the analog signal of each channel.
[0015] Optionally, the single-chip microcomputer master module comprises a single-chip microcomputer;
[0016] The first end of the single-chip microcomputer is connected with the output end of the digital input module, and the second end of the single-chip microcomputer is connected with the analog channel selection unit;
[0017] The third end of the single-chip microcomputer is connected with one end of the data storage module, and the fourth end of the single-chip microcomputer is connected with the output end of the keyboard module;
[0018] The fifth end of the single-chip microcomputer is connected with one end of the communication module, and the sixth end of the single-chip microcomputer is connected with the input end of the external display module;
[0019] The seventh end of the single-chip microcomputer is connected with the input end of the digital output module, the eighth end of the single-chip microcomputer is connected with the output end of the external address selection module, and the ninth end of the single-chip microcomputer is connected with the input end of the analog output module.
[0020] Optionally, the digital input module comprises 16 digital signal inputs and a first connector;
[0021] Each digital signal input comprises a current-limiting resistor, a pull-up resistor and an optocoupler;
[0022] The 1 pin of each optocoupler is connected with one end of the first connector through a corresponding current-limiting resistor, and the 2 pin of each optocoupler is connected with the other end of the first connector;
[0023] The 3-pin of each light coupling is connected with an external DC signal source through a corresponding pull-up resistor, the 4-pin of each light coupling is grounded, and the 3-pin of each light coupling is connected with the single-chip microcomputer;
[0024] The first end of the single-chip microcomputer is connected with the connection of all the pull-up resistors.
[0025] Optionally, the analog input module comprises 8 analog signal inputs, a second connector and a channel switching chip; each analog signal input comprises a signal processing unit;
[0026] One end of each signal processing unit is connected with one end of the second connector, the other end of the second connector is grounded, and the other end of each signal processing unit is connected with one analog signal input end of the channel switching chip;
[0027] The channel control end of the channel switching chip is connected with the second end of the single-chip microcomputer, and the output end of the channel switching chip is connected with the second end of the single-chip microcomputer.
[0028] Optionally, the digital output module comprises a high-bit register, a low-bit register, a first driving chip, a second driving chip, an output interface, 8 high-bit signal outputs and 8 low-bit signal outputs;
[0029] The first end of the high-bit register is connected with the sixth end of the single-chip microcomputer, the second end of the high-bit register is connected with the first end of the low-bit register, and the second end of the low-bit register is connected in parallel with the first end of the high-bit register, so that the single-chip microcomputer synchronously controls the high-bit register and the low-bit register;
[0030] One end of each high-bit signal output is connected with one output end of the high-bit register, and the other end is connected with one input end of the first driving chip, and the output end of the corresponding first driving chip is connected with one end of the output interface;
[0031] One end of each low-bit signal output is connected with one output end of the low-bit register, and the other end is connected with one input end of the second driving chip, and the output end of the corresponding second driving chip is connected with one end of the output interface.
[0032] Optionally, the analog output module comprises a first follower, a first low-pass filter, a second follower, a second low-pass filter and a second output interface;
[0033] The input end of the first low-pass filter is connected with the eighth end of the single-chip microcomputer, the output end of the first low-pass filter is connected with the input end of the first follower, and the output end of the first follower is connected with the first end of the second output interface;
[0034] The input end of the second low-pass filter is connected with the eighth end of the single-chip microcomputer, the output end of the second low-pass filter is connected with the input end of the second follower, and the output end of the second follower is connected with the second end of the second output interface.
[0035] The third end of the second output interface is grounded.
[0036] Optionally, the communication module comprises a 485 transceiver, a first optocoupler, a first triode, a second optocoupler and a second triode.
[0037] The base of the first triode is connected with the fourth end of the single-chip microcomputer, the collector of the first triode is connected with the first end of the first optocoupler, and the second end of the first optocoupler is connected with an external DC signal source.
[0038] The third end of the first optocoupler is connected with the base of the second triode, and the collector of the second triode is connected with the first end of the 485 transceiver; the second end of the 485 transceiver is connected with the host computer.
[0039] The third end of the 485 transceiver is connected with the first end of the second optocoupler, the second end of the second optocoupler is connected with an external DC signal source, and the third end of the second optocoupler is connected with the fourth end of the single-chip microcomputer.
[0040] Optionally, the address selection module comprises a code switch and a plurality of pull-up resistors.
[0041] The code switch comprises six address selection pins.
[0042] Each of the address selection pins is connected with at least one of the pull-up resistors in series, and the connection of all the pull-up resistors is connected with the seventh end of the single-chip microcomputer and an external DC signal source.
[0043] In a second aspect, the application provides an electronic device loaded with the above-mentioned multi-channel programmable automatic control circuit.
[0044] By using the above technical solution, the single-chip microcomputer is used as the main control module to replace the commonly used PLC controller, thereby reducing the size of the controller and the economic cost; the circuit provided by the application adopts a multi-channel design, including 16-channel digital signal output control, 8-channel analog signal input detection and 2-channel analog signal output control; if there is a channel shortage, a plurality of test nodes can be set in the automatic test equipment, an address selection module is added to change the address number of the circuit, and the communication modules are connected to change the communication channel with the host computer, thereby expanding the channels without interference.
[0045] In summary, the beneficial effects of the present application are: the single-chip microcomputer as the main control module of the alternative scheme, aiming to replace the widely used PLC controller, not only significantly reduces the volume of the controller, but also effectively reduces the economic cost. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 is a module connection diagram of a multi-channel programmable automation control circuit provided by an embodiment of the present application;
[0047] Figure 2 is a circuit principle diagram of a single-chip microcomputer main control module of a multi-channel programmable automation control circuit provided by an embodiment of the present application;
[0048] Figure 3 is a circuit principle diagram of a keyboard module of a multi-channel programmable automation control circuit provided by an embodiment of the present application;
[0049] Figure 4 is a circuit principle diagram of a digital input module of a multi-channel programmable automation control circuit provided by an embodiment of the present application;
[0050] Figure 5 is a circuit principle diagram of an analog input module of a multi-channel programmable automation control circuit provided by an embodiment of the present application;
[0051] Figure 6 is a circuit principle diagram of a digital output module of a multi-channel programmable automation control circuit provided by an embodiment of the present application;
[0052] Figure 7 is a circuit principle diagram of an analog output module of a multi-channel programmable automation control circuit provided by an embodiment of the present application;
[0053] Figure 8 is a circuit principle diagram of a data storage module of a multi-channel programmable automation control circuit provided by an embodiment of the present application;
[0054] Figure 9 is a circuit principle diagram of a display module of a multi-channel programmable automation control circuit provided by an embodiment of the present application;
[0055] Figure 10 is a circuit principle diagram of an address selection module of a multi-channel programmable automation control circuit provided by an embodiment of the present application;
[0056] Figure 11 is a circuit principle diagram of a communication module of a multi-channel programmable automation control circuit provided by an embodiment of the present application. DETAILED DESCRIPTION
[0057] The present application will be further described below in conjunction with the drawings and embodiments.
[0058] The concept, specific structure and generated technical effects of the present application will be described clearly and completely in combination with the embodiments and the drawings, so as to fully understand the purpose, features and effects of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments, and other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative labor are within the scope of protection of the present application. In addition, all the coupling / connection relationships involved in the patent do not mean that the components are directly connected, but that a better coupling structure can be composed by adding or reducing coupling accessories according to the specific implementation. The various technical features in the creation of the present application can be interactively combined without mutual contradiction and conflict.
[0059] Reference Figure 1 , Figure 1 is a module connection diagram of a multi-channel programmable automation control circuit provided by the embodiments of the present application, comprising a single-chip microcomputer master control module, a digital input module, an analog input module, a keyboard module, a communication module, an analog output module, a digital output module, a data storage module and a display module, which will be described in detail below for each module:
[0060] The first end of the single-chip microcomputer master control module is connected to the output end of the digital input module, and the second end of the single-chip microcomputer master control module is connected to the input end of the digital output module.
[0061] Regarding the digital input module and the digital output module: the present application includes 16-way digital signal input, which is used for the single-chip microcomputer master control module to read the input digital signal; and 16-channel digital signal output control is also included to provide digital voltage signal control for related digital signal control devices.
[0062] Further, the third end of the single-chip microcomputer master control module is connected to the output end of the analog input module, and the fourth end of the single-chip microcomputer master control module is connected to the input end of the analog output module.
[0063] Regarding the analog input module and the analog output module: the present application involves 8-way analog signal input detection and 2-way analog signal output control, wherein the analog input module is used to provide multiple readable analog signals to the single-chip microcomputer master control module, so as to facilitate the single-chip microcomputer to read; the analog output module is used to provide analog voltage signals to control related analog signal control devices.
[0064] More specifically, the analog input module includes an analog input unit and an analog channel selection module, specifically, the output end of the analog input unit is connected to one end of the analog channel selection unit, for inputting the analog signal sent by the analog input unit to the single-chip microcomputer through the analog channel selection unit;
[0065] The other end of the analog channel selection unit is connected to the third end of the single-chip microcomputer master module, for switching the channel in the analog channel selection unit according to the channel control signal sent by the single-chip microcomputer master module, so as to detect the analog signal of each channel.
[0066] Specifically, the output end of the analog input unit is connected to the input end of the analog channel selection unit, the analog channel selection unit is connected to the single-chip microcomputer master module, the single-chip microcomputer master module can switch the channel for transmitting the analog signal in the analog channel selection unit by sending the corresponding channel control signal, and the analog input unit sends the analog signal to the single-chip microcomputer in the single-chip microcomputer master module through the current internal transmission channel of the analog channel selection unit.
[0067] Further, the fifth end of the single-chip microcomputer master module is connected to one end of the communication module, and the other end of the communication module is connected to an external host computer, for the single-chip microcomputer master module to perform data communication with the host computer through the communication module.
[0068] Regarding the communication module: the communication module includes a 485 transceiver, and the module is provided with a function of converting the TTL signal in the circuit into the 485 differential signal outside, so as to facilitate the communication between the host computer (PC end) and the lower computer (single-chip microcomputer in the single-chip microcomputer master module), so that the lower computer returns the read parameters to the host computer, and the host computer sends control instructions to the lower computer for execution.
[0069] Further, the sixth end of the single-chip microcomputer master module is connected to the output end of the keyboard module, for adjusting the control program in the single-chip microcomputer master module according to the control signal of the keyboard module.
[0070] Regarding the keyboard module: the keyboard module is a human-computer interaction input circuit, which includes a key IC and a plurality of keys, and the user can write the control program through the plurality of keys in the keyboard module to adjust the control program used by the single-chip microcomputer master module.
[0071] Further, the seventh end of the single-chip microcomputer master module is connected to one end of the data storage module, and the eighth end of the single-chip microcomputer master module is connected to the input end of the display module.
[0072] Regarding the display module: the display module is used to display the user human-computer interaction interface, and adopts an LCD (Liquid Crystal Display) display circuit.
[0073] Reference Figures 2-11 , respectively, a circuit design of each of the above modules is specifically embodied, and each module will be specifically described as follows:
[0074] Reference Figure 2 , Figure 2 is a circuit schematic of a single-chip microcomputer master module of a multi-channel programmable automation control circuit provided by the embodiment of the application, the single-chip microcomputer master module comprising a single-chip microcomputer;
[0075] The first end of the single-chip microcomputer is connected to the output end of the digital input module, and the second end of the single-chip microcomputer is connected to the output end of the analog channel selection unit;
[0076] The third end of the single-chip microcomputer is connected to one end of the data storage module, and the fourth end of the single-chip microcomputer is connected to the output end of the keyboard module;
[0077] The fifth end of the single-chip microcomputer is connected to one end of the communication module, and the sixth end of the single-chip microcomputer is connected to the input end of the external display module;
[0078] The seventh end of the single-chip microcomputer is connected to the input end of the digital output module, the eighth end of the single-chip microcomputer is connected to the output end of the external address selection module, and the ninth end of the single-chip microcomputer is connected to the input end of the analog output module.
[0079] Specifically, Figure 3 J3 shown is a burning interface, U44 is a single-chip microcomputer, and the model used is STC15F2K60S2. The burning interface J3 is connected to the 18 / 19 pin of the single-chip microcomputer U44 through its 2 pin and 3 pin, and is used for burning programs to the single-chip microcomputer; the 1-3 pin, 30-35 pin and 38-44 pin (i.e. the first end of the single-chip microcomputer) of the single-chip microcomputer are connected to the output end of the digital input module, and are used for the single-chip microcomputer U44 to detect input digital signals; the 4-7 pin (i.e. the second end of the single-chip microcomputer) of the single-chip microcomputer is connected to the output end of the analog channel selection unit, and is used for detecting and switching analog signals; the 8-9 (i.e. the third end of the single-chip microcomputer) pin of the single-chip microcomputer U44 is connected to one end of the data storage module, and is used for reading and storing user data; the 10 / 11 pin (i.e. the fourth end of the single-chip microcomputer) of the single-chip microcomputer U44 is connected to the keyboard module, and is used for detecting key information in the keyboard module;
[0080] The 13th pin and the 18th / 19th pin (i.e., the fifth end of the single-chip microcomputer) of the single-chip microcomputer U44 are connected to one end of the communication module, for communication with the host computer (PC end) through the communication module; the 22nd-26th pins (i.e., the sixth end of the single-chip microcomputer) of the single-chip microcomputer U44 are connected to the input end of the display module; the 27th-29th pins (i.e., the seventh end of the single-chip microcomputer) of the single-chip microcomputer U44 are connected to the input end of the digital output module, for output by the single-chip microcomputer to control the digital output module; the 12th / 15th / 17th / 20th / 21st pins (i.e., the eighth end of the single-chip microcomputer) of the single-chip microcomputer U44 are connected to the output end of the address selection module, for reading the circuit address of the current address selection module, and more channels can be expanded by setting different addresses; the 36th / 37th pins (i.e., the ninth end of the single-chip microcomputer) of the single-chip microcomputer U44 are connected to the input end of the analog output module, for generating two-way PWM signals from the single-chip microcomputer to the analog output module. In addition, the 14th / 16th pins of the single-chip microcomputer U44 are connected to the positive and negative poles of the power supply module for power supply.
[0081] Referring to Figure 3 , Figure 3 is a circuit schematic diagram of a keyboard module of a multi-channel programmable automatic control circuit provided by the embodiments of the present application, which comprises a key chip U33 and a plurality of keys (S1-S28). Specifically, the 2nd / 3rd pins of the key chip U33 are connected to a single-chip master module, and the single-chip microcomputer can read and set the key chip through the two pins, and since the two pins adopt the communication protocol of IIC, an upper pull resistor R108 and an upper pull resistor R109 are respectively connected in series on the two pins; the 1st pin and the 5th-7th pins of the key chip U33 are connected to four control lines of the 4*7 matrix keys S1-S28 in the horizontal direction through resistors R116, R119, R122 and R125, the 8th-9th pins and the 11th-15th pins of the key chip U33 are connected to seven control lines of the keys S1-S28 in the vertical direction, the 10th pin of the key chip U33 is connected to the positive pole of the power supply, and the 4th pin of the key chip U33 is connected to the negative pole of the power supply to provide power supply for the IC.
[0082] Referring to Figure 4 , Figure 4 is a circuit schematic diagram of a digital input module of a multi-channel programmable automatic control circuit provided by the embodiments of the present application, which comprises 16-way digital signal inputs and a first connector;
[0083] Each of the digital signal inputs comprises a current-limiting resistor, an upper pull resistor and an optocoupler;
[0084] The 1st pin of each of the optocouplers is connected to one end of the first connector through a corresponding current-limiting resistor, and the 2nd pin of each of the optocouplers is connected to the other end of the first connector;
[0085] The 3-pin of each light coupling is connected to an external DC signal source through a corresponding pull-up resistor, the 4-pin of each light coupling is grounded, and the 3-pin of each light coupling is connected to the single-chip microcomputer.
[0086] The first end of the single-chip microcomputer is connected to the connection of all the pull-up resistors.
[0087] Specifically, the first connector is a DNN1 interface, and the model used is Header 16X2. Taking the first digital signal input as an example, the 1-pin of the light coupling U4 is connected to the 1-pin of the first connector through a current-limiting resistor R34, the 2-pin of the light coupling U4 is connected to the 2-pin of the first connector, the 3-pin of the light coupling U4 is connected to a DC signal source VCC through a pull-up resistor, and the 4-pin of the light coupling U4 is grounded. Other digital signals are sequentially connected in the same way to form isolated transmission through light couplings. The single-chip microcomputer is connected at the connection of each pull-up resistor, and the single-chip microcomputer can read the digital signals sent by the digital input module.
[0088] Referring to Figure 5 , Figure 5 is a circuit schematic diagram of an analog input module of a multi-channel programmable automatic control circuit provided by the embodiment of the present application, the analog input module comprising 8 analog signal inputs, a second connector and a channel switching chip; each of the analog signal inputs comprises a signal processing unit;
[0089] One end of each of the signal processing units is connected to one end of the second connector, the other end of the second connector is grounded, and the other end of each of the signal processing units is connected to one analog signal input end of the channel switching chip;
[0090] The channel control end of the channel switching chip is connected to the second end of the single-chip microcomputer, and the output end of the channel switching chip is connected to the second end of the single-chip microcomputer.
[0091] Specifically, the signal processing unit in each analog signal input comprises a voltage dividing resistor, a current-limiting resistor and / or a filter capacitor, which is used to process the input signal and output it to the channel switching chip. In the embodiment of the present application, the channel switching chip is U12, the second connector is A1N1, and the analog signal is output from the second connector A1N1 to the 1-4 pin and / or 12-15 pin of the channel switching chip U12 through the signal processing unit of the corresponding enabled channel; the 3-pin of the channel switching chip is connected to the single-chip microcomputer, which is used to send a corresponding channel control signal to the channel switching chip to control the channel selection of the channel switching chip; the 9-11 pin of the channel switching chip U12 is connected to the single-chip microcomputer, so that the single-chip microcomputer can read the input analog signal through these three pins. In addition, the 6-8 pin of the channel switching chip U12 is grounded, and the 16 pin is connected to the positive electrode of the power supply to maintain power supply.
[0092] Referring to Figure 6 , Figure 6It is the circuit schematic of the digital output module of the multi-channel programmable automation control circuit provided in the embodiment of the application, and the digital output module comprises a high register, a low register, a first driving chip, a second driving chip, an output interface, 8 high signal outputs and 8 low signal outputs.
[0093] The first end of the high register is connected to the sixth end of the single-chip microcomputer, the second end of the high register is connected to the first end of the low register, and the second end of the low register is connected in parallel with the first end of the high register, for synchronous control of the high register and the low register by the single-chip microcomputer.
[0094] One end of each high signal output is connected to an output end of the high register, and the other end is connected to an input end of the first driving chip, and the output end of the corresponding first driving chip is connected to one end of the output interface.
[0095] One end of each low signal output is connected to an output end of the low register, and the other end is connected to an input end of the second driving chip, and the output end of the corresponding second driving chip is connected to one end of the output interface.
[0096] Specifically, in the embodiment of the application, the high register U14, the low register U22, the first driving chip U19, the second driving chip U27 and the output interface P2 are included. The high register and the low register constitute a 16-channel shift register in series and in parallel, each analog signal output comprises a plurality of resistors and an optocoupler, and the first high signal output comprises resistors R41, R44 and R48 and an optocoupler U6.
[0097] The 11th pin, the 12th pin and the 14th pin of the high register U14 are connected to the single-chip microcomputer, the single-chip microcomputer inputs digital output signals in series through the three pins, the 1st-7th pin and the 15th pin of the high register U14 are high 8-bit signal outputs, the 9th pin of the high register U14 is connected to the 14th pin of the low register U22, for transmission of low 8-bit digital signals from the high register U14 to the low register U22, the 1st-7th pin and the 15th pin of the low register U22 output low 8-bit digital signals, the 11th-12th pin of the low register U22 is connected in parallel with the 11th-12th pin of the low register U22, and the clock signals of the two registers are synchronously controlled by the single-chip microcomputer.
[0098] Further, the first high bit signal is taken as an example. The digital signal output by the high bit register U14 is input to the 2th pin of the optocoupler U6 and the resistor R41 to form a loop, thereby converting the 0-5V voltage into a 0-24V digital voltage output to the 1th pin of the first drive chip U9 through the 4th pin of the optocoupler U6, so as to output the converted digital signal to the output interface P2 through the first drive chip U9, and the transmission principles of the high bit signals of the remaining 2-8th channels are similar.
[0099] With reference to Figure 7 , Figure 7 is a circuit schematic diagram of an analog output module of a multi-channel programmable automation control circuit provided by the embodiment of the present application, a first follower, a first low-pass filter, a second follower, a second low-pass filter, and a second output interface;
[0100] The input end of the first low-pass filter is connected to the eighth end of the single-chip microcomputer, the output end of the first low-pass filter is connected to the input end of the first follower, and the output end of the first follower is connected to the first end of the second output interface.
[0101] The input end of the second low-pass filter is connected to the eighth end of the single-chip microcomputer, the output end of the second low-pass filter is connected to the input end of the second follower, and the output end of the second follower is connected to the second end of the second output interface.
[0102] The third end of the second output interface is grounded.
[0103] Specifically, the embodiment includes a first follower U3A, a second follower U3B, a first low-pass filter (a low-pass filter composed of resistors R5, R6, R7 and capacitors C5, C6, C7), a second low-pass filter (a low-pass filter composed of resistors R35, R36, R37 and capacitors C8, C9, C10), and a second output interface P1.
[0104] More specifically, through the above design, the input end of the first follower U3A and the input end of the second follower U3B are respectively connected to the single-chip microcomputer, and finally output to the second output interface P1, completing the transmission of the analog signal and providing an analog voltage signal for controlling the analog signal control device.
[0105] With reference to Figure 8 , Figure 8The circuit principle diagram of the data storage module of the multi-channel programmable automation control circuit provided in the embodiment of the application comprises an EEPROM memory U46, the 1-3 pins of the memory U46 are connected with a negative electrode of a power supply, the 6th pin and the 5th pin are connected with a single-chip microcomputer, the single-chip microcomputer can store user data and read and execute the user data through the two pins, the 8th pin of the memory U46 is connected with a positive electrode of the power supply to maintain power supply, the 7th pin and the 4th pin of the memory U46 are connected with a negative electrode of the power supply, and the communication protocol of IIC is adopted because the 5th pin and the 6th pin of the memory U46 are connected with pull-up resistors R144 and R146.
[0106] Referring to Figure 9 , Figure 9 The circuit principle diagram of the display module of the multi-channel programmable automation control circuit provided in the embodiment of the application, the 5-9 pins of a display LCD1 are connected with a single-chip microcomputer, the single-chip microcomputer can control a display interactive interface through the pins, the 1st pin of the display LCD1 is connected with a negative electrode of a power supply through a current-limiting resistor R12, the 2nd pin is connected with a positive electrode of the power supply to supply power for backlight of the display LCD1, the 3rd pin is connected with the negative electrode of the power supply, and the 4th pin is connected with the positive electrode of the power supply to supply power for internal circuits of the display LCD1.
[0107] Referring to Figure 10 , Figure 10 The circuit principle diagram of the address selection module of the multi-channel programmable automation control circuit provided in the embodiment of the application, the address selection module comprises a code switch and a plurality of pull-up resistors.
[0108] The code switch comprises six address selection pins.
[0109] At least one pull-up resistor is connected in series with each address selection pin, and the connection of all the pull-up resistors is connected with the seventh pin of the single-chip microcomputer and an external direct-current signal source.
[0110] Specifically, the embodiment comprises a code switch S29, six address selection pins K1-K6, the 1-6 pins of the S29 are connected with pull-up resistors R147-R152, and the connection thereof is connected with a single-chip microcomputer, and the single-chip microcomputer can identify the address of the current module through the pins. For example, different address numbers can be set for the circuit through different code combinations, a plurality of circuits are set with different address numbers, and the circuits are connected in communication, and the circuits can be communicated according to the address during communication, so that a plurality of channels can be expanded and the data of the channels do not interfere with each other. Based on this, more channels can be expanded through this way, and a plurality of devices can be simultaneously operated.
[0111] Referring to Figure 11 , Figure 11The circuit principle of a communication module of a multi-channel programmable automation control circuit is provided in the embodiment of the application, and the communication module comprises a 485 transceiver, a first optocoupler, a first triode, a second optocoupler and a second triode.
[0112] The base of the first triode is connected to the fourth end of the single-chip microcomputer, the collector of the first triode is connected to the first end of the first optocoupler, and the second end of the first optocoupler is connected to an external direct-current signal source.
[0113] The third end of the first optocoupler is connected to the base of the second triode, and the collector of the second triode is connected to the first end of the 485 transceiver; the second end of the 485 transceiver is connected to the host computer.
[0114] The third end of the 485 transceiver is connected to the first end of the second optocoupler, the second end of the second optocoupler is connected to an external direct-current signal source, and the third end of the second optocoupler is connected to the fourth end of the single-chip microcomputer.
[0115] Specifically, the embodiment comprises a first optocoupler U45, a second optocoupler U42, a first triode Q2, a second triode Q1 and a 485 transceiver U43. When the single-chip microcomputer needs to send data, a high level is output and controls the base of the first triode Q2 to be conductive through a resistor R145, so that the signal of the emitter passes through the first triode Q1 and then forms a loop with the resistor R141 at the 3-pin of the first optocoupler U45, thereby isolating the sending signal to the 6-pin output of the first optocoupler U45 to control the conduction or cutoff of the second triode Q1, and indirectly transmitting the data to the 2 / 3-pin of the 485 transceiver U43. The 485 transceiver U43 converts the input high / low TTL signal into a 485 differential signal and then outputs the signal from the 6 / 7-pin to the PC end. The signal is converted internally in the PC end and then sent to the host computer.
[0116] When the host computer needs to send data to the lower computer, the host computer converts the signal into a 485 differential signal through the PC end, inputs the signal to the 7, 6-pin of the U43, converts the signal into a TTL signal internally in the U43, outputs the signal from the 1-pin of the U43, controls the 2-pin of the U42 to isolate the signal and output the signal to the 3-pin of the U42 to the single-chip microcomputer to receive the data.
[0117] In a second aspect, the application provides an electronic device loaded with the multi-channel programmable automation control circuit.
[0118] The above is a specific description of the preferred embodiment of the application, but the application is not limited to the described embodiment. Those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the application, and these equivalent modifications or replacements are all included in the scope defined by the claims of the application.
Claims
1. A multi-channel programmable automation control circuit, characterized by, The circuit comprises a single-chip microcomputer master module, a digital input module, an analog input module, a keyboard module, a communication module, an analog output module, a digital output module, a data storage module and a display module; The first end of the single-chip microcomputer master module is connected to the output end of the digital input module, and the second end of the single-chip microcomputer master module is connected to the input end of the digital output module; The third end of the single-chip microcomputer master module is connected to the output end of the analog input module, and the fourth end of the single-chip microcomputer master module is connected to the input end of the analog output module; The fifth end of the single-chip microcomputer master module is connected to one end of the communication module, and the other end of the communication module is connected to an external host computer, so that the single-chip microcomputer master module transmits and receives data with the host computer through the communication module; The sixth end of the single-chip microcomputer master module is connected to the output end of the keyboard module, so as to adjust the control program in the single-chip microcomputer master module according to the control signal of the keyboard module; The seventh end of the single-chip microcomputer master module is connected to one end of the data storage module, and the eighth end of the single-chip microcomputer master module is connected to the input end of the display module.
2. The multi-pass programmable automation control circuit of claim 1, wherein, The analog input module comprises an analog input unit and an analog channel selection unit; The output end of the analog input unit is connected to one end of the analog channel selection unit, so that the analog signal transmitted by the analog input unit is input to the single-chip microcomputer through the analog channel selection unit; The other end of the analog channel selection unit is connected to the third end of the single-chip microcomputer master module, so that the channel in the analog channel selection unit is switched according to the channel control signal transmitted by the single-chip microcomputer master module, so as to detect the analog signal of each channel.
3. The multi-pass programmable automation control circuit of claim 2, wherein, The single-chip microcomputer master module comprises a single-chip microcomputer; The first end of the single-chip microcomputer is connected to the output end of the digital input module, and the second end of the single-chip microcomputer is connected to the analog channel selection unit; The third end of the single-chip microcomputer is connected to one end of the data storage module, and the fourth end of the single-chip microcomputer is connected to the output end of the keyboard module; The fifth end of the single-chip microcomputer is connected to one end of the communication module, and the sixth end of the single-chip microcomputer is connected to the input end of the external display module; The seventh end of the single-chip microcomputer is connected to the input end of the digital output module, the eighth end of the single-chip microcomputer is connected to the output end of the external address selection module, and the ninth end of the single-chip microcomputer is connected to the input end of the analog output module.
4. The multi-pass programmable automation control circuit of claim 3, wherein, The digital input module comprises 16 digital signal inputs and a first connector; Each digital signal input comprises a current limiting resistor, a pull-up resistor and an optocoupler; The 1 pin of each optocoupler is connected to one end of the first connector through a corresponding current limiting resistor, and the 2 pin of each optocoupler is connected to the other end of the first connector; The 3 pin of each optocoupler is connected to an external DC signal source through a corresponding pull-up resistor, the 4 pin of each optocoupler is grounded, and the 3 pin of each optocoupler; The connections of all the pull-up resistors are connected to the first end of the single-chip microcomputer.
5. The multi-pass programmable automation control circuit of claim 3, wherein, The analog input module comprises eight analog signal inputs, a second connector and a channel switching chip; each of the analog signal inputs comprises a signal processing unit; One end of each of the signal processing units is connected to one end of the second connector, the other end of the second connector is grounded, and the other end of each of the signal processing units is connected to one analog signal input end of the channel switching chip; The channel control end of the channel switching chip is connected to the second end of the single-chip microcomputer, and the output end of the channel switching chip is connected to the second end of the single-chip microcomputer.
6. The multi-pass programmable automation control circuit of claim 3, wherein, The digital output module comprises a high-bit register, a low-bit register, a first driving chip, a second driving chip, an output interface, eight high-bit signal outputs and eight low-bit signal outputs; The first end of the high-bit register is connected to the sixth end of the single-chip microcomputer, the second end of the high-bit register is connected to the first end of the low-bit register, and the second end of the low-bit register is connected in parallel with the first end of the high-bit register, so that the single-chip microcomputer synchronously controls the high-bit register and the low-bit register; One end of each of the high-bit signal outputs is connected to one output end of the high-bit register, the other end of each of the high-bit signal outputs is connected to one input end of the first driving chip, and the output end of the corresponding first driving chip is connected to one end of the output interface; One end of each of the low-bit signal outputs is connected to one output end of the low-bit register, the other end of each of the low-bit signal outputs is connected to one input end of the second driving chip, and the output end of the corresponding second driving chip is connected to one end of the output interface.
7. The multi-pass programmable automation control circuit of claim 3, wherein, The analog output module comprises a first follower, a first low-pass filter, a second follower, a second low-pass filter and a second output interface; The input end of the first low-pass filter is connected to the eighth end of the single-chip microcomputer, the output end of the first low-pass filter is connected to the input end of the first follower, and the output end of the first follower is connected to the first end of the second output interface; The input end of the second low-pass filter is connected to the eighth end of the single-chip microcomputer, the output end of the second low-pass filter is connected to the input end of the second follower, and the output end of the second follower is connected to the second end of the second output interface; The third end of the second output interface is grounded.
8. The multi-pass programmable automation control circuit of claim 3, wherein, The communication module comprises a 485 transceiver, a first optocoupler, a first triode, a second optocoupler and a second triode; The base of the first triode is connected to the fourth end of the single-chip microcomputer, the collector of the first triode is connected to the first end of the first optocoupler, and the second end of the first optocoupler is connected to an external direct-current signal source; The third end of the first optocoupler is connected to the base of the second triode, the collector of the second triode is connected to the first end of the 485 transceiver, and the second end of the 485 transceiver is connected to the host computer; The third end of the 485 transceiver is connected to the first end of the second optocoupler, the second end of the second optocoupler is connected to an external direct-current signal source, and the third end of the second optocoupler is connected to the fourth end of the single-chip microcomputer.
9. The multi-pass programmable automation control circuit of claim 3, wherein, The address selection module comprises a code switch and a plurality of pull-up resistors; The code switch comprises six address selection pins. At least one of the pull-up resistors is connected in series with each of the address pins, and the seventh terminal of the single-chip microcomputer is connected to the junction of all the pull-up resistors and an external DC signal source.
10. An electronic device, comprising: A multi-channel programmable automation control circuit as claimed in any one of claims 1 to 9.