Design of a vehicle combination switch detection device based on AT89S52

Publisher:中原读书客Latest update time:2012-11-14 Source: 21ic Keywords:AT89S52 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The automobile combination switch is a commonly used switch in automobiles (see Figure 1 for its appearance). It has low beam, high beam, low light, headlight, overtaking, high speed wiper, low speed wiper, intermittent wiper, washing, left turn, right turn and other gears. At present, many manufacturers still use the traditional simulation test method when testing combination switches. This method is prone to omission and misdetection of individual gears, and the detection efficiency is also low. For this reason, the author has made an automobile combination switch detection device based on AT89S52. The device can accurately detect all gears of the combination switch, and is equipped with sound and light alarm functions, which effectively prevents misdetection and omission of individual gears in simulation tests. Here, only the circuit part of the device is analyzed as follows.

Figure 1 Common switches

1. Overall design

Combination switch detection is a very important link in production. Generally, simulation detection is adopted, that is, all peripheral circuits of the combination switch are installed on the test bench, and the indicator lights are used to simulate the working conditions of each gear. For example, if the combination switch is pulled to the intermittent gear, the indicator lights should flash intermittently. This detection method has high requirements for workers and is very easy to cause false detection and missed detection. The combination switch detection device designed and produced by the author adopts the detection scheme of single-chip scanning, adds sound and light alarm, reduces the labor intensity of workers, effectively prevents false detection and missed detection, and is particularly suitable for use on the production site. The actual circuit is shown in Figure 2.

Figure 2 Circuit diagram

2. Circuit Design Principle

This detection device uses the common AT89S52 in the market as the MCU. The chip is easy to program, easy to download programs, and has a high cost-effectiveness. It is widely used in the field of industrial control. This detection device sets a qualified indicator light for ten gears and an overall qualified indicator light for a certain type of combination switch. The overall qualified indicator light will light up when all ten gears are qualified. In addition, in order to focus the workers' attention and prevent misjudgment, a special overall qualified sound alarm is set, and an alarm is sounded by voice when the overall qualified indicator light up.

1. Hardware Design

The hardware circuit of this detection device is shown in Figure 3.

Figure 3 Hardware circuit of the detection device

PO and PI ports are used as the input of the external leads of the combination switch. The external leads of the combination switch are the external leads of each gear switch. When the combination switch is turned to different gears, each lead is connected or disconnected as required.

P2 port and P3.0, P3.1, and P3.6 serve as qualified alarm indications. This is just a simple LED indication circuit. If the indication needs to be more obvious, a high-power drive display circuit can be added through the high-power indicator light extension port.

The P3.2 port is connected to an external probe switch. When the combination switch is pressed on the test fixture, the probe switch will be closed at the same time, and the detection device will start detection immediately.

P3.7 port is connected to the recording and playback module. There are many such modules available on the market. This article uses the recording and playback module with ISD4004-08 as the core (as shown in Figure 4). This module has a built-in LM386 power amplifier circuit, which can record 16 segments and 480s of recording. You only need to add a 15ms to 30ms negative pulse signal to the corresponding port to play the recording, which is very convenient to operate.

Figure 4

2. Software Design

This system uses a point-to-point scanning method for each gear of the combination switch to determine whether the switch is good or bad. At the same time, it can also detect whether the internal wiring of the combination switch is correct and whether there is a short circuit between the leads. At the same time, in order to improve the test efficiency, an automatic test function is added. When the combination switch is removed, the system automatically resets. After the next combination switch to be tested is placed, the system automatically starts testing. The program flow chart is shown in Figure 5.

Figure 5 Program flow chart

3. Installation and Use

After the circuit board shown in Figure 2 is connected to the peripheral leads, the combination switch presses the probe switch, and the system automatically starts testing. At this time, the combination switch needs to be turned to each gear in turn. When the gear is normal, the corresponding indicator light is on. When all gears are qualified, the total qualified indicator light is on, and a voice alarm is sounded. The detection device has been applied to the production site, and the detection effect is very good.

Keywords:AT89S52 Reference address:Design of a vehicle combination switch detection device based on AT89S52

Previous article:Design of MEMS Gyroscope Signal Acquisition and Processing System Based on AT89S52
Next article:Design of high voltage DC regulated power supply based on AT89C52

Recommended ReadingLatest update time:2024-11-17 05:36

Design of an intelligent rescue robot
introduction   The reason why an intelligent robot is called an intelligent robot is that it has a fairly developed "brain". The central computer works in the brain, and this computer has a direct connection with the person who operates it. Most importantly, such a computer can perform actions arranged according to
[Microcontroller]
Design of an intelligent rescue robot
Design of single chip microcomputer interrupt source system
In the AT89S52 microcontroller, there are only two external interrupt request input terminals INT0 and INT1. In actual application systems, there are often more than two external interrupt sources, so the external interrupt sources must be expanded. The main methods are: expansion with timer/counter T0, T1; expansion b
[Microcontroller]
Design of single chip microcomputer interrupt source system
High-precision data acquisition system based on MAX197
The system designed by the common eight-bit analog-to-digital conversion chip (such as ADC0809 , etc.) is relatively simple and low-cost, but sometimes the eight-bit accuracy is not enough. At this time, we have to choose a higher-precision analog-to-digital conversion chip. Among them, MAX197 is a 12-bit precision ana
[Power Management]
High-precision data acquisition system based on MAX197
Design of Automatic Transfer Switch Controller Based on Single Chip Microcomputer
1. Introduction With the advancement and development of technology in recent years, a new type of product has emerged in the power switching system - automatic transfer switching equipment (ATSE). It consists of one (or several) transfer switching equipment and other necessary electrical appliances. It is used
[Microcontroller]
Remote control system program based on AT89S52+SIM300 GPRS
The microcontroller source program is as follows: /**************************************************************************************** * File name: SIM300.c * Description: This file is a program file for the microcontroller to control the GPRS module * Function: MCU controls SIM300 module to make calls * Modific
[Microcontroller]
Remote control system program based on AT89S52+SIM300 GPRS
AT89S5X Offline Downloader Production
Recently, due to work needs, I am preparing to make an offline downloader for AT89S5X. The initial consideration is to use AT89S52 as the host and write the target code into AT24C64 through the serial port (AT24C64 has 8K space, just enough for 52). After arriving at the site, the code in the EEPROM can be written
[Microcontroller]
AT89S52 MCU interrupt process
The interrupt of AT89S52 microcontroller is divided into four stages: interrupt sampling, interrupt query, interrupt response, and interrupt return. When executing an interrupt, the following three conditions must be met:    (1) The interrupt source has an interrupt request;    (2) The interrupt enable bit of this in
[Microcontroller]
AT89S52 MCU interrupt process
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号