A SENSOR INTERFACE FOR INTERFACING WITH A SENSOR
20180045666 · 2018-02-15
Inventors
Cpc classification
H04Q2209/43
ELECTRICITY
G06F12/0638
PHYSICS
H04Q9/00
ELECTRICITY
Y02D10/00
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
G06F2212/205
PHYSICS
H04W52/0258
ELECTRICITY
Y02D30/70
GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
G11C11/005
PHYSICS
International classification
G06F12/06
PHYSICS
H04Q9/00
ELECTRICITY
Abstract
A sensor interface for interfacing with a sensor such as an electrochemical sensor, a temperature sensor or the like in which the interface comprises a memory configured to store data received at the interface from a sensor. The sensor interface is configured to assess the difference between data values in the memory, and to transmit advertising packets at a rate dependent on the difference between the values. The sensor interface includes a volatile memory and a non-volatile memory. The volatile memory is configured to store data received at the sensor interface from a sensor. The non-volatile memory is configured to store data stored in the volatile memory. The sensor interface is configured such that: data received at the sensor is stored in the volatile memory forming stored data until the volatile memory is substantially full and then at least some of the stored data is transferred to the non-volatile memory.
Claims
1. A sensor interface for interfacing with a sensor such as an electrochemical sensor, a temperature sensor or the like; the sensor interface comprising: a memory configured to store data received at the sensor interface from a sensor; wherein the sensor interface is configured to assess the difference between data values in the memory, and to transmit advertising packets at a rate dependent on the difference between the values.
2. A sensor interface according to claim 1, wherein the data values are consecutive data values.
3. A method for transmitting an advertising packet from a sensor interface for interfacing with a sensor such as an electrochemical sensor, a temperature sensor or the like; the method comprising: storing data received at the sensor interface from a sensor in memory; assessing the difference between data values in the memory, and transmitting advertising packets at a rate dependent on the difference.
4. A method according to claim 3, wherein the data values are consecutive data values.
5. A sensor interface for interfacing with a sensor such as an electrochemical sensor, a temperature sensor or the like; the sensor interface comprising: a volatile memory configured to store data received at the sensor interface from a sensor; and a non-volatile memory configured to store data stored in the volatile memory; wherein the sensor interface is configured such that: data received at the sensor interface is stored in the volatile memory forming stored data until the volatile memory is filled to a predetermined memory level and then at least some of the stored data is transferred to the non-volatile memory.
6. A sensor interface according to claim 5, configured to store an initial time of initial data and a time between data.
7. A sensor interface according to claim 5 or claim 6, further configured to store data periodically over a period.
8. A sensor interface according to claim 7, further configured to increment a counter each time data is stored to form a counter value.
9. A sensor interface according to claim 8, further configured to store the counter value at the end of the period.
10. A sensor interface according to any of claims 5 to 9, further configured to overwrite data stored in the volatile memory once the volatile memory is filled to the predetermined level with new data.
11. A sensor interface according to any of claims 5 to 10, further configured to also transmit the new data to a target electronic device.
12. A sensor interface according to claim 11, wherein the new data is transmitted in a data packet.
13. A sensor interface according to claim 12, wherein the data packet comprises an advertising packet.
14. A sensor interface according to claim 13, wherein the advertising packet is an advertising packet of a Bluetooth Smart data stream.
15. A sensor interface according to any of claims 5 to 14, wherein the sensor interface is configured to receive a signal from a target electronic device to initiate a communication connection with the sensor interface.
16. A sensor interface according to claim 15, wherein the sensor interface is configured to receive a signal from a target electronic device indicating data not received from the sensor interface.
17. A sensor interface according to claim 16, wherein the sensor interface is configured to transmit the data indicated as not received from the sensor interface in response to receiving the signal from a target electronic device indicating data not received from the sensor interface from the volatile memory if available otherwise from the non-volatile memory.
18. A sensor interface according to any of claims 5 to 17, further comprising a processor to control the transfer of at least some of the stored data to the non-volatile memory.
19. A sensor interface according to claim 18, wherein the volatile memory is integral with the processor.
20. A sensor interface according to any of claims 5 to 19, configured to assess the difference between data values in the non-volatile memory, and to transmit advertising packets at a rate dependent on the difference between the data values.
21. A sensor interface according to any of claims 5 to 20, wherein the predetermined memory level comprises 50% or more of the capacity of the volatile memory.
22. A sensor interface according to any of claims 5 to 21, wherein the predetermined memory level comprises 75% or more of the capacity of the volatile memory.
23. A sensor interface according to any of claims 5 to 22, wherein the predetermined memory level comprises 90% or more of the capacity of the volatile memory.
24. A sensor interface according to any of claims 5 to 23, wherein the predetermined memory level comprises substantially the capacity of the volatile memory.
25. A sensor interface according to any of claims 5 to 24, wherein the predetermined memory level comprises the capacity of the volatile memory.
26. A sensor comprising a sensor interface according to any of claims 1, 2 and 5 to 25.
27. A method for storing data in a sensor interface for interfacing with a sensor such as an electrochemical sensor, a temperature sensor or the like; the method comprising: storing data received at the sensor interface from a sensor in a volatile memory forming stored data until the volatile memory is filled to a predetermined memory level; and then transferring at least some of the stored data to a non-volatile memory.
28. A method according to claim 27, further comprising storing an initial time of initial data and a time between data.
29. A method according to claim 27 or claim 28, further comprising storing data periodically over a period.
30. A method according to claim 29, further comprising incrementing a counter each time data is stored to form a counter value.
31. A method according to claim 30, further comprising storing the counter value at the end of the period.
32. A method according to any of claims 27 to 31, further comprising overwriting data stored in the volatile memory once the volatile memory is filled to the predetermined memory level with new data.
33. A method according to any of claims 27 to 32, further comprising transmitting the new data to a target electronic device.
34. A method according to claim 33, wherein the new data is transmitted in a data packet.
35. A method according to claim 34, wherein the data packet comprises an advertising packet.
36. A method according to claim 35, wherein the advertising packet is an advertising packet of a Bluetooth Smart data stream.
37. A method according to any of claims 27 to 36, further comprising receiving a signal from a target electronic device to initiate a communication connection.
38. A method according to claim 37, wherein further comprising receiving a signal from a target electronic device indicating data not received from the sensor interface.
39. A method according to claim 38, further comprising transmitting the data indicated as not received in response to receiving the signal from a target electronic device indicating data not received from the volatile memory if available otherwise from the non-volatile memory.
40. A method according to any of claims 27 to 39, in which a processor controls the transfer of at least some of the stored data to the non-volatile memory.
41. A method according to claim 40, wherein the volatile memory is integral with the processor.
42. A method to any of claims 27 to 41, comprising assessing the difference between data values in the non-volatile memory, and transmitting advertising packets at a rate dependent on the difference between the data values.
43. A method according to any of claims 27 to 42, wherein the predetermined memory level comprises 50% or more of the capacity of the volatile memory.
44. A method according to any of claims 27 to 43, wherein the predetermined memory level comprises 75% or more of the capacity of the volatile memory.
45. A method according to any of claims 27 to 44, wherein the predetermined memory level comprises 90% or more of the capacity of the volatile memory.
46. A method according to any of claims 27 to 45, wherein the predetermined memory level comprises substantially the capacity of the volatile memory.
47. A method according to any of claims 27 to 46, wherein the predetermined memory level comprises the capacity of the volatile memory.
48. A computer program for implementing the method of any of claims 3, 4 and 27 to 47.
49. A computer readable medium containing a set of instructions that causes a computer to perform the method of any of claims 3, 4 and 27 to 47.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The invention will be described in more detail, by way of example, with reference to the accompanying drawings, in which:
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
DETAILED DESCRIPTION OF THE INVENTION
[0048] Example sensor interfaces 10 will now be described with reference to
[0049] In the example of
[0050] Broadly, the temperature sensor stores and periodically transmits data representing the physical properties of the chemical 16 to a target electronic device in the form a smart phone 18 as well as calibration data. The smart phone includes appropriate software or an app to act as a meter. The data is transmitted in a wireless transmission protocol from sensor interface to smart phone in the Bluetooth (registered trade mark) and, in particular, Bluetooth Smart (registered trade mark) format. In this example, a general purpose computing device in the form of a smart phone is illustrated, however, the computing device may be a tablet computer, a personal computer, mobile handset or a digital embedded system all running a proprietary application or software. The computing device controls measurement settings for simple read functions or more complex timed log readings. The computing device transmits these settings to the sensor interface which then operates as required.
[0051] The sensor interface 10 is shown in more detail in
[0052] The sensor interface includes a volatile memory 100 configured to store data in digital form received in analogue form at the sensor interface from the sensors 12,14. The volatile memory is integral with a processor 102 or a central processing unit (CPU), which in this example is a microcontroller. In this example, the volatile memory is RAM. The sensor interface includes non-volatile memory 104 configured to store data in digital form stored or previously formed in the volatile memory. In this example, the non-volatile memory or electronic storage is ROM such as an EEPROM (Electrically Erasable Programmable Read-Only Memory) or Flash memory device. The sensor interface also includes a counter 106.
[0053] The sensor interface 10 includes a radio transceiver 108 with a receiver 110 and transmitter 112. This enables communication connection to and from the target computing device (not illustrated in
[0054] An amplifier 114 is provided in the sensor interface 10 to amplify the electrical signals (of the order of millivolts) of sensor outputs from the sensors 12,14 and provide them to an analogue to digital converter 116 to convert to a digital signal also provided in the sensor interface package.
[0055] The sensor interface 10 includes a battery 118. A voltage regulator 120 is provided for voltage regulation to take account the change in the battery's supply voltage over time. The battery, through the voltage regulator, provides electrical power to the various electrical components described above.
[0056] Broadly, the sensor interface 10 provides non-volatile electronic storage of the digitally converted analogue voltages from the sensors 12,14 over a period of time and radio transmission and reception for communicating with the computing device.
[0057] Significantly, the sensor interface 10 is configured such that data received at the sensor interface from the sensors 12,14 in analogue form is stored in the volatile memory 100 in digital form following amplification by the amplifier 114 and analogue to digital conversion by the analogue to digital converter 116 until the volatile memory is full. Then, at least some or all of the stored data is transferred to the non-volatile memory. This provides a low energy solution due to the high power requirements of erasing or writing to non-volatile memory because the amount of erasing or writing is low or minimised.
[0058] In use, at the expiration of a regular time period, which may be a predetermined value such as default value programmed at a factory or a user programmed value set using the computing device, the digitised value of the sensors 12,14 output voltages are recorded for that particular time under the control of the processor microcontroller 102. In this way, the values reported by the sensors can be used to provide a record of some measured parameter of the solution or chemical under test with respect to time. This mode of operation is called logging. Logged data is stored in the volatile memory 100 located internally to the central processing unit 102 until such time as there is no more space remaining in the volatile memory and then a batch of logged values is written at the same time. This allows the non-volatile memory to be kept in a very low power state until it is necessary to power it up and perform a write operation on it.
[0059] In this example, the volatile memory has a capacity of 128 bytes. Three bytes are used for each pH reading or log and two bytes are used for each temperature reading or log. Thus, a batch of 25 pH and temperature readings are stored in volatile memory before no further pH and temperature readings can be stored in the volatile memory and the batch of readings are then transferred to the non-volatile memory. The volatile memory may have a different, larger capacity, for example, 256 bytes. In which case, 51 pairs of pH and temperature readings can be made before the volatile memory has reached its capacity and the batch of readings is then transferred to the non-volatile memory. If a 256 byte volatile memory stored 25 readings before it transferred these readings to non-volatile memory, this would use the same power as the volatile memory of 128 byte capacity, half of the capacity as the 256 byte memory.
[0060] A low power requirement is still provided by the sensor interface if data received at the sensor interface is stored in the volatile memory until the volatile memory is filled to another predetermined memory level other then full before stored data is transferred to the non-volatile memory. For example, the predetermined memory level may be 50% or more of the capacity of the volatile memory, 75% or more of the capacity of the volatile memory, or 90% or more of the capacity of the volatile memory.
[0061] In order to reduce the amount of space needed in non-volatile memory 104 and the need for maintaining a real time clock on the cap or sensor interface, when a logging operation is started, at the request of the user, a timestamp and a period between log samples is written to the sensor interface. Under the control of the processor, values from the sensors 12,14 are then written to the log and the internal counter 106 is incremented to record the number of samples that are currently stored. This negates the need to store a real timestamp along with each logged sample and sample times can instead be calculated by multiplying the counter by the logging period and adding it to the timestamp.
[0062] The computer device (not shown in
[0063] The Bluetooth Smart radio protocol has a number of operating modes that can be used. In ordinary operation, when the battery 118 is inserted into the sensor interface, the sensor interface, adopting the role of a Bluetooth Smart server, sends out or transmits an advertising packet at a programmable time interval. As described above, advertising packet is part of a data stream that allows the discovery of devices available in the vicinity or neighbourhood of the transmitting device such as in communication range. The advertising packet may contain, amongst other things, the unique address of the sensor interface so that the computing device, adopting the role of a Bluetooth Smart client, can respond to that advertising packet and enter a connected mode. When both devices (computing device and sensor interface) have agreed to enter the connected mode, a connection interval is negotiated between them. As a time synchronised network protocol, both the sensor interface and computing device use this connection interval to determine at what points or times they will enable their radio transceivers to see if either device has transmitted a message to the other. This interval is a trade off between power consumption, the total number of possible simultaneous connections with other devices and delay in sending data. A very short connection interval requires the radios of both devices to be enabled frequently at the expense of power, however, there is only a maximum delay of one connection interval required before data is transferred between devices. A long connection delay, on the other hand, is much more power efficient. However, the delay in transmitting data is correspondingly longer.
[0064] The inventors of the present patent application have appreciated that the time interval or period between the sensor interface 10 sending out or transmitting an advertising packet or the advertising packet transmission rate may be varied for energy efficiency. In order to produce what appears to be a responsive meter display at the computing device 18, the sensor interface may continuously, at a fixed period (for example, every second), send advertising packets containing data, such as pH reading, temperature and other information. However, the inventors of the present patent application have appreciated that most chemical reactions being measured by the sensors 12,14 will finish after a period of time after the chemical reaction has started at which point, the inventors of the present patent application have appreciated, there is nothing to be gained by sending identical advertising packets to the computing device as the display will not be updated. In contrast, at the start of a chemical reaction, when chemicals are initially mixed, the rate of change of the parameter being measured by the sensors, such as pH is relatively high. In which case, the inventors of the present patent application have appreciated, that under such conditions it is preferable to increase the rate at which the values or data from the sensors are reported to the computing device so that this high rate of change can be recorded. The sensor interface of the embodiments of the present invention, therefore, includes software that dynamically changes the period between transmissions of advertising packets in such a way as to provide for appropriate responsiveness at all states of a chemical reaction. The sensor interface transmits advertising packets with a period stepwise proportional to the rate of change of the parameter being measured by the sensors. This is achieved by the processor 102 of the sensor interface, under software control, assessing the difference between data values in the non-volatile memory, and the sensor interface transmitting an advertising packet dependent or proportional to the difference.
[0065] The value read at the sensors 12,14 at each sampling period is stored in the volatile memory 100 on the processor or central processing unit 102 within the sensor interface 10 within a circular buffer. In a circular buffer, a certain number of values can be stored, overwriting the oldest stored values when the buffer wraps around after a certain amount of data has been stored. At the same time, this value is added to the Bluetooth Smart advertising packet so that the previously described connection mode does not need to be entered in order for a Bluetooth Smart client such as the computing device, to read an instantaneous value from the sensors. Radio communications are inherently unreliable, however, and there will likely be advertising packets that are not received by the computing device. In these cases, the computing device will initiate a connection with the sensor interface and request that the sensor interface sends it the values that have been missed. Using this arrangement, the sensor interface is able to have low power consumption in good radio conditions by only sending advertising packets and when poor radio conditions are encountered, and an advertising packet is not received by the computing device, the historical value or values can be read over a short-lived connection and then monitoring of the advertising packets is resumed.
[0066] Data is retrieved from the sensor interface 10 by the computing device as raw digital representations of the analogue voltage as produced by the sensors. This is in contrast to performing the known subsequent step of converting the raw digital representation, using the values stored during calibration, to an actual value representing the chemical property being measured. The approach of passing the raw digital representation, as well as having the calibration values stored on the sensor interface for retrieval by any computing device, allows the computing device to perform the conversion calculation using a value from the temperature sensor 12 that may be separate to the sensor interface interfacing to the electrochemical sensor 14.
[0067] This is explained with reference to the flow chart 200 of
[0068] Data is received from the sensors as illustrated by step 302 forming sensor data. An initial time of initial data received and a time between sensor data is also stored (step 304). As illustrated at step 306, data is stored periodically over a period in volatile memory 100. The counter 106 is incremented each time data is stored to form a counter value. The counter value is stored at the end of the period over which data is measured. The processor 102 of the sensor interface assesses or measures whether the volatile memory is full (step 308). If the volatile memory is full, then the processor or controller controls the transfer of the stored data to the non-volatile memory and the stored data is transferred to the non-volatile memory (step 310). Data continues to be received from the sensors and data stored in the volatile memory is overwritten with new data. The new data is transmitted to a target electronic device in a data packet in the form of an advertising packet of a Bluetooth Smart data stream.
[0069] As shown at step 312, the sensor interface 10 may receive a signal from the target electronic device to initiate a communication connection with the sensor interface. The sensor interface may receive a signal from a target electronic device indicating data not received from the sensor interface. In which case, in response, the sensor interface is configured to transmit the data indicated as not received from the sensor interface. This is explained in more detail below with reference to
[0070] As illustrated in the flow diagram 400 of
[0071] Alternatively, as illustrated in
[0072] In another alternative, as illustrated in
[0073] In this way, with these arrangements, as a missed packet can be detected soon after the packet has been missed, it is likely that the volatile memory of the cap or sensor interface will contain the required missed data and therefore power costly read from non-volatile memory can be avoided. In the case that the sensor interface has been left logging for an extended period without being in Bluetooth range or communication connection of the target electronic device then the non-volatile memory is read to provide the data.
[0074] A Bluetooth connection state between the sensor interface and the target electronic device is very power hungry and therefore connections are only maintained for a short period of time. In this example, the Bluetooth connection is only formed for long enough for the target electronic device to read the missed log data from the sensor interface over the opened connection.
[0075] As described above, these features provide a very energy efficient sensor interface, which therefore has long battery life.
[0076] As described further above, the sensor interface of the embodiments of the present invention include software that dynamically changes the period between transmissions of advertising packets in such a way as to provide for appropriate responsiveness at all states of a chemical reaction. The sensor interface transmits advertising packets with a period stepwise proportional to the rate of change of the parameter being measured by the sensors. Advertising packets may be transmitted at a plurality of discrete intervals (for example, two or three different discrete intervals) depending on the difference between consecutive readings from the analogue to digital converter 116 of the sensor interface. This is achieved by the processor 102 of the sensor interface, under software or firmware control, assessing the difference between data values in the non-volatile memory, and the sensor interface only transmitting an advertising packet if the difference between data values is at or above a predetermined level. The discrete intervals may be, for example, 0.25 s and 1 s; or 0.25 s, 1 s and 10 s. This is explained in more detail below.
[0077] Typically, the interval between transmission of advertising packets is initially set at a minimum level such as, for example, 0.25 seconds by the processor 102 (see
[0078] There may be more than three predetermined advertising transmission rates or steps. The maximum advertising packet transmission rate may be, for example, between 0.1 second and 1 second. The minimum advertising packet transmission rate may be, for example, between 5 seconds and 20 seconds. The mid-rate advertising packet transmission rate may be, for example, between 0.5 seconds and 5 seconds.
[0079] Embodiments of the present invention have been described. It will be appreciated that variations and modifications may be made to the described embodiments within the scope of the present invention.