Summary of the invention
In view of the deficiency of prior art existence, the object of the invention is, the technical solution of a kind of Electrical Bicycle simulation moment-assistant sensing and controlling system and implementation method is provided, employing includes the power-assisted dynamic acquisition device of some magnetic substances of the matrix arrangement of going in ring, when the belt matrix of magnetic substance and multiple Hall element relatively rotate, the sequential of magnetic substance as prescribed triggers multiple Hall elements, the impulse singla that multiple Hall elements produce triggering for generating is corresponding with axis velocity of rotation, by micro controller system (CPU), the impulse singla collecting is identified, process, the real-time speed of judgement foot-operated (axis rotation) thus, utilize calculated with mathematical model to provide the outputting power of motor, realize the intellectuality of power-assisted sensing, system passes through to gather foot-operated real-time speed in the time riding, and be gradient recognizer by the attitude module that 3 axle gyroscopes, 3 axle accelerators are integrated in employing, road gradient in gradient recognizer detection dynamic operation provides the motor outputting power of corresponding increase, realizes the intellectuality of power-assisted sensing.
For achieving the above object, the present invention adopts such scheme to realize: Electrical Bicycle simulation moment-assistant sensing and controlling system, comprise liquid crystal display display instrument module, function selection key module, brake signal load module, simulation moment-assistant dynamic acquisition device and electric machine controller, it is characterized in that, simulation moment-assistant dynamic acquisition device adopts the speed detection architecture of three Hall elements and annular magnetic steel array composition, for riding the collection of monitor signal of direction and speed; System is by simulating moment-assistant dynamic acquisition device to stretcher speed, acceleration monitoring, control in real time the output of brushless motor controller to power of motor, thereby realize the effect of simulation moment-assistant sensing, the gyrostatic MPU6050 attitude of 9 axle module that the employing of simulation moment-assistant dynamic acquisition device is simultaneously integrated, monitor in order to the attitude to riding cycle, according to road gradient situation, output power of motor is adjusted, experienced thereby obtain better user;
Described simulation moment-assistant dynamic acquisition device is made up of boosting disk framing member and simulation moment-assistant dynamic acquisition circuit card;
Described boosting disk framing member comprises rotating disk, price fixing, bearing and magnet steel; Rotating disk is plate-like cavity body, at the bottom of its inner cavity configuration comprises rotating disk, rotating disk wall, hollow shaft and belt magnet steel clamping band;
Center of turntable is hollow shaft, the outside dimension of hollow shaft and bearing inner ring dimensional fits; The aperture of its axle center hole and electrical bicycle middle shaft dimensional fits;
The magnet steel clamping band that goes in ring is positioned at the inner bottom surface at the bottom of rotating disk, and it is shaped as the flange that goes in ring, the inner bottom surface of the upper plane of the flange that goes in ring at the bottom of higher than rotating disk, and the interior ring diameter of the magnet steel clamping band that goes in ring is greater than hollow shaft external diameter, and outer ring diameter is less than rotating disk wall internal diameter; On belt magnet steel clamping band, include one group of belt, equi-spaced apart is arranged blind hole, in each blind hole, fix a cylindrical magnet steel;
Price fixing is plate-like cavity body, at the bottom of its inner cavity configuration comprises price fixing, price fixing wall, bearing frame and through wires hole; Price fixing center is bearing frame;
Inner bottom surface at the bottom of price fixing is divided into three sector regions by gusset, one of them sector region A is as the installation site of simulation moment-assistant dynamic acquisition circuit card, through wires hole is positioned at sector region A and closes on upper edge, and through wires hole is as the outlet of simulation moment-assistant dynamic acquisition circuit card control cable;
Rotating disk, price fixing, bearing are together with alinco assembled, and bearing assemble is between the hollow shaft of rotating disk and the bearing frame of price fixing, and the internal diameter of bearing frame coordinates with outer race diameter; The outer shroud of bearing is inlaid in the internal diameter of bearing frame, and the inner ring sleeve of bearing is contained on hollow shaft;
Rotating disk coordinates with price fixing, rotating disk wall internal diameter and price fixing wall external diameter bearing fit; Aperture and the electrical bicycle middle shaft of the axle center hole of hollow shaft closely cooperate;
Described simulation moment-assistant dynamic acquisition circuit card is arranged in the sector region A of price fixing, components and parts on simulation moment-assistant dynamic acquisition circuit card comprise single chip computer AT 89C16, three terminal regulator LM1117-3.3V, three Hall element ES732 that interval is fixing, an attitude module MPU6050(gyroscope), output voltage interface J2 and Resistor-Capacitor Unit;
On described simulation moment-assistant dynamic acquisition circuit card, three described Hall element ES732 are respectively the first Hall element A, the second Hall element B and the 3rd Hall element C, the sensitive surface center of three Hall element ES732 is on same camber line, the sensitive surface center of each Hall element ES732 and price fixing axial connecting line, form two fan-shaped, the angle of the sensitive surface center of every two adjacent Hall element ES732 respectively and between the line in price fixing axle center is 5 degree;
The axle center of 24 described magnet steel on described rotating disk on same circle, each magnet steel axle center and disk axes line, form 23 fan-shaped, the angle between every two adjacent magnet steel axle center and disk axes line is 15 degree;
The center of circle of the circle at the center of circle of the circle at the place, sensitive surface center of three Hall element ES732 and place, 24 magnet steel axle center is all on same axial line, and this axial line is electrical bicycle middle shaft axial line;
In the time that rotating disk rotates with bicycle middle shaft, the position of price fixing immobilizes, and the orientation of three described Hall element ES732 remains unchanged; 24 magnet steel in rotating disk are along the track annular movement of its place circle, wherein the sensitive surface of each magnet steel is successively through the sensitive surface of three Hall element ES732, a moment that the sensitive surface of magnet steel is corresponding with the sensitive surface of the Hall ES732 of unit part, trigger Hall element ES732, Hall element ES732 internal circuit produces induced voltage impulse singla;
The sensitive surface of 24 magnet steel overlaps with the sensitive surface of three Hall element ES732 and triggers sequential and be:
When rotating disk forward rides turning to while advancing, trigger successively the first Hall element A, the second Hall element B and the 3rd Hall element C;
When rotating disk reversion, trigger successively the 3rd Hall element C, the second Hall element B, the first Hall element A;
Induce voltage pulse signal to single chip computer AT 89C16, single chip computer AT 89C16 extracts relevant direction and speed data accordingly as the data of calculating power line voltage dutycycle PWM, after DA conversion, output voltage signal, the signal source of electric machine controller using this as control system;
Bearing data extracting method: by the rotation direction of rotating disk, gather three described Hall element ES732 energizing signal orders by single chip computer AT 89C16 and obtain;
Speed data extracting method: by the rotation of rotating disk, gather three described Hall element ES732 trigger signal interval time datas by single chip computer AT 89C16 and obtain;
Be arranged on the attitude module MPU6050(gyroscope on described dynamic acquisition circuit card) attitude be: coordinate X keeps level, it is vertical that coordinate Z keeps, the data of single chip computer AT 89C16 using the signal data of collection now as its position balance, the initial condition of judgement using these data as program;
Simulation moment-assistant dynamic acquisition device circuit treater centered by single chip computer AT 89C16, utilizes attitude module MPU6050(gyroscope) attitude knowability, through I
2c bus is communicated by letter with single chip computer AT 89C16, using this as gradient recognizer;
The SCL port of single chip computer AT 89C16, SDL port connect respectively SCL port, the SDL port of attitude module MPU6050, and SCL is data and the clock line that I2C communicates by letter with SDL;
Three general purpose I/O port PIO0_6, the PIO0_7 of single chip computer AT 89C16 are connected respectively three Hall element ES732 with PIO0_12;
The PWM output port PIO0_0 of single chip computer AT 89C16 connects output voltage interface J2 through resistance R 3.
The implementation method of described Electrical Bicycle simulation moment-assistant sensing and controlling system, it is characterized in that, simulation moment-assistant dynamic acquisition device is identified gathered signal through single chip computer AT 89C16, judgement and processing, single chip computer AT 89C16 selects the vehicle of input according to button simultaneously, gear information is determined fundamental voltage output valve, again according to wheel disc rotary speed data, utilize calculated with mathematical model output pwm signal, finally will after pwm signal integration, export to electric machine controller, by brake signal load module input brake signal, finally by motor controller controls electric machine operation state, described method comprises the steps:
A) first, Electrical Bicycle simulation moment control system switches on power;
B) simulation moment-assistant dynamic acquisition device passes through three Hall element ES732 Real-time Collections by bicyclist's foot-driven wheel disc rotary speed data, single chip computer AT 89C16 is the interval data information of three Hall impulse singlas of inquiry constantly, single chip computer AT 89C16 judges wheel disc rotary speed data by the interval data information of three Hall impulse singlas, then, utilize calculated with mathematical model to go out output voltage dutycycle PWM, outputed to the signal input part of electric machine controller by the PWM output port of single chip computer AT 89C16, the magnitude of voltage that motor is controlled in electric machine controller output depends on output voltage dutycycle PWM, output voltage dutycycle PWM determines the rotating speed of motor,
Output voltage dutycycle PWM and the wheel disc rotating speed exported due to the PWM output port PIO0_0 of single chip computer AT 89C16 are linear proportional relation, and the math modeling of setting up calculating PWM according to its corresponding relation is:
PWM = y+z--------------------------------------------------------(1)
In formula (1): PWM: output voltage dutycycle, unit: %
Y: be the output voltage dutyfactor value (SpeedLevel) corresponding with velocity variations; Unit: %
Z: basic output voltage dutyfactor value (OutputBase); Unit: %
y = (ka×60)÷ws + kb;-------------------------------------------(2)
In formula (2):
Ka: be the proportionality coefficient value of this transformational relation;
Its span is: 26~48, and in the time that speed is 26km/h, the value of ka is 26, in the time that speed is 6km/h, the value of ka is 48;
Kb: be the correction corresponding with velocity variations;
Its span is: 0~20, and in the time that speed is 6km/h, the value of kb is 0, in the time that speed is 26km/h, the value of kb is 20;
Ws: be to calculate adjacent two magnet steel while moving in its circular trace, in succession by the same Hall element center-point relational expression of time used, unit: ms;
ws = 3600×a×π×D÷(b×c×S) ----------------------------(3)
In formula (3):
A--the wheel disc number of teeth
B--the flywheel number of teeth
C--magnet steel number
S--moving velocity, unit: Km/h;
D--wheel value footpath, unit: m;
In programming, utilize above-mentioned math modeling to calculate, realize wheel disc rotation speed change is corresponding with output voltage dutycycle PWM;
For meeting the ride requirement of Electrical Bicycle comfort level of all kinds of crowds, according to 7 kinds of 7 kinds of proportioning parameters that different flywheel teeth arrays become of mountain bike, the configuration of highway car cone pulley structure, by 7 kinds of proportioning parameter values, 7 gears are set especially;
7 corresponding corresponding data of gear, wherein the 7th of 26 inches of vehicles the grade of value is as shown in the table:
The value preparation method of basic output voltage dutyfactor value z is: 7 gears that arrange by vehicle type structure, and 7 corresponding corresponding speeds of gear obtain from the observed data of riding, and wherein the span of 26 inches of vehicle z is as shown in the table:
Data are kept in single chip computer AT 89C16 internal storage, different automobile types, the gear option different basic output voltage dutyfactor value z of correspondence respectively that in liquid crystal display display instrument, choice menus shows, the coding of function selection key module is corresponding with basic output voltage dutyfactor value z, select vehicle, gear by button operation liquid crystal display display instrument choice menus, the selected basic output voltage dutyfactor value z that participates in calculating of wheel velocity, vehicle and gear data when single chip computer AT 89C16 drives according to wheel disc;
Once c) single chip computer AT 89C16 judges that the interval data of three Hall impulse singlas meets the valve limit of power-assisted request, simulation moment-assistant dynamic acquisition device, by liquid crystal display display instrument module output real-time speed data, shows real-time speed state by liquid crystal display display instrument;
Valve limit gauge is fixed: magnet steel continuous trigger the first Hall element A, a second Hall element B and the 3rd Hall element C in 0.1 second, and single chip computer AT 89C16 obtains the impulse singla being sent by three different Hall element ES732 respectively, is to reach valve and limit;
D) single chip computer AT 89C16 inputs given power-assisted gear information according to key-press module, utilizes calculated with mathematical model to go out power line voltage dutycycle PWM, connects electric machine controller, the power of regulation and control electric machine controller by output handle voltage interface;
If e), after performing step d), the real-time speed data that liquid crystal display display instrument shows reach requirement, maintain this mode of operation;
If f), after performing step d), the real-time speed data that liquid crystal display display instrument shows do not reach requirement, by function selection key module input key information, change, improve speed stage; Single chip computer AT 89C16 inputs given power-assisted gear information according to key-press module, re-uses calculated with mathematical model and goes out electric power output voltage dutycycle PWM, then export handle voltage to electric machine controller by output voltage interface J2, the power of regulation and control electric machine controller;
G) function of simulation moment-assistant collector identification rotating, single chip computer AT 89C16 is by the order judgement of the impulse singla of the first Hall element A, the second Hall element B that collect and the 3rd Hall element C, the forward and backward state of identification rotating disk, calculate result, when rotating disk forward, there is output signal, otherwise non-output signal;
H) by figure's knowability of attitude mould MPU6050, through I
2c communication port is to single chip computer AT 89C16, learn the gradient of operation, on the basis of former power-assisted gear, when upward slope, increase the magnitude of voltage of the input end that outputs to electric machine controller, automatically increase the horsepower output of electric machine controller in the time going up a slope, when descending, automatically reduce the magnitude of voltage of the input end that outputs to electric machine controller.
Beneficial effect of the present invention: the system acquisition human body data of riding, realize the very big lifting of people's engine efficiency, be man-machine perfect perfect match.Comfortable riding is the best product that sport health is integrated, and is also the revolutionary creativity and innovation of Electrical Bicycle.Electrical Bicycle intelligence power-assisted sensing system is research and develop for high-end assistance type bicycle (taking mountain region vehicle as main) high-end product designing, and it is a kind of manpower and the electric power total solution in conjunction with the mutual sensing of power.Radical function is the comfort level that promotes bicyclist, reduce motor wearing and tearing simultaneously, lifting motor service life, can effectively avoid engaged gears to clash into the possibility of beating tooth to there being tooth depth speed motor, because manual power assisting is without transient large current discharge, avoid the impact of lithium cell heavy-current discharge, significantly promoted life-span and the mileages of continuation of battery.This system has dynamic gradient discernibility simultaneously, make bicyclist also comfortable without tired sense as level road in the time going up a slope, particularly mountain bike is in the time of speed change, manual power assisting can many grades of cooperations, reach optimum motor horsepower output and effective labour-saving power-assisted state, realize foot-operated comfortable easily riding and reach the best ability that continues.
In a word, this system by gathering foot-operated real-time speed, detects the resistance physical quantity that the road gradient in dynamic operation forms in the time riding, and utilizes math modeling to provide intelligently the outputting power of motor, realizes the intellectuality of power-assisted sensing.
Detailed description of the invention
For a more clear understanding of the present invention, describe in conjunction with the accompanying drawings and embodiments the present invention in detail:
As shown in Fig. 1 to Figure 20, Electrical Bicycle simulation moment-assistant sensing and controlling system comprises liquid crystal display display instrument module, function selection key module, brake signal load module, simulation moment-assistant dynamic acquisition device and electric machine controller, simulation moment-assistant dynamic acquisition device adopts the speed detection architecture of three Hall elements and annular magnetic steel array composition, for riding the collection of monitor signal of direction and speed; System is by simulating moment-assistant dynamic acquisition device to stretcher speed, acceleration monitoring, control in real time the output of brushless motor controller to power of motor, thereby realize the effect of simulation moment-assistant sensing, the gyrostatic MPU6050 attitude of 9 axle module that the employing of simulation moment-assistant dynamic acquisition device is simultaneously integrated, monitor in order to the attitude to riding cycle, according to road gradient situation, output power of motor is adjusted, experienced thereby obtain better user;
Simulation moment-assistant dynamic acquisition device is made up of boosting disk framing member and simulation moment-assistant dynamic acquisition circuit card;
Boosting disk framing member comprises rotating disk 1, price fixing 2, bearing 3 and magnet steel 4; Rotating disk 1 is plate-like cavity body, and its inner cavity configuration comprises at the bottom of rotating disk 11, rotating disk wall 12, hollow shaft 13 and belt magnet steel clamping band 14;
Rotating disk 1 center is hollow shaft 13, and the outside dimension of hollow shaft 13 coordinates with the interior ring size of bearing 3; The aperture of its axle center hole 1301 and electrical bicycle middle shaft 5 dimensional fits;
The magnet steel clamping band 14 that goes in ring is positioned at the bottom of rotating disk 11 inner bottom surface, it is shaped as a belt flange, the upper plane of flange of going in ring higher than rotating disk at the bottom of 11 inner bottom surface, the interior ring diameter of the magnet steel clamping band 14 that goes in ring is greater than hollow shaft 13 external diameters, outer ring diameter is less than rotating disk wall 12 internal diameters; Go in ring include on magnet steel clamping band 14 one group go in ring, blind hole 1401 that equi-spaced apart is arranged, each blind hole 1401 is interior fixes a cylindrical magnet steel 4;
Price fixing 2 is plate-like cavity body, and its inner cavity configuration comprises at the bottom of price fixing 21, price fixing wall 22, bearing frame 23 and through wires hole 24; Price fixing 2 centers are bearing frame 23;
At the bottom of price fixing, 21 inner bottom surface is divided into three sector regions by gusset, one of them sector region A is as the installation site of simulation moment-assistant dynamic acquisition circuit card, through wires hole 24 is positioned at sector region A and closes on upper edge, and through wires hole 24 is as the outlet of simulation moment-assistant dynamic acquisition circuit card control cable;
Rotating disk 1, price fixing 2, bearing 3 and magnet steel 4 are assembled together, and bearing 3 is assemblied between the hollow shaft 13 of rotating disk 1 and the bearing frame 23 of price fixing 2, and the internal diameter of bearing frame 23 coordinates with the outer ring diameter of bearing 3; The outer shroud of bearing 3 is inlaid in the internal diameter of bearing frame 23, and the inner ring sleeve of bearing 3 is contained on hollow shaft 13;
Rotating disk 1 coordinates with price fixing 2, rotating disk wall 12 internal diameters and price fixing wall 22 external diameter bearing fits; Aperture and the electrical bicycle middle shaft 5 of the axle center hole 1301 of hollow shaft 13 closely cooperate.
Dynamic acquisition circuit card is arranged in the sector region A of price fixing 2, components and parts on simulation moment-assistant dynamic acquisition circuit card comprise single chip computer AT 89C16, three terminal regulator LM1117-3.3V, three Hall element ES732 that interval is fixing, attitude module MPU6050 gyroscope, output voltage interface J2 and a Resistor-Capacitor Unit;
On described simulation moment-assistant dynamic acquisition circuit card, three described Hall element ES732 are respectively the first Hall element A, the second Hall element B and the 3rd Hall element C, the sensitive surface center of three Hall element ES732 is on same camber line, the sensitive surface center of each Hall element ES732 and price fixing 2 axial connecting lines, form two fan-shaped, the angle of the sensitive surface center of every two adjacent Hall element ES732 respectively and between the line in price fixing 2 axle center is 5 degree;
The axle center of 24 described magnet steel 4 on rotating disk 1 on same circle, each magnet steel 4 axle center and rotating disk 1 axial connecting line, form 23 fan-shaped, the angle between every two adjacent magnet steel 4 axle center and rotating disk 1 axial connecting line is 15 degree;
The center of circle of the center of circle of the circle at the place, sensitive surface center of three Hall element ES732 and the circle at 24 magnet steel 4 places, axle center is all on same axial line, and this axial line is electrical bicycle middle shaft 5 axial lines;
In the time that rotating disk 1 rotates with bicycle middle shaft, the position of price fixing 2 immobilizes, and the orientation of three described Hall element ES732 remains unchanged; 24 magnet steel 4 in rotating disk 1 are during along the track annular movement of its place circle, wherein, the sensitive surface of each magnet steel 4 is successively through the sensitive surface of three Hall element ES732, a moment that the sensitive surface of magnet steel 4 is corresponding with the sensitive surface of the Hall ES732 of unit part, trigger Hall element ES732, Hall element ES732 internal circuit produces induced voltage impulse singla;
The sensitive surface of 24 magnet steel 4 overlaps with the sensitive surface of three Hall element ES732 and triggers sequential and be:
When rotating disk 1 forward rides turning to while advancing, trigger successively the first Hall element A, the second Hall element B and the 3rd Hall element C;
Rotating disk 1 reverses constantly, triggers successively the 3rd Hall element C, the second Hall element B, the first Hall element A;
Induce voltage pulse signal to single chip computer AT 89C16, single chip computer AT 89C16 extracts relevant direction and speed data accordingly as the data that calculate power line voltage dutycycle PWM, after DA conversion, output voltage signal, the signal source of electric machine controller using this as control system;
Bearing data extracting method: by the rotation direction of rotating disk 1, gather three described Hall element ES732 energizing signal orders by single chip computer AT 89C16 and obtain;
Speed data extracting method: by the rotation of rotating disk 1, gather three described Hall element ES732 trigger signal interval time datas by single chip computer AT 89C16 and obtain;
Be arranged on the attitude module MPU6050(gyroscope on described simulation moment-assistant dynamic acquisition circuit card) attitude be: coordinate X keeps level, it is vertical that coordinate Z keeps, the data of single chip computer AT 89C16 using the signal data of collection now as its position balance, the initial condition of judgement using these data as program;
Simulation moment-assistant dynamic acquisition device circuit treater centered by single chip computer AT 89C16, utilizes attitude module MPU6050(gyroscope) attitude knowability, through I
2c bus is communicated by letter with single chip computer AT 89C16, using this as gradient recognizer;
The SCL port of single chip computer AT 89C16, SDL port connect respectively SCL port, the SDL port of attitude module MPU6050, and SCL is data and the clock line that I2C communicates by letter with SDL;
Three general purpose I/O port PIO0_6, the PIO0_7 of single chip computer AT 89C16 are connected respectively three Hall element ES732 with PIO0_12;
The PWM output port PIO0_0 of single chip computer AT 89C16 connects output voltage interface J2 through resistance R 3.
As shown in Figure 14 to Figure 16,
After energising, in the time that first magnet steel 4 triggers the first Hall element A, the position of the second Hall element B and the 3rd Hall element C is in gap;
In the time that first magnet steel 4 triggers the second Hall element B, the position of the first Hall element A and the 3rd Hall element C is in gap;
In the time that first magnet steel 4 triggers the 3rd Hall element C, the position of the first Hall element A and the second Hall element B is in gap;
In the present embodiment:
(1) Presentation Function and content comprise:
1. battery electric quantity shows: by gathering the dynamic change of supply voltage value, 5 segmentations that provide electric weight show (only making Presentation Function).
2. by the selection of function key, realize different displaying contents
(1) Speed display: other Fumction display item was stablized after 5 seconds, returns to default speed and shows, the impulse singla providing by riding speed Hall element calculates riding speed.The speed showing will be selected different wheel footpaths by function key, as: 22 inch, 24 inch, 26 inch, 27 inch, 28 inch, obtain by MCU treater the true velocity that different automobile types is ridden.
(2) Speed display can carry out English system and metric system translation function
Speed display and accumulative mileage show changes English system and metric system by Fumction display key, i.e. mile and kilometer.
(3) vehicle shows: as: 22 inch, 24 inch, 26 inch, 28 inch, select current ridden vehicle by function selecting key.
(4) mileage shows: after start switches on power each time, the mileage of riding before power cut-off shows, automatic clear after start for the second time.Number by the wheel footpath of vehicle and the Hall velocity pick-up signal of collection calculates mileage.
(5) power-assisted gear shows: show altogether 7 grades, power-assisted is divided into 7 gears.Choose by function selecting key, be chosen in after power-assisted gear Presentation Function in function key, select gear by raising key and down key.After start, be defaulted as the 6th grade.
(2) liquid crystal display display instrument also has following function
1, to lower end to power-assisted collector (by controller junction line) transmit data functionality: under different power-assisted gears (1-7 shelves), pass to the different gear signal of lower end simulation moment-assistant dynamic acquisition device by agreement and carry out instruction simulation moment-assistant dynamic acquisition device and export different magnitude of voltage (PWM dutycycle), realize regulation and control electric machine controller horsepower output number.This is the core of man-machine mixing sensor-based system, reach real-time power-assisted, without hysteresis power-off, do not step on that sky is ridden, light comfortable effect.
2., brake signal conduction function: the protocol signal of passing to a final voltage value output of lower end simulation moment-assistant dynamic acquisition device by gathering brake signal (IO is that ground connection drags down level) treater stops the function of power of motor output.
3, power-on button: realize and power on and open and power-off shutdown system function by start button, enter normal condition after energising after backlight flicker three times, after power-off, backlight extinguishes.LCD display is along with on and off simultaneously.
4, function of swiping card: swipe the card by RF principle, realize and power on and opens and power-off shutdown system function, enter normal condition after energising after backlight flicker three times, after power-off, backlight extinguishes.Play the antitheft function of safe opening by swiping the card.
The apolegamy of child and parent card: after powering on for the first time, first read master card (backlight glimmer twice instruction) and then in five seconds, match two subcards (once instruction of backlight flicker after success),
5, have simultaneously identification load power on before and after short-circuit protection function.In the time there is load short circuits situation, indicator lamp backlight is using the frequency scintillation of per minute 80 times 10 times as instruction.
Liquid crystal display display instrument is the display section of Electrical Bicycle force aid system.Mainly realize real-time speed demonstration, travelled distance, gear selection, information about power, wheel diameter information, and force aid system power control function.
Input comprises:
1. button: 3 buttons, raise key (K1), function key (K2), down key (K3);
2. electric quantity monitoring: the input of geometric ratio voltage, according to voltage detecting electric quantity of power supply;
3. the input of testing the speed: external interrupt input, the number of turns is rotated in monitoring;
4. brake signal: level incoming signal, the input of monitoring brake situation;
5. the coil of swiping the card: external interrupt input, read EM4100 card number data;
6. power supply monitoring: comparator interrupts, monitoring power fail situation;
Output comprises:
1. liquid crystal display: show mileage, electric weight, speed, gear information;
2. communication: pulse output, output gear is selected and brake information;
3. backlight: level output, prompting power supply output situation;
4. power supply control: level output, control the supply of controller for electric vehicle power supply;
Function declaration:
The Primary Actor of key scan: button,
Flow process: 30ms detects once, key-press input detected, records key assignments and sends into menu/parameter configuration;
The Primary Actor that electric weight detects: electric quantity monitoring,
Success flow process: 10s detects once, divides 6 grades of electric weight according to AD value, sends into menu/parameter configuration;
The Primary Actor that speed detects: speed input,
Success flow process: interrupt producing once, record twice time between interruptions, computation speed and mileage are sent into menu/parameter configuration;
The Primary Actor that brake signal detects: brake signal;
Success flow process:
30ms detects once, low level detected, sends into communication output and sends;
The Primary Actor of Card Reader control: the coil of swiping the card
Success flow process:
Interrupt detecting incoming signal, judge validity according to reading in EM4100 card number, send into control logic;
The Primary Actor of power protection: power supply monitoring
Success flow process: comparator interrupts detecting, and Power supply is opened after 100us, does not interrupt, and Power supply fault, sends into control logic;
Control logic
Initial condition: detect storing keys card number situation in EEPROM
Success flow process: there is no card number information, be switched to master card learning state;
Substitute flow process: master card card number is effective, and subcard card number and secondary subcard card number are invalid, are switched to subcard card number learning state;
Master card, subcard or secondary subcard card number are effective, are switched to normal working;
Master card learning state:
Success flow process: receive correct card number message, be stored as master card card number, switching state is to subcard learning state;
Subcard learning state:
Success flow process: receive new card number message, be stored as subcard card number, switching state is to secondary subcard learning state;
Secondary subcard learning state:
Success flow process: receive new card number message, be stored as secondary subcard card number, switching state is to off-mode;
Substitute flow process: receive subcard card number message, switching state is to off-mode; 5s does not receive effective card number message, and switching state is to off-mode;
Off-mode:
Success flow process: receive subcard card number message, switching state is to mode of operation;
Substitute flow process: receive secondary subcard card number message, switching state is to mode of operation;
Mode of operation:
Success flow process: the short function key of pressing, is switched to gear selection function state, the flicker of gear numeral;
Substitute flow process
The long function key of pressing, is switched to automobile type configuration mode state, the dimension figure flicker of wheel footpath;
Receive subcard card number message, switching state is to off-mode;
Receive secondary subcard card number message, switching state is to off-mode;
Receive power fail message, switching state is to off-mode;
Gear selection function state:
Success flow process: the short rise key of pressing, gear increases by one grade, until high tap position (seven grades);
Substitute flow process: short in down key, gear reduces one grade, until lowest gear (a grade); The short function key of pressing, is switched to speed unit selection mode, the flicker of present speed unit, and gear information comes into force, and deposits EEPEOM in, and cancels flicker; 5s is without any actuation of keys, and gear information comes into force, and deposits EEPROM in, returns to mode of operation; Receive subcard card number message, abandon gear information amendment, switching state is to off-mode; Receive secondary subcard card number message, abandon gear information amendment, switching state is to off-mode; Receive power fail message, abandon gear information amendment, switching state is to off-mode.
Speed unit selection mode:
Success flow process: the short rise key of pressing, speed unit is switched to pattern made in Great Britain;
Substitute flow process: short in down key, speed unit is switched to metric system pattern; The short function key of pressing, is switched to mileage contractor selection state, the flicker of current mileage unit, and speed unit is selected to come into force, and deposits EEPROM in, and cancels flicker; 5s is without any button operation, and speed unit is selected to come into force, and deposits EEPROM in, returns to mode of operation; Receive subcard card number message, abandon the amendment of speed unit selection information, switching state is to off-mode; Receive secondary subcard card number message, abandon the amendment of speed unit selection information, switching state is to off-mode; Receive power fail message, abandon the amendment of speed unit selection information, switching state is to off-mode.
Mileage contractor selection state;
Success flow process: the short rise key of pressing, mileage unit is switched to pattern made in Great Britain;
Substitute flow process: short in down key, mileage unit is switched to metric system pattern; The short function key of pressing, is switched to normal working, and current mileage unit comes into force, and deposits EEPROM in; 5s is without any button operation, and mileage contractor selection comes into force, and deposits EEPROM in, returns to mode of operation; Receive subcard card number message, abandon the amendment of mileage unit, switching state is to off-mode; Receive secondary subcard card number message, abandon the amendment of mileage unit, switching state is to off-mode; Receive power fail message, abandon the amendment of mileage unit, switching state is to off-mode.
Automobile type configuration mode state; (can select vehicle successively: 22 types, 24 types, 26 types, 28 types)
Success flow process: the short rise key of pressing, wheel footpath size raises a rank, until bull wheel footpath (28 type);
Substitute flow process: short in down key, wheel footpath size is lowered a rank, until small-wheel-diameter (22 type); Short in function key, when front-wheel footpath, size Selection comes into force, and deposits EEPROM in, returns to mode of operation; Long by function key, when front-wheel footpath, size Selection comes into force, and deposits EEPROM in, deletes card number information, and switching state is to master card learning state;
5s is without any button operation, and when front-wheel footpath, size Selection comes into force, and deposits EEPROM in, returns to mode of operation;
Receive subcard card number message, abandon taking turns footpath modification of dimension, switching state is to off-mode;
Receive secondary subcard card number message, abandon taking turns footpath modification of dimension, switching state is to off-mode;
Receive master card card number message, abandon taking turns footpath modification of dimension, switching state is to subcard learning state;
Receive power fail message, abandon taking turns footpath modification of dimension, switching state is to off-mode;
Parameter storage
Success flow process: power on and correctly read EEPROM parameter information, use EEPROM data parameters;
Substitute flow process: power on and read EEPROM parameter information mistake, the each parameter of initialization; When parameter comes into force, parameter information is in EEPROM;
Communication output:
Success flow process: when brake signal is effective, 50% cycle of output duty cycle is 21 of 2ms square waves, interval 1s repeats 3 times;
Substitute flow process: when brake signal is invalid, after gear information comes into force, 50% cycle of output duty cycle is 2ms square wave gear value, and interval 1s repeats 3 times;
When brake signal is effective, after gear information comes into force, after brake signal is invalid, 50% cycle of output duty cycle 2ms square wave gear value, interval 1s repeats 3 times;
Show and control
1. initial condition
Success flow process: only show current electric quantity information;
2. master card learning state:
Success flow process: while not learning master card card number, speed numeral display position demonstration " 00 " is flashed, and flicker frequency is 1s;
Substitute flow process: when the success of study master card card number, speed numeral display position shows " 01 ", stops flashing 2 seconds;
3. subcard learning state:
Success flow process: while not learning subcard card number, gear numeral display position demonstration " 00 " is flashed, and flicker frequency is 1s;
Substitute flow process: when the success of study subcard card number, gear numeral display position shows " 01 ", and flashing frequency is 1s;
4. secondary subcard learning state:
Success flow process: while not learning secondary subcard card number, speed numeral display position demonstration " 01 " is flashed, and flicker frequency is 1s;
Substitute flow process: when the success of study master card card number, speed numeral display position shows " 02 ", stops flashing 2 seconds;
5. off-mode:
Success flow process: only show current electric quantity information;
6. mode of operation:
Success flow process: show current electric quantity information, real-time speed information, start mileage information, gear selection information, vehicle information;
7. gear selection mode:
Success flow process: demonstration current electric quantity information, real-time speed information, start mileage information, vehicle information are not all glimmered, gear information flicker, flicker frequency 1Hz;
8. speed unit selection mode
Success flow process: demonstration current electric quantity information, real-time speed information, start mileage information, vehicle information, gear information are not all glimmered, speed unit flicker, flicker frequency 1Hz;
9. mileage contractor selection state
Success flow process: demonstration current electric quantity information, real-time speed information, start mileage information, gear information are not all glimmered, the flicker of mileage unit, flicker frequency 1Hz;
10. automobile type configuration state:
Success flow process: demonstration current electric quantity information, real-time speed information, start mileage information, vehicle information are not all glimmered, the flicker of vehicle numeral, flicker frequency 1Hz;
Backlight control
Success flow process: when power-off, backlight extinguishing;
Substitute flow process: when power supply is successfully opened, backlight first flicker three times, frequency is 1Hz, then Chang Liang;
When power fail occurs, flicker backlight ten times, flicker cycle is 750ms;
When master card learning success, flicker secondary backlight, flicker frequency is 1Hz;
When subcard learning success, once, flicker frequency is 1Hz in flicker backlight;
When secondary subcard learning success, once, flicker frequency is 1Hz in flicker backlight;
Power supply output:
Success flow process: under initial condition, master card learning state, subcard learning state, secondary subcard learning state, off-mode, power-off;
Substitute flow process: under mode of operation, gear selection mode, speed unit selection mode, mileage contractor selection state, automobile type configuration state, electric power starting.
According to the above description, can realize the solution of the present invention in conjunction with art technology.