Research and development of electric sunroof durability test system

Publisher:艺泉阁Latest update time:2011-08-05 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1 Overview
Automobile sunroofs are designed to meet the requirements of consumers for health and comfort when riding in a car. Therefore, people's requirements for the performance of sunroofs are not only beautiful and luxurious, but also must meet all-round requirements such as safety, reliability, and smooth operation. Therefore, before installing the sunroof on a car, it is necessary to first conduct durability and safety tests on it to ensure that it meets the requirements of technology and users after installation. However, the existing car sunroofs have hidden dangers and problems such as insufficient travel and the sunroof cannot be opened; insufficient travel and the sunroof cannot be closed tightly, posing a threat to the car's anti-theft and rainproof; and failure of the control switch, resulting in the phenomenon of people being pinched.
At present, most domestic sunroof tests use a stand-alone lower computer system. Although this type of system can perform conventional tests, it cannot record or feedback test information. The car sunroof test system we designed is divided into upper and lower computers. The lower computer has an actuator that controls the sunroof. It can not only control the sunroof's round trip and other actions to complete the test items, but also has an automatic fault identification function and can automatically record the sunroof motor failure time. The upper computer displays the number of durability tests and faults. Relying on the reliable communication between the upper computer and the lower computer, the test operation, information transmission and information feedback are realized.
2 Key technologies of the electric sunroof durability test system
2.1 Hardware technical characteristics
This hardware system is to realize the judgment of the sunroof opening and closing, midway stop and necessary rest of the motor. It is mainly composed of two parts: detection circuit and control circuit. The system schematic diagram is shown in Figure 1:


In-place detection circuit: In the system, in order to ensure the durability of the sunroof test bench, a non-contact sensor (infrared photoelectric sensor) is used in the design to replace the fragile contact sensor, and the position of the sunroof can be flexibly adjusted to be in place or closed, which is convenient for users. The working principle of the sunroof in-place circuit is as follows: the circuit is composed of a 3D infrared transmitting tube, a 3E receiving tube and an operational amplifier LM324. When the sunroof is not in place or not closed, no signal is sent. Only when the sunroof is in place, a signal is sent to the microcontroller.
Midway stop detection circuit: In the system, due to the load characteristics of the control object (sunroof motor), the sunroof motor is not allowed to work continuously to prevent the motor from overheating and affecting normal operation. In the subsystem for obtaining the midway stop signal, a sampling resistor is used to sample and hold. In order to ensure that the signal is not distorted, a two-stage amplification circuit can be used, which is converted by V/F and F/V (because the ground of the signal cannot be shared with the power ground), and then amplified by one stage, and connected to the microcontroller after comparison.
Alarm control circuit: The signal from 8255 controls the optocoupler through 7405. If the system is detected to be blocked, an alarm will sound.
Overcurrent protection control circuit: When the system is blocked, the relay opens and the motor stops working immediately.
Motor control circuit: After the open position signal (close position signal) comes out from 8255, it controls the conduction of the optocoupler through 7405, and then controls the relay through the transistor to stop the motor for 30 seconds.
2.2 Software technical characteristics
Microcontroller part: The lower computer part is composed of a microcontroller and an expansion interface circuit, mainly including 8031, address latch 74LS373, EPROM2764 used as an off-chip program memory, and 8255 for expanding I/O ports, and then communicates with the upper computer through the RS-232 interface. Since the input and output levels of the microcontroller are TTL levels, and the PC is equipped with an RS-232 standard serial interface, the electrical specifications of the two are inconsistent. Therefore, in order to complete the data communication between the microcontroller and the PC, the TTL level output by the microcontroller must be converted. This circuit uses a standard RS-232 chip MAX232. The lower computer software is written in assembly language and mainly consists of the main program, delay subroutine, interrupt subroutine, skip motor start subroutine, handshake contact subroutine and stall current assignment subroutine. Its functions are as follows:


Main program: complete system initialization, allocate and call each subprogram to realize system functions;
Delay subprogram: in order to meet the characteristic requirements of the sunroof motor, control the motor to work discontinuously;
Interrupt subprogram: when the stall current is greater than the set current, the motor stops working;
Skip motor start subprogram: when the motor starts, the current is very large and may exceed the stall current, this program can make the motor work normally;
Handshake subprogram: when the upper and lower computers are communicating, the handshake subprogram plays a role in ensuring reliable communication and reducing false operations; [page]

Stall current subroutine: set the stall current value to control the operation of the motor; Part of the code is as follows, and the program flow chart is shown in Figure 2:
ORG 0000H
LJMP MAIN
ORG 000BH
LJMP TOT0
ORG 0030H
MAIN: MOV R6,#0FFH ; Delay subroutine, wait for 8255 to be completely reset
MAIN1: DJNZ R6,MAIN1
MOV P1,#0FFH
MOV SP,#40H
MOV DPTR,#7FF3H ; Write control word to 8255, PA, PB.PC output, 0010 0100 0000 0011
MOV A,#80H
MOVX @DPTR,A
MOV DPTR,#7FF0H ; PA outputs all 01111111
MOV A,#00H
MOVX @DPTR,A
MOV DPTR,#0BFFFH
MOV A,#0FFH
MOVX @DPTR,A
MOV TMOD,#22H ; T1 is a baud generator, mode 2, timing. T0 mode 2, timing
MOV TL1,#0F3H ; The baud is 1200B/S.
Upper computer part: It is composed of a PC and has a human-machine interface, as shown in Figure 3. Since the VISUAL BASIC language has a very friendly interface and plays a good role in its visualization characteristics, it is deeply favored by programmers. Therefore, the software is written using the VB6.0 language environment, and the interface operation is convenient and direct. In this system, if you want to use upper and lower computer communication, you must use serial port technology. Serial port communication generally adopts RS232 or RS485 and other specifications, and there are dedicated chips to implement related hardware communication circuits. In Windows environment, we can call API functions or directly use ActiveX serial communication controls. It is more complicated to write serial communication programs using API functions. The MSComm communication control of VB6.0 is a standard communication command set, which provides an interface that allows programmers to establish a connection based on the serial port, confirm commands, exchange data, and monitor various events or errors that may occur at the serial interface, and respond. In addition, VB6.0 provides the setting of serial communication port parameters through attribute methods, which can easily solve serial communication problems. Moreover, the MSComm control shields the underlying operations in the communication process, making serial port programming very convenient. Therefore, when developing a system, using the MSComm control can shorten the design cycle and increase system reliability. At the same time, as long as you understand the parameters you need, you can write the host computer software in sequence, so here we use MSComm control programming to achieve communication with the microcontroller. The parameters of this control are briefly introduced as follows:
CommPort: sets and returns the communication port number;
PortOpen: sets and returns the communication port status (true means open, false means closed);
InPut: returns and deletes data from the receive buffer;
Output: writes data to the send buffer;
InBufferSize: sets and returns the size of the receive buffer;
OutBufferSize: sets and returns the size of the send buffer;
InputLen: sets and returns the number of bytes read from the receive buffer by the Input property at one time;
Settings: sets and returns the baud rate, parity, data bits, and stop bits parameters;
InputMode: sets and returns the data type read by the Input property;
InBufferCount: returns the number of bytes waiting in the receive buffer. When set to 0, it can also be used to clear the receive buffer;
OutBufferCount: returns the number of bytes waiting in the send buffer. When set to 0, it can also be used to clear the output buffer;


The serial communication program design first initializes the work, sets the communication baud rate and the format of the transmitted characters, including the number of character bits, the number of stop bits, the parity check method, etc. The baud rate of the communication in this system is 1200b/s, and the format of the transmitted characters is 1 start bit, 8 data bits and 1 stop bit, etc. Usually, once the character format is determined, it will not change in future communications.
3 Conclusion
The automobile sunroof test system based on serial communication developed by us realizes test operation, information transmission and information feedback through the joint use of upper and lower computers, improves the performance of the stand-alone lower computer system that can perform routine tests but cannot record or feedback test information, and has more functions such as fault identification. Considering that there may be other potential problems with the automobile sunroof, the test system has an external interface to expand and improve more test functions.
Today, when China actively advocates the independent automobile industry, the design of the durability test system of the automobile sunroof provides an effective platform to ensure that the sunroof has high reliability during use. It can greatly improve the social and economic benefits of the automobile industry and has broad application prospects.
4 Innovations of the author of this article
The system realizes test operation, information transmission and information feedback through the joint use of the upper and lower computers. The lower computer controls the actuator of the sunroof, which can control the sunroof's round trip, opening, stopping, etc., and record the number of round trips of the sunroof; it can also automatically identify various faults, record the sunroof motor failure time, and terminate the test process at any time. In addition, the motor stall current is provided to meet the requirements of various sunroof motors. The upper computer provides a user-friendly interface, displays the number of durability tests, displays faults, and has the functions of recording the sunroof's immediate position, test progress, printing test results, and recording the time and location of the fault. The core is the communication reliability of the upper computer and the lower computer. In the design, the characteristic requirements for the sunroof motor are that it must pause for 30 seconds after working for one cycle, and this sunroof motor has a midway stop function. Since the sunroof needs to be tested for durability, we abandon the commonly used mechanical switch and use a durable photoelectric switch sensor to increase the system's working reliability and response speed, and ensure the instant and accurate test data.
In view of the slight differences in the application of this system for different car models and different sunroof design functions, the functions need to be continuously improved, and the specific economic benefits created by this need to be further counted and studied.

Reference address:Research and development of electric sunroof durability test system

Previous article:DC motor controller test system based on GP32
Next article:Design of smart home data acquisition system based on S3C2410

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号