As one of the most commonly used electronic control measuring instruments in electronic control measurement systems, signal generators are basic instruments commonly used in industrial control, teaching, and scientific research. Although various signal generators have gradually appeared on the market, they still cannot get rid of the disadvantages of large size, many operating buttons, and high prices, which brings inconvenience to power system engineers in debugging and repairing electronic control equipment. Considering many factors, it is necessary to develop a multifunctional engine speed simulator with simple structure, easy to carry and use. It can simulate and generate and output the speed (frequency) signal and given current signal required on site to debug electronic control equipment (such as electronic speed governor, etc.) without starting the engine, which can greatly save the cost of doing experiments (such as fuel costs, etc.) and has high adjustment accuracy; when the machine is turned on, it can detect the frequency of the external signal (that is, the speed signal of the engine on site) and display the value, and the system is powered by batteries, so the successful development of this multifunctional engine speed simulator will bring great convenience to power system engineering and technical personnel in on-site testing, and it has high practical value and economic value.
1 System overall design
The principle block diagram of the multifunctional engine speed simulator system is shown in Figure 1. It is mainly composed of power supply, frequency signal generation, frequency signal conditioning, frequency signal measurement, current signal generation, current signal measurement and single-chip measurement display modules. The frequency adjustment knob can be used to output a standard square wave signal with adjustable frequency, and the current adjustment knob can be used to output an adjustable current signal of 0-20 mA, which is displayed by a digital tube. In addition, it can also detect the frequency of the external input signal. Since the debugging object is mainly the engine, speed measurement is another unique function of the speed simulator.
2 System Hardware Circuit Design
2.1 Signal generation circuit
(1) Frequency signal generating circuit
The frequency signal generating circuit is shown in FIG2 .
The core component of this circuit module is the LM331 voltage-frequency conversion chip. It is an integrated chip with relatively high performance and price produced by NS Corporation of the United States. It has the characteristics of large frequency adjustable range, low nonlinearity, high conversion accuracy, and single power supply. It realizes V/F function together with the surrounding circuits. The frequency of its output signal can be calculated by formula (1):
In the formula: Vin is in V, which indicates the conversion voltage of U1; R1, R2, R3 are in Q; C. Capacitor is in F; fout is in Hz, which indicates the frequency value of U1 output. It can be seen that the signal frequency is proportional to Vin and has a good linear relationship. As long as the appropriate resistance and capacitance are selected and the performance of the variable resistor W1 is good enough, the stability of the output signal can be guaranteed. The resistors used here are all metal film resistors.
(2) Current signal generating circuit
The current signal generating circuit is shown in Figure 3. This circuit module and the frequency signal generating module share a sliding rheostat W1. The wiring is as follows: J3-1, J3-2, and J3-3 are connected to J1-1, J1-2, and J1-3 in the frequency signal generating circuit respectively, and the frequency and current adjustment are selected through the section switch. Adjusting the value of the sliding rheostat W1 can achieve a current output of 0 to 20 mA. The core component selected for this circuit is AD*. AD* is a monolithic voltage-to-current converter (hereinafter referred to as V/I). It converts the input voltage signal into a standard 0 to 20 mA current signal, which can be widely used for parameter transmission of pressure, flow, temperature and other signals, and control of valves, regulators and some common equipment in process control.
[page]
2.2 Frequency signal conditioning circuit
The frequency signal conditioning circuit is shown in Figure 4. Since the waveform generated by the frequency signal generating circuit is not very regular, it must be shaped by CD4013 and finally collected by the microcontroller and displayed by the LED. If K1 is closed, the internal signal and the ground are short-circuited. At this time, the external pulse signal (such as the sine signal from the diesel engine magnetoelectric sensor) can be obtained, because T1 and CD4013 will shape them into a square wave with a pulse width ratio of 1:1, which can also be collected by the microcontroller. It should be noted that when the microcontroller calculates the number of pulses, it should consider the pulse signal after the frequency division, so the number of pulses counted is doubled in the software.
2.3 Serial A/D conversion circuit
The serial A/D conversion circuit is shown in Figure 5. The 0-20 mA current generated by AD* is converted into an analog voltage signal of 0-2.0V and connected to the CH0 and CH1 ports of MAX144. Since the analog signal voltage range is 0-2.0V, the reference voltage of MAX144 can be set to 2.048V, which can improve the conversion accuracy and facilitate the subsequent processing of the converted data. The reference voltage of 2.048V can be provided by REF191.
[page]
2.4 AT89C2051 single chip microcomputer measurement and display circuit
The core component of the measurement and display circuit is the AT89C2051 single-chip microcomputer, and the circuit is shown in Figure 6. The reset watchdog uses MAX813L to achieve power-on reset and program monitoring (implemented in the program); the number of engine teeth is set manually according to the actual number of teeth and read by the single-chip microcomputer; MAX7219 is a BCD decoder that plays a display driving role; the microprocessor uses Atmel's AT89C2051, which contains 2 KB program memory, 128 bytes of data memory, 15 I/O ports and 2 timers, which are sufficient for this multi-functional speed simulator.
3. System software design
The software flow of this system is shown in Figure 7. It includes frequency/speed measurement, serial A/D conversion value reading, value display and related processing parts.
[page]
3.1 Frequency/speed measurement software design
When the circuit is powered on, MAX813L generates a reset signal, prompting the microcontroller to reset. The program jumps to the starting address 0000h, first initializes the internal registers and MAX7219, such as T0, T1, TMOD, and then opens interrupts for T0, T1, and EX1. The dog feeding statement is placed in the loop query. The time interval for feeding the MAX813L should be less than 1.6 s, otherwise it will generate a reset signal again, disrupting the normal operation of the program. Then detect the P1.3 pin. If it is a low level, execute the serial A/D conversion value reading program; if it is a high level, the microcontroller is triggered to interrupt at the falling edge of the signal, and T1 timing and T0 counting are turned on. When T1 timing 1 s is reached, turn off T0 and T1, read the T0 value, and then open interrupts for T0 and T1 to re-count the number of pulses. Then calculate (T0 value multiplied by 2), judge (when it does not exceed 9999 or is equal to 0, it is determined to be legal and the FLAG mark is set), and then send it to MAX7219. After decoding, it is displayed on the LED, and the frequency indicator light is on, informing the user that the displayed value is the frequency value, so that the knob W1 (see Figure 2) can be adjusted as needed to make the generator send out the desired frequency value signal. This is the principle of measuring signal frequency; if the value is illegal, the LED will not display or display 0. At this time, W1 should be adjusted until it is legal. The frequency measurement and display procedures of external signals are the same as before (the torsion switch needs to be turned to the input position). If the P2.7 pin is at a low level, the engine speed is measured, and the previous frequency value needs to be substituted into the speed formula
n=(f·60)/k(2)
Where: n is the diesel engine speed (r/min), f is the measured frequency value (Hz), and k is the number of teeth on the engine speed measuring gear.
It can be seen that the microcontroller needs to read the tooth value, then calculate and judge (n is not greater than 9999), and send it to the LED display. It should be noted that: what is said above is to first accumulate and count the number of speed pulse signals within 1 s, and then substitute it into formula (2) to calculate the speed. This measurement method is called frequency measurement. When the engine is running at a low speed, the period measurement method should be used: first measure the average pulse period, then use division to calculate the frequency value, substitute it into the speed formula for calculation, jump to the loop query after display, then use division to calculate the frequency value, substitute it into the speed formula for calculation, jump to the loop query after display, and continue to query the timing interrupt.
3.2 Serial A/D conversion value reading software design
Since the interface between MAX144 and the microcontroller is very simple, only three I/O lines are needed, so this system uses P1.0, P1.1, and P1.2 of the microcontroller. This circuit uses the internal clock mode. The microcontroller generates a serial clock through programming and reads out data in sequence. The data after A/D conversion (16 bits) can be stored in the storage units R2 and R3 inside the MAX144. The CH0 and CH1 channels can be distinguished through the flag CHID, and then the upper 4 bits are masked to obtain the actual A/D conversion data. The upper 4 bits are masked using ANLR3, 0FH. After the program is completed, R3 contains the upper 4 bits of the 12-bit data of A/D conversion, and R2 contains the lower 8 bits. Then, the program conversion set in the microcontroller is used (OFFFH corresponds to 2.048 V, i.e. 20.48 mA; 0000H corresponds to 0 V, i.e. 0 mA), and the current value can be displayed.
Conclusion
The multifunctional engine speed simulator uses few components, has low cost, is easy to adjust, and is easy to implement. Through debugging, it is found that as long as the temperature coefficient of the resistor and capacitor is low, the output frequency and current are quite stable, so it has a high cost performance. The use of the multifunctional speed simulator shows that it has good reliability, stable output, and is easy to carry.
Previous article:Analysis of powertrain and electrical system in hybrid electric vehicles
Next article:Introduction to three types of variable valve lift technologies with similar functions
- Popular Resources
- Popular amplifiers
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- How much do you know about intelligent driving domain control: low-end and mid-end models are accelerating their introduction, with integrated driving and parking solutions accounting for the majority
- Foresight Launches Six Advanced Stereo Sensor Suite to Revolutionize Industrial and Automotive 3D Perception
- OPTIMA launches new ORANGETOP QH6 lithium battery to adapt to extreme temperature conditions
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions
- TDK launches second generation 6-axis IMU for automotive safety applications
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- How to improve the power of voltage doubler rectifier circuit
- Mesh Wi-Fi system enhances smart home applications and makes connectivity easy
- Good tools can make work more efficient: Keysight Technology promotion season is here!
- Introduction to the SIG852 arbitrary waveform generator based on computer software (similar to a virtual oscilloscope)
- Evaluation information is here~~
- It is recommended that the forum organize the posts of the past year
- RFSOC wireless communication development platform
- Littro MicroBox——Ultra-small terminal deep learning recognition module
- Can the power symbol ^ in the matlab result be replaced by pow in the c language?
- Share: BQ24040: BQ2404X Series Device Schematic and Layout Review