Summary of the invention
The invention provides a kind of on-off signal acquisition system, utilize this system can gather a plurality of on-off signals, and the on-off signal that gathers is passed on the CAN bus; Reduced on the one hand gathering the required wire harness of on-off signal, be convenient on the other hand detection failure.
Described on-off signal acquisition system is used for the on-off signal of a plurality of switches on the collection vehicle, and described on-off signal represents the on off state of described a plurality of switches; Described system comprises:
The on-off signal collecting unit, the analog voltage of the on off state of the described switch of collection expression, wherein different analog voltages is corresponding to the on off state of different switches;
Microprocessor receives and obtains according to described analog voltage the on-off signal of described switch;
CAN bus communication unit receives described on-off signal and described on-off signal is delivered on the CAN bus, so that each controller can obtain described on-off signal by the CAN bus on the vehicle.
Preferably, described on-off signal collecting unit comprises at least one series connection bleeder circuit, is provided with a plurality of divider resistances that are in series on it, and the first end of divider resistance string is connected with power supply via a booster resistor, the second end ground connection; Also be provided with on the described series connection bleeder circuit be in parallel each other a plurality of switches, described a plurality of switches are mutually exclusive, 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 is so that the analog voltage of described divider resistance string first end is different when different switch closures.Described microprocessor is configured to receive the analog voltage of described divider resistance string first end.
Further, described on-off signal collecting unit also comprises the second booster resistor that is arranged between described microprocessor and the described divider resistance string first end, damages because electric current is excessive in order to prevent described microprocessor.
Described system can also comprise the independent switch signal acquisition circuit, also comprises at least one independent switch signal acquisition circuit (103), is used for gathering the on-off signal of an independent switch.
Particularly, described power supply can be preferably vehicle power for vehicle power or external source, and when ignition lock was in the ON shelves, described vehicle power was given described system power supply.
Utilize on-off signal acquisition system provided by the invention, a plurality of on-off signals all can be collected on the CAN bus, the convenient use; And for the switch designs that can not open simultaneously the series connection bleeder circuit gather on-off signal, can actv. reduce wire harness quantity.
The specific embodiment
Below in conjunction with drawings and the specific embodiments on-off signal acquisition system provided by the invention is elaborated.
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 that represents on off state;
Microprocessor 2 receives described analog voltage and obtains on-off signal according to described analog voltage;
CAN bus communication unit 3 receives described on-off signal and described on-off signal is delivered on the CAN bus 5;
Power supply 4 is used for to described on-off signal collecting unit 1, described microprocessor 2 and 3 power supplies of described CAN bus communication unit.Described power supply 4 can be vehicle power, and when ignition lock switched to " ON " shelves, described power supply 4 began power supply.
The analog voltage corresponding on off state that can collect different switches by described on-off signal collecting unit 1, then 2 pairs of described analog voltages of microprocessor carry out just can obtaining after the analyzing and processing corresponding on-off signal, by CAN bus communication unit 3 described on-off signal are delivered on the CAN bus 5.When each controller need to obtain on-off signal on the automobile, only need to gather required on-off signal from CAN bus 5, can greatly reduce like this rigid line wire harness of car load; Because the signaling rate on the CAN bus 5 is fast, also can improve transmission efficiency in addition.
Described on-off signal collecting unit 1 can comprise the first bleeder circuit 101 as shown in Figure 2.Be provided with divider resistance R5, R4, R3, R2 and the R1 of series connection on described the first bleeder circuit 101, the first end of described divider resistance string is connected to described power supply 4, the second end ground connection by a booster resistor R9; Also be parallel with K switch 1, K switch 2, K switch 3 and the K switch 4 that can not open simultaneously on described the first bleeder circuit 101, like this when different switch opens (namely be communicated with), the first end of described divider resistance string (namely, divider resistance R5 and booster resistor R9 junction) analog voltage can be different, the analog voltage by gathering described divider resistance string first end also carries out the state that analyzing and processing just can obtain K switch 1, K switch 2, K switch 3 and K switch 4.For example, when K switch 4 closure, 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 for example, when K switch 1 closure is only arranged, U9:(U2+U3+U4+U5)=R9:(R2+R3+R4+R5); At this moment, 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 also are 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 that records, thereby obtain representative to the on-off signal of the on off state of inductive switch.
Preferably, between described microprocessor 2 and described the first bleeder circuit 101, be connected with the second booster resistor R10, to prevent that microprocessor 2 is because of the excessive injury of electric current.The resistance value of described the second booster resistor R10 is far smaller than the resistance value of booster resistor R9, divider resistance R5, R4, R3, R2 or R1.For example the 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 be for microprocessor 2 provide protection, again can be so that A point place magnitude of voltage 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 answer 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 that the A that measures is ordered is continuous analog voltage, fault occurs in any one section wire harness and all different magnitudes of voltage can occur, therefore can also judge whether occurred fault in the wire harness according to the analog voltage that the A point measurement obtains, and then the failure judgement reason, realize the wire harness malfunction monitoring.
Further, described on-off signal collecting unit 1 can also comprise the bleeder circuit of a plurality of and described the first bleeder circuit 101 structure similar, to gather the on-off signal of different switches.Can open simultaneously to arrange the rigid line wire harness according to position and the possibility of different switches on the vehicle, when making it possible to required on-off signal all passed through described microprocessor 2 and gather, 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, and its structure and described the first bleeder circuit 101 are similar, and wherein booster resistor R11 and R9 are similar, and resistance R 12 is similar with described the second booster resistor R10; 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 to be provided with on described the second bleeder circuit 102 different switches: K switch 6 and K switch 7; Analog voltage by described microprocessor 2 measurement booster resistor R11 and divider resistance R8 junction can obtain the on off state of described K switch 6 and described K switch 7, thereby 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 in the bleeder circuit with other switches on the vehicle, can gather on-off signal 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 only arranges a K switch 8 on it, microprocessor 2 can directly gather the on-off signal that representation switch K8 opens or closes.Same, described on-off signal collecting unit 1 can also comprise the bleeder circuit of a plurality of and described independent switch signal acquisition circuit 103 structure similar, for example the independent switch signal acquisition circuit 104, only are provided with K switch 9 on it.K switch 8, K switch 9 can be in rain brush switch, main furnace building light switch, passing light switch or the Stereo Switch etc. any one.
Described microprocessor 2 converts the analog voltage of the representation switch state that collects on the CAN bus 5 on-off signal, by CAN bus communication unit 3 described on-off signal is delivered on the CAN bus 5, so that reading the on-off signal that needs from CAN bus 5, each controller gets final product, thereby reduced the rigid line wire harness between controller and each switch, also can improve the propagation speed of signal simultaneously.
Above embodiment only is used for technical scheme of the present invention is described, is not limited to protection scope of the present invention.The modification that those skilled in the art can carry out technical scheme of the present invention or equal the replacement, and do not break away from the spirit and scope of technical solution of the present invention.