introduction
In today's rapidly evolving technological landscape, education is a powerful driving force for development. The world has transitioned from traditional industrial civilization to a knowledge economy, and competition between nations is increasingly focused on this area. Developed countries are placing greater emphasis on the functionality and spatial environment of educational facilities, and are gradually integrating multifunctional electronic information products into the construction of multifunctional classrooms in schools. However, classroom comprehension and projector-based teaching methods have limited capabilities; the scenes they display are fleeting. Our designed multifunctional interactive teaching device allows students to experience firsthand the basic knowledge in textbooks through seeing, hearing, touching, discovering, and reflecting, receiving a new form of technological education in a joyful environment.
1 Design Scheme
1.1 Overall Design Concept
For a single-stage gear transmission mechanism, assuming the driving gear's speed is 50 r/min and the driven gear's speed is 60 r/min, the number of teeth on the driving gear...
=30, the number of teeth on the driven gear is =25.
Then the transmission ratio
In other words, the transmission ratio is equal to the ratio of the number of teeth on the driving gear to the number of teeth on the driven gear, and also equal to the ratio of the rotational speeds on the driven gear to the rotational speeds on the driving gear. While we can visually determine the number of teeth, the rotational speed is not directly observable. Therefore, we use a photoelectric gate counting method to improve this limitation. The gear model is shown in the figure below.
Figure 1. Schematic diagram of the gear model
1.2 Working Principle
This article focuses on meshing gears and calculates the gear ratio based on the different number of rotations of the two gears within the same time period.
Concepts, basic theories, and fundamental methods. The aim is to fully stimulate students' imagination.
Therefore, we installed two photoelectric gates near the meshing gear. These two photoelectric gates were fixed in their respective positions using discarded pen refills as supports. Simultaneously, a light-blocking plate was fixed at the central shaft of the gear. This way, the photoelectric gates count once every time the gear rotates, and can transmit the signal to the microcontroller. After the gear rotates multiple times, the microcontroller can automatically display the number of rotations and the ratio of those rotations (the transmission ratio) on the LCD screen. This allows for the scientific calculation and intuitive display of the transmission ratio.
The specific solution is as follows: The motor's rotational speed is measured. A microcontroller, as the core, processes the digital signal generated by the photoelectric switch to determine the motor's rotational speed. This speed is then displayed on a 12864 LCD screen. In other words, the photoelectric switch converts the motor's rotational speed into digital values of 0 and 1. Each rotation of the shaft generates one or more pulses, which are then sent to the microcontroller for counting and calculation to obtain the rotational speed information.
2 System Hardware Design
2.1 System Overall Structure Design
The system mainly consists of an AT89c51 microcontroller processing system, a motor, a sensor detection unit, a signal processing unit, and a display system, as shown in Figure 2.
Figure 2 System Composition Block Diagram
2.2 Rotation System Design
This design uses a through-beam photoelectric sensor to measure the motor speed. When an opaque object blocks the gap between the transmitter and receiver, the switch is turned off; otherwise, it is turned on.
The measuring device is installed according to the actual mounting positions of the sensors on the engine. The signal disk is fixed to the motor shaft, with the photoelectric speed sensor facing the signal disk. The measuring head consists of a photoelectric speed sensor, and the distance between the two ends of the measuring head is equal to the distance between the two ends of the signal disk. After the measuring device is packaged, it is fixed in a position close to the signal disk. When the signal disk rotates, the photoelectric element outputs a periodic pulse signal with alternating positive and negative signals. The number of pulses generated by one rotation of the signal disk is equal to the number of teeth on it. Therefore, the frequency of the pulse signal reflects the rotational speed of the signal disk. The advantages of this device are that the amplitude of the output signal is independent of the rotational speed, and it can measure a wide range of rotational speeds, generally from 1 r/s to over 104 r/s, with high accuracy.
2.3 Signal Acquisition and Processing
The measured physical quantity is transformed by the sensor into a change in some electrical parameter such as resistance, current, voltage, or inductance. In order to analyze, process, display, and record the signal, it is necessary to amplify, calculate, and analyze the signal, which introduces intermediate transformation circuits.
2.4 Microcontroller Processing and Display Circuit
The pulses used to measure the rotational speed are input to the microcontroller via P3.5/T1, and the pulse signals are counted using the timer/counter T1 of the AT89S51.
The timer T0 is used for timing, and an interrupt is generated every 10ms to refresh the 12864 LCD screen. After 500 interrupts (i.e., 5s), the speed is processed once. Then, the microcontroller calculates and converts the number of pulses of T1, and the speed of the motor is displayed on the 12864 LCD screen.
3 System Software Design
3.1 Rotational Speed Measurement Principle
This design employs the frequency measurement method. The measurement principle is to count the number of pulses (i.e., frequency) generated by the speed sensor within a fixed measurement time, thereby calculating the actual speed. Let the fixed measurement time be T (min), the number of pulses counted by the counter be m1, and the pulse generator output p pulses per revolution, corresponding to a measured speed of N (r/min). The actual speed value N = 60m1/pT can then be calculated. The speed measurement programming is implemented using C language.
3.2 Program Design and Description
This system uses a counting program to collect signal pulses, a timer to generate interrupts, refreshes the 12864 LCD screen and updates the buffer data, and then displays the data on the 12864 LCD screen. The counting program flowchart is shown in Figure 15; the timed display program flowchart is shown in Figure 3.
Figure 3 Flowchart of the pulse counting program
Program Description: Set the timer to mode 1, count external pulses, and check the value of Flag_calc. When Flag_calc = 1...
At that time, the pulse value is converted from hexadecimal to decimal, converted according to the speed conversion formula, and then loaded into the data buffer.
Figure 4 Flowchart of the timed display program
Program Description: The timer is set to mode 1 with a timing interval of 10ms. When the timer reaches 10ms, an interrupt is generated, refreshing the 12864 LCD screen to display the rotation speed, and incrementing the time counter T by 1. When the time counter T=500, Flag_calc is set to 1, the number of pulses counted by the counter within this time is retrieved, the rotation speed value is calculated by the rotation speed calculation program, and then stored in the data buffer for display on the 12864 LCD screen.
4. Design physical images and explanation of innovative points
The image below shows the actual multi-functional mechanical transmission demonstrator. The left side shows the microcontroller and transmission mechanism, while the right side shows the LED display screen.
Figure 5 Multifunctional Mechanical Transmission Demonstration Instrument
The innovative aspects of this design are as follows:
1) This instrument adopts advanced mechatronics technology, which can display the number of rotations of each gear on the screen using photoelectric gates and microcontroller-related knowledge, directly showing the transmission ratio of this pair of meshing gears.
2) The structure is reasonable and the manufacturing process is simple. It not only makes the demonstration experiment more vivid and vivid, but also improves the accuracy of the experiment. It can make the mechanical structure simpler under the condition of achieving the same function.
3) It utilizes waste materials, turning waste into treasure. It is economical, low-carbon, environmentally friendly, and cost-effective, making it a green teaching instrument.
Conclusion
The experimental equipment designed in this paper is suitable for any university course related to automation and mechanical transmission, as well as for individuals from all walks of life who are interested in mechatronics. This instrument can also be further intelligentized; firstly, the gear rotation can be driven by a motor, and the motor's start, stop, forward and reverse rotation can all be remotely controlled. The transmission ratio of this instrument can not only be displayed digitally, but theoretically, it can also be directly announced by voice. Therefore, the advent of this experimental equipment can make university classroom content not only more vivid and engaging, but also allow more students to discover the charm of science.