Controller for electric vehicle reference voltage 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 voltage preset system and pre-setting method thereof.
Background technology
Electric motor car is light, quick with it, environmental protection, the advantage such as energy-conservation, cheap and enjoy consumer's favor.Controller for electric vehicle is one of core component of electric motor car, the task such as electric motor car normally completes the travelling of electric motor car, turns under the control of controller for electric vehicle, braking.In the production run of controller for electric vehicle; because the inconsistent meeting of component parameter causes the performance parameter difference of controller for electric vehicle; for example; when using the MOSFET pipe of different capacity; the correlation parameter of its driving circuit is just different, thereby controller for electric vehicle just must be modified for the under-voltage value of under-voltage protection.At present, the method that controller for electric vehicle is revised under-voltage value mainly contains two kinds: a kind of is to realize by software approach update routine or corresponding parameter, its shortcoming is, controller for electric vehicle for different components and parts all needs to develop 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 modified, the under-voltage value adjusting resistance of revising in hardware circuit is realized, its shortcoming is, due to the discreteness of given reference voltage and the impact of resistance precision, the tester often need to do repeatedly and adjust and just can make under-voltage value meet the requirements.In sum, existing controller for electric vehicle some problems below existence when revising under-voltage value: 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 artificial method of adjusting to be difficult to improve the precision of controller for electric vehicle under-voltage value, affect the performance of controller for electric vehicle; 3. for component parameter, different controller for electric vehicle exists multiple different software version or hardware version, has increased the workload of exploitation, production and maintenance; 4. when revising, need to use precision resistance to be adjusted under-voltage value, cause the raising of production cost.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, provide a kind of reasonable in design, automaticity is high, be convenient to controller for electric vehicle reference voltage preset system and the pre-setting method thereof realized, the method can be eliminated the inconsistent impact that the performance parameter of controller for electric vehicle is caused of component parameter effectively, improved the performance of production efficiency and controller for electric vehicle, brought great convenience to 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 voltage preset system, by upper control machine, reference power supply and controller for electric vehicle, formed, between upper control machine and controller for electric vehicle, use serial communication mode to be connected, upper control machine is connected by control line with reference power supply, the reference voltage output end of reference power supply is connected with the reference voltage input mouth of controller for electric vehicle, through the reference voltage value of reference voltage preset system collection, stores the E in controller for electric vehicle into
2in PROM (EEPROM (Electrically Erasable Programmable Read Only Memo) Electrically Erasable Programmable 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 form, single-chip microcomputer by 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 sequentially are connected, 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 motor, this single-chip microcomputer also is connected with upper control machine by its communication interface, and the I/O interface of single-chip microcomputer is connected with the reference voltage output end of reference power supply.
And described controller for electric vehicle is by built-in E
2the single-chip microcomputer of PROM, power supply, the external signal input circuit, the duty output circuit, driving circuit, power tube switch and current feedback circuit form, single-chip microcomputer by the I/O interface respectively with the external signal input circuit, duty output circuit and driving circuit are connected, driving circuit, power tube switch and current feedback circuit sequentially are connected, 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 motor, this single-chip microcomputer also is connected with upper control machine by its communication interface, the I/O interface of single-chip microcomputer is connected with the reference voltage output end of reference power supply.
And described controller for electric vehicle is by built-in emulation E
2the single-chip microcomputer of PROM, power supply, the external signal input circuit, the duty output circuit, driving circuit, power tube switch and current feedback circuit form, single-chip microcomputer by the I/O interface respectively with the external signal input circuit, duty output circuit and driving circuit are connected, driving circuit, power tube switch and current feedback circuit sequentially are connected, 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 motor, this single-chip microcomputer also is connected with upper control machine by its communication interface, the I/O interface of single-chip microcomputer is connected with the reference voltage output end of reference power supply.
And, I/O interface of the serial communication interface that described communication interface is single-chip microcomputer or single-chip microcomputer or two I/O interfaces of single-chip microcomputer or the I/O interface be connected with the external signal input circuit.
A kind of pre-setting method of controller for electric vehicle reference voltage, the method comprises the steps:
(1). upper control machine sends the preset order of reference voltage and opens reference power supply to controller for electric vehicle provides reference voltage to controller for electric vehicle;
(2). after controller for electric vehicle receives the preset order of reference voltage, to the reference voltage of reference voltage input mouth gathers and the A/D conversion after the acquisition reference voltage value;
(3). controller for electric vehicle carries out stores processor to reference voltage value, and the information that storage action is completed sends to upper control machine;
(4). host computer receives after storage action completes information and carries out analyzing and processing, completes the preset of controller for electric vehicle reference voltage.
And the step that described controller for electric vehicle carries out stores processor to reference voltage value is:
(1). whether the judgment standard magnitude of voltage goes beyond the scope, if super scope event memory information is set to the super range mark of collection value, processing finishes, otherwise enters next step;
(2). reference voltage value is written to the E in controller for electric vehicle
2in PROM, and whether the data that write of judgement are correct, if correctly event memory information is set to preset successfully sign, otherwise are set to write E
2the PROM failure flags.
And described reference voltage value is to average and obtain after the reference voltage to the reference voltage input mouth carries out gathering for 2~16 times.
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 voltage that makes controller for electric vehicle provide reference power supply under the control of upper control machine gathers and the A/D conversion obtains reference voltage value, and this reference voltage value is stored into to the E of controller for electric vehicle
2in PROM; realized the preset of controller for electric vehicle reference voltage; this method that reference voltage is gathered and changes by the controller for electric vehicle internal circuit; eliminated the error effect that adopts different components and parts to cause; controller for electric vehicle arranges under-voltage value using the reference voltage value collected as standard; guarantee accuracy and the validity of under-voltage protection, significantly improved the precision of under-voltage value simultaneously.
2. the present invention adopts intelligent automatic processing procedure, there are characteristics simple to operate, easy to use, when reality is used, only upper control machine, controller for electric vehicle and reference power supply need be connected, can realize automatic collection and the A/D transfer process of reference voltage and the reference voltage value of acquisition be stored into to the E of controller for electric vehicle
2in PROM, realize the preparatory function of reference voltage, shortened the processing time, improved production efficiency.
3. the present invention is gathered reference voltage by the controller for electric vehicle internal circuit, eliminated the error effect that adopts different components and parts to cause, therefore do not need to use precision resistance can realize preset to reference voltage, reduced the hardware cost of controller for electric vehicle, reduced software version and the hardware version of controller for electric vehicle simultaneously, brought great convenience to design, production and the maintenance of controller for electric vehicle.
The present invention have reasonable in design, automaticity is high, realize easy characteristics, effectively eliminate the inconsistent impact that the performance parameter of controller for electric vehicle is caused of component parameter, improved the performance of production efficiency and controller for electric vehicle, brought great convenience to design, production and the maintenance of controller for electric vehicle.
The accompanying drawing explanation
Fig. 1 is controller for electric vehicle reference voltage preset system connection side block diagram;
Fig. 2 is the first controller for electric vehicle and upper control machine and reference power supply connection side block diagram;
Fig. 3 is the second 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 present invention is further described.
This controller for electric vehicle reference voltage preset system consists of upper control machine, reference power supply and controller for electric vehicle, between upper control machine and controller for electric vehicle, use serial communication mode to be connected, upper control machine is connected by control line with reference power supply, the reference voltage output end of reference power supply is connected with the reference voltage input mouth of controller for electric vehicle, and controller for electric vehicle is built-in with E
2pROM (EEPROM (Electrically Erasable Programmable Read Only Memo) Electrically Erasable Programmable Read-Only Memory), store the E in controller for electric vehicle into through the reference voltage value of reference voltage preset system collection
2in PROM.
Controller for electric vehicle in said system has three kinds of forms, below explanation respectively:
As shown in Figure 2, this controller for electric vehicle is by single-chip microcomputer, E for the first form
2pROM, power supply, external signal input circuit, duty output circuit, driving circuit, power tube switch and current feedback circuit form, and power supply provides working power for controller for electric vehicle, single-chip microcomputer by 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 sequentially are connected, the output terminal of current feedback circuit is connected with the I/O interface of single-chip microcomputer, and the output terminal of power tube switch is connected with motor, E
2pROM is EEPROM (Electrically Erasable Programmable Read Only Memo), has the non-volatile semiconductor memory characteristic, be stored in its inner data and can not lose, and therefore, by parameter and the running state data of its storage controller for electric vehicle, be safe, E
2pROM can carry out the storage of data and read under the control of single-chip microcomputer, and in the present embodiment, what single-chip microcomputer adopted is the pic16F72 single-chip microcomputer, E
2pROM has been 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 is aobvious, the panel state shows and the electric current gauge outfit shows.This single-chip microcomputer also is connected with upper control machine by its communication interface, and the I/O interface of single-chip microcomputer is connected with the reference voltage output end of reference power supply.
As shown in Figure 3, this controller for electric vehicle is by built-in E for the second form
2the single-chip microcomputer of PROM, power supply, external signal input circuit, duty output circuit, driving circuit, power tube switch and current feedback circuit form, built-in E
2the single-chip microcomputer that the single-chip microcomputer of PROM is pic16F877, this single-chip microcomputer is connected with external signal input circuit, duty output circuit and driving circuit respectively by the I/O interface, driving circuit, power tube switch and current feedback circuit sequentially are connected, 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 motor, this single-chip microcomputer also is connected with upper control machine by its communication interface, and the I/O interface of single-chip microcomputer is connected with the reference voltage output end of reference power supply.The difference of the controller for electric vehicle of the structure of the controller for electric vehicle of the second form and the first form is, it adopts built-in E
2the single-chip microcomputer of PROM has replaced external E
2pROM.
As shown in Figure 4, this controller for electric vehicle is by built-in emulation E for the third form
2the single-chip microcomputer of PROM, power supply, external signal input circuit, duty output circuit, driving circuit, power tube switch and current feedback circuit form, built-in emulation E
2the single-chip microcomputer that the single-chip microcomputer of PROM is STC12C5401AD, the single-chip microcomputer that this single-chip microcomputer is flash ROM, in the part of the flash ROM of single-chip microcomputer inner utilization single-chip microcomputer, be E with Software tool or software emulation
2pROM.This single-chip microcomputer is connected with external signal input circuit, duty output circuit and driving circuit respectively by the I/O interface, driving circuit, power tube switch and current feedback circuit sequentially are connected, 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 motor, this single-chip microcomputer also is connected with upper control machine by its communication interface, and the I/O interface of single-chip microcomputer is connected with the reference voltage output end 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 the first form is, it adopts built-in emulation E
2the single-chip microcomputer of PROM has replaced external E
2pROM.
Upper control machine in above-mentioned voltage preset system is one and the computing machine of the preset software of reference voltage is installed and has serial communication interface and be connected with controller for electric vehicle, be provided with corresponding actions menu and processing capacity and realize and the communication control function of controller for electric vehicle on upper control machine, the single-chip microcomputer on controller for electric vehicle is connected with following three kinds of connected modes by serial communication between its communication interface and 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 interface of the I/O with 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, as tach signal is connected, be digital signal while communicating by letter with upper control machine due to the I/O interface, and be the simulating signal input as external input signal, that is: when single-chip microcomputer detects the simulating signal input, be judged as the tach signal input, enter the A/D pattern; When single-chip microcomputer detects the digital signal input, be judged as signal of communication, enter communication pattern.
The pre-setting method of this controller for electric vehicle reference voltage realizes that on controller for electric vehicle reference voltage preset system the method comprises the steps:
1. upper control machine sends the preset order of reference voltage and opens reference power supply to controller for electric vehicle provides reference voltage to controller for electric vehicle, as the controller for electric vehicle that is 48V for an operating voltage, this reference power supply provides the reference voltage of a 41V ± 50mV to the reference voltage input mouth of controller for electric vehicle;
2. after controller for electric vehicle receives the preset order of reference voltage, to the reference voltage of reference voltage input mouth gather and the A/D conversion after obtain reference voltage value, this reference voltage value is to average and obtain after the reference voltage to the reference voltage input mouth carries out gathering for 2~16 times.
3. controller for electric vehicle carries out stores processor to reference voltage value, and event memory information is sent to upper control machine; At the treatment step that reference voltage value is carried out to stores processor, be:
(1). whether the judgment standard magnitude of voltage goes beyond the scope, if super scope event memory information is set to the super range mark of collection value, processing finishes, otherwise enters next step;
(2). reference voltage value is written to the E in controller for electric vehicle
2in PROM, and whether the data that judgement writes are correct, if information correct that storage action completes is set to preset successfully sign, otherwise are set to write E
2the PROM failure flags.
After completing reference voltage value and carrying out stores processor, the information that storage action is completed as: presetly successfully indicate, the super scope of collection value or write E
2the PROM failure flags is sent to upper control machine;
4. host computer receives after storage action completes information and carries out analyzing and processing, according to presetly successfully indicating, the super 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 voltage by above-mentioned steps.
It is emphasized that; embodiment of the present invention is illustrative; rather than determinate; therefore the present invention is not limited to the embodiment described in embodiment; every other embodiments that drawn by those skilled in the art's technical scheme according to the present invention, belong to the scope of protection of the invention equally.