An experimental platform and an experimental system
By combining multiple MCUs, multiple serial port peripherals, and a power switch, asynchronous programming and button simulation of multiple MCUs are realized. This solves the problems of remote programming of multiple single-chip microcomputers in existing experimental platforms and remote programming of multiple MCUs in existing technologies. It realizes remote programming and local programming of multiple MCUs, supports multiple single-chip microcomputer models, reduces the difficulty of experiments, provides real-time experimental status and anti-cheating functions, and improves the utilization rate of experimental equipment.
Patent Information
- Application Number
- CN202310441778.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-23
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-04-23
AI Technical Summary
The existing experimental platform cannot remotely program multiple MCUs, is not suitable for button experiments, and cannot monitor the experimental situation in real time, thus limiting its applicability.
It employs a combination of multiple MCUs, multiple serial port peripherals, power switches, and selection switches. Asynchronous programming and key simulation of multiple MCUs are achieved through normally closed relays and optocoupler circuits. Combined with data transmission and scoring modules for servers and clients, it supports multiple microcontroller models and adopts two-level prevention measures to prevent cheating.
It enables remote and local programming of multiple MCUs, supports various microcontroller models, reduces the difficulty of experiments, provides real-time experimental status monitoring and anti-cheating functions, and improves the utilization rate of experimental equipment.
Smart Images

Figure CN116580627B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of wireless technology and measurement and control technology, and specifically relates to an experimental platform and experimental system. Background Technology
[0002] Due to various reasons, the experimenters are unable to conduct experiments at the designated experimental site. In such cases, they can conduct remote experiments through an online experimental platform. However, the experimental platforms currently in use have the following drawbacks:
[0003] (1) Understanding the experimental situation solely through the text or data displayed on the experimental platform is insufficient to accurately and in real time understand the experimental situation;
[0004] (2) It is not applicable to button experiments, which still require the experimenter to conduct the experiment on the experimental site.
[0005] (3) It can only be applied to specific or single experiments. There are still technical difficulties to be solved for remote programming of multiple MCUs and local programming. Summary of the Invention
[0006] Purpose of the invention: To address the problems existing in current experimental platforms, this invention proposes an experimental platform and experimental system.
[0007] Technical solution: An experimental platform, comprising: a first microcontroller, a second microcontroller, a third microcontroller, a normally closed relay, a first switching circuit, a second switching circuit, a third switching circuit, and a data transmission module;
[0008] The normally closed relay is connected in series with the first switching circuit to simultaneously control the power supply of the first microcontroller, the second microcontroller, and the third microcontroller; the power supply terminal of the third microcontroller is connected in series with the first switching circuit through the third switching circuit.
[0009] The programming serial ports of the first, second, and third microcontrollers are all connected to the server's input serial port cable through the second switching circuit;
[0010] The experimental-related pins of the first microcontroller are connected to the corresponding pins of the second microcontroller through the first optocoupler circuit.
[0011] An experiment scoring module is provided on the second microcontroller. The experiment scoring module is used to score the experiment based on the experiment-related pin status of the first microcontroller and upload the obtained experiment score to the server.
[0012] The third microcontroller is electrically connected to the data transmission module and to the normally closed relay. The third microcontroller receives instructions from the server through the data transmission module and controls the normally closed relay to operate according to the instructions, thereby realizing the cold start of the first, second, and third microcontrollers.
[0013] Furthermore, the output pins of the second microcontroller are connected to the relevant pins of the first microcontroller through the second optocoupler circuit, and the second microcontroller outputs a level signal to the first microcontroller to simulate button operation.
[0014] Furthermore, it also includes multiple peripheral modules that share a single serial port. On this serial port, there are two double-throw switches. One double-throw switch is connected to the server via a CH340N chip, and the other double-throw switch is connected to a second switching circuit.
[0015] Furthermore, the experimental scoring module includes:
[0016] The experiment scoring and statistics module is used to obtain the experiment-related pin status of the first microcontroller, match the experiment-related pin status of the first microcontroller with the built-in scoring rules, and deduct the corresponding points from the base score for each matching scoring rule to obtain the experiment score.
[0017] The experiment scoring upload module is used to send experiment scores to the server.
[0018] Furthermore, the first optocoupler circuit is controlled by the fourth switching circuit, and the second optocoupler circuit is also controlled by the fourth switching circuit.
[0019] This invention discloses an experimental system, comprising:
[0020] The client is used to send connection requests to the server, and only after the connection request is approved, to send a programming request to the server, and to display the experimental results feedback from the server; the programming request includes the microcontroller program to be programmed and the target microcontroller.
[0021] The server is used to receive and store programming requests from clients, and send corresponding programming instructions to the experimental platform according to the programming requests; and to obtain experimental result feedback based on the experimental platform's experimental score, and send the experimental result feedback to the client.
[0022] The experimental platform is used to control normally closed relays according to the programming instructions from the server to program the microcontroller to be programmed into the target microcontroller and obtain the experimental score.
[0023] The experimental platform is one of the experimental platforms described in any one of claims 1 to 5.
[0024] Furthermore, the server also includes:
[0025] The connection approval module is used to receive connection requests from clients and determine whether there is any experimental result feedback corresponding to the previous connection request. If there is, the current connection request is approved; otherwise, the current connection request is not approved.
[0026] Furthermore, the client includes:
[0027] The login module is used to store the login information used by the user when logging into the client for the first time; and to match the current login information with the stored login information. If they do not match, the user's login fails; if they match, the login succeeds. The login information includes the user's name, student ID, and the CPU and hard disk serial numbers of the computer on which the client is located.
[0028] Furthermore, it also includes a camera, which is connected to the server and is used to acquire real-time image information of the experimental platform when the burning request from the client includes an image information request, and upload the real-time image information of the experimental platform to the server, which then feeds the real-time image information back to the client.
[0029] Furthermore, when the microcontroller program is burned to the first / second microcontroller, the server adaptively adjusts the time interval for sending the microcontroller program.
[0030] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0031] (1) The experimental platform of the present invention achieves efficient cooperation of multiple MCUs, multiple serial port peripherals, power switches and selection switches, so that the same serial port peripheral can be used for experiments of multiple MCUs, and solves the problem of remote programming and local programming of multiple MCUs; the experimental platform of the present invention has the advantages of sufficient interfaces, no need for jumpers, and reduced experimental difficulty caused by wiring; and the experimental platform of the present invention does not require complex interface chips, nor does it require additional learning of interface chips such as 8155, 8255, etc., reducing the difficulty of learning microcontrollers;
[0032] (2) The experimental platform of the present invention can be adapted to a variety of microcontrollers, including 51 microcontrollers and STM32 series microcontrollers. It has a wide range of applications and is suitable for many occasions. The experimental platform of the present invention has two 51 microcontroller chips on board, one is a low-end chip and the other is a high-end chip. The two chips work together to enable users to quickly get started and deepen their learning.
[0033] (3) The hardware of the experimental platform of the present invention can intelligently sense changes in the data being burned on the serial port, can automatically start the download function, has remote cold start technology, realizes remote automatic download, and assists in the remote burning of microcontroller programs.
[0034] (4) The experimental platform of the present invention adopts two-level prevention measures, including: the personal key information of the first login cannot be modified to prevent the occurrence of proxy or substitute experiments, and the storage of each experimental operation can also effectively prevent cheating.
[0035] (5) Users can complete experimental tasks or enhance classroom exercises at any time or place, which not only greatly improves the utilization rate of experimental equipment, but also provides more experimental opportunities for users in need. Attached Figure Description
[0036] Figure 1 This is a block diagram of the experimental system of the present invention;
[0037] Figure 2 This is an example diagram of the first microcontroller and its peripheral circuitry;
[0038] Figure 3 This is an example diagram of the third microcontroller and its peripheral circuitry;
[0039] Figure 4 This is an example diagram of the second microcontroller and its peripheral circuitry;
[0040] Figure 5 Display sample images to the client;
[0041] Figure 6 To evaluate the hardware principle of the indicator light;
[0042] Figure 7 This is the evaluation process for flashing lights. Detailed Implementation
[0043] The technical solution of the present invention will now be further described in conjunction with the accompanying drawings and embodiments.
[0044] Example 1:
[0045] This embodiment discloses a networked remote intelligent experimental platform, which mainly includes a first microcontroller, a second microcontroller, a third microcontroller, a first switching circuit, a normally closed relay, a second switching circuit, a third switching circuit, a fourth switching circuit, a first optocoupler circuit, and a second optocoupler circuit.
[0046] To facilitate understanding of the experimental platform in this embodiment, the structure of the experimental platform will now be described in detail through the functions that the experimental platform can achieve.
[0047] The experimental platform in this embodiment can realize asynchronous programming of three MCUs. The specific implementation is as follows:
[0048] The first switching circuit is connected in series with a normally closed relay to control the power supply of the three microcontrollers. The programming serial ports of the first, second, and third microcontrollers are connected to a serial line via the second switching circuit. This serial line is connected to the server's input serial line. In other words, the second switching circuit is used to switch between programming or operating the first or second microcontroller. In this embodiment, the second switching circuit is manually controlled, and it defaults to the first microcontroller being the experimental microcontroller. If the second microcontroller is to be used for experimentation, the state of the second switching circuit is switched to switch the second microcontroller to the experimental microcontroller.
[0049] A normally closed relay is connected in series with the first switching circuit. One path of the first switching circuit is connected to the power supply terminal of the third microcontroller via a third switching circuit, and the other path is connected to the power supply terminals of both the first and second microcontrollers. The purpose of the third switching circuit is to independently control the power supply of the third microcontroller. When the first switching circuit is working, the third switching circuit enables a cold start of the third microcontroller; that is, the third switching circuit is first opened and then closed to complete the programming of the third microcontroller. The first and second switching circuits work together to program both the first and second microcontrollers, and because the power supply of the third microcontroller is independent, it ensures that erroneous programming of the third microcontroller is avoided. In this embodiment, by programming preset code into the third microcontroller and controlling the Wi-Fi module, remote programming of the first or second microcontroller is achieved to complete functional experiments. Specifically, when a local manual cold start programming is required, the first switching circuit is manually switched to initiate a cold start, which, in conjunction with the second switching circuit, enables the programming of either the first or second microcontroller. During remote automatic programming, the first switch circuit is in a closed state. The third microcontroller receives instructions from the server through the Wi-Fi module and controls the normally closed relay to operate according to the instructions. For example, when 0x7F is received, the normally closed relay operates to cut off the power for 2-3 seconds. Then the normally closed relay operates again to turn on the power, realizing the cold start of the first or second microcontroller, and then programming the first or second microcontroller.
[0050] In this embodiment, the P0 and P1 pins of the first microcontroller are connected to the corresponding P0 and P1 pins of the second microcontroller via a first optocoupler circuit. The common output terminal of the first optocoupler circuit is connected to a fourth switch circuit. When the second switch circuit is closed, the first and second microcontrollers do not affect each other. When the fourth switch circuit is open, the pin states of the first microcontroller are transmitted to the second microcontroller. At this time, the second microcontroller scores the experimental results based on the pin states of the first microcontroller. Specifically, the second microcontroller uses an independent item scoring method and sets a base score, for example, 10 points. The pin status of the first microcontroller is compared with the preset scoring rules. Each scoring rule has a corresponding score. For each scoring rule that is met, the corresponding score is deducted from the base score. The scoring is done by ORing the corresponding hexadecimal data. For example, if the full score code for the first experiment is 0xA0, then 0xA1, 0xA2, 0xA4, and 0xA8 are four types of errors. When multiple errors occur in parallel, these data are ORed. For example, 0xA1 and 0xA8 are superimposed to become 0xA9. At this time, the second microcontroller uploads 0xA9 to the server.
[0051] To simulate button operation, the P2 pin of the second microcontroller is connected to the P2 pin of the first microcontroller via a second optocoupler circuit. The common terminal of the second optocoupler is controlled by a fourth switching circuit. The P2 pin of the second microcontroller outputs a level signal to the first microcontroller, thereby controlling the first microcontroller. In other words, this embodiment uses the second microcontroller to simulate button operation to control the first microcontroller, transferring data transmission verification from remote to local, thus solving the problem of local experimental operation.
[0052] In this embodiment, the first and second optocoupler circuits are used not only for experimental scoring but also to enable communication between the first and second microcontrollers.
[0053] The experimental platform in this embodiment supports multiple serial port peripherals, including but not limited to voice modules, 4G SMS modules, serial LCD displays, and digital tube displays. Multiple serial port peripherals are connected to the same serial port line (RXD, TXD). Two double-throw switches are added to this serial port line. One double-throw switch works with the CH340N to form a reverse switch, and the other double-throw switch is connected to a second switching circuit. The purpose of this connection is to allow the second switching circuit to freely switch the connection between the first or second microcontroller and the serial port peripheral. Through the reverse switch, the computer can directly access the serial port peripheral via the serial port, facilitating debugging and configuration of the serial port peripheral.
[0054] Example 2:
[0055] Based on Example 1, this example proposes an experimental system, which includes:
[0056] The client is used to send connection requests to the server, and only after the connection request is approved, to send a programming request to the server, as well as to display the experimental results feedback from the server; the programming request includes the microcontroller program to be programmed and the target microcontroller.
[0057] The server is used to receive and store programming requests from clients, and send corresponding programming instructions to the experimental platform according to the programming requests. In the process of programming the microcontroller program, this embodiment realizes variable baud rate data transmission by controlling the data flow speed. When programming the microcontroller, the time interval of sending data is adaptively changed according to the negotiated different baud rate requirements. Using the principle of expert system, a large number of samples are first accumulated, and then an inference model is set according to the transmission rules. Through learning from a large number of samples, the different baud rate data transmission requirements required for programming the microcontroller code are realized. Based on the experimental platform, experimental results feedback is obtained and sent to the client.
[0058] The experimental platform is used to control normally closed relays according to the burning instructions from the server to burn the microcontroller program to the target microcontroller and obtain the experimental score; the experimental platform used in this embodiment is the networked remote intelligent experimental platform disclosed in Embodiment 1.
[0059] To display detailed ratings, four text boxes are placed on the server, each corresponding to a rating rule. When a rating rule is met, the program reads the rating rule text into the program's text box. When the rating is finished, all the content in the text box is sent to the client for display and score decoding.
[0060] To prevent proxy testing and substitution, this embodiment stores the user's name, student ID, and other key personal information in a special file hidden within the operating system. Once the student ID and name are registered for the first experiment, they cannot be modified, preventing users from altering their identity information to conduct experiments for others. The system also detects the CPU and hard drive serial numbers of the computer running the software to prevent cheating through software or operating system reinstallation. Furthermore, each time a user completes an experiment, their score is recorded in both a local and a remote database. The local database displays the data in lists and charts, which helps prevent cheating and facilitates the analysis of students' experimental abilities. The remote database can analyze student scores, summarize, export, and print them.
[0061] To enable remote acquisition of experimental site images, this embodiment utilizes flash library parsing software to remotely access a camera located in the laboratory. The specific operation includes: the remote camera first identifies its IP information on the local area network; using the intranet penetration capability of the flash library parsing software, the flash library parsing software points locally to the camera's local area network IP; and through a domain name to IP conversion tool, the client accesses the IP converted from the flash domain name, thus achieving remote access to the camera and solving the problem of remote transmission of video information.
[0062] To ensure orderly experimentation by multiple users on the same device, when a client connects and sends a programming file, the server first receives and saves the file. Then, the server initiates a programming protocol with the experimental platform's microcontroller and reads the saved file. To prevent channel preemption during the current programming session, new connections are only allowed after the current experiment has been scored. In this embodiment, the server does not distinguish between clients; any authorized client is allowed to connect. Combined with video, this enables orderly experimentation by multiple users on the same device, improving device utilization. If the current experiment is not completed, conditions are set to deny the next programming operation. Because the client sends the programming file to the server, the server saves it as a file, and then sends it to the experimental platform, simultaneous use by multiple users will not cause programming chaos or even system crashes.
[0063] This embodiment of the authorization connection includes two methods: automatic authorization and manual authorization. Automatic authorization allows setting an effective time period and uploading the user's information. When using the experimental platform, if the conditions are met, automatic authorization is granted, and the platform can be used directly. Manual authorization requires manual review and the issuance of an authorization code before the experimental platform can be used. The generation and use process of the authorization code is as follows:
[0064] The authorization code is generated based on the date (e.g., 2023.05.01), the experimental platform number (e.g., 05), and the user's mobile phone number (e.g., 15784897852). It can be generated by simply adding the data together and taking the last four hexadecimal digits. For example, 0x752E represents the last four digits of the hexadecimal sum. The algorithm for this authorization code exists on both the client and server. When a user requests access to the experimental platform, they send their request to the server. The server generates an authorization code and sends it to the client. If the two authorization codes match, the user can use the experimental platform.
[0065] Example 3:
[0066] This embodiment uses a flashing light experiment as an example to illustrate the technical solution of the present invention.
[0067] The experimental operation in this embodiment includes: the client selects the code file related to the flashing light experiment, clicks to burn, and transmits the code file related to the flashing light experiment to the server. After receiving the file, the server interacts with the third microcontroller and transmits the code file related to the flashing light experiment to the first microcontroller. At the same time, the client sends a start evaluation command to the second microcontroller, the second microcontroller starts the evaluation, and after the evaluation is completed, it sends the error code to the server. The server decodes the error code and sends it to the remote client for display.
[0068] The experimental requirements for the flashing light experiment are that the eight-color indicator lights flash at one-second intervals; the scoring requirements include: (1) the interval time is about 1 second; (2) all lights participate in flashing.
[0069] like Figure 6 and Figure 7 As shown, the evaluation process includes: the second microcontroller cyclically detects port P1 (connected to port P1 of the first microcontroller via an optocoupler). Port P1 is responsible for lighting up the indicator lights. If P1 = 0x00 is detected, it indicates that all lights are on. Otherwise, code 0xA7 is sent (indicating that not all lights are on). Then, a timer is started to detect the time interval between one on and off cycle. If the interval is about 1 second, it meets the requirements and outputs 0xA0 (indicating that the experiment is successful). Otherwise, 0xA9 is output (indicating that the delay time is incorrect).
[0070] Example 4:
[0071] This embodiment uses a flowing light experiment as an example to illustrate the technical solution of the present invention.
[0072] The experimental operation in this embodiment includes: the client selects the code file related to the running light experiment, clicks to burn, and transmits the code file related to the running light experiment to the server. After receiving the file, the server interacts with the third microcontroller and transmits the code file related to the running light experiment to the first microcontroller. At the same time, the client sends a start evaluation command to the second microcontroller. The second microcontroller starts the evaluation. After the evaluation is completed, the error code is sent to the server. The server decodes the error code and sends it to the remote client for display.
[0073] The experimental requirements for the running light experiment are: the indicator lights should light up sequentially from left to right, with an interval of 1 second. The scoring requirements include: (1) the interval should be about 1 second; (2) the direction should not change from left to right; and (3) the cycle should not be incomplete.
[0074] The evaluation process includes: the initial evaluation code is 0xB0 (indicating a successful experiment), and the port is checked in a loop. If the loop direction is incorrect, the evaluation code 0xB0 and 0x01 are ORed. If the port light is not lit, the evaluation code 0xB0 is ORed with 0x0F (i.e., 0xBF, indicating that the light is not lit). The loop exits when the number of loops reaches the limit or all port data is detected. Then, the port is checked periodically. If there is an error in the delay, the calculated evaluation code is ORed with 0x02 to obtain the final evaluation code, which is then sent to the remote service system for decoding.
[0075] Example 5:
[0076] This embodiment uses a static digital tube experiment as an example to illustrate the technical solution of the present invention.
[0077] The experimental operation in this embodiment includes: the client selects the code file related to the static digital tube experiment, clicks to burn, and then transmits the code file related to the static digital tube experiment to the server. After receiving the file, the server interacts with the third microcontroller and transmits the code file related to the static digital tube experiment to the first microcontroller. At the same time, the client sends a start evaluation command to the second microcontroller, the second microcontroller starts the evaluation, and after the evaluation is completed, it sends the error code to the server. The server decodes the error code and sends it to the remote client for display.
[0078] The experimental requirements for the static digital tube experiment are: use a single digital tube to display 0 to 7 in a loop. Grading criteria: display all data from 0 to 7.
[0079] The evaluation process includes: the initial evaluation code is 0xC0 (indicating a successful experiment), the data from port 0 to 7 is detected in a loop (in fact, the encoded values from port 0 to 7 are detected, converted to 0 to 7 for judgment), the loop exits when all values or the loop count is reached, if not all bits are detected, the evaluation code is 0xC1, if no data is detected at the digital tube port, the evaluation code is 0xCF, and finally the evaluation code is output.
[0080] Example 6:
[0081] This embodiment uses a dynamic digital tube experiment as an example to illustrate the technical solution of the present invention.
[0082] The experimental operation in this embodiment includes: the client selects the code file related to the dynamic digital tube experiment, clicks to burn, and transmits the code file related to the dynamic digital tube experiment to the server. After receiving the file, the server interacts with the third microcontroller and transmits the code file related to the dynamic digital tube experiment to the first microcontroller. At the same time, the client sends a start evaluation command to the second microcontroller, the second microcontroller starts the evaluation, and after the evaluation is completed, it sends the error code to the server. The server decodes the error code and sends it to the remote client for display.
[0083] The experimental requirements for the dynamic digital tube experiment are: use an eight-digit digital tube to dynamically scan and display 0 to 7 simultaneously. Grading requirements: display all data from 0 to 7.
[0084] The evaluation process includes: the initial evaluation code is 0xC0 (indicating a successful experiment), the data from port 0 to 7 is detected in a loop (in fact, the encoded values from port 0 to 7 are detected, converted to 0 to 7 for judgment), the loop exits when all values or the loop count is reached, if not all bits are detected, the evaluation code is 0xC1, if no data is detected at the digital tube port, the evaluation code is 0xCF, and finally the evaluation code is output.
[0085] Example 7:
[0086] This embodiment uses a serial communication experiment as an example to illustrate the technical solution of the present invention.
[0087] The experimental operation in this embodiment includes: the client selects the code file related to the serial communication experiment, clicks to burn, and transmits the code file related to the serial communication experiment to the server. After receiving the file, the server interacts with the third microcontroller and transmits the code file related to the serial communication experiment to the first microcontroller. At the same time, the client sends a start evaluation command to the second microcontroller, the second microcontroller starts the evaluation, and after the evaluation is completed, it sends the error code to the server. The server decodes the error code and sends it to the remote client for display.
[0088] The experimental requirements for serial communication are: send any number from 0 to 9 from the serial port, and the corresponding number should be displayed on the digital tube. The scoring requirements include: (1) normal serial communication; (2) the digital tube displays the input value correctly.
[0089] The evaluation process includes: the initial evaluation code is 0xE0 (indicating a successful experiment). Since the startup code of the evaluation algorithm is 0xA5, the last four bits of the startup code, i.e., 0x05, are taken as the test code. First, the port is checked cyclically for codes from 0 to 9. If a number is found, or the loop ends, the received data is checked again to see if it is "5". If it is correct, 0xE0 is output; otherwise, 0xEF is output.
[0090] Example 8:
[0091] This embodiment uses an independent button experiment as an example to illustrate the technical solution of the present invention.
[0092] The experimental operation in this embodiment includes: the client selects the code file related to the independent button experiment, clicks to burn, and then transmits the code file related to the independent button experiment to the server. After receiving the file, the server interacts with the third microcontroller and transmits the code file related to the independent button experiment to the first microcontroller. At the same time, the client sends a start evaluation command to the second microcontroller, the second microcontroller starts the evaluation, and after the evaluation is completed, it sends the error code to the server. The server decodes the error code and sends it to the remote client for display.
[0093] The experimental requirements for the independent button experiment are: press the four corresponding independent buttons, and the digital tube will display the corresponding numbers 0 to 3. Scoring requirements: (1) a button is pressed; (2) the digital tube displays the corresponding number.
[0094] The evaluation process includes: the initial evaluation code is 0xF0 (indicating a successful experiment), the port data is checked in a loop, and if 0 to 9 are found, the loop is exited or the loop is waited for to end; low level is output for buttons 1 to 4 respectively to simulate button operation, and at the same time, it is checked whether the digital tube port output corresponds to 0 to 3. If less than 2 ports are checked, the evaluation code 0xF1 is output (indicating that the program may be trapped in an infinite loop and the program is unhealthy), otherwise 0xF0 is output.
Claims
1. An experimental system, characterized in that: include: The client is used to send connection requests to the server, and only after the connection request is approved, to send a programming request to the server, and to display the experimental results feedback from the server; the programming request includes the microcontroller program to be programmed and the target microcontroller. The server is used to receive and store programming requests from clients, and send corresponding programming instructions to the experimental platform according to the programming requests; and to obtain experimental result feedback based on the experimental platform's experimental score, and send the experimental result feedback to the client. The experimental platform is used to control normally closed relays according to the programming instructions from the server to program the microcontroller to be programmed into the target microcontroller and obtain the experimental score. The experimental platform includes: a first microcontroller, a second microcontroller, a third microcontroller, a normally closed relay, a first switching circuit, a second switching circuit, a third switching circuit, and a data transmission module; The normally closed relay is connected in series with the first switching circuit to simultaneously control the power supply of the first microcontroller, the second microcontroller, and the third microcontroller; the power supply terminal of the third microcontroller is connected in series with the first switching circuit through the third switching circuit. The programming serial ports of the first, second, and third microcontrollers are all connected to the server's input serial port cable through the second switching circuit; The experimental-related pins of the first microcontroller are connected to the corresponding pins of the second microcontroller through the first optocoupler circuit. An experiment scoring module is provided on the second microcontroller. The experiment scoring module is used to score the experiment based on the experiment-related pin status of the first microcontroller and upload the obtained experiment score to the server. The third microcontroller is electrically connected to the data transmission module and to the normally closed relay. The third microcontroller receives instructions from the server through the data transmission module and controls the normally closed relay to operate according to the instructions, thereby realizing the cold start of the first, second, and third microcontrollers. Pre-set code is programmed into the third microcontroller. The process of writing the microcontroller program to the target microcontroller specifically includes: During the microcontroller programming process, the time interval for sending data is adaptively changed according to the negotiated different baud rate requirements. By controlling the data flow speed, variable baud rate data transmission is achieved. The aforementioned adaptive change of the data transmission time interval according to different negotiated baud rate requirements includes the following specific operations: firstly, accumulating a large number of samples using the principle of expert systems; secondly, setting up an inference model based on transmission patterns; and thirdly, learning from a large number of samples to achieve the different baud rate data transmission requirements required for microcontroller programming. The server also includes an authorization connection module, comprising: an automatic authorization module and a manual authorization module; The automatic authorization module is used to set the effective time period and upload the information of the experimental users. When using the experimental platform, if the effective time period is met and the experimental user's information is correct, automatic authorization will be granted. The manual authorization module is used to generate authorization codes on the server and client respectively when an experimental user applies to use the experimental platform. The experimental user can only use the experimental platform if the two authorization codes match. The authorization code is generated according to the following algorithm: Based on the date, experimental platform number, and mobile phone number of the experimental user, the data is added together, and the last four hexadecimal digits are taken as the authorization code; The generation algorithm is deployed on both the server and the client.
2. The experimental system according to claim 1, characterized in that: The server also includes: The connection approval module is used to receive connection requests from clients and determine whether there is any experimental result feedback corresponding to the previous connection request. If there is, the current connection request is approved; otherwise, the current connection request is not approved.
3. The experimental system according to claim 1, characterized in that: The client includes: The login module is used to store the login information used by the user when logging into the client for the first time; and to match the current login information with the stored login information. If they do not match, the user's login fails; if they match, the login succeeds. The login information includes the user's name, student ID, and the CPU and hard disk serial numbers of the computer on which the client is located.
4. The experimental system according to claim 1, characterized in that: It also includes a camera, which is connected to the server and is used to acquire real-time image information of the experimental platform when the burning request from the client includes an image information request, and upload the real-time image information of the experimental platform to the server, which then feeds the real-time image information back to the client.
5. The experimental system according to claim 1, characterized in that: The output pin of the second microcontroller is connected to the relevant pin of the first microcontroller through the second optocoupler circuit. The second microcontroller outputs a level signal to the first microcontroller to simulate button operation.
6. The experimental system according to claim 1, characterized in that: It also includes multiple peripheral modules, which share a single serial port line. Two double-throw switches are installed on this serial port line. One double-throw switch is connected to the server via a CH340N chip, and the other double-throw switch is connected to a second switching circuit.
7. The experimental system according to claim 1, characterized in that: The experimental scoring module includes: The experiment scoring and statistics module is used to obtain the experiment-related pin status of the first microcontroller, match the experiment-related pin status of the first microcontroller with the built-in scoring rules, and deduct the corresponding points from the base score for each matching scoring rule to obtain the experiment score. The experiment scoring upload module is used to send experiment scores to the server.
8. The experimental system according to claim 5, characterized in that: The first optocoupler circuit is controlled by the fourth switching circuit, and the second optocoupler circuit is also controlled by the fourth switching circuit.
Citation Information
Patent Citations
Method for realizing remote experiment and single-chip remote experiment system thereof
CN106448321A
Development system of magnetic particle flaw detector
CN111751443A
Self-scoring remote experiment system and method
CN115623460A