CN1760776A - Drive unit for digital control pointer type meters in cars, and drive method - Google Patents

Drive unit for digital control pointer type meters in cars, and drive method Download PDF

Info

Publication number
CN1760776A
CN1760776A CN 200510057359 CN200510057359A CN1760776A CN 1760776 A CN1760776 A CN 1760776A CN 200510057359 CN200510057359 CN 200510057359 CN 200510057359 A CN200510057359 A CN 200510057359A CN 1760776 A CN1760776 A CN 1760776A
Authority
CN
China
Prior art keywords
module
data
micro
step motor
pwm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200510057359
Other languages
Chinese (zh)
Other versions
CN100483274C (en
Inventor
程方
王平
李银国
李铮
邓炳光
邓定春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CNB2005100573593A priority Critical patent/CN100483274C/en
Publication of CN1760776A publication Critical patent/CN1760776A/en
Application granted granted Critical
Publication of CN100483274C publication Critical patent/CN100483274C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Instrument Panels (AREA)

Abstract

The invention is related to automotive meters and instruments. PWM modulation method is adopted in the invention to drive step motor of pointer type meters directly. Relevant algorithms solve nonlinear acceleration and retardation in pointer rotation. Thus, software algorithms accomplish functions such as driving and speed controlling etc, which are implemented by hardware drive formerly. The invention reduces cost of instrument, complexity of hardware, and raises generality of system.

Description

汽车数控指针式仪表驱动装置及其驱动方法Automobile numerical control pointer instrument driving device and driving method thereof

技术领域technical field

本发明涉及自动控制领域,尤其涉及汽车智能仪器仪表驱动控制。The invention relates to the field of automatic control, in particular to the drive control of automobile intelligent instruments.

背景技术Background technique

目前的汽车用数控指针式仪表的实现方法多是采用专用的硬件驱动电路来实现指针式仪表的步进电机的微步驱动,如哈尔滨工业大学出版社在《步进电机及其驱动控制系统》中披露了一种步进电机的微步驱动方法,这种方法的成本较高;硬件电路较为复杂,不利于系统的维护;设计者针对不同应用时的自主操控性不高;可能导致部分硬件驱动芯片的资源浪费。At present, most of the implementation methods of numerical control pointer instruments for automobiles are to use special hardware drive circuits to realize the micro-step drive of the stepping motors of the pointer instruments, such as Harbin Institute of Technology Press in "Stepping Motors and Its Drive Control System" A micro-step driving method of a stepping motor is disclosed in , but the cost of this method is relatively high; the hardware circuit is relatively complicated, which is not conducive to system maintenance; the designer's autonomous control for different applications is not high; it may cause some hardware The resources of the driver chip are wasted.

发明内容Contents of the invention

为了克服现有的数控指针式仪表方案中的成本较高,硬件电路复杂,硬件资源浪费,通用性不强的问题,本实用新型设计了一种新的数控指针式仪表直接驱动的方案。能减低硬件电路的复杂度,提高系统的通用性,同时能有效的降低仪表的成本。In order to overcome the problems of high cost, complex hardware circuit, waste of hardware resources and poor versatility in the existing scheme of numerical control pointer instrument, the utility model designs a new direct drive scheme of numerical control pointer instrument. The complexity of the hardware circuit can be reduced, the generality of the system can be improved, and the cost of the instrument can be effectively reduced at the same time.

本发明解决其技术问题的技术方案是:设计一种汽车用数控指针式仪表驱动装置,采用PWM调制方法实现步进电机的微步工作模式,直接对双向步进电机实现精确的指针式仪表的显示控制功能;改用软件上的算法处理来实现整个转速表的驱动控制,采用相应的算法解决指针转动中的非线性加速和减速。该仪表包括:系统初始化模块、输入脉冲采样模块,数据采样模块、驱动参数计算模块、PWM输出驱动模块、以及各模块间的协调调度模块,其特征在于,协调调度模块实现对上述各模块的协调调度工作;数据采样模块采集微型步进电机的物理特性参数;输入脉冲采样模块:进行输入脉冲采样;驱动参数计算模块把采集来的数据转换成微型步进电机转过的角度;PWM驱动模块产生特定的PWM序列脉冲,执行微型步进电机的驱动。The technical solution of the present invention to solve the technical problem is: to design a numerically controlled pointer meter driving device for automobiles, to realize the micro-step working mode of the stepping motor by using the PWM modulation method, and to directly realize the accurate pointer meter for the bidirectional stepping motor. Display control function; use the algorithm processing on the software to realize the driving control of the entire tachometer, and use the corresponding algorithm to solve the nonlinear acceleration and deceleration in the pointer rotation. The instrument includes: a system initialization module, an input pulse sampling module, a data sampling module, a drive parameter calculation module, a PWM output drive module, and a coordination scheduling module among the modules, and is characterized in that the coordination scheduling module realizes the coordination of the above-mentioned modules Scheduling work; the data sampling module collects the physical characteristic parameters of the micro-stepping motor; the input pulse sampling module: performs input pulse sampling; the drive parameter calculation module converts the collected data into the angle of the micro-stepping motor; the PWM drive module generates A specific PWM sequence of pulses executes the drive of the micro stepping motor.

本发明还设计了一种汽车用数控指针式仪表直接驱动实现方法,其特征在于,所述方法包括以下步骤:系统初始化模块初始化MCU的I/O口,定时器,中断使能;数据采样模块采集微型步进电机的物理特性参数;将采集来的数据转换成微型步进电机转过的角度参数;在数据列表中查找对应的转速;PWM驱动模块接收驱动数据,产生特定的PWM序列脉冲;输出脉冲序列,驱动微型步进电机转动。The present invention also designs a method for realizing the direct drive of a numerically controlled pointer instrument for automobiles, which is characterized in that the method includes the following steps: the system initialization module initializes the I/O port of the MCU, the timer, and the interrupt enable; the data sampling module Collect the physical characteristic parameters of the micro-stepping motor; convert the collected data into the angle parameters of the micro-stepping motor; find the corresponding speed in the data list; the PWM drive module receives the driving data and generates a specific PWM sequence pulse; The pulse sequence is output to drive the micro stepping motor to rotate.

本发明的有益效果是:可以在保证指针式仪表质量、达到较高的技术指标及可靠性的同时,有效的降低成本,减低硬件电路的复杂性及提高系统的通用性。The beneficial effects of the invention are: while ensuring the quality of the pointer instrument, achieving high technical index and reliability, it can effectively reduce the cost, reduce the complexity of the hardware circuit and improve the universality of the system.

附图说明Description of drawings

图1为本发明的算法整体框图Fig. 1 is the overall block diagram of the algorithm of the present invention

图2为本发明的数据采集流程图Fig. 2 is the flow chart of data acquisition of the present invention

图3为本发明的驱动参数计算流程图Fig. 3 is the drive parameter calculation flowchart of the present invention

图4为本发明的PWM驱动流程图Fig. 4 is the PWM driving flowchart of the present invention

具体实施方式Detailed ways

下面结合附图和数控指针式汽车发动机转速表的实施例对本发明做进一步的说明:Below in conjunction with the embodiment of accompanying drawing and numerical control pointer type automobile engine tachometer, the present invention will be further described:

本实施例的总体算法模型框架如图1所示,主要包括系统初始化模块(2)、数据采样模块(3)、驱动参数的计算模块(4)、PWM输出驱动模块(5)、以及各模块间的协调调度模块(1)。调度模块主要实现以上各模块的协调工作,在转速表刚刚上电的时候,协调模块首先调用初始化模块,初始化MCU的I/0口,定时器,中断使能等等;接着起动数据采集模块,采集发动机转动的速率数据;采集时间过后,调用数据计算模块把采集来的数据转换成微型步进电机转过的角度;最后把计算结果传给PWM驱动模块执行微型步进电机的驱动。为了缩短每次数据采样之间的时间间隔,在PWM驱动模块接收驱动数据后,同时也起动了数据采集模块,如此可以实现驱动和采集同时进行,防止指针在一段时间内转动时出现断断续续的现象,让指针能够实现更宽的速度驱动范围。在数据采集过程中主要通过脉冲触发中断的方式来实现脉冲计算,因为中断的时间非常断,对PWM的驱动没有明显的影响。The overall algorithm model frame of the present embodiment is as shown in Figure 1, mainly includes system initialization module (2), data sampling module (3), calculation module (4) of drive parameter, PWM output drive module (5), and each module The coordination scheduling module among them (1). The scheduling module mainly realizes the coordination of the above modules. When the tachometer is just powered on, the coordination module first calls the initialization module, initializes the I/0 port of the MCU, the timer, interrupt enable, etc.; then starts the data acquisition module, Collect the speed data of the engine rotation; after the collection time, call the data calculation module to convert the collected data into the angle of the micro-stepping motor; finally pass the calculation result to the PWM drive module to drive the micro-stepping motor. In order to shorten the time interval between each data sampling, after the PWM driver module receives the driving data, it also starts the data acquisition module at the same time, so that the driving and acquisition can be carried out at the same time, preventing the intermittent phenomenon when the pointer rotates for a period of time , allowing the pointer to achieve a wider speed drive range. In the process of data acquisition, the pulse calculation is mainly realized by means of pulse-triggered interrupt, because the interrupt time is very intermittent and has no obvious impact on the PWM drive.

图2为输入脉冲采样功能模块,具体的采样方法为采用定时长计数脉冲个数的方法来进行输入脉冲采样。这样当输入脉冲频率较高时也能保证采样的准确性,同时外部串入的少量干扰脉冲也不会对采样的精度有大的影响。Figure 2 shows the input pulse sampling function module. The specific sampling method is to use the method of counting the number of pulses at a fixed time to sample the input pulse. In this way, when the input pulse frequency is high, the accuracy of sampling can be guaranteed, and at the same time, a small amount of external interference pulses will not have a great impact on the accuracy of sampling.

图3所示为驱动参数计算模块,实现指针目标位置计算,通过采样获得的脉冲频率换算出发动机的转速,再根据发动机的最大转速、齿数、最大转角等参数计算出指针的目标转动位置,将指针的目标位置和当前位置进行比较,计算出指针将要转过的转角,指针转动的速度是和转角成一定的比例关系,也即和发动机转速的变化成比例。设计方案中采用了查表的方式来实现不同转速的选择,即根据不同的指针转动距离查找出其应选择的转速。步进电机转动过程中对加速度有一定的限制,当加速度过大时会造成电机的转动力矩不足,产生抖动甚至失步。因此,在本项目中对指针速度变化采用了加减速过程并对此过程采取了非线性的处理以避免失步,同时也使得指针的转动更加平稳,视觉效果更好。确定了转速后根据目标转速与当前转速的差值以及转动的距离确定其对应的速度变化曲线表,具体的速度变化是通过控制PWM脉冲占空比改变的频率变化来实现的。Figure 3 shows the drive parameter calculation module, which realizes the calculation of the target position of the pointer. The speed of the engine is converted from the pulse frequency obtained by sampling, and then the target rotation position of the pointer is calculated according to the parameters such as the maximum speed of the engine, the number of teeth, and the maximum rotation angle. The target position of the pointer is compared with the current position, and the rotation angle that the pointer will turn is calculated. The speed of the pointer rotation is proportional to the rotation angle, that is, it is proportional to the change of the engine speed. In the design scheme, the method of looking up the table is used to realize the selection of different speeds, that is, to find out the speed that should be selected according to the different pointer rotation distances. There are certain restrictions on the acceleration during the rotation of the stepper motor. When the acceleration is too large, the rotational torque of the motor will be insufficient, resulting in jitter or even out of step. Therefore, in this project, the acceleration and deceleration process is adopted for the pointer speed change, and the non-linear processing is adopted for this process to avoid out of step, and it also makes the rotation of the pointer more stable and the visual effect is better. After the speed is determined, the corresponding speed change curve table is determined according to the difference between the target speed and the current speed and the distance of rotation. The specific speed change is realized by controlling the frequency change of the PWM pulse duty cycle.

图4为产生动态PWM输出控制脉冲驱动步进电机微步运转的功能模块,由步进电机微步驱动的原理,知道步进电机的驱动电流呈正弦曲线的阶梯波形,本PWM驱动波形的电流有效值呈正弦阶梯变化,驱动的电信号波形表现为脉冲的宽度接近正弦曲线变化。从驱动的连续过程上看,对步进电机的驱动就是向步进电机发送不断重复的某一固定脉冲序列。该固定的脉冲序列的变调制过程就是本设计中的关键部分,它确定了指针走动的平稳度,精确度等重要技术指标。Figure 4 is a functional module that generates dynamic PWM output control pulses to drive the stepper motor to run in microsteps. The principle of stepper motor microstepping drives, knowing that the drive current of the stepper motor is a sinusoidal ladder waveform, the current of this PWM drive waveform The effective value changes in a sinusoidal step, and the electrical signal waveform of the drive shows that the pulse width is close to a sinusoidal curve change. From the perspective of the continuous process of driving, the driving of the stepper motor is to send a certain fixed pulse sequence that is constantly repeated to the stepper motor. The variable modulation process of the fixed pulse sequence is the key part of this design, which determines the important technical indicators such as the smoothness and accuracy of the pointer movement.

Claims (5)

1, a kind of automobile digital control pointer type meters drive unit, comprise: system initialization module, input pulse sampling module, the coordinated scheduling module of data sampling module, driving parameters computing module, PWM output driver module and each intermodule, it is characterized in that the coordinated scheduling module realizes the coordinated scheduling work to above-mentioned each module; Data sampling module is gathered the physical characteristics parameter of micro-step motor; Input pulse sampling module: carry out the input pulse sampling; The driving parameters computing module is gathering the angle that next data-switching becomes micro-step motor to turn over; The PWM driver module produces specific PWM train pulse, carries out the driving of micro-step motor.
2, automobile digital control pointer type meters according to claim 1 is characterized in that, the mode that described data acquisition module interrupts by trigger action realizes step-by-step counting.
3, a kind of automobile is characterized in that with the direct driving method of digital control pointer type meters, said method comprising the steps of: the I/O mouth of system initialization module initialization MCU, and timer interrupts enabling; Data sampling module is gathered the physical characteristics parameter of micro-step motor; The angle parameter that next data-switching becomes micro-step motor to turn over will be gathered; In data list, search corresponding rotating speed; The PWM driver module receives driving data, produces specific PWM train pulse; Output pulse sequence drives micro-step motor and rotates.
4, implementation method according to claim 3 is characterized in that, after the PWM driver module receives driving data, also starts data acquisition module simultaneously.
5, implementation method according to claim 3 is characterized in that, the target location and the current location of pointer compared, and calculates the corner that pointer will turn over and obtains angle parameter, searches the rotating speed that it should be selected according to different pointer rotation distances.
CNB2005100573593A 2005-11-03 2005-11-03 Drive unit for digital control pointer type meters in cars, and drive method Expired - Fee Related CN100483274C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100573593A CN100483274C (en) 2005-11-03 2005-11-03 Drive unit for digital control pointer type meters in cars, and drive method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100573593A CN100483274C (en) 2005-11-03 2005-11-03 Drive unit for digital control pointer type meters in cars, and drive method

Publications (2)

Publication Number Publication Date
CN1760776A true CN1760776A (en) 2006-04-19
CN100483274C CN100483274C (en) 2009-04-29

Family

ID=36706882

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100573593A Expired - Fee Related CN100483274C (en) 2005-11-03 2005-11-03 Drive unit for digital control pointer type meters in cars, and drive method

Country Status (1)

Country Link
CN (1) CN100483274C (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103116298A (en) * 2013-01-17 2013-05-22 重庆邮电大学 Automobile numerical control instrument driving system
CN103344261A (en) * 2013-07-12 2013-10-09 航天科技控股集团股份有限公司 Method for enabling automobile meter needle to point zero through inertia
CN104868877A (en) * 2014-08-13 2015-08-26 北汽福田汽车股份有限公司 Digital instrument stepper motor driving method and system
CN106406360A (en) * 2016-08-31 2017-02-15 惠州华阳通用电子有限公司 Virtual instrument pointer rotation control method and device
CN110729927A (en) * 2019-10-23 2020-01-24 东风电子科技股份有限公司 System and method for realizing synchronous control of LED indicator lamp and stepping motor

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944873A (en) * 2010-09-17 2011-01-12 中国科学院上海技术物理研究所 Acceleration and speed reduction control method for stepper motor

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103116298A (en) * 2013-01-17 2013-05-22 重庆邮电大学 Automobile numerical control instrument driving system
CN103116298B (en) * 2013-01-17 2015-05-27 重庆邮电大学 Automobile numerical control instrument driving system
CN103344261A (en) * 2013-07-12 2013-10-09 航天科技控股集团股份有限公司 Method for enabling automobile meter needle to point zero through inertia
CN104868877A (en) * 2014-08-13 2015-08-26 北汽福田汽车股份有限公司 Digital instrument stepper motor driving method and system
CN104868877B (en) * 2014-08-13 2017-11-24 北京车和家信息技术有限责任公司 The driving method and system of digital instrument stepper motor
CN106406360A (en) * 2016-08-31 2017-02-15 惠州华阳通用电子有限公司 Virtual instrument pointer rotation control method and device
CN110729927A (en) * 2019-10-23 2020-01-24 东风电子科技股份有限公司 System and method for realizing synchronous control of LED indicator lamp and stepping motor
CN110729927B (en) * 2019-10-23 2021-11-09 东风电子科技股份有限公司 System and method for realizing synchronous control of LED indicator lamp and stepping motor

Also Published As

Publication number Publication date
CN100483274C (en) 2009-04-29

Similar Documents

Publication Publication Date Title
CN202334412U (en) Brushless DC motor control system
CN107124125A (en) A kind of multiaxis controllor for step-by-step motor system based on fpga chip
CN101373947A (en) Method, apparatus and system for controlling stepper motor speed
CN103368496B (en) A kind of converter M/T velocity-measuring system based on DSP and method
AU2019397879A1 (en) PWM generation circuit, processing circuit and chip
CN102237838B (en) Braking current control method and device for electric bicycle controller
CN102843082A (en) Self-adaptive control algorithm of pointer of stepper motor type motormeter
CN1760776A (en) Drive unit for digital control pointer type meters in cars, and drive method
CN107769643B (en) Stepping motor control method and device, stepping motor and storage medium
CN111030526A (en) Motor driving method and system
CN112636660B (en) Servo drive control system and absolute position signal processing method, device and equipment
CN103604951B (en) The GES measuring method and its TT&C system of a kind of vehicle speed sensor
CN209170340U (en) Pwm signal sample detecting circuit, processing circuit and chip
CN201352125Y (en) Stepping motor automobile combined instrument
CN209419518U (en) A kind of novel brushless direct current motor sensorless control system
CN1136453C (en) Inteligent type electronic speed meter for vehicle
CN113824360B (en) PWM speed regulation system and method for DC motor
CN205508234U (en) High accuracy optical bench
CN109347374A (en) A kind of novel brushless direct current motor sensorless control system and method
CN202713217U (en) Novel direct current motor rotating speed measurement and control system controlled by double single chip microcomputers
CN105915133B (en) Stepper motor driver and its any divided method
CN206968611U (en) Screen wiper
CN112071183B (en) Multifunctional motion detection teaching experiment system and control method
CN206601628U (en) Commanding officer position finder bidimensional turntable following control system based on stepper drive
CN211429224U (en) DC compensation circuit

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090429

Termination date: 20111103