C8051F311 microcontroller and Hall sensor realize the design of automobile electric seat control system

C8051F311 microcontroller and Hall sensor realize the design of automobile electric seat control system
Post Date:2022-10-12,Silicon Motion, Inc.

C8051F311 microcontroller and Hall sensor realize the design of automobile electric seat control system


With the improvement of people's living standards, the requirements for the comfort of car seats are getting higher and higher, and the adjustment of the car seats is required to be simpler, more convenient and faster. At present, the adjustment of the car seat position mostly adopts two methods, mechanical and electric control based on manual adjustment. There are three main ways to adjust the position of the car seat, namely height adjustment, horizontal position adjustment and adjustment of the seat back inclination angle.

1. Basic working principle of the system

C8051F311 The structure principle of the automatic car seat is shown in Figure 1. The seat is pulled by 4 DC motors, including 2 height adjustment motors, 1 horizontal adjustment motor and one backrest adjustment motor. The DC motor armature voltage is 12V, and the power source is from the car battery obtained on. The automatic control system of the car seat is composed of a C8051F311 single-chip microcomputer with a non-volatile data memory, a drive module, a transmission mechanism and an operating handle. The rotational speed of the motor and the position information of the seat are detected by the Hall sensor installed on the motor, and then sent to the single-chip microcomputer after being shaped and amplified to form the speed feedback of the system.

Design of car electric seat control system based on C8051F311 microcontroller and Hall sensor

The car electric seat is to install a DC motor, a worm gear structure, and a drive shaft on the traditional car seat, which together form a transmission mechanism to drive the seat to move; two DC motors are installed vertically under the car seat to support the driver in the Move up and down in the vertical direction; install a DC motor in the back direction of the seat to control the angle change of the seat back; install a DC motor in the horizontal direction of the seat to control the car seat to move back and forth in the horizontal direction. There are several manual adjustment buttons on the operating handle, which can control the DC motor through manual adjustment, and change the stroke and direction of the transmission shaft, so as to adjust the position of the car seat, such as the up and down position of the seat, the front and rear positions and the angle change of the backrest; There are multiple memory buttons used to memorize or restore seat position information. A self-learning button is installed on the control system to automatically measure the limit position that the seat can move inside the car to prevent the motor from burning for a long time after the seat reaches the limit position.

2. System hardware design
 The 3×4 matrix keyboard is used as the operating handle of the system; the P1 port is connected to the drive circuit to control 4 DC motors, and the shaping circuit amplifies and shapes the Hall sensor signal into a TTL level signal that directly interfaces with the microcontroller.

2.1 Drive circuit design


By controlling the level change of P1.0 and P1.1 of C8051F311 microcontroller, the steering of the motor is controlled. When P1.0 is at high level and P1.1 is at low level, transistor Q2 is turned on, and relay K1 is turned on; transistor Q3 is turned off, relay K2 is turned on, and the DC power supply passes through the normally open contact of relay K1 and the normally closed contact of K2 Connected to the motor armature, it is assumed that the motor is rotating forward at this time. When P1.0 is low level and P1.1 is high level, the motor reverses. By controlling the change of the level of the P1 port of the C8051F311 single-chip microcomputer, the direction and time of rotation of the motor are controlled, thereby controlling the movement of the car seat in all directions.

The integer circuit of the Hall sensor, the feedback Hall sensor +2V weak signal is amplified and shaped into a TTL level that can interface with the single-chip microcomputer, and is connected to the external interrupt 0 (P0.0) of the C8051F311 single-chip microcomputer, using the interrupt method. The number of pulses generated by the Hall sensor is calculated to calculate the rotational speed and position data of the motor.

3. Software design

The power supply of the DC motor installed on the car seat is taken from the car battery. Since the voltage of the car battery will fluctuate with the different operating conditions of the car, the speed of the motor will also change accordingly. When moving the distance, the position data of the car seat will also change; therefore, the paper adopts the calculation of the number of turns the motor rotates in one direction, that is, the number of pulses generated by the Hall sensor on the motor, to identify the motor in this direction. distance traveled.

3.1 Manual adjustment

There are 8 manual adjustment buttons on the operating handle, which are used to control the rotation of each motor on the seat in each direction, and the manual adjustment adopts the jog control method. Through the manual buttons of the operating handle, each motor of the seat is controlled, and the seat is moved through the transmission mechanism, and the moving direction and moving distance of the seat are adjusted, thereby adjusting the position of the seat.

3.2 Design of memory function

The design principle of the car seat memory function is: manually control the motors in all directions of the seat by manually adjusting the buttons, so that the seat reaches the most comfortable position, and at the same time calculate the number of pulses generated by the Hall sensors on each motor (that is, the seat position information), and then press the store button for more than 3 seconds, the system will store the position information of each motor of the seat into the designated unit of the FLASH ROM, and the memory of the seat position will be completed. When it is necessary to restore the memorized seat position, press the corresponding storage button for no more than 3 seconds, and the system will read the memorized seat motor position information from the FLASH ROM and compare it with the current seat position information. Control the motor to move to the memorized position; the system has multiple storage buttons to memorize multiple seat positions.

3.3 Self-learning function for measuring position limit

Due to the different size of the interior space of the car, the maximum distance that the car seat can move in the car is also different; the limit position should be set when installing the automatic car seat, so that the car seat can move safely within the limit position; When setting the seat limit position, due to the different interior spaces of different cars, the set limit positions are different; therefore, a self-learning function software must be designed to enable the system to automatically measure the limit position that the seat can move in the car.

When the motor runs in a locked-rotor state, the speed becomes low, or even stops; when the car seat moves to the limit position, the motor is blocked due to the limitation of the interior space of the car. Using the locked rotor state of the motor, the limit position of the seat can be measured.

During the rotation of the motor, monitor the speed of the motor. When the speed is much lower than the normal speed of the motor, it can be judged that the motor is in a locked-rotor state at this time, and the motor is stopped. The position at this time is a limit position of the car seat. ; Then control the motor to rotate in the opposite direction to determine another limit position; set one limit position as zero point and the other as the maximum limit position, and store the position data of the maximum limit position in the FLASH ROM in the microcontroller. When the car seat moves to the limit position, the motor is controlled to stop, and the control seat can only rotate in the opposite direction at this time, so as to prevent the motor from burning out due to the locked rotor time being too long.

4. Conclusion
Developed a seat automatic control system with C8051F311 microcontroller as the core. The system has the functions of automatically measuring the position limit of seat installation and memorizing multiple seat positions, which makes the installation of electric seats easier. The adjustment is convenient and fast; it can greatly improve the controllability of the seat and improve the comfort of the occupant. The automatic seat control system can also be well used in hospital beds, which can help patients with more difficult mobility.

Related Products

Shopping Cart Tel: +86-755-82518276 Email: sales@jinftry.com Skype: +8615019224070, annies65, +8615118125813 QQ: 568248857, 827259012, 316249462 Mobile: +8615019224070, +8615118118839, +8615118125813 WeChat: Send Message
TOP