Sensor device with sampling function, and sensor data processing system using same

09534923 ยท 2017-01-03

Assignee

Inventors

Cpc classification

International classification

Abstract

The sensor device includes a counter for counting the number of count commands used to perform measurements while maintaining among multiple sensor devices the ratio of measurement intervals; a ratio-holding-unit for setting the ratio to a desired ratio and holding respective values of the ratio for each of the multiple sensor devices; a sampling-timing-generating-unit for receiving a count value of the counter and the setting value of the ratio held by the ratio-holding-unit, and for generating a sampling timing signal based on the comparison result between the count value and the setting value; and a sampling-unit for sampling a detection signal detected by the detecting unit, by using the sampling timing signal generated by the sampling-timing-generating-unit.

Claims

1. A sensor device with sampling functionality comprising: a counter for counting the number of count commands for performing measurements while maintaining among multiple sensor devices a ratio of measurement intervals; a ratio-of-measurement-intervals-holding-unit for holding a setting value of desired ratio of measurement intervals; a sampling-timing-generating-unit for generating sampling timing signal from count value of the counter and the setting value of the ratio of measurement intervals which value is held by the ratio-of-measurement-intervals-holding-unit, based on the comparison result between the count value and the setting value; and a sampling-unit for starting, according to the sampling timing signal generated by the sampling-timing-generating-unit, the sampling of detected signals of various types of information detected by detecting-unit.

2. The sensor device with sampling functionality according to claim 1, wherein a delay-time-holding-unit, which holds desired measurement start delay time, is connected to the sampling-timing-generating-unit so that the start of sampling in the sampling-unit triggered by the sampling timing signal is delayed.

3. The sensor device with sampling functionality according to claim 1, wherein the sensor device is equipped with: detecting-unit-operation-start-time-holding-unit for holding operation start time information of the detecting-unit; and detecting-unit-operation-controlling-unit for receiving the count value from the counter and the operation start time information of the detecting-unit from the detecting-unit-operation-start-time-holding-unit.

4. The sensor device with sampling functionality according to claim 1, wherein the sensor device is equipped with count-command-generating-unit for generating the count command, and when using the count command generated by the count-command-generating-unit, the sensor device is capable of outputting the count command to the outside while inputting the count command to the counter.

5. The sensor device with sampling functionality according to claim 4, wherein an interface for outputting the count command generated by the count-command-generating-unit to the outside and an interface for receiving the count command from the outside are a single interface.

6. The sensor device with sampling functionality according to claim 5, wherein the interface for outputting the count command generated by the count-command-generating-unit to the outside and the interface for receiving the count command from the outside are a single interface; and the single interface is an I2C bus.

7. The sensor device with sampling functionality according to claim 5, wherein the interface for outputting the count command generated by the count-command-generating-unit to the outside and the interface for receiving the count command from the outside are a single interface; and the single interface is a SPI bus.

8. The sensor device with sampling functionality according to claim 5, wherein the sensor device is switchable between an operation mode in which the count command generated by the count-command-generating-unit is inputted into the counter and another operation mode in which the count command received from the outside is inputted into the counter.

9. A sensor data processing system wherein, the sensor device according to claim 1 and a sensor-data-processing-unit are combined, and the sensor-data-processing-unit has functionalities of setting the ratio of measurement intervals, and transmitting information on the ratio of measurement intervals and the count command to the sensor devices; and functionality of receiving data from the sensor devices.

10. A sensor data processing system wherein, the sensor device according to claim 1 and a sensor-data-processing-unit are combined, and a master device connected to the sensor-data-processing-unit has functionalities of setting the ratio of measurement intervals, and transmitting information on the ratio of measurement intervals and the count command to the sensor devices; and functionality of receiving data from the sensor devices.

11. A sensor data processing system wherein, the sensor device according to claim 1 and a sensor-data-processing-unit are combined, the sensor-data-processing-unit has functionalities of setting the ratio of measurement intervals and the like, and transmitting information on the ratio of measurement intervals to the sensor devices; and functionality of receiving data from the sensor devices, and one of the sensor devices generates and outputs the count command.

12. A sensor data processing system wherein, the sensor device according to claim 1 and a sensor-data-processing-unit are combined, the sensor data processing system comprises external periodic-signal-generating-unit for generating the count command, the count command is transmitted from the periodic-signal-generating-unit to the sensor devices, and the sensor-data-processing-unit has functionalities of setting the ratio of measurement intervals, and transmitting information on the ratio of measurement intervals to the sensor devices; and functionality of receiving data from the sensor devices.

13. A sensor data processing system wherein, the sensor device according to claim 1 and a sensor-data-processing-unit are combined, the sensor data processing system comprises an external periodic-signal-generating-unit for generating the count command, the count command is transmitted from the periodic-signal-generating-unit to the sensor devices, and is received by the sensor devices and the sensor-data-processing-unit, each sensor devices autonomously perform measurements according to the respective set ratio of measurement intervals by referring to the count command, the sensor-data-processing-unit counts the number of the received count commands and obtains data from the sensor devices when the number of the received count commands reaches a set number.

Description

BRIEF DESCRIPTION OF DRAWINGS

(1) FIG. 1 is a configuration diagram of a conventional GPS receiver with a DR sensor sampling function;

(2) FIG. 2 is a block diagram for explaining a magnetic sensor described in Patent Literature 2;

(3) FIG. 3 discloses a technique forming a base of a signal synchronizing device for multiple sensor devices in the present invention. FIG. 3 is a configuration diagram of a measurement timing managing system in which a CPU manages measurement timings of the multiple sensor devices;

(4) FIG. 4 discloses a technique forming a base of a signal synchronizing device for multiple sensor devices in the present invention. FIG. 4 is a configuration diagram of an autonomous measurement managing system which requires no measurement timing management by a CPU and which includes sensor devices having independent clocks and for performing measurements autonomously;

(5) FIG. 5 is an explanatory view of a case where, even if the same sensor devices are set to the same measurement rate, measurement cycles do not match due to deviation caused by variation in clocks of the respective sensor devices, and deviation of a ratio in number of measurements temporally increases;

(6) FIG. 6 is a configuration diagram for explaining Embodiment 1 of a sensor device with sampling functionality in the present invention;

(7) FIG. 7 is a view for explaining flows of signals of respective units in the configuration diagram shown in FIG. 6;

(8) FIG. 8 is a view showing the signals of the respective units in FIG. 7;

(9) FIG. 9 is an explanatory view of a signal synchronizing device which enables the multiple sensor devices to autonomously perform measurements with holding a set ratio measurement interval in the respective sensor devices;

(10) FIG. 10 is an explanatory view of a case where the sensor devices respectively have the clocks of the same rate;

(11) FIG. 11 is a configuration diagram for explaining Embodiment 2 of a sensor device with sampling functionality in the present invention;

(12) FIG. 12 is a view for explaining flows of signals of respective units in the configuration diagram shown in FIG. 11;

(13) FIG. 13 is a view showing the signals of the respective units in FIG. 12;

(14) FIG. 14 is an explanatory view of a case where delay times for measurement start time of the multiple sensor devices can be set and held;

(15) FIG. 15 is a configuration diagram for explaining Embodiment 3 of a sensor device with sampling functionality in the present invention;

(16) FIG. 16 is a view for explaining flows of signals of respective units in the configuration diagram shown in FIG. 15;

(17) FIG. 17 is a view showing the signals of the respective units in FIG. 16;

(18) FIG. 18A is an explanatory view of a case where, in Embodiment 3 of the sensor device with sampling functionality in the present invention, the ratio of measurement interval in the sensor devices can be arbitrary set and be held and an operation start time and an end time of each detecting-unit can be also set and held as a delay time. FIG. 18A shows a case where the ratio of measurement interval is 1;

(19) FIG. 18B is an explanatory view of a case where, in Embodiment 3 of the sensor device with sampling functionality in the present invention, the ratio of measurement interval in the respective sensor devices can be arbitrary set and be held and the operation start time and the end time of each detecting-unit can be also set and held as the delay time. FIG. 18B shows a case where the ratio of measurement interval is 4;

(20) FIG. 19 is a configuration diagram for explaining Embodiment 4 of a sensor device with sampling functionality in the present invention;

(21) FIG. 20 is a configuration diagram for explaining a modified example of Embodiment 4 of the sensor device with sampling functionality in the present invention;

(22) FIG. 21 is a configuration diagram for explaining another modified example of Embodiment 4 of the sensor device with sampling functionality in the present invention;

(23) FIG. 22 is a block diagram of a sensor data processing system in which the ratio of measurement interval in the respective sensor devices shown in FIG. 19 can be arbitrarily set and be held and in which measurements can be autonomously performed with holding the set ratio of measurement interval in the respective sensor devices;

(24) FIG. 23 is a block diagram of a sensor data processing system in which the ratio of measurement interval in the respective sensor devices shown in FIGS. 20 and 21 can be arbitrarily set and be held and in which measurements can be autonomously performed with holding the set ratio of measurement interval in the respective sensor devices;

(25) FIG. 24A is a system configuration diagram showing various connection relationships among the sensor devices each having the configuration shown in FIG. 21;

(26) FIG. 24B is a system configuration diagram showing various connection relationships among the sensor devices each having the configuration shown in FIG. 21;

(27) FIG. 24C is a system configuration diagram showing various connection relationships among the sensor devices each having the configuration shown in FIG. 21;

(28) FIG. 24D is a system configuration diagram showing various connection relationships among the sensor devices each having the configuration shown in FIG. 21;

(29) FIG. 24E is a system configuration diagram showing various connection relationships among the sensor devices each having the configuration shown in FIG. 21;

(30) FIG. 24F is a system configuration diagram showing various connection relationships among the sensor devices each having the configuration shown in FIG. 21;

(31) FIG. 25 is a block diagram for explaining a sensor data processing system using multiple sensor devices in Embodiment 5 of the present invention;

(32) FIG. 26 is a system configuration diagram which explains operations in the block diagram shown in FIG. 25. FIG. 26 is a system configuration diagram which shows a case where an I2C bus is used as a single count command input-output interface;

(33) FIG. 27 is a system configuration diagram which explains operations in the block diagram shown in FIG. 25. FIG. 27 is a system configuration diagram which shows a case where a SPI bus is used as a single count command input-output interface;

(34) FIG. 28 is a block diagram for explaining a sensor data processing system using multiple sensor devices in Embodiment 6 of the present invention;

(35) FIG. 29 is a block diagram for explaining a sensor data processing system using multiple sensor devices in Embodiment 7 of the present invention;

(36) FIG. 30 is a block diagram for explaining a sensor data processing system using multiple sensor devices in Embodiment 8 of the present invention; and

(37) FIG. 31 is a block diagram for explaining a sensor data processing system using multiple sensor devices in Embodiment 9 of the present invention.

DESCRIPTION OF EMBODIMENTS

(38) Embodiments of the present invention are described below with reference to the drawings.

Embodiment 1

(39) FIG. 6 is a configuration diagram for explaining a sensor device with sampling functionality of Embodiment 1 in the present invention. A sensor device 51 in FIG. 6 comprises: a counter 511; a ratio-of-measurement-interval-holding-unit 512; a sampling-timing-generating-unit 513; a detecting-unit 514; and a sampling-unit 515. The sensor device 51 corresponds to the sensor devices 31, 32, and 33 in FIG. 3. The sensor device also corresponds to the sensor devices 41, 42, and 43 in FIG. 4. In FIG. 6, only one sensor device is illustrated.

(40) The sensor device 51 in Embodiment 1 of the present invention includes: the counter 511 for counting the number of count commands which are used to perform measurements while maintaining a ratio of measurement intervals among multiple sensor devices; a ratio-of-measurement-interval-holding-unit 512 for setting the ratio of measurement intervals to a desired ratio of measurement intervals and holding respective values of the ratio of measurement intervals for each of the multiple sensor devices. The sensor device 51 also includes: the sampling-timing-generating-unit 513 for receiving a count value of the counter 511 and the setting value of the ratio of measurement intervals which is held by the ratio-of-measurement-interval-holding-unit 512, and for generating a sampling timing signal based on the comparison result between the count value and the setting value; and the sampling-unit 515 for sampling of detected signals detected by the detecting-unit 514, by using the sampling timing signal generated by the sampling-timing-generating-unit 513. Measurement data from the sensor device 51 is sent to a CPU (not illustrated) and is subjected to signal processing.

(41) FIG. 7 is a view for explaining flows of signals of the respective units in the configuration diagram shown in FIG. 6. FIG. 8 is a view showing the signals of the respective units in FIG. 7. FIG. 8 shows an example of a case where there are multiple sensor devices (sensor1, sensor2, and sensor3). In FIG. 8, two signals (rstn and trg) shown in the top rows are signals commonly inputted from the outside to all of the sensor devices. Next, four signals (clk, trg_sync, trg_count, and smpl_org) shown under each of the partition lines denoted sensor1, sensor2, and sensor3 are internal signals independently held by each of the sensor devices. Lastly, four signals (trg, smpl1, smpl2, and smpl3) shown under the partition line denoted sensor1, 2, 3 are the above-shown signals shown again to facilitate visualization of a state of synchronization among the multiple sensor devices, and trg is the same as trg in the top row while smpl1 to smpl3 are the same as the smpl_org of the sensor devices sensor1 to sensor3, respectively.

(42) Each of the sensor devices operates by using an independent internal clock (clk) of 1 KHz having an accuracy of plus or minus 10%. Moreover, the sensor device 1 holds the value of 1, the sensor device 2 holds the value of 2, and the sensor device 3 holds the value of 3, as the ratio of measurement interval (s2). Furthermore, a common count command (trg) of 100 Hz is inputted to the sensor devices. In this example, the count command is a signal of one bit. Each of the sensor devices fetches the count command by using its internal clock and generates an internal count command (trg_sync) which becomes active for one clock period. Furthermore, a value of the count command counter (trg_count and s1) is incremented by one every time the internal count command becomes active. When the value of the count command counter matches the value of the ratio of measurement interval (s2) minus 1, the value of the count command counter is reset to 0 by a count command counter reset signal (s3). When the internal count command becomes active with the count command counter being reset, an internal basic sampling signal (smpl_org) becomes active for one clock period, and this signal becomes a sampling signal (s4) which is the output of the sampling-timing-generating-unit 513.

(43) This configuration makes it possible to arbitrary set the ratio of measurement interval among multiple sensor devices, and to autonomously perform measurements while maintaining the set ratio of measurement interval among multiple sensor devices.

(44) FIG. 10 is an explanatory view of a case where each sensor devices have respective clocks of the same rate. FIG. 10 is a view further explaining the operation of Embodiment 1 by using a simpler drawing. In FIG. 10, the timings at which each sensor devices is activated vary and the periods of the clocks also vary.

(45) In Embodiment 1, the ratio of measurement interval of the first sensor device is 1, the ratio of measurement interval of the second sensor device is 1, and the ratio of measurement interval of the third sensor device is 2. Here, if a measurement cycle t1 is set to T in the first sensor device, measurement cycles t2 will be set to T in the second sensor device, and measurement cycles t3 will be set to 2T in the third sensor device. In the sensor devices of the conventional techniques, the variation in clock rate causes a deviation of the measurement cycles. Thus, the measurement cycle t1 is not exactly T, the measurement cycle t2 is not exactly T, and the measurement cycle t3 is not exactly 2T, and the ratio of measurement interval eventually deviates as time elapses. Moreover, in a case where there is a deviation of activation time, the measurement timings also deviate from each other. This state is shown in a left portion of FIG. 9. Even in such a situation, in a case where the processing is performed with the configuration shown in FIG. 6, measurements can be performed with maintaining the measurement cycle t1 at T, measurement cycle t2 at T, and measurement cycle t3 at 2T, as shown in a right portion of FIG. 9 and the ratio of measurement interval in the respective sensor devices does not deviate. Moreover, the measurement timings can be matched among the sensor devices.

(46) As described above, in the configuration of Embodiment 1 as shown in FIG. 6, it is possible to arbitrary set and hold the ratio of measurement interval in the multiple sensor devices and autonomously perform measurements while holding the set ratio of measurement interval in the respective sensor devices.

Embodiment 2

(47) In the aforementioned example of Embodiment 1, the measurements are performed while maintaining the ratio of measurement intervals as well the measurement timings being matched within the range of variations of respective clocks of each sensor devices. However, as described in the problems to be solved by the present invention, a case where measurement timings are deliberately shifted from one another among sensor devices is conceivable. Hence, it is important that delays for measurement timings can be set.

(48) FIG. 11 is a configuration diagram for explaining Embodiment 2 in the present invention of a sensor device with sampling functionality. FIG. 11 is a configuration diagram of a sensor device which allows setting and holding delay time of measurement start timing for each of detecting-units. A sensor device 61 in FIG. 11 includes: a counter 611; a ratio-of-measurement-interval-holding-unit 612; sampling-timing-generating-unit 613; a detecting-unit 614, a sampling-unit 615; and a delay-time-holding-unit 616.

(49) The sensor device 61 in Embodiment 2 of the present invention includes: the counter 611 for counting the number of count commands which are used to perform measurements while maintaining a ratio of measurement intervals among multiple sensor devices; a ratio-of-measurement-interval-holding-unit 612 for setting the ratio of measurement intervals to a desired ratio of measurement intervals and holding respective values of the ratio of measurement intervals for each of the multiple sensor devices. The sensor device 61 also includes: the sampling-timing-generating-unit 613 for receiving a count value of the counter 611 and the setting value of the ratio of measurement interval which is held by the ratio-of-measurement-interval-holding-unit 612, and for generating a sampling timing signal after the delay time held by the delay-time-holding-unit 616 elapses from a time point of matching of the count value and the setting value; and the sampling-unit 615 for sampling detected signal detected by the detecting-unit 614, by using the sampling timing signal generated by the sampling-timing-generating-unit 613.

(50) Specifically, the delay-time-holding-unit 616 for holding a desired measurement start delay time is connected to the sampling-timing-generating-unit 613 to delay the start of the sampling of the sampling-unit 615 by the sampling timing signal. Measurement data from the sensor device 61 is sent to a CPU (not illustrated) and is subjected to signal processing.

(51) In this configuration, the delay-time-holding-unit 616 holding the desired delay time and the sampling-timing-generating-unit 613 generates the timing of the sampling start after the elapse of the delay time, on the basis of the count value and the held ratio of measurement interval.

(52) FIG. 12 is a view for explaining flows of signals of the respective units in the configuration diagram shown in FIG. 11. FIG. 13 is a view showing the signals of the respective units in FIG. 12. FIG. 13 shows an example of a case where there are multiple sensor devices (sensor1, sensor2, and sensor3). In FIG. 13, two signals (rstn and trg) shown in the top rows are signals commonly inputted from the outside to all of the sensor devices. Next, six signals (clk to smpl_trg_dly) shown under each of the partition lines denoted sensor1, sensor2, and sensor3 are internal signals independently held by each of the sensor devices. Lastly, four signals (trg, smpl1, smpl2, and smpl3) shown under the partition line denoted sensor1, 2, 3 are the above-shown signals shown again to facilitate visualization of a state of synchronization among the multiple sensor devices, and trg is the same as trg in the top row while smpl1 to smpl3 are the same as smpl_trg_dly of the sensor devices sensor1 to sensor3, respectively.

(53) Each of the sensor devices operates by using an independent internal clock (clk) of 1 KHz having an accuracy of plus or minus 10%. Moreover, the sensor device 1 holds value of 5, the sensor device 2 holds value of 5, and the sensor device 3 holds value of 5 as the ratio of measurement interval (s2). Delay time information (a1 and a2) is information for determining the final sampling timing and is specified as delay times from an internal basic sampling signal (smpl_org). Here, a delay time (a1) is a value indicating the number of count commands by which the sampling is delayed from the internal basic sampling signal. Meanwhile, a delay time (a2) is a value indicating the number of clocks by which the sampling is further delayed after the delay of a1 count commands. In this example, the sensor device 1 holds value of 0, the sensor device 2 holds value of 1, and the sensor device 3 holds value of 2 as the delay time a1 (in 0, the sensor device operates without a delay). Moreover, the sensor device 1 holds value of 0, the sensor device 2 holds value of 0, and the sensor device 3 holds value of 0 as the delay time a2. Furthermore, a common count command (trg) of 100 Hz is inputted to the respective sensor devices. In this example, the count command is a signal of one bit.

(54) Each of the sensor devices fetches the count command by using its internal clock and generates an internal count command (trg_sync) which becomes active for one clock period. Furthermore, a value of the count command counter (trg_count and s1) is incremented by one every time the internal count command becomes active. When the value of the count command counter matches the value of the ratio of measurement interval (s2) minus 1, the value of the count command counter is reset to 0 by a count command counter reset signal (s3). When the internal count command becomes active with the count command counter being reset, an internal basic sampling signal (smpl_org) becomes active for one clock period. A sampling signal (smpl_trg_dly and s4), which becomes active for one clock period after a2 times of clock ticks during the a1-th active period of internal count command from a timing at which the internal basic sampling signal becomes active, becomes the output from the sampling-timing-generating-unit 613.

(55) FIG. 14 is an explanatory view of a case where the delay times for the measurement start time of multiple sensor devices can be set and held. It is possible to arbitrarily set and hold the ratio of measurement interval among multiple sensor devices and also set and hold the delay times for the measurement start time of the sensor devices. This is useful in a case where the sampling times are desired to be slightly shifted from one another to avoid interference among the sensors. Moreover, the measurements can be autonomously performed with holding the set ratio of measurement interval in the respective sensor devices.

Embodiment 3

(56) FIG. 15 is a configuration diagram for explaining a sensor device with sampling functionality of Embodiment 3 in the present invention. FIG. 15 is a configuration diagram in which a detecting-unit-operation-start-time-holding-unit and a detecting-unit-operation-controlling-unit are included in Embodiment 1 shown in FIG. 6. A sensor device 71 in FIG. 15 includes: a counter 711; a ratio-of-measurement-interval-holding-unit 712; a sampling-timing-generating-unit 713; a detecting-unit 714; a sampling-unit 715; a detecting-unit-operation-start-time-holding-unit 716; and a detecting-unit-operation-controlling-unit 717.

(57) The sensor device 71 in Embodiment 3 of the present invention includes: the counter 711 for counting the number of count commands used to perform measurements with holding a ratio of measurement interval in multiple sensor devices; the ratio-of-measurement-interval-holding-unit 712 for setting the ratio of measurement interval to a desired ratio of measurement interval and hold a setting value of the ratio of measurement interval in such a way that the multiple sensor devices each correspond to the setting value; and the detecting-unit-operation-start-time-holding-unit 716 for holding desired operation start time information of the detecting-unit. The sensor device 71 also includes: the detecting-unit-operation-controlling-unit 717 for controlling an operation of the detecting-unit 714 on the basis of a count value from the counter 711 and operation start time information of the detecting-unit from the detecting-unit-operation-start-time-holding-unit 716; the sampling-timing-generating-unit 713 for receiving the count value of the counter 711 and the setting value of the ratio of measurement interval which is held by the ratio-of-measurement-interval-holding-unit 712 and to generate a sampling timing signal after matching of the count value and the setting value; and the sampling-unit 715 for sampling a detection signal detected by the detecting-unit 714, by using the sampling timing signal generated by the sampling-timing-generating-unit 713. Measurement data from the sensor device 71 is sent to a CPU (not illustrated) and is subjected to signal processing.

(58) FIG. 16 is a view for explaining flows of signals of the respective units in the configuration diagram shown in FIG. 15. FIG. 17 is a view showing the signals of the respective units in FIG. 16. FIG. 17 shows an example of a case where there are multiple sensor devices (sensor1, sensor2, and sensor3). In FIG. 17, two signals (rstn and trg) shown in the top row are signals commonly inputted from the outside to all of the sensor devices. Next, four signals (clk to smpl_org) or five signals (clk to power_enable) shown under each of the partition lines denoted sensor1, sensor2, and sensor3 are internal signals independently held by each of the sensor devices. Lastly, six signals (trg to smpl3) shown under the partition line denoted sensor1, 2, 3 are the above-shown signals shown again to facilitate visualization of a state of synchronization among the multiple sensor devices and an operation of the detecting-unit of each sensor device. Here, trg is the same as trg in the top row, smpl1 to smpl3 are the same as smpl_org of the sensor devices sensor1 to sensor3, and power_enable2 and power_enable3 are the same as power_enable of the sensor devices sensor2 and sensor3.

(59) Each of the sensor devices operates by using an independent internal clock (clk) of 1 KHz having an accuracy of plus or minus 10%. Moreover, the sensor device1 holds values 5, the sensor device 2 holds values of 5, and the sensor device 3 holds values of 5 as the ratio of measurement interval (s2). The detecting-unit operation start time information (a1 and a2) is information for determining a operation start time of the determination-unit and is specified as delay times from the internal basic sampling signal (smpl_org and s4). Here, a delay time (a1) is a value indicating the number of count commands by which the operation start is delayed from the internal basic sampling signal. Meanwhile, a delay time (a2) is a value indicating the number of clocks by which the operation start is further delayed after the delay of a1 count commands. In this example, the sensor device 1 hold value of 0, the sensor device 2 holds value of 1, and the sensor device 3 hold value of 2 as the delay time a1. Moreover, the sensor device 1 hold value of 0, the sensor device 2 holds value of 0, and the sensor device 3 holds value of 0 as the delay time a2. Furthermore, a common count command (trg) of 100 Hz is inputted to the respective sensor devices. In this example, the count command is a signal of one bit.

(60) Each of the sensor devices fetches the count command by using its internal clock and generates an internal count command (trg_sync) which becomes active for one clock cycle. Furthermore, a value of the count command counter (trg_count and s1) is incremented by one every time the internal count command becomes active. When the value of the count command counter matches 1 of the value of the ratio of measurement interval (s2), the value of the count command counter is reset to 0 by a count command counter reset signal (s3). When the internal count command becomes active with the count command counter being reset, an internal basic sampling signal (smpl_org) becomes active for one clock cycle. This signal becomes a sampling signal (s4) which is an output of the sampling-timing-generating-unit 713.

(61) The detecting-unit-operation-controlling-unit 717 detects a timing of a2 times of clock operation from the timing at which the a1-th internal count command from the activation timing of the sampling signal becomes active, and the operation of the detecting-unit 714 is started at this timing. Thereafter, the detecting-unit 714 is paused at the completion of the next sampling (for example, at a falling edge of the sampling signal) and is made to wait until start timing of the next operation.

(62) FIGS. 18A and 18B are explanatory views of a case where, in Embodiment 3 of the sensor device with sampling functionality in the present invention, the ratio of measurement interval among the sensor devices can be arbitrary set and be held and the operation start time and end time of each detecting-unit can be also set and held as the delay time. FIG. 18A shows a case where the ratio of measurement interval is 1 and FIG. 18B shows a case where the ratio of measurement interval is 4.

(63) It is possible to start the operation of the detecting-unit earlier than the sampling timing by a set time and thereby start the sampling at the sampling timing without a delay. Moreover, the detecting-unit can be set to a pause mode in times other than the sampling timing.

Embodiment 4

(64) FIG. 19 is a configuration diagram for explaining Embodiment 4 of a sensor device with sampling functionality in the present invention. FIG. 19 is a configuration diagram in which a count-command-generating-unit is added to the counter in Embodiment 1 shown in FIG. 6. A sensor device 81 includes: a counter 811; a ratio-of-measurement-interval-holding-unit 812; a sampling-timing-generating-unit 813; a detecting-unit 814; a sampling-unit 815; the count-command-generating-unit 816; and a count command output controlling-unit 817 (SW1).

(65) The sensor device 81 in Embodiment 4 of the present invention includes: the counter 811 for counting the number of count commands which are used to perform measurements while maintaining a ratio of measurement interval among multiple sensor devices; the count-command-generating-unit 816 for generating a count command; and the count command output controlling-unit 817 for determining whether to use the generated count command as a count command for synchronization among the sensor devices. The sensor device 81 also includes: the ratio-of-measurement-interval-holding-unit 812 for setting the ratio of measurement interval to a desired ratio of measurement intervals and holding a respective value of the ratio of measurement intervals for each of multiple sensor devices; the sampling-timing-generating-unit 813 for receiving a count value of the counter 811 and the setting value of the ratio of measurement intervals which is held by the ratio-of-measurement-interval-holding-unit 812 and for generating a sampling timing signal based on the comparison result between count value and the setting value; and the sampling-unit 815 for sampling of detected signals detected by the detecting-unit 814, by using the sampling timing signal generated by the sampling-timing-generating-unit 813. Measurement data from the sensor device 81 is sent to a CPU (not illustrated) and is subjected to signal processing.

(66) Specifically, the count-command-generating-unit 816 for generating the count command is provided and, in a case where the count command generated by the count-command-generating-unit 816 is used, the sensor device 81 can output the count command to the outside while inputting the count command to the counter 811. The count command output controlling-unit (SW1) 817 is provided between a count command output terminal and the count-command-generating-unit 816, and a line between a count command input terminal and the counter 811 and a line between the count command output terminal and the count-command-generating-unit 816 are connected to each other.

(67) This configuration makes it possible to arbitrarily set and to hold the ratio of measurement interval the respective sensor devices as in sensor data processing systems shown in FIGS. 25 to 31 to be described later. This configuration makes it possible to autonomously perform measurements while holding the set ratio of measurement interval in the respective sensor devices. Moreover, the sensor device performs an output control of the count command in which the sensor device can supply the count command generated therein to the outside while operating according to the same count command. Hence, the sensor device can serve as a master for synchronizing the sensor devices, by outputting the generated count command to the other sensors. The multiple sensor devices in FIGS. 25 to 31 include sensor devices 101, 102, and 103.

(68) FIG. 20 is a configuration diagram for explaining a modified example of Embodiment 4 of the sensor device with sampling functionality in the present invention. FIG. 20 is a configuration diagram in which the count-command-generating-unit is added to the counter of Embodiment 1 shown in FIG. 6. In FIG. 19, the sensor device includes the count command input terminal and the count command output terminal. However, in FIG. 20, the sensor device includes only a count command input-output terminal and the count command output controlling-unit (SW1) 817 is provided between the count command input-output terminal and the count-command-generating-unit 816. In other words, FIG. 20 is a configuration diagram in which interfaces respectively for the counter command output and the count command input which are shown in FIG. 19 are integrated into a common interface.

(69) The sensor device in the modified example of Embodiment 4 of the present invention can implement two operations to perform measurement while holding the ratio of measurement interval in the multiple sensor devices. First, in a case where the sensor device operates as the master for synchronizing the sensor devices (SW1 is set to ON), the sensor device can output the count command generated by count command generating means therein to the outside while inputting the count command to the counter. In this case, the direction of a count command input-output interface is output of the command. Next, in a case where the sensor device operates in synchronization with the other sensor devices according to a master outside the sensor device (SW1 is set to OFF), the sensor device inputs, to the counter, the count command received from the outside via the count command input-output interface. In this case, the direction of the count command input-output interface is input of the command.

(70) In other words, an interface for outputting the count command generated by the count-command-generating-unit 816 to the outside and an interface for receiving the count command from the outside are a single interface.

(71) In this configuration, the sensor device requires no separate interfaces for input and output and it is possible to implement in a simpler configuration than the same functions as those of the configuration shown in FIG. 19. Thus, there is obtained an effect that not only the configuration of each sensor device is made simpler, but also the configuration of the entire sensor data processing system is made simpler.

(72) FIG. 21 is a configuration diagram for explaining another modified example of Embodiment 4 of the sensor device with sampling functionality in the present invention. FIG. 21 is a configuration diagram in which the count-command-generating-unit is added to the counter of Embodiment 1 shown in FIG. 6. As in FIG. 20, the sensor device includes only the count command input-output terminal. However, SW2 is provided between the count command input-output terminal and the counter. In other words, FIG. 21 is a configuration diagram in which the counter command input-output interface of the modified example shown in FIG. 20 can be disconnected from the count-command-generating-unit 816 and the counter 811 in the sensor device.

(73) The sensor device in the other modified example of Embodiment 4 can implement three operations to perform measurement while holding the ratio of measurement interval in the multiple sensor devices. First, in a case where the sensor device operates as the master for synchronizing the sensor devices (SW1 and SW2 are both set to ON), the sensor device can output the count command generated by count-command-generating-unit 816 therein to the outside while inputting the count command to the counter. In this case, the direction of the count command input-output interface is the output of the command. Next, in a case where the sensor device operates in synchronization with the other sensor devices according to the master outside the sensor device (SW1 is set to OFF, SW2 is set to ON), the sensor device inputs, to the counter 811, the count command received from the outside via the count command input-output interface. In this case, the direction of the count command input-output interface is the input of the command. Moreover, in a case where the sensor device operates independently without being synchronized with the other sensor devices (SW1 is ON, SW2 is OFF), the sensor device inputs the count command generated by the count-command-generating-unit 816 therein to the counter 811. However the sensor device does not output this command to the outside. In this case, the count command input-output interface is disconnected from the count-command-generating-unit 816 and the counter 811 in the sensor device.

(74) This configuration makes it possible to achieve multiple master-slave configurations by switching the operation modes of the respective sensor devices, even in a state where physical connections among the multiple sensor devices are fixed.

(75) In other words, the sensor device is switchable between an operation mode in which the count command generated by the count-command-generating-unit 816 is inputted to the counter 811 and an operation mode in which the count command received from the outside is inputted to the counter 811.

(76) Moreover, the interface for outputting the count command generated by the count-command-generating-unit 816 to the outside and the interface for receiving the count command from the outside may be the single interface, and the single interface may be an I2C bus. I2C is a serial bus used in embedded systems, mobile phones, and the like and stands for Inter-Integrated Circuit, generally written I2C and called I-two-C. A data processing system using the I2C bus is shown in FIG. 26 to be described later.

(77) Alternatively, the interface for outputting the count command generated by the count-command-generating-unit 816 to the outside and the interface for receiving the count command from the outside may be the single interface, and the single interface may be an SPI bus. SPI stands for Serial Peripheral Interface and is a bus connecting devices used in a computer. The SPI bus is a type of serial bus which requires fewer connection terminals than a parallel bus and is used for devices performing data transfer at relatively low speeds. A data processing system using the SPIC bus is shown in FIG. 27 to be described later.

(78) FIG. 22 is a block diagram of a sensor data processing system in which the ratio of measurement interval in the respective sensor devices shown in FIG. 19 can be arbitrarily set and be held and in which measurements can be autonomously performed with holding the set ratio of measurement interval in the sensor devices. FIG. 22 shows a relationship of the multiple sensor devices 101, 102, and 103 each including the count command input terminal and the count command output terminal.

(79) FIG. 23 is a block diagram of a sensor data processing system in which the ratio of measurement interval in the respective sensor devices shown in FIGS. 20 and 21 can be arbitrarily set and be held and in which measurements can be autonomously performed with holding the set ratio measurement interval in the respective sensor devices. FIG. 23 shows a relationship of the multiple sensor devices 101, 102, and 103 each including only the count command input-output terminal.

(80) FIGS. 24A to 24F are system configuration diagrams showing various connection relationships among the sensor devices each having the configuration shown in FIG. 21. The system in FIG. 24A to 24F includes: the count-command-generating-unit CC; the counter C; the master M; and the slave S. Moreover, among the interconnections in the drawings, the interconnections illustrated by solid lines show physical connections among the sensor devices while the interconnections illustrated in broken lines each show a final connection between the count-command-generating-unit and the counter which is achieved by switching the operation mode of the sensor device. As is apparent from FIGS. 24A to 24F, multiple master-slave configurations can be achieved by switching the operations modes of the respective sensor devices even in a state where physical connections among the sensor devices are fixed.

(81) As described above, it is possible to provide the sensor device with sampling functionality which allows the ratio of measurement interval in the multiple sensor devices to be arbitrary set and to be held and which can autonomously perform measurements while holding the set ratio of measurement interval in the respective sensor devices.

(82) FIGS. 25 to 31 are block diagrams for explaining sensor data processing systems using the aforementioned multiple sensor devices of the present invention.

Embodiment 5

(83) FIG. 25 is a block diagram for explaining a data processing system using sensor devices in Embodiment 5 of the present invention. The data processing system in FIG. 25 includes the sensor devices 101 to 103 and a MCU 110 (sensor-data-processing-unit). Note that the broken lines indicate a count command, the solid lines indicate other commands and contents of setting such as a ratio of measurement interval, and one-dot chain lines indicate data.

(84) Here, the MCU (Micro Controller-Unit; Micro Controller) refers to an embedded microprocessor in which a computer system is integrated into one integrated circuit. The MCU is used mainly for control of electronic equipments and the like. Unlike common microprocessors, many peripheral functions including memory such as ROM and RAM, functions related to I/O, and similar functions are mounted in the MCU itself. Accordingly, the cost for constructing a system can be suppressed compared to the case where ROM and the like are mounted as independent parts. In the present invention, the MCU functions as the sensor-data-processing-unit.

(85) Embodiment 5 includes sensor devices 101, 102, and 103 having the functions of the present invention and the MCU 110 connected to the sensor devices 101, 102 and 103. The MCU 110 has: a function of setting the ratio of measurement interval and the like and transmitting information on the setting to the sensor devices 101, 102, and 103; a function of generating a count command and transmitting the count command to the sensor devices 101, 102, and 103; and a function of receiving data from the sensor devices 101, 102, and 103.

(86) FIG. 26 is a system configuration diagram which explains operations in the block diagram shown in FIG. 25 and which shows a case where an I2C bus is used as a single count command input-output interface.

(87) The sensor devices 101, 102, and 103 and the MCU 110 has I2C interfaces and perform communication each other by I2C. The MCU 110 sets the ratio of measurement interval and transmits the set ratio to the sensor devices 101, 102, and 103. The sensor devices 101, 102, and 103 each have a broadcast address in addition to a unique address and simultaneously receive the count command transmitted from the MCU 110 by using the broadcast address. Each of the sensor devices 101, 102, and 103 autonomously performs a measurement at the set ratio of measurement interval according to the count command and sets an interrupt flag after completing the measurement. The MCU 110 fetches data upon detecting the interrupt flag of the measurement completion.

Embodiment 6

(88) FIG. 28 is a block diagram for explaining a sensor data processing system using multiple sensor devices in Embodiment 6 of the present invention.

(89) Embodiment 6 includes sensor devices 101, 102, and 103 having the functions of the present invention, a master device 111 connected to the sensor devices 101, 102 and 103, and a MCU 110 capable of transmitting and receiving data to and from the master device 111 and setting a ratio of measurement interval and the like. The master device 111 has: a function of transmitting information on the ratio of measurement interval and the like which is obtained from the MCU 110, to the sensor devices 101, 102, and 103; a function of generating a count command and transmitting the count command to the sensor devices 101, 102, and 103; a function of receiving data from the sensor devices 101, 102, and 103; and a function of transmitting and receiving data to and from the MCU 110.

Embodiment 7

(90) FIG. 29 is a block diagram for explaining a sensor data processing system using multiple sensor devices in Embodiment 7 of the present invention.

(91) Embodiment 7 includes sensor devices 101, 102, and 103 having the functions of the present invention and a MCU 110 connected to the sensor devices 101, 102 and 103. The MCU 110 has: a function of setting a ratio of measurement interval and the like and transmitting the information on the setting to the sensor devices 101, 102, and 103; and a function of receiving data from the sensor devices 101, 102, and 103. However, the MCU 110 does not have a function of generating a count command. One of the sensor devices generates and outputs the count command.

(92) FIG. 26 is a system configuration diagram which explains operations in the block diagram shown in FIG. 29. FIG. 26 is a system configuration diagram which shows a case where an I2C bus is used as a single count command input-output interface.

(93) Specifically, in the embodiment, the sensor devices each have a common slave address for broadcast in addition to a unique slave addresses. Moreover, the MCU may also have this common slave address. First, in order to set the ratio of measurement interval in the respective sensor devices, the MCU 110 becomes an I2C master and starts data transmission in a write mode to each of the sensor devices by using the unique address of the sensor device.

(94) Next, in order to give an instruction to one of the sensor devices to generate the count command, the MCU becomes the I2C master and starts data transmission in the write mode for the corresponding sensor device by using the unique address of this sensor device. Thereafter, the sensor device instructed to generate the count command becomes the I2C master by a timing managed by itself and starts data transmission in the write mode to the common broadcast address, as the count command. The sensor devices simultaneously receive the count command. Each of the sensor devices counts the number of the count commands transmitted from the sensor device being the I2C master and autonomously performs measurements at the set ratio of measurement interval.

(95) In a case where the MCU 110 has the common broadcast address, the MCU 110 knows the number of receptions of the count commands and can thus know a timing at which data is to be collected from each of the sensor devices on the basis of the information on the number of receptions. Accordingly, the MCU 110 becomes the I2C master at an appropriate timing to correct the data and starts data transmission in a read mode to each of the sensor devices by using the address unique to the sensor device. This causes the designated sensor device to transmit measurement data to the MCU 110, and the MCU 110 can thereby collect measurement data.

(96) Moreover, each of the sensor devices can notify measurement completion to the MCU 110. Setting an interrupt flag, the sensor device becoming the I2C master and starting data transmission in a MCU write mode, and the like are conceivable as means of notification. The MCU 110 fetches the data upon detecting the notification of measurement completion. Moreover, each of the sensor devices can automatically transmit the measurement data by becoming the I2C master and giving an instruction of data transmission in the MCU write mode.

(97) FIG. 27 is a system configuration diagram which explains operations in the block diagram shown in FIG. 29. FIG. 27 is a system configuration diagram which shows a case where a SPI bus is used as a single count command input-output interface. In FIG. 27, a CPU, a slave 1, and a slave 2 each have a SPI interface and perform communication with each other via the SPI bus. The slave 1 and the slave 2 are set by the CPU.

(98) In the embodiment, the sensor devices are connected in cascade to the MCU (CPU) 110 and a slave select signal line (SS) and a serial clock signal line (SCK) are shared by the respective sensor devices. In this configuration, setting registers and data registers of the respective sensor devices appear as one long shift register when viewed from the MCU 110.

(99) First, in order to set the ratio of measurement interval in the respective sensor devices, the MCU 110 becomes a SPI master. At this time, a serial clock signal terminal (SCK) of the MCU 110 is an output terminal. Moreover, slave select signal terminals (SS) and serial clock signal terminals (SCK) of the sensor devices are all input terminals. The MCU 110 activates a slave select signal line (SS) shared by the sensor devices through a CTRL terminal. The slave select signal is also inputted to the slave select signal terminal (SS) of the MCU 110 itself. However, the operation of the MCU 110 is not affected at all because the MCU 110 is operating as the SPI master at this point.

(100) In this state, the MCU 110 accesses a register chain in which the setting registers of all of the sensor devices are connected in cascade, by using a serial clock signal terminal and a serial output signal terminal, and sets the ratio measurement interval. Moreover, the MCU 110 sets an instruction for one of the sensor devices to generate the count command and sets the desired timing of transmission of the measurement data (specifies the number of counts before the transmission) and the desired number of pieces of measurement data to be transmitted.

(101) After the operations up to this point are completed, the MCU 110 cancels the master state and sets itself to a slave mode. In a state from this point forward, the serial clock signal terminal (SCK) of the MCU 110 is an input terminal. Moreover, the sensor device set to generate the count command changes its slave select signal terminal (SS) and its serial clock signal terminal (SCK) to output terminals.

(102) The sensor device set to generate the count command becomes the SPI master by a timing managed by itself and outputs the count command to the slave select signal line (SS). The count command is, for example, a falling edge of the slave select signal line (SS). This count command is simultaneously received by the sensor devices. Each of the sensor devices counts the number of the count commands and autonomously performs measurement at the set ratio of measurement interval.

(103) Moreover, upon detecting the set timing of transmission of the measurement data, the sensor device set to generate the count command transmits a clock signal corresponding to the number of pieces of measurement data to be transmitted, to the serial clock signal line (SCK), with the slave select signal line (SS) being activated. The pieces of measurement data are thereby sequentially transferred to the MCU from the register chain in which the data registers of all of the sensor devices are connected in cascade, and the MCU can thus collect the desired measurement data.

(104) In the SPI bus configuration in which the sensor devices are connected in cascade, data can be transmitted from the MCU 110 to the sensor devices at a timing at which data is transmitted from the sensor devices to the MCU 110. Accordingly, in a case where the MCU 110 desires to change the configuration of the measurement data, the MCU 110 can regain the authority of the SPI master from the sensor device by transmitting desired setting information.

Embodiment 8

(105) FIG. 30 is a block diagram for explaining a sensor data processing system using multiple sensor devices in Embodiment 8 of the present invention.

(106) Embodiment 8 includes sensor devices 101, 102, and 103 having the functions of the present invention, a MCU 110 connected to the sensor devices 101, 102 and 103, and an external periodic-signal-generating-unit 112 for generating a count command. The periodic-signal-generating-unit 112 transmits the count command to the sensor devices 101, 102, and 103. The MCU 110 has: a function of setting a ratio of measurement interval and the like and transmitting the information on the setting to the sensor devices 101, 102, and 103; and a function of receiving data from the sensor devices 101, 102, and 103.

Embodiment 9

(107) FIG. 31 is a block diagram for explaining a sensor data processing system using multiple sensor devices in Embodiment 9 of the present invention and shows another embodiment of Embodiment 8 shown in FIG. 30.

(108) Embodiment 9 includes: sensor devices 101, 102, and 103 having the functions of the present invention, a MCU 110 connected to the sensor devices 101, 102 and 103, and an external periodic-signal-generating-unit 112 configured to generate a count command. The MCU 110 sets a ratio of measurement interval and transmits information on the setting to the sensor devices 101, 102, and 103. Lines for count command reception are provided and the count command is transmitted from the external periodic-signal-generating-unit 112 to the sensor devices 101, 102, and 103. The sensor devices 101, 102, and 103 and the MCU 110 receives the count command. Each of the sensor devices 101, 102, and 103 autonomously performs measurements at the set ratio of measurement interval according to the count command. The MCU 110 counts the number of received count commands and fetches data from each of the sensor devices 101, 102, and 103 when the number reaches a set number.

(109) As described above, it is possible to provide the sensor data processing system using the sensor devices with sampling functionality which allow the ratio of measurement interval in the multiple sensor devices to be arbitrary set and to be held and which can autonomously perform measurements while holding the set ratio of measurement interval in the respective sensor devices.