Summary of the invention
The invention provides a kind of on-off signal acquisition system, utilize this system can gather multiple on-off signal, and gathered on-off signal is passed in CAN; Decrease the wire harness gathered needed for on-off signal on the one hand, be convenient to detection failure on the other hand.
The on-off signal of described on-off signal acquisition system multiple switch in collection vehicle, described on-off signal represents the on off state of described multiple switch; Described system comprises:
On-off signal collecting unit, gathers the analog voltage of the on off state representing described switch, and wherein different analog voltages corresponds to the on off state of different switch;
Microprocessor, receives and obtains the on-off signal of described switch according to described analog voltage;
CAN communication unit, receives described on-off signal and is delivered in CAN by described on-off signal, obtains described on-off signal to make each controller on vehicle by CAN.
Preferably, described on-off signal collecting unit comprises at least one series connection bleeder circuit, and be provided with the multiple divider resistances be in series, the first end of divider resistance string is connected with power supply via a booster resistor, the second end ground connection; Described series connection bleeder circuit is also provided be in parallel each other multiple switches, described multiple switch is mutually exclusive, and namely synchronization can only have a switch to be in closure state; One end of each switch be connected to divider resistance between, other end ground connection, makes the analog voltage of the described divider resistance string first end when different switches closes different.Described microprocessor is configured to the analog voltage receiving described divider resistance string first end.
Further, described on-off signal collecting unit also comprises the second booster resistor be arranged between described microprocessor and described divider resistance string first end, damages because electric current is excessive in order to prevent described microprocessor.
Described system can also comprise independent switch signal acquisition circuit, also comprises at least one independent switch signal acquisition circuit (103), for gathering the on-off signal of an independent switch.
Particularly, described power supply can be vehicle power or external source, is preferably vehicle power, and when ignition lock is in ON shelves, described vehicle power gives described system power supply.
Utilize on-off signal acquisition system provided by the invention, multiple on-off signal all can be collected in CAN, easy to use; And series connection bleeder circuit is to gather on-off signal for the switch designs that can not open simultaneously, wire harness quantity can be reduced by actv..
Detailed description of the invention
Below in conjunction with drawings and the specific embodiments, on-off signal acquisition system provided by the invention is described in detail.
As a preferred embodiment of the present invention, as shown in Figure 1, described on-off signal acquisition system comprises:
On-off signal collecting unit 1, gathers the analog voltage representing on off state;
Microprocessor 2, receives described analog voltage and obtains on-off signal according to described analog voltage;
CAN communication unit 3, receives described on-off signal and is delivered in CAN 5 by described on-off signal;
Power supply 4, powers for giving described on-off signal collecting unit 1, described microprocessor 2 and described CAN communication unit 3.Described power supply 4 can be vehicle power, and when ignition lock is switched to " ON " shelves, described power supply 4 starts power supply.
The analog voltage that the on off state that can collect different switch by described on-off signal collecting unit 1 is corresponding, then microprocessor 2 just can obtain corresponding on-off signal after carrying out analyzing and processing to described analog voltage, is delivered in CAN 5 by described on-off signal by CAN communication unit 3.When controller each on automobile needs to obtain on-off signal, only need to gather required on-off signal from CAN 5, the rigid line wire harness of car load can be greatly reduced like this; In addition because the signaling rate in CAN 5 is fast, also transmission efficiency can be improved.
Described on-off signal collecting unit 1 can comprise the first bleeder circuit 101 as shown in Figure 2.Described first bleeder circuit 101 is provided with divider resistance R5, R4, R3, R2 and R1 of series connection, the first end of described divider resistance string is connected to described power supply 4, second end ground connection by a booster resistor R9; Described first bleeder circuit 101 is also parallel with K switch 1, K switch 2, K switch 3 and the K switch 4 that can not open simultaneously, like this when different switch opens (being namely communicated with), the first end of described divider resistance string (namely, divider resistance R5 and booster resistor R9 junction) analog voltage can be different, by gathering the analog voltage of described divider resistance string first end and carrying out the state that analyzing and processing just can obtain K switch 1, K switch 2, K switch 3 and K switch 4.Such as, when K switch 4 closes, U9:U5=R9:R5, Ua=U5; Wherein, U9 represents the magnitude of voltage at booster resistor R9 two ends, and U5 represents the magnitude of voltage at divider resistance R5 two ends; Ua represents A point voltage value.Again such as, when only there being K switch 1 to close, U9:(U2+U3+U4+U5)=R9:(R2+R3+R4+R5); Now, Ua=U2+U3+U4+U5.Because the concrete numerical value of each resistance is known, and power supply 4 is known electric potential source or current source, its magnitude of voltage or current value are also known, therefore by measuring the analog voltage at A point place, just can judge it has been which switch open according to the analog voltage recorded, thus obtain the on-off signal of representative to the on off state of inductive switch.
Preferably, between described microprocessor 2 and described first bleeder circuit 101, be connected with the second booster resistor R10, cause damage to prevent microprocessor 2 because electric current is excessive.The resistance value of described second booster resistor R10 is far smaller than the resistance value of booster resistor R9, divider resistance R5, R4, R3, R2 or R1.The such as resistance value of the second booster resistor R10 is any number between 3 ~ 10 ohm; and divider resistance R5, R4, R3, R2, R1 and booster resistor R9 are any number between 40 ~ 100 ohm; so both can provide protection for microprocessor 2, A point place magnitude of voltage can be made again to be approximately equal to the magnitude of voltage at divider resistance string first end place.
Particularly, described K switch 1, K switch 2, K switch 3 and K switch 4 can be respectively the ACC function activation reply memory/ACC setting speed of a motor vehicle increases switch (RES/+), ACC function activation/ACC setting speed of a motor vehicle minimizing switch (SET/-), ACC function vehicle headway increase switch (DIST+) and ACC function vehicle headway minimizing switch (DIST-).Further, because the magnitude of voltage of the A point measured is continuous print analog voltage, occur that fault all can occur different magnitudes of voltage in any one section of wire harness, the analog voltage that therefore can also obtain according to A point measurement judges whether occurred fault in wire harness, and then failure judgement reason, realize wire harness malfunction monitoring.
Further, described on-off signal collecting unit 1 can also comprise the similar bleeder circuit of multiple and described first bleeder circuit 101 structure, to gather the on-off signal of different switch.And whether can may open simultaneously and arrange rigid line wire harness according to the position of switch different on vehicle, while making it possible to required on-off signal all to be gathered by described microprocessor 2, reduce the quantity of rigid line wire harness.As shown in Figure 2, described on-off signal collecting unit 1 can also comprise the second bleeder circuit 102, its structure and described first bleeder circuit 101 similar, wherein booster resistor R11 and R9 is similar, and resistance R12 and described second booster resistor R10 is similar; Divider resistance string R1, R2, R3, R4 and R5 in divider resistance string R6, R7 and R8 and the first bleeder circuit 101 are similar.Difference is described second bleeder circuit 102 is provided with different switches: K switch 6 and K switch 7; Measured the analog voltage of booster resistor R11 and divider resistance R8 junction by described microprocessor 2, the on off state of described K switch 6 and described K switch 7 can be obtained, thus obtain corresponding on-off signal.Particularly, described K switch 6, K switch 7 can be ACC function on/off switch (ON/OFF) and ACC function cancel switch (CANCLE).
Further, when some switch is not easy to be integrated into together with other switches in a bleeder circuit on vehicle, on-off signal can be gathered by independent wire harness.Specifically as shown in Figure 2, described on-off signal collecting unit 1 can also comprise:
Independent switch signal acquisition circuit 103, it is only arranged a K switch 8, and microprocessor 2 directly can gather the on-off signal that representation switch K8 opens or closes.Same, described on-off signal collecting unit 1 can also comprise the similar bleeder circuit of multiple and described independent switch signal acquisition circuit 103 structure, and such as independent switch signal acquisition circuit 104, it is only provided with K switch 9.K switch 8, K switch 9 can be any one in rain brush switch, main furnace building light switch, passing light switch or Stereo Switch etc.
The analog voltage of the representation switch state collected is converted to the on-off signal in CAN 5 by described microprocessor 2, by CAN communication unit 3, described on-off signal is delivered in CAN 5, each controller is made to read the on-off signal of needs from CAN 5, thus the rigid line wire harness decreased between controller and each switch, also can improve the propagation speed of signal simultaneously.
Above embodiment only for illustration of technical scheme of the present invention, is not limited to protection scope of the present invention.The amendment that those skilled in the art can carry out technical scheme of the present invention or replace on an equal basis, and do not depart from the spirit and scope of technical solution of the present invention.