Synchronization method for reading a status of an electrical contact of a motor vehicle

11491956 · 2022-11-08

Assignee

Inventors

Cpc classification

International classification

Abstract

A method for synchronizing acquisition of an analog signal value with a read signal for a state of an electrical contact of a motor vehicle. The method includes: controlling, at each start time of the first task, the power supply module so that the power supply module generates a read signal voltage pulse at the interface module input; at the same start time, triggering a counter for a predetermined duration shorter than the duration of the read signal voltage pulse; on the expiration of the counter duration, measuring the value of an analog signal generated by the interface module based on the state signal and of the read signal; and controlling, at the next start time of the second task, the power supply module so that the power supply module generates a zero voltage signal at the interface module input until the next start time of the first task.

Claims

1. A method for synchronizing acquisition of a value of an analog signal with a read signal for a state of an electrical contact of a motor vehicle by a computer on board said motor vehicle, said computer comprising a microcontroller, a power supply module and an interface module, said interface module being electrically connected to said microcontroller and to said power supply module, said electrical contact being electrically connected to the interface module so as to provide it with a state signal of the state of said electrical contact, the microcontroller periodically managing at least a first task and a second task in alternation, the method, implemented by the microcontroller, the method comprising: controlling, at each start time of the first task, the power supply module so that said power supply module generates a voltage pulse of a read signal at an input of the interface module; at the same start time of the first task, triggering a counter for a predetermined duration that is shorter than a duration of said voltage pulse of the read signal; on the expiration of the duration of said counter, measuring the value of an analog signal generated by the interface module on the basis of the state signal and of the read signal; and controlling, at the next start time of the second task, the power supply module so that said power supply module generates a zero voltage signal at the input of the interface module until the next start time of the first task.

2. The method as claimed in claim 1, wherein the counter has a duration between 50% and 100% of the duration of the pulse.

3. The method as claimed in claim 2, wherein the counter has a duration between 70% and 90% of the duration of the pulse.

4. The method as claimed in claim 3, wherein the counter has a duration of about 80% of the duration of the pulse.

5. A computer, for installation on board a motor vehicle, for synchronizing acquisition of a value of an analog signal with a read signal for a state of an electrical contact of said motor vehicle, said computer comprising a microcontroller, a power supply module and an interface module, said interface module being electrically connected to said microcontroller and to said power supply module, said electrical contact being electrically connected to the interface module so as to provide it with a state signal of the state of said electrical contacts, the microcontroller periodically managing at least a first task and a second task in alternation, the microcontroller being configured for: controlling, at each start time of the first task, the power supply module so that said power supply module generates a voltage pulse of a read signal at an input of the interface module; at the same start time of the first task, triggering a counter for a predetermined duration that is shorter than a duration of said voltage pulse of the read signal; on the expiration of the duration of said counter, measuring the value of an analog signal generated by the interface module on the basis of the state signal and of the read signal; and controlling, at the next start time of the second task, the power supply module so that said power supply module generates a zero voltage signal at the input of the interface module until the next start time of the first task.

6. The computer as claimed in claim 5, wherein the counter has a duration between 50% and 100% of the duration of the pulse.

7. The computer as claimed in claim 6, wherein the counter has a duration between 70% and 90% of the duration of the pulse.

8. The computer as claimed in claim 7, wherein the counter has a duration of about 80% of the duration of the pulse.

9. The computer as claimed in claim 5, wherein an intensity of the electric current generated by the power supply module is higher than 0.05 A.

10. A motor vehicle comprising a computer as claimed in claim 5, and an electrical contact that is electrically connected to the interface module of said computer.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) Other features and advantages of the invention will become apparent from the following description, given with reference to the appended figures that are given by way of non-limiting example and in which identical references are given to similar objects.

(2) FIG. 1 (mentioned above) schematically shows a computer of the prior art allowing the state of an electrical contact to be detected.

(3) FIG. 2 (mentioned above) shows a state signal, a read signal, an analog signal and a sampled signal.

(4) FIG. 3 schematically shows one embodiment of a computer according to an aspect of the invention.

(5) FIG. 4 shows the synchronization of two tasks and of the acquisition of an analog signal by the computer of FIG. 3.

(6) FIG. 5 shows one implementation of the method according to an aspect of the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

(7) The computer according to an aspect of the invention is intended to be installed on board a motor vehicle in order to determine the states of one or more electrical contacts of equipment of the vehicle.

(8) In what follows, the detection of the state of an electrical contact of a wiper of a motor vehicle is presented. It should be noted that such an application does not limit the scope of an aspect of the present invention, which is applicable to any electrical contact of a vehicle as well as to any type of vehicle.

(9) Such a wiper is connected in a known manner to an electric motor which drives it in a sweeping motion, for example across the windshield of the vehicle, in order to remove deposited liquid, for example rainwater, and thus allow the driver to have good visibility.

(10) When the wiper is deactivated, the electric motor stops so that the wiper is in a predetermined rest position in which it does not interfere with the driver's view. This predetermined rest position may for example correspond to a position in which the wiper lies substantially horizontally at the bottom of the vehicle windshield, out of the driver's field of view.

(11) FIG. 3 shows an example of an electronic computer 10 that is electrically connected to an electrical contact 20 of a wiper (not shown) so as to determine the state thereof. This computer 10 may for example be a control computer for controlling electrical equipment of the vehicle, known as a BCM, for “body control module”. Such a BCM is suitable for controlling and monitoring electrical equipment of the vehicle such as, for example, the head- and signaling lights, the opening of doors, the wipers, etc.

(12) In this example and in a known manner, the electrical contact 20 is connected to the wiper such that, with reference to FIG. 2, in the rest position of the wiper, the electrical contact 20 is in the closed state Ef (high state) and, outside the rest position of the wiper, the electrical contact 20 is in the open state Eo (low state), these successive open Eo and closed Ef states defining, at the terminals of the electrical contact 20, a signal referred to as the “state signal” E. It goes without saying that the electrical contact 20 could be connected to the wiper differently, in particular so as to be in the open state Eo in the rest position of the wiper and in the closed state Ef out of the rest position of the wiper.

(13) Referring back to FIG. 3, the computer 10 comprises a microcontroller 11, a power supply module 12 and an interface module 13.

(14) The power supply module 12 is electrically connected both to the microcontroller 11 and to the interface module 13. Advantageously, the microcontroller 11 and the power supply module 12 may be connected by a connection link referred to as an SPI, for “Serial Peripheral Interface”.

(15) The interface module 13 is electrically connected to all three of the power supply module 12, of the electrical contact 20 and of the microcontroller 11.

(16) With reference to FIGS. 2 and 3, the microcontroller 11 is configured to control the power supply module 12, via the transmission of a CMD command, so that the latter generates a periodic pulsed voltage electrical signal, referred to as the “read signal” SL, at the input of the interface module 13.

(17) As illustrated in FIG. 2, this read signal SL is a periodic signal, the period of which is about 5 ms, having a succession of current pulses P1, representing the high states of the read signal SL, of very short duration, for example about 500 μs. The power supply module 12 is suitable for generating current pulses P1, preferably of high intensity, for example about 0.05 A to 0.1 A, in order to make it possible to clean off, through the generation of electric arcs, grease residue and traces of oxidation which may build up on the electrical contact 20.

(18) Advantageously, the power supply module 12 may be included within a component of the computer 10, such as a smart high-side driver or a circuit, also referred to as an SBC for “system basis chip”, incorporating a plurality of functions including high-side outputs. Thus, no additional element is required, which limits the cost of the computer 10. An input of the SBC is then connected to the microcontroller 11 in order to receive the command for generating the read signal SL and an output of the SBC is connected to the interface module 13 in order to send the read signal SL to the interface module 13.

(19) In the non-limiting example of FIG. 3, the power supply module 12 comprises a resistor R1 connected both to the microcontroller 11 and to the base of an NPN transistor T1. The power supply module 12 also includes a resistor R2 connected both to the base of the transistor T1 and to ground M, which is itself connected to the emitter of the transistor T1. A resistor R3 is connected to the collector of the transistor T1, and to a resistor R4 and to the base of a PNP transistor T2. The resistor R4 is connected to a supply voltage V.sub.CC, for example of 5 V. The emitter of the transistor T2 is connected to the supply voltage V.sub.CC and the collector of the transistor T2 is connected both to the interface module 13 and to a capacitor C1, which is itself connected in turn to ground M. Since this assembly and its operation are known, they will not be described in further detail here. It should also be noted that any other suitable type of assembly could be used.

(20) The interface module 13 allows the status signal E received from the electrical contact 20 to be adapted so that the microcontroller 11 can read it. More specifically, the interface module 13 is configured to generate an analog signal SA, transmitted to the microcontroller 11, on the basis of the current pulses P1 of the read signal SL and of the state signal E, this analog signal SA being representative of the open and closed states Eo, Ef of the electrical contact 20.

(21) To this end, the interface module 13 comprises a capacitor C2 that is connected both to the microcontroller 11 and to ground M, a resistor R5 that is connected both to the microcontroller 11 and to ground M and a resistor R6 that is connected both to the microcontroller 11 and to the electrical contact 20. The interface module 13 also comprises a diode D1 that is connected both to the power supply module 12 and to a resistor R7, which is itself connected in turn to the electrical contact 20, a point A being defined between the diode D1 and the resistor R7. The interface module 13 further comprises a capacitor C3, which is connected both to the electrical contact 20 and to ground M, and a capacitor C4, which is connected both to the point A and to ground M. Since this assembly and its operation are known per se, they will not be described in further detail here. It should also be noted that any other suitable type of assembly could be used.

(22) Furthermore, the microcontroller 11 is configured to manage a plurality of tasks simultaneously, which it triggers on a regular basis. These tasks may for example consist in reading the inputs or activating the outputs of the microcontroller 11, transmitting messages over the vehicle's communication networks or any software activity requiring periodic or non-periodic processing.

(23) In one embodiment, with reference to FIG. 4, the microcontroller 11 is configured to manage a first task T1 and a second task T2 periodically in alternation. The first task T1 begins at a task start time denoted by t.sub.1 while the second task T2 starts at a task start time denoted by t.sub.2. However, it should be noted that an aspect of the invention could be applied to the periodic management of more than two tasks.

(24) To prevent a delay in the processing of one or more of the tasks from causing a shift in the acquisition time t.sub.A, the microcontroller 11 is configured for: controlling, at each start time t.sub.1 of the first task T1, the power supply module 12 so that said power supply module 12 generates a pulse P1 of a read signal SL at the input of the interface module; at the same start time t.sub.1 of the first task T1, triggering a counter CT for a predetermined duration that is shorter than the duration of said voltage pulse P1 of the read signal SL; on the expiration of said counter, reading the analog signal SA generated by the interface module 13 on the basis of the state signal E of the state of the electrical contact 20 and of the generated read signal SL; and controlling, at the next start time t.sub.2 of the second task T2, the power supply module 12 so that said power supply module 12 generates or maintains a zero voltage signal at the input of the interface module 13 until the next start time t.sub.1 of the first task T1.

(25) Lastly, the microcontroller 11 is configured to determine the state of the electrical contact 20 on the basis of the value of the analog signal SA that it receives. More specifically, the reading of the analog signal SA at the acquisition times t.sub.A allows the microcontroller 11 to generate a sampled signal SE as voltage pulses, illustrated for example in FIG. 2, the pulses of this signal SE taking as their value the value of the analog signal SA measured at the acquisition times t.sub.A.

(26) It should be noted that the electrical influence of the interface module 13 on the analog signal SA outside the pulses P1, and more particularly outside the acquisition times t.sub.a, has no effect on the implementation of an aspect of the invention.

(27) One implementation of the method according to an aspect of the invention will now be described with reference to FIGS. 4 and 5.

(28) First, in a step E1, the microcontroller 11 controls (CMD), at each start time t.sub.1 of the first task T1, the power supply module 12 so that said power supply module 12 generates, in a step E2, a pulse P1 of a read signal SL at the input of the interface module 13.

(29) At the same start time t.sub.1 of the first task T1, the microcontroller 11 triggers, in a step E3, a counter for a predetermined duration CT that is shorter than the duration of said voltage pulse P1 of the read signal SL. Preferably, the duration of the counter CT is about 80% of the duration of the pulse P1 of the read signal SL. For example, if the pulse P1 has a duration of 500 μs, then the duration of the counter CT may for example be about 400 μs.

(30) On the expiration of said counter, the microcontroller 11 measures, in a step E4, the value of the analog signal SA generated by the interface module 13 on the basis of the state signal E and of the read signal SL.

(31) Next, the microcontroller 11 controls (CMD), in a step E5, at the next start time t.sub.2 of the second task T2, the power supply module 12 so that said power supply module 12 generates, in a step E6, a zero voltage signal at the input of the interface module 13 until the next start time t.sub.1 of the first task T1.

(32) An aspect of the invention thus allows the microcontroller 11 to synchronize the acquisition times t.sub.A of the analog signal SA with the start of the tasks T1 and T2 such that, by adapting the duration of the counter, each acquisition time t.sub.A occurs toward the end of each pulse P1 of the read signal SL, thus making it possible to obtain relevant measurements of the analog signal SA.

(33) For example, with reference to FIG. 4, when the task T1, which is supposed to be periodic (with period T), experiences a delay d1 in addition to its period T (i.e. the execution of the task is slowed down) or an advance d2 ahead of its period T, the method according to an aspect of the invention makes it possible to prevent the acquisition time t.sub.A of the voltage value of the analog signal SA from taking place during a theoretical pulse P′1 corresponding to a fixed period of the read signal SL or else at the start of a pulse P1, when the electronic components of the interface module 13 are powering up.

(34) The method according to an aspect of the invention thus makes it possible to ensure that the voltage value of the analog signal SA used by the microcontroller 11 to generate the sampled signal SE is correct, thus avoiding the wiper stopping outside its rest position.