Controller for electric vehicle reference current preset system and pre-setting method thereof
Technical field
The invention belongs to the controller for electric vehicle field, especially controller for electric vehicle reference current preset system and pre-setting method thereof.
Background technology
Electric motor car is light, quick with it, environmental protection, advantage such as energy-conservation, cheap and enjoy consumer's favor.Controller for electric vehicle is one of core component of electric motor car, tasks such as electric motor car is normally accomplished the going of electric motor car, turned under the control of controller for electric vehicle, braking.In the production run of controller for electric vehicle; Owing to the inconsistent meeting of component parameter causes the performance parameter of controller for electric vehicle different; For example; When using the MOSFET pipe of different capacity, the correlation parameter of its driving circuit is just different, thereby the cut-off current that controller for electric vehicle is used for current-limiting protection just must be made amendment.At present; The method that controller for electric vehicle is revised cut-off current mainly contains two kinds: a kind of is to realize through software approach update routine or relevant parameters; Its shortcoming is; Controller for electric vehicle to different components and parts all need be developed corresponding software version, has increased the workload of software development and management; Another kind method is that the hardware circuit of controller for electric vehicle is made amendment; The cut-off current adjustment resistance of promptly revising in the hardware circuit is realized; Its shortcoming is; Because the discreteness of given reference voltage and the influence of resistance precision, the tester often need do repeatedly to adjust cut-off current is met the requirements.In sum, some problems below existing controller for electric vehicle exists when revising cut-off current: 1. no matter adopt software approach or hardware approach, all have the problem that modification process institute spended time is long, production efficiency is low; 2. adopt the very difficult precision that improves the controller for electric vehicle cut-off current of method of artificial adjustment, influence the performance of controller for electric vehicle; 3. there are multiple Different software version or hardware version to the different controller for electric vehicle of component parameter, increased the workload of exploitation, production and maintenance; 4. when revising, need use precision resistance that cut-off current is adjusted, cause the raising of production cost.
Summary of the invention
The objective of the invention is to overcome the deficiency of prior art; Provide a kind of reasonable in design, automaticity is high, controller for electric vehicle reference current preset system and the pre-setting method thereof being convenient to realize; This method can be eliminated the inconsistent influence that performance parameter caused to controller for electric vehicle of component parameter effectively; Improved the performance of production efficiency and controller for electric vehicle, brought great convenience for design, production and the maintenance of controller for electric vehicle.
The present invention solves its technical matters and takes following technical scheme to realize:
A kind of controller for electric vehicle reference current preset system; The reference current preset system is made up of upper control machine, reference power supply and controller for electric vehicle; Upper control machine is connected with controller for electric vehicle and adopts serial communication mode to communicate by letter; Upper control machine is connected through control line with reference power supply; The reference current output terminal of reference power supply is connected with the reference current input port of controller for electric vehicle, and the output terminal of controller for electric vehicle connects a standard termination, stores the E in the controller for electric vehicle into through the reference current value of reference current preset system collection
2Among the PROM (EEPROM Electrically ErasableProgrammable Read-Only Memory).
And described controller for electric vehicle is by single-chip microcomputer, E
2PROM, power supply, external signal input circuit, duty output circuit, driving circuit, power tube switch and current feedback circuit constitute, single-chip microcomputer through the I/O interface respectively with E
2PROM, external signal input circuit, duty output circuit and driving circuit are connected; Driving circuit, power tube switch and current feedback circuit are connected in proper order; The output terminal of current feedback circuit is connected with the I/O interface of single-chip microcomputer; The output terminal of power tube switch is connected with standard termination, and this single-chip microcomputer also is connected with upper control machine through its communication interface, and the I/O interface of single-chip microcomputer is connected with the reference current output terminal of reference power supply.
And described controller for electric vehicle is by built-in E
2The single-chip microcomputer of PROM, power supply, external signal input circuit, duty output circuit, driving circuit, power tube switch and current feedback circuit constitute; Single-chip microcomputer is connected with external signal input circuit, duty output circuit and driving circuit respectively through the I/O interface; Driving circuit, power tube switch and current feedback circuit are connected in proper order; The output terminal of current feedback circuit is connected with the I/O interface of single-chip microcomputer; The output terminal of power tube switch is connected with standard termination, and this single-chip microcomputer also is connected with upper control machine through its communication interface, and the I/O interface of single-chip microcomputer is connected with the reference current output terminal of reference power supply.
And described controller for electric vehicle is by built-in emulation E
2The single-chip microcomputer of PROM, power supply, external signal input circuit, duty output circuit, driving circuit, power tube switch and current feedback circuit constitute; Single-chip microcomputer is connected with external signal input circuit, duty output circuit and driving circuit respectively through the I/O interface; Driving circuit, power tube switch and current feedback circuit are connected in proper order; The output terminal of current feedback circuit is connected with the I/O interface of single-chip microcomputer; The output terminal of power tube switch is connected with standard termination, and this single-chip microcomputer also is connected with upper control machine through its communication interface, and the I/O interface of single-chip microcomputer is connected with the reference current output terminal of reference power supply.
And described communication interface is I/O interface or two the I/O interfaces of single-chip microcomputer or an I/O interface that is connected with the external signal input circuit of serial communication interface or the single-chip microcomputer of single-chip microcomputer.
A kind of pre-setting method of controller for electric vehicle reference current, this method comprises the steps:
(1). upper control machine presets order and opens reference power supply to controller for electric vehicle transmission reference current provides reference current to controller for electric vehicle;
(2). after controller for electric vehicle reception reference current presets order, through the electric current of current feedback circuit output terminal being gathered and A/D conversion back acquisition reference current value;
(3). controller for electric vehicle carries out stores processor to reference current value, and the information that storage action is accomplished is sent to upper control machine;
(4). host computer carries out analyzing and processing after receiving storage action completion information, accomplishes presetting of controller for electric vehicle reference current.
And described controller for electric vehicle to the step that reference current value carries out stores processor is:
(1). whether the judgment standard current value goes beyond the scope, if ultra scope then the event memory information setting is the ultra range mark of collection value, processing finishes, otherwise gets into next step;
(2). reference current value is written to the E in the controller for electric vehicle
2Among the PROM, and judge whether the data write are correct,, otherwise be set to write E if correctly then the event memory information setting is indicated for presetting successfully
2The PROM failure flags.
And averaging after described reference current value carries out gathering for 2~16 times to reference current obtains.Advantage of the present invention and good effect are:
1. the present invention sets up a kind of Control on Communication mode between upper control machine and controller for electric vehicle; The reference current that makes controller for electric vehicle under the control of upper control machine, provide reference power supply is gathered and A/D conversion acquisition reference current value, and stores this reference current value the E of controller for electric vehicle into
2Among the PROM; Realized presetting of controller for electric vehicle reference current; This method of reference current being gathered and being changed through the controller for electric vehicle internal circuit has been eliminated the error effect that adopts different components and parts to cause, and controller for electric vehicle is provided with cut-off current with the reference current value that collects as standard; Guarantee the accuracy and the validity of current-limiting protection, significantly improved the precision of cut-off current simultaneously.
2. the present invention adopts intelligent automatic processing procedure; Have characteristics simple to operate, easy to use; When reality is used; Only need upper control machine, controller for electric vehicle and reference power supply are connected, can realize the automatic collection of reference current is stored into the A/D transfer process and with the reference current value of acquisition the E of controller for electric vehicle
2Among the PROM, realize the preparatory function of reference current, shortened the processing time, improved production efficiency.
3. the present invention gathers reference current through the controller for electric vehicle internal circuit; Eliminated the error effect that adopts different components and parts to cause; Therefore need not use precision resistance can realize presetting to reference current; Reduced the hardware cost of controller for electric vehicle, reduced the software version and the hardware version of controller for electric vehicle simultaneously, brought great convenience for design, production and the maintenance of controller for electric vehicle.
4. the present invention has characteristics reasonable in design, that automaticity is high, realization is easy; Eliminate the inconsistent influence that performance parameter caused of component parameter effectively to controller for electric vehicle; Improved the performance of production efficiency and controller for electric vehicle, brought great convenience for design, production and the maintenance of controller for electric vehicle.
Description of drawings
Fig. 1 is a controller for electric vehicle reference current preset system connection side block diagram;
Fig. 2 is first kind of controller for electric vehicle and upper control machine and reference power supply connection side block diagram;
Fig. 3 is second kind of controller for electric vehicle and upper control machine and reference power supply connection side block diagram;
Fig. 4 is the third controller for electric vehicle and upper control machine and reference power supply connection side block diagram.
Embodiment
Below in conjunction with accompanying drawing the embodiment of the invention is done further detailed description.
This controller for electric vehicle reference current preset system is made up of upper control machine, reference power supply and controller for electric vehicle; Use serial communication mode to be connected between upper control machine and the controller for electric vehicle; Upper control machine is connected through control line with reference power supply; The reference current output terminal of reference power supply is connected with the reference current input port of controller for electric vehicle, and the output terminal of controller for electric vehicle connects a standard termination, is provided with E in the controller for electric vehicle
2PROM stores the E in the controller for electric vehicle into through the reference current value of reference current preset system collection
2Among the PROM (EEPROM ElectricallyErasable Programmable Read-Only Memory).
Controller for electric vehicle in the said system has three kinds of forms, below explanation respectively:
First kind of form is as shown in Figure 2, and this controller for electric vehicle is by single-chip microcomputer, E
2PROM, power supply, external signal input circuit, duty output circuit, driving circuit, power tube switch and current feedback circuit constitute, and power supply is that controller for electric vehicle provides working power, single-chip microcomputer through the I/O interface respectively with E
2PROM, external signal input circuit, duty output circuit and driving circuit are connected; Driving circuit, power tube switch and current feedback circuit are connected in proper order; The output terminal of current feedback circuit is connected with the I/O interface of single-chip microcomputer; The output terminal of power tube switch is connected with standard termination; The electric current that flows through standard termination is reference current, and this reference current can be gathered and carry out the A/D conversion and obtain reference current value and store E into through the I/O interface that is connected with current negative feedback circuit
2Carry out current-limiting protection as cut-off current among the PROM.E
2PROM is an EEPROM, has the non-volatile semiconductor memory characteristic, be stored in its inner data and can not lose, and therefore, be safe with its parameter and running state data of storing controller for electric vehicle, E
2PROM can carry out the storage of data and read under the control of single-chip microcomputer, in the present embodiment, what single-chip microcomputer adopted is the pic16F72 single-chip microcomputer, E
2PROM has used the storer of 24CXX or 24LCXX series, and the external signal input circuit comprises tach signal, hall signal, brake signal and burglar alarm signal, and the duty output circuit comprises that speed shows, the panel state shows and the electric current gauge outfit shows.This single-chip microcomputer also is connected with upper control machine through its communication interface, and the I/O interface of single-chip microcomputer is connected with the reference current output terminal of reference power supply.
Second kind of form is as shown in Figure 3, and this controller for electric vehicle is by built-in E
2The single-chip microcomputer of PROM, power supply, external signal input circuit, duty output circuit, driving circuit, power tube switch and current feedback circuit constitute, built-in E
2The single-chip microcomputer of PROM is the single-chip microcomputer of pic16F877; This single-chip microcomputer is connected with external signal input circuit, duty output circuit and driving circuit respectively through the I/O interface; Driving circuit, power tube switch and current feedback circuit are connected in proper order; The output terminal of current feedback circuit is connected with the I/O interface of single-chip microcomputer; The output terminal of power tube switch is connected with standard termination, and this single-chip microcomputer also is connected with upper control machine through its communication interface, and the I/O interface of single-chip microcomputer is connected with the reference current output terminal of reference power supply.The difference of the controller for electric vehicle of the structure of the controller for electric vehicle of second kind of form and first kind of form is that it adopts built-in E
2The single-chip microcomputer of PROM has replaced external E
2PROM.
The third form is as shown in Figure 4, and this controller for electric vehicle is by built-in emulation E
2The single-chip microcomputer of PROM, power supply, external signal input circuit, duty output circuit, driving circuit, power tube switch and current feedback circuit constitute, built-in emulation E
2The single-chip microcomputer of PROM is the single-chip microcomputer of STC12C5401AD, and this single-chip microcomputer is the single-chip microcomputer of flash ROM, in the part of the flash ROM of single-chip microcomputer inner utilization single-chip microcomputer, uses Software tool or software emulation to be E
2PROM.This single-chip microcomputer is connected with external signal input circuit, duty output circuit and driving circuit respectively through the I/O interface; Driving circuit, power tube switch and current feedback circuit are connected in proper order; The output terminal of current feedback circuit is connected with the I/O interface of single-chip microcomputer; The output terminal of power tube switch is connected with standard termination, and this single-chip microcomputer also is connected with upper control machine through its communication interface, and the I/O interface of single-chip microcomputer is connected with the reference current output terminal of reference power supply.The difference of the controller for electric vehicle of the structure of the controller for electric vehicle of the third form and first kind of form is that it adopts built-in emulation E
2The single-chip microcomputer of PROM has replaced external E
2PROM.
Upper control machine in the above-mentioned electric current preset system is one and reference current is installed presets the computing machine of software and have serial communication interface and be connected with controller for electric vehicle; On upper control machine, be provided with corresponding actions menu and processing capacity and realize and the communication control function of controller for electric vehicle that the single-chip microcomputer on the controller for electric vehicle is connected with following three kinds of connected modes through serial communication between its communication interface and the upper control machine:
1. use the serial communication port of single-chip microcomputer to be connected with upper control machine;
2. use the I/O interface of single-chip microcomputer to be connected with upper control machine, this connected mode can be used an I/O interface to carry out the half-duplex operation mode and communicate, and also can use two I/O interfaces to carry out the full-duplex communication mode and communicate
3. use the I/O interface that has the A/D translation function of single-chip microcomputer to be connected with upper control machine, this I/O interface is connected with upper control machine as communication interface on the one hand, simultaneously with the external signal input circuit; Be connected like tach signal; Because the I/O interface is a digital signal when communicating by letter with upper control machine, and be the simulating signal input, that is: when single-chip microcomputer detects simulating signal and imports as external input signal; Be judged as the tach signal input, get into the A/D pattern; When single-chip microcomputer detects the digital signal input, be judged as signal of communication, get into communication pattern.
The pre-setting method of this controller for electric vehicle reference current realizes that this method comprises the steps: on controller for electric vehicle reference current preset system
1. upper control machine presets order and opens reference power supply to controller for electric vehicle transmission reference current provides reference current to controller for electric vehicle, and the reference current of a 16A ± 0.1A is provided to the reference current input port of controller for electric vehicle like this reference power supply;
2. after controller for electric vehicle reception reference current preset order, through the electric current of current feedback circuit output terminal being gathered and A/D conversion back acquisition reference current value, this reference current value was to average after reference current carries out gathering for 2~16 times to obtain.
3. controller for electric vehicle carries out stores processor to reference current value, and event memory information is sent to upper control machine; Treatment step reference current value being carried out stores processor is:
(1). whether the judgment standard current value goes beyond the scope, if ultra scope then the event memory information setting is the ultra range mark of collection value, processing finishes, otherwise gets into next step;
(2). reference current value is written to the E in the controller for electric vehicle
2Among the PROM, and judge whether the data write are correct, if correct then the information setting that storage action is accomplished is indicated for presetting successfully, otherwise would be set to write E
2The PROM failure flags.
After accomplishing reference current value and carrying out stores processor, the information that storage action is accomplished as: preset successfully indicate, the ultra scope of collection value or write E
2The PROM failure flags is sent to upper control machine;
4. host computer carries out analyzing and processing after receiving storage action completion information, indicates according to presetting successfully, the ultra scope of collection value or write E
2The PROM failure flags shows accordingly, printing or stores processor.
Can realize the preparatory function of controller for electric vehicle reference current through above-mentioned steps.
It is emphasized that; Embodiment of the present invention is illustrative; Rather than it is determinate; Therefore the present invention is not limited to the embodiment described in the embodiment, and every other embodiments that drawn by those skilled in the art's technical scheme according to the present invention belong to the scope that the present invention protects equally.