Drug delivery device with signal filtering

By detecting the transition of the sensor signal of the drug delivery device and determining the cumulative time period, the problem of inaccurate dose estimation caused by signal noise interference is solved, and more accurate drug dose detection is achieved.

CN120187472APending Publication Date: 2025-06-20ELI LILLY & CO
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202380077356.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-11-01
Filing Date
2023-10-30
Publication Date
2025-06-20

AI Technical Summary

Technical Problem

Sensor signals in existing drug delivery devices are susceptible to noise interference, resulting in inaccurate counting of signal transitions, which in turn affects the accurate estimation of drug dose.

Method used

The first transition of the signal from the second logic state to the first logic state and determine whether the signal is in an accumulated period of time that lasts equal to or exceeds the first threshold duration by detecting the first transition from the disengaged state to the engaged state during the time period beginning at that time point.

Benefits of technology

Effectively filtering noise improves the accuracy of sensor state transitions, thereby improving the accurate estimation of drug dose.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120187472A_ABST
    Figure CN120187472A_ABST
Patent Text Reader

Abstract

A method for filtering a signal output from a sensor of a drug delivery device is provided. In some embodiments, the sensor is operable to transition between an engaged state and a disengaged state. In some embodiments, the method includes detecting a first transition of a signal from a second logic state to a first logic state, the first transition occurring at a first point in time; determining whether the signal is in a first logical state for a cumulative period of time equal to or exceeding a first threshold duration within a first period of time starting at the first point in time; and determining that a sensor of the drug delivery device transitions from the disengaged state to the engaged state at a first point in time when the cumulative time period equals or exceeds a first threshold duration.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] Patients suffering from various diseases must often inject themselves with drugs. To allow people to administer drugs to themselves conveniently and accurately, various devices widely known as pen injectors or injection pens have been developed. Generally, these pens are equipped with a cartridge that includes a piston and holds a multi-dose amount of liquid drug. A drive member can be moved forward to advance the piston in the cartridge so as to dispense the contained drug, typically through a needle, from an outlet at the distal end of the cartridge.

[0002] Such a device can have components that physically interact with each other to cause a change in the state or an action of the device. For example, the device can have a dose button that can be rotated to set a dose and / or actuated to deliver a dose.

[0003] Such a device can include electronics, such as an integrated circuit having a processing unit and other components. For example, the electronics can include a sensing device that communicates with the processing unit to detect the occurrence of such an interaction. Summary of the Invention

[0004] According to an exemplary embodiment of the present disclosure, a method for filtering a signal output from a sensor of a drug delivery device is provided. The sensor is operable to transition between an engaged state and a disengaged state, in which the signal output from the sensor is in a first logic state in the engaged state and in a second logic state in the disengaged state. The method includes: detecting a first transition of the signal from the second logic state to the first logic state, the first transition occurring at a first time point; determining whether the signal is in the first logic state for a cumulative time period equal to or exceeding a first threshold duration within a first time period starting from the first time point; and when the cumulative time period is equal to or exceeding the first threshold duration, determining that the sensor of the drug delivery device has transitioned from the disengaged state to the engaged state at the first time point.

[0005] According to another embodiment of the present disclosure, a drug delivery device is provided. The drug delivery device includes a housing that includes a reservoir sized to hold a drug. The drug delivery device includes a printed circuit board. The drug delivery device includes a sensor mounted to the printed circuit board and operable to output a signal, wherein the sensor is operable to transition between an engaged state and a disengaged state, in which the signal output from the sensor is in a first logic state in the engaged state and in a second logic state in the disengaged state. The drug delivery device includes a microcontroller that is in electrical communication with the sensor via a logic input to the microcontroller. The microcontroller is configured to: receive the signal output from the sensor; and based on the received signal, determine whether the sensor has transitioned between the disengaged state and the engaged state at least in part by: determining whether the signal is in the first logic state for an accumulated time period equal to or exceeding a first threshold duration within a first time period starting at a first time point, the first time point corresponding to the first transition of the signal from the second logic state to the first logic state; and when the accumulated time period is equal to or exceeding the first threshold duration, determining that the sensor has transitioned from the disengaged state to the engaged state. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Additional embodiments of the present disclosure, as well as their features and advantages, will become more apparent by reference to the description herein in conjunction with the accompanying drawings. The components in the drawings are not necessarily to scale. Further, in the drawings, like reference numerals designate corresponding parts throughout the different views.

[0007] Figure 1 is a perspective view of a drug delivery device having a dose detection system according to aspects of the present disclosure.

[0008] Figure 2 is Figure 1 a partially exploded perspective view of the drug delivery device, showing a dose button having a support and a cap, where the cap is shown separated from the support.

[0009] Figure 3 is Figure 1 a partially exploded perspective view of the drug delivery device, showing components of the dose detection system.

[0010] Figure 4 is Figure 1 a cross-sectional view of the drug delivery device.

[0011] Figure 5 is Figure 1 a partially cut-away view of the proximal end of the drug delivery device, showing components of the dose detection system.

[0012] Figure 6 isFigure 1 Bottom side view of a portion of a dose button, showing a printed circuit board held within a dose button cap.

[0013] Figure 7 Is Figure 6 Exploded view of this portion of the dose button shown in

[0014] Figure 8 Perspective view of a flange of a dose detection system of a drug delivery device.

[0015] Figure 9 Is Figure 8 Top - down view of the flange of

[0016] Figure 10 Perspective view of a dose button support.

[0017] Figure 11 Is Figure 10 Top - down view of the dose button support of

[0018] Figure 12 Exemplary schematic diagram of a printed circuit board according to some embodiments.

[0019] Figure 13 Exemplary graph showing a signal received from a sensor of a drug delivery device according to some embodiments.

[0020] Figure 14 Exemplary schematic diagram of a printed circuit board having a resistor - capacitor (RC) circuit according to some embodiments.

[0021] Figure 15 Exemplary graph showing a signal received from a sensor of a drug delivery device and filtered using an RC circuit according to some embodiments.

[0022] Figures 16A - 16B Flowchart showing an exemplary method for filtering a signal received from a sensor of a drug delivery device according to some embodiments.

[0023] Figure 17 Exemplary schematic diagram of a system for detecting a transition of a signal received from a sensor of a drug delivery device according to some embodiments.

[0024] Figure 18 Exemplary graph showing integration of a signal received from a sensor of a drug delivery device according to some embodiments. Detailed Description

[0025] To facilitate an understanding of the principles of the present disclosure, reference will now be made to the embodiments illustrated in the accompanying drawings and specific language will be used to describe these embodiments. However, it will be understood that no limitation of the scope of the invention is thereby intended.

[0026] Techniques are provided herein for filtering signals received from a sensor of a drug delivery device. According to some embodiments, the sensor is operable to transition between an engaged state and a disengaged state. For example, when the sensor begins to interact with a sensed component of the drug delivery device, it may transition to the engaged state. When the sensor no longer interacts with the sensed component of the drug delivery device, it may transition to the disengaged state.

[0027] The engaged state and / or the disengaged state can be used to determine information about the drug delivery device, such as dosing information. In some embodiments, the transition of the sensor between the engaged state and the disengaged state can be used to determine the drug dose delivered using the drug delivery device. As a non-limiting example, the drug dose can be determined based on the number of times the sensor transitions to the engaged state and / or the disengaged state. Thus, the inventors have appreciated that it is important to accurately account for the number of times the sensor has transitioned to the engaged state and / or the disengaged state in order to accurately determine the drug dose delivered using the drug delivery device. For example, the drug delivery device can include a flanged wheel with teeth that rotates when the device dispenses a dose. As the flanged wheel rotates, the teeth can interact with a mechanical switch to trigger the switch. Each time the teeth physically trigger the switch (e.g., when the switch contacts the teeth and / or when the switch no longer contacts the teeth), the switch can output an electrical signal that is counted by a processor of the drug delivery device. The processor can count these electrical signals to determine how many degrees the flanged wheel has rotated and optionally determine how much insulin has been dispensed by the drug delivery device based on the rotation information. Alternatively, the processor can communicate the rotation information to another device that determines how much insulin has been dispensed by the drug delivery device based on the rotation information.

[0028] In some embodiments, the signal output by the sensor can be used to infer whether the sensor has transitioned between an engaged state and / or a disengaged state. For example, when the sensor is in the engaged state, it can be configured to output a signal in a first logic state, and when the sensor is in the disengaged state, it can be configured to output a signal in a second logic state different from the first logic state. Thus, when the sensor transitions between the engaged state and the disengaged state, the signal output by the sensor can transition between the first logic state and the second logic state. For example, the first logic state of the signal can be an asserted state (e.g., logic 1, high state, etc.), and the second logic state of the signal can be a de-asserted state (e.g., logic 0, low state, etc.), or vice versa. Although the embodiments herein have been described assuming that the sensor outputs a signal in an asserted state when in the engaged state and a signal in a de-asserted state when in the disengaged state, one can easily reverse this situation with appropriate modifications. For example, the signal can pass through an inverter before being processed to detect transitions between logic states.

[0029] However, the inventors have recognized limitations with this approach. In particular, there can be noise associated with the transition of the sensor between the engaged state and the disengaged state. For example, when the sensor begins to transition to the engaged state, the interaction between the sensor and the sensed component can fluctuate (e.g., the sensor can briefly lose contact with the sensed component). As another example, when the sensor transitions to the disengaged state, it can bounce repeatedly between the disengaged state and the engaged state. As a result, even when the sensor undergoes only a single transition, the signal output by the sensor can fluctuate several times between the first logic state and the second logic state. Thus, counting the number of signal transitions to infer the number of sensor transitions can lead to an overestimation and, in turn, an inaccurate dosage estimate for drug delivery using the drug delivery device.

[0030] Accordingly, the inventors have developed techniques for filtering signals received from such sensors of a drug delivery device that address the above limitations of conventional techniques. In some embodiments, these techniques detect transitions between logic states of the signal and use the detected transitions to determine whether the sensor has transitioned to the engaged state and / or the disengaged state. For example, in some embodiments, to determine whether the sensor has transitioned to the engaged state at a first point in time, these techniques determine an accumulated time period during which the signal is in a first logic state (such as an asserted state) during a first time period starting at the first point in time. If the accumulated time period is equal to or exceeds a threshold duration, this can indicate that the sensor has transitioned to the engaged state at the first point in time.

[0031] Additionally or alternatively, in some embodiments, techniques for filtering a signal include using one or more hardware components to process the signal. For example, in some embodiments, these techniques include using a resistor-capacitor (RC) circuit to process the signal. For example, the RC circuit can act as a low-pass filter that is configured to filter out high-frequency noise caused by the interaction between the sensor and the sensed component when the sensor transitions between an engaged state and / or a disengaged state.

[0032] Although various embodiments have been described, it will be apparent to those of ordinary skill in the art that many more additional embodiments and implementations are possible. Thus, the embodiments described herein are examples and not the only possible embodiments and implementations. Additionally, the advantages described above are not necessarily the only advantages, and it is not necessarily expected that every embodiment will achieve all of the advantages described.

[0033] The devices described herein may include a drug such as, for example, within a reservoir or cartridge 20 (described below). In another embodiment, the system may include one or more devices (including device 10 (described below)) and a drug. The term "drug" refers to one or more therapeutic agents, including but not limited to insulin, insulin analogs (such as lispro insulin or glargine insulin), insulin derivatives, GLP-1 receptor agonists (such as dulaglutide or liraglutide), glucagon, glucagon analogs, glucagon derivatives, gastric inhibitory polypeptide (GIP), GIP analogs, GIP derivatives, oxyntomodulin analogs, oxyntomodulin derivatives, therapeutic antibodies, and any therapeutic agent capable of being delivered by the devices described herein. The drug used in the device may be formulated with one or more excipients. The device is operated by a patient, caregiver, or healthcare professional in generally the manner described above to deliver the drug to a person.

[0034] Exemplary drug delivery device 10 is illustrated in Figures 1 - 4 as a pen-type syringe that is configured to inject a drug into a patient through a needle. Device 10 includes a body 11 that includes an elongated pen-shaped housing 12 that includes a distal portion 14 and a proximal portion 16. As used herein, the term "distal" refers to the direction and / or portion of the drug delivery device that is oriented toward the injection site and / or points (or is positioned closer) thereto, while the term "proximal" refers to the direction and / or portion of the drug delivery device that points away from (or is positioned farther away from) the injection site. The distal portion 14 may be received within a pen cap 18. Refer to Figure 4, the distal portion 14 may include a reservoir or cartridge 20 configured to contain a drug to be dispensed through an outlet 21 of the housing during a dispensing operation. The outlet 21 of the distal portion 14 may be equipped with an injection needle 24. In some embodiments, the injection needle may be removable from the housing. In some embodiments, after each use, the injection needle is replaced with a new injection needle.

[0035] A piston 26 may be positioned within the reservoir 20. The drug delivery device may include an injection mechanism positioned within the proximal portion 16 that operates to advance the piston 26 towards the outlet of the reservoir 20 during a dose dispensing operation to force the contained drug through the needle tip. The injection mechanism may include a drive member 28 illustratively in the form of a screw that is axially movable relative to the housing 12 to advance the piston 26 through the reservoir 20.

[0036] The device may include a dose setting assembly coupled to the housing 12 for setting the amount of dose to be dispensed by the device 10. As Figure 3 and Figure 4 best seen in, in the illustrated embodiment, the dose setting assembly includes a dose setting screw 32 and a flange 38. The dose setting screw 32 is in the form of a screw element that operates to perform a helical motion (i.e., move both axially and rotationally) relative to the housing 12 about a longitudinal axis of rotation AA during dose setting and dose dispensing. Figure 3 and Figure 4 illustrates the dose setting screw 32 fully screwed into the housing 12 in its home position or zero dose position. The dose setting screw 32 operates to screw out of the housing 12 in the proximal direction until it reaches a fully extended position corresponding to the maximum dose that the device 10 can deliver in a single injection. The extended position can be any position between positions corresponding to incremental extended positions (such as dose setting 0.5 or 1 unit) and the fully extended position corresponding to the maximum dose that the device 10 can deliver in a single injection, and is screwed into the housing 12 in the distal direction until it reaches the home position or zero position corresponding to the minimum dose that the device 10 can deliver in a single injection.

[0037] Referring to Figure 3 and Figure 4 , the dose setting screw 32 includes a helical threaded outer surface that engages a corresponding threaded inner surface 13 of the housing 12 to allow the dose setting screw 32 to perform a helical motion (i.e., rotate and translate simultaneously) relative to the housing 12. The dose setting screw 32 further includes a helical threaded inner surface that engages the threaded outer surface of a sleeve 34 of the device 10 ( Figure 4 ). The outer surface of the dose setting screw 32 includes dose indicator markings, such as numbers visible through a dose window 36 to indicate to the user the amount of dose set.

[0038] As mentioned above, in some embodiments, the dose setting assembly further includes a tubular flange 38 that is coupled in the open proximal end of the dose setting screw 32 and is axially and rotationally locked to the dose setting screw 32 by a protrusion 40 received within an opening 41 in the dose setting screw 32. The protrusion 40 of the flange 38 can be seen in Figure 3 , Figure 8 and Figure 9 , and the opening 41 of the dose setting screw 32 can be seen in Figure 3 .

[0039] As Figure 3 and Figure 4 seen, the delivery device 10 can include an actuator assembly having a clutch 52 and a dose button 30. The clutch 52 is received within the dose setting screw 32, and the clutch 52 includes an axially extending shank 54 at its proximal end. The dose button 30 of the actuator assembly is positioned proximal to the dose setting screw 32 and the flange 38. The dose button 30 includes a support 42 (also referred to herein as the "lower button") and a cap 56 (also referred to herein as the "upper button"). As will be discussed, the support 42 and the cap 56 enclose electronic components for storing and / or communicating data related to the amount of dose delivered by the drug delivery device.

[0040] The support 42 of the dose button can be attached to the shank 54 of the clutch 52 (such as, by an interference fit or ultrasonic welding) to axially and rotatably fix the dose button 30 and the clutch 52 together.

[0041] In some embodiments, a portion of the clutch can pass through the lumen 39 of the flange 38. The lumen 39 of the flange is best seen in Figure 8 and 9 . In some embodiments, the lumen 39 can be used to help center the clutch 52 in place.

[0042] The proximal face 60 of the dose button 30 can serve as a push surface onto which a force can be manually applied, i.e., a force is directly applied by the user to push the actuator assembly (the dose button 30 and the clutch 52) in the distal direction. A biasing member 68 (illustrated as a spring) can be disposed between the distal surface 70 of the support 42 and the proximal surface 72 of the tubular flange 38 ( Figure 8 and Figure 9 ) to urge the support 42 of the actuator assembly and the flange 38 of the dose setting assembly to axially separate from each other. The user can press the dose button 30 to initiate a dose dispensing operation. In some embodiments, the biasing member 68 is seated against the proximal surface 72 and can surround a raised collar 37 of the flange 38.

[0043] The delivery device 10 is operable in a dose setting mode and a dose dispensing mode. In the dose setting mode of operation, the dose button 30 is rotated relative to the housing 12 to set the desired dose to be delivered by the device 10. In some embodiments, rotating the dose button 30 relative to the housing 12 in one direction causes the dose button 30 to translate axially proximally relative to the housing 12, and rotating the dose button 30 relative to the housing 12 in the opposite direction causes the dose button 30 to translate axially distally relative to the housing. In some embodiments, a clockwise rotation of the dose button causes the dose button 30 to move distally, and a counterclockwise rotation of the dose button causes the dose button to move proximally, or vice versa.

[0044] In some embodiments, rotating the dose button 30 to cause the dose button 30 to translate axially in the proximal direction is for increasing the set dose, and rotating the dose button 30 to cause the dose button 30 to translate axially in the distal direction is for decreasing the set dose. During dose setting operation, the dose button 30 can be adjusted in predefined rotational increments corresponding to the minimum incremental increase or decrease of the set dose. The dose button can include a ratchet mechanism such that each rotational increment produces an audible and / or tactile "click" sound. For example, one increment or "click" can be equal to one-half or one unit of the drug.

[0045] In some embodiments, the amount of the set dose can be visible to the user via the scale indicator markings shown through the dose window 36. During the dose setting mode, the actuator assembly including the dose button 30 and the clutch 52 moves axially and rotationally together with the dose setting assembly including the flange 38 and the dose setting screw 32.

[0046] Due to the threaded connection of the dose setting screw 32 with the housing 12, the dose setting screw 32 and the flange 38 are rotationally fixed to each other and rotate and move proximally during dose setting. During this dose setting movement, the dose button 30 is rotationally fixed relative to the flange 38 and the dose setting screw 32 by the complementary splines 74 ( Figure 4 ) of the flange 38 and the clutch 52, and these complementary splines are urged together by the biasing member 68. During the process of dose setting, the dose setting screw 32, the flange 38, the clutch 52, and the dose button 30 move relative to the housing 12 in a helical manner (i.e., rotating and translating axially simultaneously) from a "start" position to an "end" position. This rotation and translation relative to the housing is proportional to the amount of the dose set by the operation of the drug delivery device 10.

[0047] Once the desired dose has been set, the device 10 is manipulated so that the injection needle 24 properly pierces, for example, the skin of a user. The dose dispensing mode is initiated in response to an axially distal force applied to the proximal face 60 of the dose button 30. The axial force is directly applied to the dose button 30 by the user. This causes the actuator assembly (dose button 30 and clutch 52) to axially move in the distal direction relative to the housing 12.

[0048] The axial displacement movement of the actuator assembly compresses the biasing member 68 and reduces or closes the gap between the dose button 30 and the tubular flange 38. This relative axial movement disengages the complementary splines 74 on the clutch 52 and the flange 38, and thereby disengages the dose button 30 from being rotationally fixed to the flange 38 and the dose setting screw 32. In particular, the dose setting screw 32 is rotationally disengaged from the dose button 30 to allow the dose setting screw 32 to be driven in reverse rotation relative to the dose button 30 and the housing 12. Moreover, when the dose setting screw 32 and the flange 38 are free to rotate relative to the housing 12, the dose button 30 is prevented from rotating relative to the housing 12 by the user engaging the dose button 30 (by pressing against the dose button).

[0049] As the dose button 30 and the clutch 52 continue to axially insert without rotating relative to the housing 12, the dose setting screw 32 spins back into the housing 12 as it spins relative to the dose button 30. The dose markings indicating the amount still to be injected are visible through the window 36. As the dose setting screw 32 is screwed distally downward, the drive member 28 is advanced distally to push the piston 26 through the reservoir 20 and expel the drug through the needle 24.

[0050] During the dose dispensing operation, as the dose setting screw 32 spins back into the housing 12, the amount of drug expelled from the drug delivery device is proportional to the rotational movement of the dose setting screw 32 relative to the housing 12. In some embodiments, since the dose button 30 is rotationally fixed relative to the housing 12 during the dose dispensing mode (e.g., due to engagement with the user's finger), the amount of drug expelled from the drug delivery device can be considered proportional to the rotational movement of the dose setting screw 32 relative to the dose button 30 as the dose setting screw 32 spins back into the housing 12. When the internal threads of the dose setting screw 32 have reached the distal end of the corresponding external threads of the sleeve 34, the injection is complete ( Figure 4 ). Then, the device 10 is again arranged in the ready state or zero-dose position, as shown in Figure 2 and Figure 4 .

[0051] As discussed above, the delivered dose can be derived based on the amount of rotation of the dose setting assembly (flange 38 and dose setting screw 32) relative to the actuator assembly (clutch 52 and dose button 30) during dose delivery. This rotation can be determined by detecting incremental movements of the dose setting assembly that are "counted" as the dose setting assembly rotates during dose delivery.

[0052] Further details of the design and operation of the exemplary delivery device 10 can be found in U.S. Patent No. 7,291,132, entitled "Medication Dispensing Apparatus with Triple Screw Threads for Mechanical Advantage", the entire disclosure of which is hereby incorporated by reference herein. Another example of a delivery device can be found in U.S. Patent No. 8,734,394, entitled "Automatic Injection Device With Delay Mechanism Including Dual Functioning Biasing Member", which is hereby incorporated by reference in its entirety herein, wherein such a device is modified with one or more of the various sensor systems described herein to determine the amount of drug delivered from the drug delivery device based on sensing relative rotation within the drug delivery device. Another example of a delivery device is a reusable pen-type device found in U.S. Patent No. 7,195,616, entitled "Medication Injector Apparatus with Drive Assembly that Facilitates Reset", which is hereby incorporated by reference in its entirety herein, wherein such a device is modified with one or more of the various sensor systems described herein to determine the amount of drug delivered from the drug delivery device based on sensing relative rotation within the drug delivery device.

[0053] A dose detection system is described herein that can be operable to determine the amount of dose delivered based on relative rotation between a dose setting member and a device body. The dose detection system utilizes a dose setting member attached to the device body and rotatable about a rotational axis relative to the device body during dose delivery. A sensed element is attached to the dose setting member and rotationally fixed relative to the dose setting member. An actuator is attached to the device body and remains non-rotating relative to the device body during dose delivery. The sensed element thus rotates relative to the actuator during dose delivery in a manner related to the amount of dose delivered.

[0054] In some embodiments, the dose detection system includes a rotation sensor attached to an actuator assembly and a sensed element including surface features that are equally radially spaced apart about the axis of rotation of the sensed element.

[0055] In some embodiments, the dose detection system may include a sensor and a sensed member attached to a component of a drug delivery device. The term "attached" encompasses any manner of fixing the position of a component to another component or to a member of a drug delivery device such that they can operate as described herein. For example, the sensor may be attached to a component of the drug delivery device by being directly positioned on the component, received within the component, integrated with the component, or otherwise connected to the component. The connection may include, for example, a connection formed by friction engagement, splines, snap fits, or press fits, sonic welding, or adhesives.

[0056] The term "directly attached" is used to describe an attachment where two components or a component and a member are physically fixed together with no intermediate member other than the attachment components. The attachment components may include fasteners, adapters, or other parts of a fastening system, such as a compressible membrane interposed between two components to facilitate the attachment. "Directly attached" is distinct from an attachment where the component / member is coupled through one or more intermediate functional members.

[0057] The term "fixed" is used to indicate that the indicated movement may or may not occur. For example, if two members are required to move rotationally together, the first member is "rotationally fixed" to the second member. In one aspect, a member may be "functionally fixed" relative to another member rather than structurally. For example, one member may be pressed against another member such that frictional engagement between the two members rotationally fixes them together, and the two members may not be fixed together without the pressing of the first member.

[0058] Various sensor arrangements are contemplated herein. Generally, a sensor arrangement includes a sensor and a sensed member. The term "sensor" refers to any component capable of detecting the relative position or movement of a sensed member. The sensor may be used with associated electrical components to operate the sensor. A "sensed member" is any component for which the sensor is capable of detecting the position and / or movement of the sensed member relative to the sensor. For a dose detection system, the sensed member rotates relative to the sensor, and the sensor is capable of detecting the rotational movement of the sensed member. The sensor may include one or more sensing elements, and the sensed member may include one or more sensed elements. The sensor detects the movement of the sensed member and provides an output representative of the movement of the sensed member.

[0059] Illustratively, the dose detection system includes electronic components suitable for operation of a sensor arrangement as described herein. The drug delivery device may include a controller operably connected to the sensor to receive an output from the sensor. The controller begins to receive the generated signals from the sensor, which indicate the count from the first to the last to obtain the total count for determining the total displacement (e.g., angular displacement). In the case of detecting the angular movement of the dose setting assembly, the controller may be configured to receive data indicating the angular movement of the dose setting assembly, which can be used to determine the amount of dose delivered by the operation of the drug delivery device based on these outputs. Optionally, the controller may be configured to determine the amount of dose delivered by the operation of the drug delivery device based on these outputs. The controller includes conventional components such as a processor, a power source, a memory, a microcontroller, etc. Additionally or alternatively, at least some components may be provided separately, such as by means of a computer, a smart phone or other devices. Then, means are provided to operably connect the external controller components to the sensor at an appropriate time, such as by a wired or wireless connection. For example, the on-board controller of the drug delivery device may be configured to only determine the amount of angular movement of the dose setting assembly and communicate the angular movement to the external controller. Then, the external controller may be configured to determine the amount of dose delivered based on the angular movement information.

[0060] According to one aspect, the electronic components include a sensor arrangement that includes one or more sensors operatively communicating with a processor for receiving signals representative of a sensed rotation from the sensor. Exemplary electronic components 76 are shown in Figures 5 - 7 and may include a sensor 86, and a printed circuit board (PCB) 77 having a plurality of electronic components. The printed circuit board may be a flexible printed circuit board. The circuit board of the electronic components 76 may include a microcontroller unit (MCU) as a controller, which includes at least one processing core and an internal memory. The electronic components may include a power source 79 for powering the various components, such as a battery, illustratively a button cell. The controller of the electronic components 76 may include control logic operative to perform the operations described herein, which include detecting the angular movement of the dose setting assembly during dose setting and / or dose delivery and / or detecting the dose delivered by the drug delivery device 10 based on the detected rotation of the dose setting assembly relative to the actuator assembly. Many (if not all) of the components of the electronic components may be housed in a compartment 85 within the dose button 30. In some embodiments, the compartment 85 may be defined between the proximal surface 71 of the support 42 of the dose button and the distal surface 81 of the cover 56 of the dose button. In the Figure 5 embodiment shown, the electronic components 76 are permanently integrated within the dose button 30 of the delivery device. In other embodiments, the electronic components are provided as a module that can be removably attached to the actuator assembly of the drug delivery device.

[0061] In Figure 6 a bottom view of an electronic assembly 76 held within a cap 56 is shown, and in Figure 7 an exploded view of the electronic assembly 76 is shown. As Figure 6 and Figure 7 shown, the electronic assembly 76 may include a printed circuit board (PCB) 77 and a sensor 86 having a contact surface 111. As Figure 7 shown, the electronic assembly 76 may further include a battery 79 and a battery cage 87.

[0062] In some embodiments, at least a portion of the sensor 86 extends out of a compartment 85 of the dose button 30. As Figure 10 and 11 best seen in

[0063] a support 42 of the dose button 30 may include one or more openings 45 through which the sensor 86 may extend. In some embodiments, during assembly of the drug delivery device, the contact surface 111 of the sensor 86 passes through the opening 45 of the support 42. This may permit the contact surface 111 of the sensor to interact with components external to the compartment 85 of the dose button 30. In some embodiments, although only one opening 45 in the support 42 is required to accommodate the sensor, a second opening may be provided, for example for symmetry of the support components, which aids in the manufacture of the components and / or the assembly of the components with the drug delivery device.

[0064] As discussed, according to one aspect, a dose detection system relates to detecting relative rotational movement between two components of a drug delivery device. In cases where there is a known relationship between the degree of rotation and the amount of dose delivered, the sensor operates to detect the amount of angular movement from the start to the end of a dose injection. For example, in some embodiments, for a pen-type syringe the relationship is: an angular displacement of 18° of a dose setting component corresponds to one dose unit, although other angular relationships are suitable, such as for example 9 degrees, 10 degrees, 15 degrees, 20 degrees, 24 degrees or 36 degrees for one unit or half a unit. The sensor system may operate to determine the total angular displacement of a dose setting member during dose delivery. Thus, if the angular displacement is 90°, then 5 dose units have been delivered.

[0065] The angular displacement is determined by counting increments of the dose amount as the injection proceeds. For example, the sensing system can use a repeating pattern of the sensed element such that each repetition is indicative of a predetermined degree of angular rotation. Conveniently, the pattern can be established such that each repetition corresponds to the smallest dose increment that can be set with the drug delivery device.

[0066] The components of the dose detection system can be permanently or removably attached to the drug delivery device. In some embodiments, at least some of the components of the dose detection system are provided in the form of a module removably attached to the drug delivery device. In other embodiments, the dose detection system components are permanently attached to the drug delivery device.

[0067] In some embodiments, the sensor can detect the relative rotation of the sensed member rotationally fixed to the dose setting screw 32 during dose delivery, and thereby determine the dose amount delivered by the drug delivery device. In the illustrative embodiment, the rotational sensor is attached and rotationally fixed to the actuator assembly. The actuator assembly does not rotate relative to the device housing during dose delivery.

[0068] In some embodiments, the sensed member is attached and rotationally fixed to the dose setting screw 32, which rotates relative to the dose button 30 and the device housing 12 during dose delivery. In some embodiments described herein, the sensed member includes an annular structure having a plurality of proximally extending protrusions circumferentially disposed relative to each other. The protrusions are shaped and sized to deflect the movable element of the rotational sensor. An illustrative embodiment of such a sensed member is the tubular flange 38 best seen in Figure 3 , Figure 5 , Figure 8 and Figure 9 . The embodiments described herein can be provided for a dose button removably attachable to the delivery device or a module integrated within the dose button of the delivery device.

[0069] During dose delivery, the dose setting screw 32 rotates freely relative to the dose button 30. In the illustrative embodiment, the electronic assembly 76 is rotationally fixed to the dose button 30 and does not rotate during dose delivery.

[0070] As Figure 2 , Figure 3 and Figure 5As seen, the dose button 30 includes a cap 56 coupled to a support 42. The electronic assembly 76 can be at least partially received within a compartment 85 defined between the cap 56 and the support. In some embodiments, the cap and the support have corresponding splines that engage with each other to couple the cap and the support together. For example, in some embodiments, the cap 56 can be coupled to the support 42 via one or more latches 57 on the cap 56 that correspond to one or more protrusions 43 on the support. As Figure 5 and 6 seen, the latches 57 on the cap 56 can point radially inward from the inner circumferential sidewall 73. As Figure 5 、 Figure 10 and Figure 11 seen, the protrusions 43 on the support 42 can point radially outward from the outer circumferential sidewall 75 of the support 42. The protrusions 43 can form a triangular ramp shape.

[0071] The latches 57 on the cap 56 are configured to snap onto and mate with the protrusions 43 on the support to couple the cap to the support. In some embodiments, the protrusions on the support include a continuous annular protrusion around the outer circumferential sidewall of the support. The cap 56 can be attached to the support 42 via friction engagement, interference fit, or any other suitable fit. In some embodiments, the cap 56 is permanently fixed to the support 42 during assembly, such as via ultrasonic welding, adhesives, or other suitable fixing methods.

[0072] As Figure 8 and Figure 9 seen, the tubular flange 38 can include a plurality of axially directed teeth 102 that are equally radially spaced about the axis of rotation and arranged in relation to the equivalent of one dose unit. In this illustrative embodiment, the tubular flange 38 includes 20 teeth 102 that are equally rotationally spaced from each other such that the rotational distance between two adjacent teeth corresponds to an 18-degree rotation. Thus, for Figure 8 the tubular flange 38, an 18-degree rotation of the tubular flange 38 can be used to represent one dose unit or half a dose unit. It should be appreciated that in other embodiments, a different total number of teeth can be used to produce other angular relationships, such as for example 9 degrees, 10 degrees, 15 degrees, 18 degrees, 20 degrees, 24 degrees, or 36 degrees can be used for one unit or 0.5 units.

[0073] A recess 124 can be defined between each pair of adjacent teeth 102. Each tooth 102 can have an approximately triangular profile, each profile having a surface 120 against which the contact surface 111 of the sensor can slide.

[0074] In some embodiments, a sensor for detecting rotation of a tubular flange includes a movable element having a contact portion that is configured to rest against teeth of the tubular flange and is spring-biased such that the contact surface is configured to slide against and past the teeth as the flange rotates relative to the actuator assembly during dose delivery. The sensor responds to the contact portion moving past the teeth and generates a signal corresponding to the flange. The controller responds to the signal generated by the sensor to determine a dose count to determine the dose delivered based on the detected rotation of the flange relative to the actuator assembly during dose delivery.

[0075] The contact surface may be biased against a physical feature of the tubular flange to ensure proper contact between the contact surface and the physical feature during rotation. In one embodiment, the movable element is an elastic member having a portion attached to the actuator at a location displaced from the contact surface. In one example, the movable element is a follower member including a beam attached to the actuator at one end and having a contact surface at the other end. The beam is flexed to urge the contact surface along the direction of the surface feature. Alternatively, the movable element may be biased in any of a variety of other ways. In addition to using an elastic beam, for example, biasing may be provided by using a spring member. Such a spring member may include, for example, a compression, tension, or torsion coil spring. In still other embodiments, the movable element may be biased against the surface feature of the sensed element by a separate elastic member or spring member that bears against the movable element.

[0076] Figure 5 An illustrative embodiment of a sensor 86 is depicted having a contact surface 111 that interacts with teeth 102 of a tubular flange 38. As the flange 38 rotates relative to the dose button 30 during delivery, the teeth 102 of the flange contact the contact surface 111 of the sensor 86 and slide against it, causing the contact surface 111 to move in an oscillatory manner. The movement of the contact surface 111 may be a combination of axial and lateral movement as the contact surface 111 slides into and out of recesses 124 defined between the teeth 102 of the flange 38. The sensor 86 may be configured to track the movement of the contact surface 111 and correlate the movement with an output signal sent to the controller.

[0077] As an alternative to the teeth on the tubular flange, the surface features that interact with the sensor can include anything that can be detected by the sensor. For example, the sensor arrangement can be based on various sensed properties, including tactile, optical, electrical, and magnetic properties. In the illustrative embodiment shown in the figures, the surface feature is a physical feature that allows detection of incremental movement when the dose setting assembly rotates relative to the actuator assembly. In alternative embodiments, the sensor can be a piezoelectric sensor, a magnetic sensor (such as a Hall effect sensor), an accelerometer for detecting vibrations of, for example, a ratchet or other stop mechanism (where the vibrations can be related to rotational movement), an optical sensor (such as a reflective sensor), an interrupter sensor, or an optical encoder, or any other sensor suitable for sensing the rotation of the first component relative to the second component.

[0078] In some embodiments, when the user axially presses on the face 60 of the dose button 30, the dose button 30 is advanced distally relative to the housing 12, thereby compressing the spring 68. Continuing to press the dose button 30 distally causes reverse driving of the dose setting screw 32 in a helical direction relative to the housing 12. As a result, the dose setting screw 32 and the flange 38 are driven to rotate by axially pressing on the dose button 30. In some embodiments, the dose detection system is operable to perform dose detection only when the dose button is pressed.

[0079] In some embodiments, the electronic assembly can include a clock or timer to determine the time elapsed between counts caused by triggering the rotation sensor from the surface features of the sensed element. This can be used to indicate that a dose has been completed when the controller has not detected a count after a period of time.

[0080] In some embodiments, a single sensing system can be employed to perform both dose detection sensing and wake-up activation. For example, when the sensor initially senses rotation of the sensed element, the controller is configured to allow waking up or activating the electronic assembly to a greater or full power state. The wake-up feature is configured to allow power to be transferred from a power source (shown as a battery) to power the electronic components for dose sensing, so as to minimize unintentional power loss or use when no dose dispensing event occurs. In other embodiments, a separate wake-up switch can be provided and arranged within the dose button housing and triggered when the dose button is in its distal position. After activating the electronic assembly, the controller begins receiving the generated signals from the rotation sensor, which indicate the counts from the first to the last to obtain the total number of counts for determining the total angular displacement and thus the amount of dose delivered.

[0081] In some embodiments, an electronic assembly may have a controller configured to receive an output signal from a rotational sensor. The controller of the electronic assembly may be programmed to convert an intermediate signal into an adjusted digital signal, which may be a single stepped / square wave having a predetermined width representative of a predetermined time. In some embodiments, output signals below a predetermined level may be filtered out and ignored.

[0082] As described herein, a printed circuit board (e.g., printed circuit board 77) may include various processing circuitry and / or logic that generates data based on the operation of a drug delivery device. For example, the processing circuitry may count the number of times a sensor (e.g., sensor 86) is activated or triggered during an injection to determine the dose size of the injection (e.g., the dose of a particular insulin injection). As described herein, the relative rotational movement between the dose setting assembly and the actuator of the drug delivery device may be sensed in order to determine the amount of dose delivered by the drug delivery device, since the sensed relative rotational movement may be related to the amount of dose delivered.

[0083] Figure 12 is an exemplary schematic diagram of a printed circuit board 1200 according to some embodiments. The printed circuit board 1200 (e.g., printed circuit board 77) includes various components, including a sensor 1202 (e.g., Figure 6 the sensor 86 in ) that is in electrical communication with a microcontroller 1204. The printed circuit board 1200 includes a set of pads 1206, 1208, 1210, 1212, 1214, 1216, 1218, 1220, and 1222 that are in electrical communication with the microcontroller 1204. These pads may be used to connect electrical components to the microcontroller 1204, such as for testing and / or similar operations. Some of the pads (such as pads 1208, 1210, 1212, 1214, 1216, and 1218) may not communicate with the microcontroller 1204 by default. For example, the microcontroller may initially be programmed (e.g., via associated registers) such that some of the pads do not communicate electrically with the microcontroller 1204 (e.g., via programmable switches or resistors). One or more of the pads may be placed in electrical communication with a logic input, such as a (plural) general purpose input / output (GPIO) pin of the microcontroller 1204. As an example, the microcontroller may be programmed to modify internal programmable components (e.g., one or more pull-up resistors and / or pull-down resistors) in order to place the pad in electrical communication with the logic input.

[0084] In some embodiments, the GPIO pin inputs of the microcontroller 1204 can be logic level inputs. If a voltage higher than a certain maximum threshold is applied to the GPIO pin, the microcontroller 1204 can detect a logic 1, and if a voltage lower than a certain minimum threshold is applied to the GPIO pin, the microcontroller 1204 can detect a logic 0. Some pads on the printed circuit board can be connected to a voltage source. For example, pad 1220 can provide the battery voltage Vbat. As another example, pad 1206 can provide Vdcdc from a DC / DC converter.

[0085] As described herein, the microcontroller 1204 (e.g., including based on inputs from the sensor 1202) is operable to process dose data and / or other data of the drug delivery device. For example, the microcontroller 1204 can be configured to store the total angular movement for determining dose delivery and / or the detected dose delivery in a local memory (e.g., internal flash memory or on-board EEPROM). The microcontroller 1204 can further be operable to wirelessly transmit signals representative of the total count, total angular movement, and / or detected dose to an external device, such as a user's mobile device or a remote server (e.g., via the BLE control logic and controller integrated on the printed circuit board 1200).

[0086] As described herein, in some embodiments, the drug delivery device includes a sensor (e.g., Figure 6 sensor 86 in Figure 12 sensor 1202 in

[0087] ), which detects the movement of the sensed member and provides an output representative of the movement of the sensed member. For example, the sensor can generate a signal indicating whether the sensor is in an engaged state or a disengaged state. Figure 5 and Figures 8 - 9 ), the sensor can be in an engaged state. When the contact portion of the sensor does not contact the teeth, such as when the contact portion is positioned in a recess (e.g., Figures 8 - 9 recess 124 in Figure 5 ), between the teeth of the tubular flange of the drug delivery device, the sensor can be in a disengaged state.

[0088] Additionally or alternatively, in some embodiments, the state of the sensor depends on the sensor arrangement. As described herein, for example, the sensor arrangement can be based on various sensed properties, including tactile, optical, electrical, and magnetic properties. The sensor can be a piezoelectric sensor, a magnetic sensor (such as a Hall effect sensor), an accelerometer for detecting vibrations, an optical sensor, an interrupter sensor, or an optical encoder, or any other sensor suitable for sensing the rotation of the first component relative to the second component. Thus, it should be appreciated that when the sensor senses any suitable sensed property, the sensor can be considered to be in an engaged state, and when the sensor does not sense the sensed property, the sensor can be considered to be in a disengaged state, or vice versa.

[0089] In some embodiments, the sensor generates a signal in response to its interaction with the sensed component. For example, when the contact portion of the sensor contacts the teeth of the tubular flange (e.g., the sensor is in an engaged state), the sensor can generate a signal in a first logic state. When the contact portion of the sensor does not contact the sensed component (e.g., when the contact portion is positioned in the recess between the teeth, or when the sensor is in a disengaged state), the sensor can generate a signal in a second logic state different from the first logic state. For example, the first logic state of the signal can be an active state (e.g., logic 1, high state, etc.), and the second logic state of the signal can be an inactive state (e.g., logic 0, low state, etc.), or vice versa.

[0090] Thus, in some embodiments, the generated signal can be used to determine the rotation of the sensor relative to the sensed component. Continuing with the example of the tubular flange (e.g., tubular flange 38), when the signal transitions between the first logic state and the second logic state five times, this can indicate that the contact portion of the sensor slides against and past five teeth of the drug delivery device. Given the spacing between the teeth, it may be possible to determine the rotation of the dose setting assembly within the drug delivery device. As described herein, then, the rotation of the dose setting assembly can be used to determine the drug dose delivered using the drug delivery device. The drug dose can be determined by the controller of the drug delivery device or by a separate device in communication with the drug delivery device based on data indicative of the rotation of the dose setting assembly.

[0091] However, the signal output by the sensor can be noisy, making it challenging to use the signal to determine whether the sensor is in an engaged state or a disengaged state. For example, when the sensor begins to engage with the sensed component, it can briefly lose contact with the sensed component, such that the signal output by the sensor briefly transitions to the second logic state when it should remain in the first logic state. For example, when the contact portion of the sensor begins to slide past the teeth of the tubular flange, its leading edge can bounce up, causing it to briefly lose contact with the teeth.

[0092] Figure 13 is an exemplary graph showing signals received from a sensor of a drug delivery device. Line 1310 indicates the time at which the sensor of the drug delivery device actually transitions between an engaged state (point "B" along the y-axis) and a disengaged state (point "A" along the y-axis). For example, this may correspond to the contact portion of the sensor sliding past two teeth of a tubular flange of the drug delivery device. Line 1320 indicates the time at which the signal output by the sensor transitions between a valid state (e.g., a first logic state, or point "B" along the y-axis) and an invalid state (e.g., a second logic state, or point "A" along the y-axis). As shown, the number of times the signal transitions between the valid state and the invalid state is several times more than the number of times the switch actually transitions between the engaged state and the disengaged state. Thus, counting the number of times the signal is in the valid state to infer the number of times the sensor is in the engaged state will result in an overestimation of this value. This will in turn lead to an inaccurate determination of the rotation of the dose setting assembly, which will lead to an inaccurate estimation of the drug dose delivered using the drug delivery device.

[0093] Accordingly, the inventors have developed techniques for filtering signals from the sensor such that the signals can be used to more reliably determine when the sensor has transitioned between the engaged state and the disengaged state. In turn, these techniques can more reliably and accurately estimate the rotation of the dose setting assembly and more reliably and accurately determine the drug dose delivered using the drug delivery device.

[0094] In some embodiments, the techniques for filtering the signal include using one or more hardware components. For example, a printed circuit board of the drug delivery device (e.g., Figure 12 the printed circuit board 1200 therein) may include one or more components for filtering the signals received from the sensor. As a non-limiting example, the printed circuit board may include a resistor-capacitor circuit.

[0095] Figure 14 is an exemplary schematic diagram of a printed circuit board having a resistor-capacitor (RC) circuit according to some embodiments. As shown, the printed circuit board 1400 includes a dose detector component 1420 and a system clock 1430, each of which is in electrical communication with a microcontroller 1410. However, it should be appreciated that the printed circuit board 1400 may include one or more additional or alternative components, such as those described herein (including at least those regarding Figures 5 - 7 and Figure 12 ).

[0096] In some embodiments, the microcontroller 1410 uses the system clock 1430 to track time. The system clock 1430 may include an oscillator circuit, the frequency of which can be used to track time. The oscillator circuit may include a resistor-capacitor (RC) oscillator circuit, an inductor-capacitor (LC) oscillator circuit, a crystal oscillator circuit, or any other suitable oscillator circuit, as aspects of the techniques described herein are not limited in this regard. However, it should be appreciated that the system clock 1430 is not limited to an oscillator circuit and may include any other suitable clock, as aspects of the technology are not limited in this regard.

[0097] In some embodiments, the dose detector component 1420 includes a switch 1422 and an RC circuit 1424. In some embodiments, the switch 1422 includes a part of a sensor (e.g., Figures 5 - 7 the sensor 86 in ) that is configured to detect the position and / or movement of a sensed component (such as the teeth of a tubular flange). For example, the switch may be configured to close when the contact portion of the sensor physically contacts the sensed component and to open when the contact portion does not physically contact the sensed component, or vice versa.

[0098] Thus, in some embodiments, the RC circuit 1424 is configured to receive a signal from the sensor when the switch 1422 closes and transmit the filtered signal to the microcontroller 1410. In alternative embodiments, the microcontroller 1410 is configured to receive the signal directly from the sensor when the switch 1422 closes.

[0099] In some embodiments, the RC circuit 1424 is configured to filter the signal received from the switch 1422. The RC circuit 1424 may include a resistor 1424a and a capacitor 1424b. The resistance of the resistor 1424a and the capacitance of the capacitor 1424b can be selected such that the RC circuit 1424 acts as a low-pass filter. For example, the RC circuit can be configured to filter out noise in the signal, such as momentary signal invalidation that occurs when the sensor is actually in the engaged state and / or momentary signal validation that occurs when the sensor is actually in the disengaged state. Thus, it should be appreciated that the resistor can have any suitable resistance and the capacitor can have any suitable capacitance, as aspects of the technology are not limited in this regard.

[0100] In some embodiments, the RC circuit is configured to act as a low-pass filter with respect to only one or two types of signal transitions (e.g., a transition of the signal from a second logic state to a first logic state and / or a transition of the signal from a first logic state to a second logic state). For example, as Figure 15 shown, the RC circuit operates as a low-pass filter when the signal transitions from a valid state to an invalid state. Thus, as described herein,Figure 15 In the example of, the RC circuit can be configured to filter out high-frequency noise when the sensor transitions to the disengaged state.

[0101] In some embodiments, the RC circuit 1424 transmits the filtered signal to the microcontroller 1410. The microcontroller 1410 can include any suitable microcontroller, such as the microcontroller 1204 described herein (including at least the microcontroller Figure 12 ). In some embodiments, the microcontroller 1410 receives the filtered signal through a GPIO pin input. The GPIO pin input can be a logic level input. If a voltage higher than a certain maximum threshold is applied to the GPIO pin, the microcontroller 1410 can detect a logic one (1), and if a voltage lower than a certain minimum threshold is applied to the GPIO pin, the microcontroller 1410 can detect a logic zero (0).

[0102] Although the RC circuit 1424 can function to filter out unwanted noise, there may be some limitations associated with the use of the RC circuit 1424, such as the limitations described herein (including at least the limitations Figure 15 ).

[0103] Figure 15 is an exemplary graph showing a signal received from a sensor of a drug delivery device and filtered using an RC circuit according to some embodiments. As shown, line 1510 indicates the time when the sensor of the drug delivery device actually transitions between the engaged state and the disengaged state. Line 1530 indicates the analog signal output from the RC circuit (such as the RC circuit 1424 shown Figure 14 ). Line 1520 indicates the digital signal received and processed by the microcontroller of the drug delivery device (such as the microcontroller 1410 shown Figure 14 ).

[0104] In some embodiments, when the contact portion of the sensor contacts the sensed component, the switch 1422 closes, allowing the RC circuit 1424 to charge. When the RC circuit charges, the analog signal 1530 received by the microcontroller is indicated by the portion of the analog signal 1530 that transitions in the positive y direction to point "B".

[0105] In some embodiments, when the analog signal 1530 exceeds the threshold 1560a, the digital signal 1520 transitions to a valid state. For example, as Figure 15As shown, when the analog signal 1530 exceeds the threshold 1560a, the digital signal 1520 transitions along the y-axis from point “A” to point “C”, which respectively correspond to the invalid state and the valid state of the signal 1520. In some embodiments, the threshold 1560a may include any suitable threshold, as aspects of the techniques described herein are not limited in this regard.

[0106] In some embodiments, when the contact portion of the sensor is no longer in contact with the sensed component, the switch 1422 opens, causing the RC circuit 1424 to discharge. When the RC circuit discharges, the analog signal 1530 received by the microcontroller is indicated by the portion of the analog signal 1530 that transitions downward in the negative y-direction from point “B”.

[0107] In some embodiments, when the analog signal 1530 drops below the threshold 1560b, the digital signal 1520 transitions to the invalid state. For example, as Figure 15 shown, when the analog signal 1530 drops below the threshold 1560b, the digital signal 1520 transitions along the y-axis from point “C” to point “A”.

[0108] In some embodiments, the RC circuit charges at a faster rate than it discharges. Thus, as Figure 15 shown, after the sensor has transitioned to the detached state, the microcontroller may continue to receive a non-zero analog signal 1530, as indicated by line 1510. This may also result in a delay, such as delay 1550, between the time the sensor transitions to the detached state and the time the analog signal 1530 drops below the threshold 1560b. This delay may depend on the nature of the RC circuit used to filter the signal received from the switch. For example, the range of delay 1550 may be from 20 to 120 μs.

[0109] In some embodiments, the signal transition delay does not affect the result of the downstream processing of the signal 1520. For example, the first validity of the digital signal 1520 corresponds to an occurrence of the sensor transitioning to the engaged state. Even with the delay 1550, the delay 1550 does not affect the calculation of the number of occurrences of the sensor transitioning to the engaged state during the period when the digital signal 1520 is in the valid state.

[0110] However, in some embodiments, the signal transition delay does affect the downstream processing result of signal 1520. For example, the second valid of digital signal 1520 corresponds to two occurrences of the sensor transitioning to the engaged state. As shown, since the RC circuit discharges too slowly after the sensor transitions from the engaged state to the disengaged state, the analog signal 1530 decreases, but does not decrease below the threshold 1560b before the sensor transitions back to the engaged state. Thus, the digital signal 1520 does not transition to the invalid state, and the result cannot be used to reliably detect the two occurrences of the sensor transitioning to the engaged state.

[0111] In some embodiments, this limitation can be addressed by adjusting the RC circuit to allow higher frequencies to pass through (e.g., such that line 1530 more closely follows line 1510). However, such an adjustment can also allow more noise to pass through the RC circuit, resulting in inaccurate estimates of both the number of times the sensor transitions to the engaged state and the drug dose delivered by the drug delivery device.

[0112] Accordingly, the inventors have developed additional or alternative techniques for filtering signals received from a sensor of a drug delivery device.

[0113] Figures 16A - 16B is a flowchart showing an exemplary method 1600 for filtering signals received from a sensor of a drug delivery device according to some embodiments. For example, method 1600 can be implemented on any suitable processor (such as, microcontroller 1204, microcontroller 1410, and / or one or more processors external to the drug delivery device).

[0114] At step 1602, for example, the processor receives data indicating a signal from a sensor of the drug delivery device (such as, Figures 5 - 7 sensor 86 in Figure 12 and sensor 1202 in Figure 14The RC circuit 1424) in receives the signal after filtering the signal. Additionally or alternatively, the processor may receive data indicative of the signal after any suitable preprocessing steps have been used to process the signal. Additionally or alternatively, the processor may receive data indicative of a signal from a different processor. For example, the processor may be external to the drug delivery device and receive data indicative of a signal from a microcontroller included in the drug delivery device. In some embodiments, the raw or processed signal from the sensor 1202 may be stored in the memory for a certain period of time before the processor receives the data.

[0115] In some embodiments, the processor continues to receive data indicative of the signal during subsequent steps of process 1600. For example, the steps of process 1600 may be performed while the signal is being generated, and the processor may receive and process data indicative of a newly generated portion of the signal at any time during process 1600.

[0116] At step 1604, the processor detects a transition of the signal from a second logic state (e.g., an invalid state) to a first logic state (e.g., a valid state) based on the received data. For simplicity, the transition of the signal from the second logic state to the first logic state may be referred to herein as an "up transition". It should be noted that the term "up transition" is most suitable for embodiments in which the first logic state corresponds to a valid or high logic state and the second logic state corresponds to an invalid or low logic state, such that when the signal transitions from the first logic state to the second logic state, the signal "rises" from a low state to a high state. However, as previously discussed, the present disclosure also contemplates embodiments in which the first logic state corresponds to an invalid or low logic state and the second logic state corresponds to a valid or high logic state. The use of the term "up transition" herein as Figure 16A and Figure 16B part of does not imply exclusion of such alternative embodiments.

[0117] In some embodiments, the processor is configured to determine the time point (e.g., a first time point) at which the up transition occurs. The processor may use any suitable technique to determine the time point. As an illustrative example, the processor may use an interrupt handler to determine the time point, which is implemented using software that is executed on or configured to be executed on the processor. In some embodiments, the interrupt handler is configured to record a timestamp indicative of the time point at which the up transition occurs. For example, the interrupt handler may record the timestamp according to a timer included in the drug delivery device. Additionally or alternatively, the processor may determine the time point by polling a timer included in the drug delivery device.

[0118] At step 1606, the processor determines whether a transition of the signal from the first logic state to the second logic state occurs within the first time period. For simplicity, the transition of the signal from the first logic state to the second logic state may be referred to herein as a "fall transition". It should be noted again that the term "fall transition" is most suitable for embodiments in which the first logic state corresponds to an active or high logic state and the second logic state corresponds to an inactive or low logic state, such that when the signal transitions from the first logic state to the second logic state, the signal "falls" from the high state to the low state. However, as previously discussed, the present disclosure also contemplates embodiments in which the first logic state corresponds to an inactive or low logic state and the second logic state corresponds to an active or high logic state. The use of the term "fall transition" herein as Figure 16A and Figure 16B part of does not imply exclusion of such alternative embodiments.

[0119] In some embodiments, the first time period begins at the time point (e.g., the first time point) at which the rising transition occurs, as determined at step 1604. In some embodiments, the duration of the first time period depends on the amount of time that the sensor is expected to be in the engaged state. For example, when the sensor is expected to be in the engaged state for up to one second, the duration of the first time period may be approximately one second (e.g., between 750 ms and 1.25 s, between 800 ms and 1.2 s, between 900 ms and 1.1 s, 1 s, etc.). However, aspects of the technology are not limited in this regard, and the first time period may have any suitable duration.

[0120] In some embodiments, if a fall transition is detected within the first time period, process 1600 proceeds to step 1608. If a fall transition is not detected within the first time period, process 1600 proceeds to step 1612.

[0121] At step 1608, the processor detects the fall transition of the signal based on the data received at step 1602 or the data received at any time during process 1600. In some embodiments, the processor is configured to determine the time point (e.g., the second time point) at which the fall transition occurs. The processor may use any suitable technique to determine the time point. For example, the processor may use an interrupt handler to determine the time point, and the interrupt handler is implemented using software that is executed or configured to be executed on the processor. In some embodiments, the interrupt handler is configured to record a timestamp indicating the time point at which the fall transition occurs. For example, the interrupt handler may record the timestamp according to a timer included in the drug delivery device. Additionally or alternatively, the processor may determine the time point by polling a timer included in the drug delivery device.

[0122] At step 1610, the processor determines whether another rising transition of the signal occurs within the first time period and after a second time point (e.g., the time at which the falling transition occurs). In some embodiments, if another rising transition occurs within the first time period, process 1600 returns to step 1604, at which the rising transition is detected. If no additional rising transition occurs within the first time period, process 1600 proceeds to step 1612.

[0123] At step 1612, the processor determines whether the signal is in a first logic state within the first time period for an accumulated time period equal to or exceeding a first threshold duration. In some embodiments, the signal is considered to be in the first logic state during the time elapsed between the rising transition of the signal and the falling transition of the signal. For example, the accumulated time period may include the amount of time elapsed between a first time point (e.g., determined at step 1604) and a second time point (e.g., determined at step 1608). If there is another rising transition within the first time period at step 1610, the accumulated time period may also include the amount of time elapsed between the time point at which the rising transition occurs and the time point at which either (a) the end of the first time period, or (b) another falling transition occurs within the first time period. The logic described in the previous sentence may be applied to any further rising transitions within the first time period other than the first and second rising transitions. In some embodiments, if it is determined at step 1606 that no falling transition occurs within the first time period, the accumulated amount of time may include the amount of time elapsed between the first time point and the end of the first time period.

[0124] In some embodiments, the first threshold duration may include any suitable duration less than or equal to the duration of the first time period. As a non-limiting example, the first threshold duration may be 70% of the duration of the first time period, 75% of the duration of the first time period, 80% of the duration of the first time period, 85% of the duration of the first time period, 90% of the duration of the first time period, 100% of the duration of the first time period, or any other suitable threshold duration. In some embodiments, the first threshold duration may depend on the expected duration of sensor engagement and / or the expected noise frequency (e.g., an instantaneous transition of the signal to a second logic state) when the sensor engages a sensed component (e.g., a tooth) of the drug delivery device. For example, a relatively low first threshold duration will account for more noise when determining that the sensor is in an engaged state compared to a relatively high first threshold duration. In some embodiments, once the processor determines that the signal has been in the first logic state within the first time period for an accumulated time period equal to the first threshold duration, the processor may stop measuring the accumulated time period for which the signal is in the first logic state.

[0125] At step 1614, the processor determines whether the sensor transitions from a disengaged state to an engaged state at a first time point. If the cumulative time period determined at step 1612 is equal to or exceeds a first threshold duration, the processor determines that the sensor has transitioned from a disengaged state to an engaged state at the first time point. In some embodiments, the occurrence of such a transition can be included in a count indicating the number of transitions of the sensor between the disengaged state and the engaged state. In some embodiments, this count can be used to determine the dosage of the drug delivered using the drug delivery device. If the cumulative time period is not equal to or does not exceed the first threshold duration, the processor determines that the sensor has not transitioned from the disengaged state to the engaged state.

[0126] At step 1616, the processor determines whether a downward transition occurs after a first time period. If no downward transition occurs after the first time period, process 1600 ends. If a downward transition does occur after the first time period, process 1600 proceeds to Figure 16B step 1618 as shown in. Additionally or alternatively, although not shown in Figure 16A if the cumulative time period is equal to or exceeds the first threshold duration, the processor can transition to Figure 16B step 1618 as shown in after the first threshold duration and / or after the first time period.

[0127] At step 1618, the processor detects a downward transition of the signal based on the data received at step 1602 or any data received during process 1600. In some embodiments, the processor is configured to determine the time point (e.g., a third time point) at which the downward transition occurs. The processor can use any suitable technique to determine the time point. For example, the processor can use an interrupt handler, such as the interrupts described herein (including at least the interrupt regarding step 1608). Additionally or alternatively, the processor can determine the time point by polling a timer included in the drug delivery device.

[0128] At step 1620, the processor determines whether the signal is in the second logic state for an accumulated period of time that is equal to or exceeds a second threshold duration during a second time period. In some embodiments, the second time period begins at the time point at which the falling transition occurs (e.g., the third time point), as determined at step 1618. In some embodiments, the duration of the second time period depends on the amount of time that the sensor is expected to be in the off state. For example, when the sensor is expected to be in the off state for up to one second, the duration of the second time period may be approximately one second (e.g., between 300 ms and 1.7 s, between 400 ms and 1.6 s, between 500 ms and 1.5 s, between 600 ms and 1.4 s, between 700 ms and 1.3 s, between 750 ms and 1.25 s, between 800 ms and 1.2 s, between 900 ms and 1.1 s, 1 s, etc.). However, aspects of the technology are not limited in this regard, and the second time period may have any suitable duration.

[0129] In some embodiments, during the time elapsed between the falling transition of the signal and the rising transition of the signal, the signal is considered to be in the second logic state. For example, the accumulated period may include the amount of time elapsed between the third time point (e.g., determined at step 1618) and a later time point at which a rising transition occurs during the second time period (e.g., the fourth time point). If there is another falling transition after the fourth time point and within the second time period, the accumulated period may also include the amount of time elapsed between the time point at which the falling transition occurs and the time point at which either (a) the end of the second time period, or (b) a time point at which another rising transition occurs within the second time period. The logic described in the previous sentence may be applied to any further falling transitions other than the first and second falling transitions within the second time period. In some embodiments, if no rising transition occurs after the third time point and within the second time period, the accumulated period may include the amount of time elapsed between the third time point and the end of the second time period.

[0130] In some embodiments, the second threshold duration can be any suitable duration that is less than or equal to the duration of the second time period. As a non-limiting example, the second threshold duration can be 70% of the duration of the second time period, 75% of the duration of the second time period, 80% of the duration of the second time period, 85% of the duration of the second time period, 90% of the duration of the second time period, 100% of the duration of the second time period, or any other suitable second threshold duration. In some embodiments, the second threshold duration can depend on the expected duration of sensor detachment and / or the expected noise frequency (e.g., an instantaneous signal transition to a first logic state) when the sensor disengages from a sensed component (e.g., a tooth) of the drug delivery device. The second threshold duration can be the same as or different from the first threshold duration.

[0131] At step 1622, the processor determines whether the sensor of the drug delivery device transitions between an engaged state and a disengaged state at a third time point. If the cumulative time period determined at step 1620 is equal to or exceeds the second threshold duration, the processor determines that the drug delivery device transitions between the engaged state and the disengaged state. If the cumulative time period is not equal to or does not exceed the second threshold duration, the processor determines that the drug delivery device does not transition between the engaged state and the disengaged state.

[0132] At step 1624, the processor determines whether another rising transition of the signal occurs after the second time period. If a rising transition does occur, process 1600 returns to Figure 16A step 1604 as shown. If a rising transition does not occur, process 1600 ends.

[0133] For simplicity, Figure 16A and Figure 16B depict an exemplary process for determining whether the sensor transitions from the disengaged state to the engaged state (or vice versa), where a first logic state corresponds to an active or high logic state and where a second logic state corresponds to an inactive or low logic state. This does not imply that the present disclosure excludes embodiments in which the first logic state corresponds to an inactive or low logic state and where the second logic state instead corresponds to an active or high logic state. In such an alternative embodiment, appropriate modifications can be made to Figure 16A and Figure 16B For example, the term "rising transition" can be replaced with the term "falling transition" (and vice versa). Similarly, the term "active state" or "active threshold duration" can be replaced with the term "inactive state" or "inactive threshold duration" (and vice versa).

[0134] Figure 17FIG. is an exemplary schematic diagram of a system 1700 for detecting rising and falling transitions of a signal received from a sensor of a drug delivery device. As shown, system 1700 includes a clock 1702, a timer 1704, a rising transition interrupt handler 1716, and a falling transition interrupt handler 1718. However, it should be appreciated that a system for detecting rising and / or falling transitions may include one or more additional or alternative components, as aspects of the techniques described herein are not limited in this regard.

[0135] In some embodiments, the rising transition interrupt handler 1716 is configured to detect a rising transition 1708 of the signal 1714 and record a timestamp 1706 indicating the time point at which the rising transition 1708 occurs. For example, according to the timer 1704, the timestamp 1706 indicates that the rising transition 1708 occurs at count 158.

[0136] In some embodiments, the rising transition interrupt handler 1716 is an interrupt configured to detect a rising transition 1708 of the signal 1714 and / or record a timestamp at which the rising transition 1708 occurs. For example, the rising transition interrupt handler 1716 may be implemented using software executed on or configured to be executed on a processor, such as a processor configured to execute Figures 16A - 16B the process 1600 shown in.

[0137] In some embodiments, the timer 1704 is any suitable timer, such as, for example, a timer configured to increment a count from an initial time. For example, the clock 1702 may cause the timer 1704 to increment a count from the time of assembling the drug delivery device. In some embodiments, the timer 1704 may be configured to increment a count at a certain rate (e.g., in one-second increments) to a specific value and then start over from the beginning when it reaches that value. For example, the clock 1702 may drive an 11-bit counter to increment in one-second increments to 2,047. When the counter reaches 2,047, it restarts from 0. In some embodiments, to track the cumulative time elapsed since the initial time, the system 1700 is configured to record each time the counter restarts. In some embodiments, the timer 1704 is included in the drug delivery device. For example, the timer may be included on a printed circuit board (PCB) of the drug delivery device. In some embodiments, the timer 1704 is external to the drug delivery device.

[0138] In some embodiments, the clock 1702 includes any suitable clock, such as, for example Figure 14The system clock 1430 as shown. In some embodiments, the clock 1702 is included in the drug delivery device. For example, the clock 1702 may be included on the PCB of the drug delivery device. In some embodiments, the clock 1702 is external to the drug delivery device.

[0139] In some embodiments, the falling edge interrupt handler 1718 is configured to detect the falling edge 1710 of the signal 1714 and record a timestamp 1712 indicating the time point at which the falling edge 1710 occurs. For example, according to the timer 1704, the timestamp 1712 indicates that the falling edge 1710 occurs at count 297.

[0140] In some embodiments, the falling edge interrupt handler 1718 is an interrupt configured to detect the falling edge 1710 of the signal 1714 and / or record the timestamp at which the falling edge 1710 occurs. For example, the falling edge interrupt handler 1718 may be implemented using software executed on or configured to be executed on a processor, such as a processor configured to execute Figures 16A - 16B the process 1600 as shown.

[0141] In some embodiments, the timestamps 1706, 1712 recorded by the interrupt handlers 1716, 1718 can be used to determine the duration during which the signal 1714 is in a particular state. In Figure 17 the example, the signal 1714 is in the active state for a duration defined by the difference between the time point indicated by the timestamp 1706 and the time point indicated by the timestamp 1712. As shown, the signal 1714 is in the active state for 139 counts, which is equal to the difference between 297 and 158. If the timer 1704 is configured to increment the count in one microsecond increments, the duration during which the signal is in the active state is 139 microseconds. In some embodiments, if the timer 1704 restarts its count at some time between the occurrence of the rising edge 1708 and the falling edge 1710 (e.g., restarts from 0), additional information may be used to determine the amount of time elapsed between these two occurrences. Such additional information may include, for example, the maximum value to which the timer 1704 is configured to increment the count and / or the number of times the timer 1704 restarts its count.

[0142] Figure 18 is an exemplary graph showing the integration of a signal received from a sensor of a drug delivery device according to some embodiments. As shown, line 1810 indicates the time at which the sensor of the drug delivery device actually transitions between the engaged state and the disengaged state. Line 1820 indicates the signal received from the sensor of the drug delivery device. Line 1830 indicates the cumulative time period during which the signal 1820 is in the active state and / or the inactive state.

[0143] In some embodiments, the signal 1820 is received by the processor. In some embodiments, the processor is configured to process the signal by performing some or all of the processes 1600 described herein (including at least the processes regarding Figures 16A - 16B ).

[0144] For example, in some embodiments, the processor may detect or be configured to detect the first rising transition of the signal 1820. When detecting the first rising transition, the processor may determine the first time point at which the first rising transition occurs. For example, the processor may use a software-implemented interrupt handler to record a timestamp indicating the first time point at which the first rising transition occurs. Additionally or alternatively, in some embodiments, the first time point may not correspond to the first rising transition. For example, the first time point may include any suitable time point determined in any suitable manner, such as a time point before or after the first rising transition, as aspects of the techniques described herein are not limited in this regard. For example, upon detecting each rising transition of the signal, the first time period may slide substantially along the time to search for the first instance of a series of signals that causes the signal to be in an active state for a first threshold duration (e.g., an active threshold duration).

[0145] In some embodiments, the first time point marks the start of the first time period, as Figure 18 shown. The processor may further detect or be configured to detect additional rising transitions and / or falling transitions that occur within the first time period after the first time point. This may include, for example, determining the time points at which each rising transition and / or falling transition occurs during the first time period, such as the second time point at which the first falling transition occurs. As shown, three additional rising transitions and three falling transitions of the signal 1820 occur within the first time period.

[0146] In some embodiments, the processor may determine or be configured to determine whether the sensor transitions between a disengaged state and an engaged state at the first time point. In some embodiments, this includes determining whether the sensor is in an active state for an accumulated time period equal to or exceeding an active threshold duration (T A ) within the first time period.

[0147] In some embodiments, determining the cumulative time period includes: (a) determining the amount of time elapsed between each rising transition and falling transition within a first time period, and (b) summing the determined amounts of time. For example, line 1830 shows the integration of signal 1820 over the first time period. Between each rising transition and falling transition within the first time period, when signal 1820 is in an active state, line 1830 rises by the amount of time elapsed during the signal active period. In other words, the amount of time elapsed is included in the cumulative time period. However, between each falling transition and rising transition, when signal 1820 is in an inactive state, line 1830 does not increase. In other words, the amount of time elapsed during the signal inactive period is not included in the cumulative time period. In some embodiments, when there is a rising transition within the first time period that is not followed by a falling transition, as shown by the last rising transition in the first time period in Figure 18 the cumulative time period includes the time elapsed between the time point at which the rising transition occurs and the end time point of the first time period.

[0148] In some embodiments, if the cumulative time period is equal to or exceeds a valid threshold duration (T A ), the processor determines that the sensor transitions to an engaged state at a first time point. As shown in the example of Figure 18 during the first time period, the cumulative time period indicated by line 1830 is equal to the valid threshold duration (T A ). Thus, even if there is noise (e.g., momentary signal inactivity) within the first time period, the processor still correctly determines that the sensor transitions to an engaged state at the first time point.

[0149] In some embodiments, after determining that the sensor transitions to an engaged state at a first time point, the processor may evaluate the quality of signal 1820. In some embodiments, such an evaluation may include determining the number of rising transitions and / or falling transitions of the signal within the first time period. For example, during the first time period shown in Figure 18 there are four rising transitions (including the first rising transition) and three falling transitions. In some embodiments, if the number of rising transitions and / or falling transitions is equal to or exceeds a specified threshold (e.g., the signal is very noisy), this may indicate that there may be a problem with the sensor, and thus, there may be a lower confidence associated with determining that the sensor transitions to an engaged state. In some embodiments, when this occurs, even if the processor previously determined that the sensor transitions to an engaged state (e.g., before the quality evaluation), the processor may ignore the transition.

[0150] In some embodiments, the processor may provide an output indicative of the quality of the signal. For example, when the number of rising transitions and / or falling transitions exceeds a threshold, the processor may provide an output that advises the user to manually check the dose administered by the drug delivery device to confirm the accuracy of the estimate based on the signal. Additionally or alternatively, the processor may provide the output as part of a quality control process. For example, during manufacturing, the processor may output a metric indicative of the number of rising transitions and / or falling transitions in the signal, which can then be compared to a predicted value. If there is a difference between these two values, the drug delivery device being tested and / or the manufacturing process may be flagged as a potential problem.

[0151] In some embodiments, the processor may further detect or be configured to detect a falling transition of signal 1820 that occurs after a first time period. In Figure 18 the example, a falling transition occurs at a third time point after the first time period. In some embodiments, when detecting the falling transition, the processor may determine the third time point at which the falling transition occurs. For example, the processor may use a software-implemented interrupt handler to record a timestamp indicative of the third time point at which the falling transition occurs. Additionally or alternatively, in some embodiments, the third time point may not correspond to the falling transition. For example, the third time point may correspond to the end of the first time period. For example, when each falling edge is detected, a second time period may slide substantially in time to search for a first instance of a series of signals that causes the signal to be in an invalid state for a second threshold duration (e.g., an invalid threshold duration). As described above, the first time period may additionally or alternatively slide in time to perform the detections described herein.

[0152] In some embodiments, the third time point marks the start of the second time period, as Figure 18 shown. The processor may further detect or be configured to detect additional falling transitions and / or rising transitions that occur within the second time period after the third time point. This may include, for example, determining the time points at which each falling transition and / or rising transition occurs during the second time period. As indicated, two additional falling transitions and two rising transitions of signal 1820 occur within the second time period.

[0153] In some embodiments, the processor may determine or be configured to determine whether the sensor transitions between an engaged state and a disengaged state at the third time point. In some embodiments, this includes determining whether the sensor is in an invalid state for an accumulated time period equal to or exceeding an invalid threshold duration (T D ).

[0154] In some embodiments, determining the cumulative time period includes: (a) determining the amount of time elapsed between each falling transition and rising transition during a second time period, and (b) summing the determined amounts of time. For example, line 1830 shows the integration of signal 1820 during the second time period. Between each falling transition and rising transition during the second time period, when signal 1820 is in an inactive state, line 1830 rises by the amount of time elapsed during the signal inactivity. In other words, the amount of time elapsed is included in the cumulative time period. However, between each rising transition and falling transition, when signal 1820 is in an active state, line 1830 does not increase. In other words, the amount of time elapsed during the signal activity is not included in the cumulative time period. In some embodiments, when there is a falling transition during the second time period that is not followed by a rising transition, as shown by the last falling transition in the second time period in Figure 18 , the cumulative time period includes the time elapsed between the time point at which the falling transition occurs and the end time point of the second time period.

[0155] In some embodiments, if the cumulative time period is equal to or exceeds the inactive threshold duration (T D ), the processor determines that the sensor transitions to a disengaged state at a third time point. As shown in the example of Figure 18 , during the second time period, the cumulative time period indicated by line 1830 is equal to the inactive threshold duration (T D ). Thus, even if there is noise (e.g., momentary signal activity) during the second time period, the processor still correctly determines that the sensor transitions to a disengaged state at the third time point.

[0156] In some embodiments, these techniques can be configured to process the signal as it is being received (e.g., in real time during signal reception and / or processing). This approach can, for example, achieve memory savings because a complete signal does not need to be saved for the drug delivery device. In some embodiments, these techniques can be configured to store the received signal and process the stored signal at a later time point according to the techniques described herein (i.e., non-real time during signal reception and / or processing). Although this technique may require more memory compared to processing the signal upon reception, this technique can allow for multiple passes of processing the signal, etc., such that the signal can be processed in various ways to determine the (multiple) best ways to analyze the signal to determine the active and inactive states.

[0157] It should be appreciated that various time periods (such as, a first time period and / or a second time period) are configurable and may change over time when processing a signal. In some embodiments, the first time period is different from the second time period. In some embodiments, the first time period is the same as the second time period. In some embodiments, multiple different first time periods and / or second time periods may be used in accordance with the techniques described herein.

[0158] Although depicted in the context of embodiments in which a first logical state corresponds to an active or high logical state and in which a second logical state corresponds to an inactive or low logical state Figure 18 , other embodiments are possible in which the first logical state corresponds to an inactive state and in which the second logical state corresponds to an inactive state. In such alternative embodiments, appropriate modifications may be made Figure 18 . For example, line 1820 of the signal may be reversed such that whenever line 1810 indicates that the sensor is in an engaged state, signal 1820 occupies an inactive state, and similarly, whenever line 1810 indicates that the sensor is in a disengaged state, signal 1820 occupies an active state. The active threshold duration (T A ) may be modified to become an inactive threshold duration (T D ). During the first time period, the cumulative time period indicated by line 1830 may correspond to the cumulative amount of time that signal 1820 has spent in an inactive state rather than an active state. The inactive threshold duration (T D ) may be modified to become an active threshold duration (T A ). During the second time period, the cumulative time period indicated by line 1830 may correspond to the cumulative amount of time that signal 1820 has spent in an active state rather than an inactive state.

[0159] In some embodiments, the processor may determine a quality metric based on the processing of signal 1820. The metric may include any suitable metric, such as for example, the ratio between the number of times the sensor is determined to have transitioned to an engaged state and the number of rising transitions in the signal. Additionally or alternatively, the metric may include the ratio between the number of times the sensor transitions to a disengaged state and the number of falling transitions in the signal.

[0160] In some embodiments, quality metrics may be output to a user, where the user is a user of a drug delivery device such as a user, a healthcare provider, and / or a user involved in manufacturing and / or testing a drug delivery device. In some embodiments, the quality metric may indicate a problem with a sensor of the drug delivery device, such as for example when the ratio between a signal transition and a sensor transition is large (e.g., indicating noisy signals). Additionally or alternatively, when the quality metric indicates a problem, suggestions may be output to the user to check the sensor, manually check the dose delivered using the drug delivery device, and / or output any other suitable suggestions, as aspects of the technology are not limited in this regard.

[0161] The devices described herein are generally the reusable pen-shaped drug injection devices as labeled, which are manually handled by the user to selectively set a dose and then inject the set dose. This type of injection device is well known, and the description of the device is merely illustrative, as the sensing system can be adapted for use in a variety of configured drug delivery devices, including differently configured pen-shaped drug injection devices, differently shaped injection devices, and infusion pump devices. The drug can be any device of the type that can be delivered by such a drug delivery device. The device is intended to be illustrative and not restrictive, as the sensing system described further below can be used in other differently configured devices.

[0162] Techniques operating in accordance with the principles described herein can be implemented in any suitable manner. The processing and decision blocks of the above flowcharts represent steps and actions that can be included in algorithms implementing these various processes. The algorithms resulting from these processes can be implemented as software integrated with and guiding the operation of one or more single-use or multi-use processors, can be implemented as functionally equivalent circuitry (such as, digital signal processing (DSP) circuitry or application specific integrated circuit (ASIC)), or can be implemented in any other suitable manner. It should be appreciated that the flowcharts included herein do not depict any particular circuitry or any particular programming language or syntax or operation of a programming language type. Instead, the flowcharts illustrate functional information that a person skilled in the art can use to fabricate circuitry or implement a computer software algorithm to perform the processing of a particular device implementing the techniques described herein. It should also be appreciated that, unless otherwise indicated herein, the specific order of the steps and / or actions described in each flowchart merely illustrates the algorithms that can be implemented, and can be changed in the implementations and embodiments of the principles described herein.

[0163] Thus, in some embodiments, the techniques described herein may be embodied in computer-executable instructions implemented as software, including as application software, system software, firmware, middleware, embedded code, or any other suitable type of computer code. Such computer-executable instructions may be written using any of several suitable programming languages and / or programming or scripting tools, and may also be compiled into executable machine language code or intermediate code for execution on a framework or virtual machine.

[0164] When the techniques described herein are embodied as computer-executable instructions, these computer-executable instructions may be implemented in any suitable manner, including as a number of functional facilities, each providing one or more operations to complete the execution of an algorithm that operates in accordance with these techniques. However, a "functional facility" is instantiated as a structural component of a computer system that, when integrated with and executed by one or more computers, causes the one or more computers to perform a particular operational role. A functional facility may be part of or an entire software component. For example, a functional facility may be implemented as a function of a process, or a discrete process, or any other suitable processing unit. If the techniques described herein are implemented as multiple functional facilities, each functional facility may be implemented in its own way; not all functional facilities need to be implemented in the same way. Additionally, these functional facilities execute in parallel and / or serially as appropriate, and may communicate with each other using shared memory on the (multiple) computers on which they are executing, using a messaging protocol, or in any other suitable way.

[0165] Generally, functional facilities include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. Generally, the functionality of functional facilities may be combined or distributed as needed within the systems in which they operate. In some implementations, one or more functional facilities implementing the techniques herein may together form a complete software package. In alternative embodiments, these functional facilities may be adapted to interact with other unrelated functional facilities and / or processes to implement a software program application.

[0166] Some example functional facilities for implementing one or more tasks have been described herein. However, it should be appreciated that the described functional facilities and task partitioning merely illustrate the types of functional facilities that may implement the exemplary techniques described herein, and embodiments are not limited to implementing with any particular number, partitioning, or type of functional facilities. In some implementations, all functionality may be implemented in a single functional facility. It should also be appreciated that in some implementations, some of the functional facilities described herein may be implemented together with or separately from other functional facilities (i.e., as a single unit or separate units), or some of these functional facilities may not be implemented.

[0167] In some embodiments, computer-executable instructions for implementing the techniques described herein (when implemented as one or more functional facilities or otherwise) may be encoded on one or more computer-readable media to provide functionality to the media. Computer-readable media include magnetic media (such as hard disk drives), optical media (such as compact discs (CDs) or digital versatile discs (DVDs)), persistent or non-persistent solid-state memories (e.g., flash memories, magnetic RAM, etc.), or any other suitable storage medium. Such computer-readable media may be implemented in any suitable manner. As used herein, "computer-readable media" (also referred to as "computer-readable storage media") refers to tangible storage media. Tangible storage media are non-transitory and have at least one physical, structural component. In "computer-readable media" as used herein, at least one physical, structural component has at least one physical property that can be changed in some way during the process of creating the medium with embedded information, during the process of recording information thereon, or during any other process of encoding the medium with information. For example, the magnetization state of a portion of the physical structure of a computer-readable media can be changed during the recording process.

[0168] Further, some of the techniques described above include actions for storing information (e.g., data and / or instructions) for use by these techniques. In some implementations of these techniques - such as those in which the techniques are implemented as computer-executable instructions - the information may be encoded on a computer-readable storage medium. Where specific structures are described herein as advantageous formats for storing such information, these structures may be used to impart a physical organization to the information when it is encoded on the storage medium. These advantageous structures may then provide functionality to the storage medium by affecting the operation of one or more processors that interact with the information; for example, by increasing the efficiency of computer operations performed by the processor(s).

[0169] In some but not all implementations in which these techniques may be embodied as computer-executable instructions, the instructions may be executed on one or more suitable computing devices operating in any suitable computer system, or one or more computing devices (or one or more processors of one or more computing devices) may be programmed to execute the computer-executable instructions. When the instructions are stored in a data storage device (e.g., on-chip cache or instruction register, computer-readable storage medium accessible via a bus, computer-readable storage medium accessible via one or more networks and accessible by the device / processor, etc.) in a manner accessible to the computing device or processor, the computing device or processor may be programmed to execute the instructions. The functional facilities including these computer-executable instructions may be integrated with and direct the operation of: a single general-purpose programmable digital computing device, a coordinated system of two or more general-purpose computing devices sharing processing capabilities and jointly implementing the techniques described herein, a single computing device or a coordinated system of computing devices (co-located or geographically distributed) dedicated to executing the techniques described herein, one or more field-programmable gate arrays (FPGAs) for implementing the techniques described herein, or any other suitable system.

[0170] The computing device may include at least one processor, a network adapter, and a computer-readable storage medium. The computing device may be, for example, a desktop or laptop personal computer, a personal digital assistant (PDA), a smartphone, a server, or any other suitable computing device. The network adapter may be any suitable hardware and / or software that enables the computing device to communicate wired and / or wirelessly with any other suitable computing device via any suitable computing network. The computing network may include wireless access points, switches, routers, gateways, and / or other networking equipment, and any suitable one or more wired and / or wireless communication media for exchanging data between two or more computers, including the Internet. The computer-readable medium may be adapted to store data to be processed and / or instructions to be executed by the processor. The processor enables data to be processed and instructions to be executed. The data and instructions may be stored on the computer-readable storage medium.

[0171] The computing device may additionally have one or more components and peripherals, including input devices and output devices. These devices may be used in particular to present a user interface. Examples of output devices that may be used to provide a user interface include a printer or display screen for visual presentation of output, and a speaker or other sound-generating device for auditory presentation of output. Examples of input devices that may be used for a user interface include a keyboard and a pointing device, such as a mouse, a touchpad, and a digitizing tablet. As another example, the computing device may receive input information by voice recognition or in other audible formats.

[0172] Embodiments have been described in which these techniques are implemented in circuitry and / or computer-executable instructions. It should be appreciated that some embodiments may take the form of a method, and at least one example of which has been provided. The acts performed as part of the method may be ordered in any suitable way. Accordingly, embodiments may be constructed in which the acts are performed in an order different from that illustrated, which may include performing some acts simultaneously, even though shown as sequential acts in the illustrative embodiments.

[0173] The various aspects of the embodiments described above may be used alone, in combination, or in a variety of arrangements not specifically discussed in the embodiments described above, and thus, in their application, are not limited to the details and arrangements of the components set forth in the foregoing description or illustrated in the drawings. For example, aspects described in one embodiment may be combined with aspects described in other embodiments in any manner.

[0174] The use of ordinal terms such as "first," "second," "third," etc. in the claims to modify claim elements does not by itself imply any priority, precedence, or order of one claim element over another, or the temporal order of acts of a method, but is merely used as a label to distinguish one claim element having a certain name from another element having the same name (if the ordinal term is not used) in order to distinguish these claim elements.

[0175] Moreover, the language and terminology used herein are for the purpose of description and should not be regarded as limiting. The use herein of "including," "comprising," "having," "containing," "involving" and variations thereof is intended to cover the items listed hereinafter and their equivalents, as well as additional items.

[0176] The word "exemplary" is used herein to mean serving as an example, instance, or illustration. Thus, unless otherwise indicated, any embodiment, implementation, process, feature, etc. described herein as exemplary should be understood as an illustrative example and not as a preferred or advantageous example.

[0177] For purposes of clarification and to hereby publicly state, the applicant defines the phrase " 、 , …… and <n>at least one of < / n> 、 、…… <n>or at least one of its combinations< / n> 、 , …… and / or <n>”, unless the applicant expressly states to the contrary, supersedes any other implicit definition in the foregoing or the following, and means one or more elements selected from the group consisting of A, B, ……, and N. In other words, these phrases mean any combination of one or more of the elements A, B, ……, and N, including any one of the elements alone or a combination of that one element with one or more of the other elements, and the other elements may also include combinations of additional elements not listed.

[0178] Although various embodiments have been described, it will be apparent to those of ordinary skill in the art that many additional embodiments and implementations are possible. Accordingly, the embodiments described herein are examples and not the only possible embodiments and implementations. In addition, the advantages described above are not necessarily the only advantages, and it is not necessarily expected that every embodiment will achieve all of the advantages described.

[0179] Various aspects are described in the present disclosure, and these aspects include but are not limited to the following aspects:

[0180] 1. A method for filtering a signal output from a sensor of a drug delivery device, wherein the sensor is operable to transition between an engaged state and a disengaged state, in the engaged state, the signal output from the sensor is in a first logic state, and in the disengaged state, the signal output from the sensor is in a second logic state, the method comprising: detecting a first transition of the signal from the second logic state to the first logic state, the first transition occurring at a first time point; determining whether the signal is in the first logic state for a cumulative period equal to or exceeding a first threshold duration within a first time period starting from the first time point; and when the cumulative period is equal to or exceeding the first threshold duration, determining that the sensor of the drug delivery device transitions from the disengaged state to the engaged state at the first time point.

[0181] 2. The method according to claim 1, further comprising: when the cumulative period is not equal to or exceeding the first threshold duration, determining that the sensor of the drug delivery device does not transition from the disengaged state to the engaged state.

[0182] 3. The method according to any one of claims 1 to 2, further comprising: receiving data indicative of a signal from a sensor of the drug delivery device.

[0183] 4. The method according to any one of claims 1 to 3, further comprising: detecting a second transition of the signal from the first logic state to the second logic state, the second transition occurring at a second time point after the first time point and within the first time period, wherein the cumulative time period includes a first amount of time elapsed between the first time point and the second time point.

[0184] 5. The method according to claim 4, further comprising: detecting a third transition of the signal from the second logic state to the first logic state, the third transition occurring at a third time point after the second time point and within the first time period; and detecting a fourth transition of the signal from the first logic state to the second logic state, the fourth transition occurring at a fourth time point after the third time point and also within the first time period, wherein the cumulative time period includes a second amount of time elapsed between the third time point and the fourth time point, but does not include the time elapsed between the second time point and the third time point.

[0185] 6. The method according to any one of claims 4 to 5, wherein detecting the second transition comprises: using a first interrupt handler to record the second time point at which the second transition occurs.

[0186] 7. The method according to any one of claims 1 to 6, wherein detecting the first transition comprises: using a second interrupt handler to record the first time point at which the first transition occurs.

[0187] 8. The method according to any one of claims 1 to 7, wherein determining that the sensor of the drug delivery device transitions between the states further comprises: determining whether the number of signal transitions occurring within the first time period exceeds a threshold; and determining that the sensor of the drug delivery device transitions from the disengaged state to the engaged state only if the number of signal transitions does not exceed the threshold.

[0188] 9. The method according to any one of claims 1 to 8, further comprising: detecting a fifth transition of the signal from the first logic state to the second logic state, the fifth transition occurring at a fifth time point after the first time period.

[0189] 10. The method according to claim 9, further comprising: determining whether the signal is in the second logic state for a second cumulative time period equal to or exceeding a second threshold duration within a second time period starting at the fifth time point; and when the second cumulative time period is equal to or exceeding the second threshold duration, determining that the sensor of the drug delivery device transitions from the engaged state to the disengaged state at the fifth time point.

[0190] 11. The method according to claim 10, further comprising: detecting a sixth transition of the signal from the second logic state to the first logic state, the sixth transition occurring at a sixth time point after the fifth time point and within the second time period, wherein the second cumulative time period includes the amount of time elapsed between the fifth time point and the sixth time point.

[0191] 12. The method according to any one of claims 10 to 11, wherein: the duration of the first time period is different from the second duration of the second time period; or the first threshold duration is different from the second threshold duration; or both.

[0192] 13. The method according to any one of claims 1 to 12, further comprising: detecting a seventh transition of the signal from the second logic state to the first logic state, the seventh transition occurring at a seventh time point; determining whether the signal is in the first logic state for a third cumulative time period equal to or exceeding the first threshold duration within a third time period starting at the seventh time point; and when the third cumulative time period is equal to or exceeding the first threshold duration, determining that the sensor of the drug delivery device transitions from the disengaged state to the engaged state at the seventh time point.

[0193] 14. The method according to any one of claims 1 to 13, further comprising: determining the number of sensor transitions occurring within a fourth time period starting at the first time point, wherein the number of sensor transitions indicates the amount of drug delivered using the drug delivery device.

[0194] 15. The method according to any one of claims 1 to 14, wherein: the first logic state includes an active state; and the second logic state includes an inactive state.

[0195] 16. A non - transitory computer - readable storage medium comprising instructions that, when executed by one or more processors on a computing device, are operable to cause the one or more processors to perform the method according to any one of claims 1 to 15.

[0196] 17. A drug delivery device, comprising: a housing including a reservoir sized to accommodate a drug; a printed circuit board; a sensor mounted to the printed circuit board and operable to output a signal, wherein the sensor is operable to transition between an engaged state and a disengaged state, in which the signal output from the sensor is in a first logic state in the engaged state and in a second logic state in the disengaged state; and a microcontroller in electrical communication with the sensor via a logic input to the microcontroller, wherein the microcontroller is configured to: receive the signal output from the sensor; and based on the received signal, determine at least in part whether the sensor has transitioned between the disengaged state and the engaged state by: determining whether the signal is in the first logic state for an accumulated time period equal to or exceeding a first threshold duration within a first time period starting at a first time point, the first time point corresponding to the first transition of the signal from the second logic state to the first logic state; and when the accumulated time period is equal to or exceeding the first threshold duration, determining that the sensor has transitioned from the disengaged state to the engaged state.

[0197] 18. The drug delivery device according to claim 17, wherein the microcontroller is configured to: when the accumulated time period is not equal to or exceeding the first threshold duration, determine that the sensor has not transitioned from the disengaged state to the engaged state.

[0198] 19. The drug delivery device according to any one of claims 17 to 18, further comprising a rotatable element rotatable relative to the printed circuit board, the rotatable element having a series of protrusions spaced apart from each other, the rotatable element positioned to allow the protrusions to slide against the sensor as the rotatable element rotates to move the sensor between the engaged state and the disengaged state.

[0199] 20. The drug delivery device according to any one of claims 17 to 19, further comprising a resistor-capacitor (RC) circuit electrically coupled to the sensor and the microcontroller, wherein the signal is a filtered signal, and wherein the RC circuit is configured to: receive an unfiltered signal from the sensor; and transmit the filtered signal to the microcontroller.

[0200] 21. The drug delivery device according to any one of claims 17 to 19, further comprising a timer configured to incrementally count from an initial time point.

[0201] 22. The drug delivery device according to claim 21, wherein determining whether the sensor has transitioned between the disengaged state and the engaged state further comprises: detecting a first transition of the signal; and using the timer to determine a first time point at which the first transition occurred.

[0202] 23. The drug delivery device according to any one of claims 21 to 22, wherein determining whether the sensor has transitioned between the disengaged state and the engaged state further comprises: detecting a second transition of the signal from the first logic state to the second logic state, the second transition occurring at a second time point after the first time point and within the first time period; using the timer to determine the second time point at which the second transition occurred; and determining an amount of time elapsed between the first time point and the second time point.

[0203] 24. The drug delivery device according to any one of claims 17 to 23, further comprising a drug contained within the reservoir.

[0204] 25. The drug delivery device according to claim 24, wherein the drug is insulin.< / n>

Claims

1. A method for filtering a signal output from a sensor of a drug delivery device, wherein, The sensor is operable to transition between an engaged state and a disengaged state, in which an engaged state, a signal output from the sensor is in a first logic state, and in the disengaged state, the signal output from the sensor is in a second logic state. The method includes: Detecting a first transition of the signal from the second logic state to the first logic state, the first transition occurring at a first time point; Determining whether the signal is in the first logic state for an accumulated time period equal to or exceeding a first threshold duration within a first time period starting from the first time point; and When the accumulated time period is equal to or exceeds the first threshold duration, determining that the sensor of the drug delivery device transitions from the disengaged state to the engaged state at the first time point.

2. The method according to claim 1, further comprising: When the accumulated time period is not equal to or does not exceed the first threshold duration, determining that the sensor of the drug delivery device does not transition from the disengaged state to the engaged state.

3. The method according to any one of claims 1 to 2, further comprising: Receiving data indicating a signal from the sensor of the drug delivery device.

4. The method according to any one of claims 1 to 3, further comprising: Detecting a second transition of the signal from the first logic state to the second logic state, the second transition occurring at a second time point after the first time point and within the first time period, wherein the accumulated time period includes a first amount of time elapsed between the first time point and the second time point.

5. The method according to claim 4, further comprising: Detecting a third transition of the signal from the second logic state to the first logic state, the third transition occurring at a third time point after the second time point and within the first time period; and Detecting a fourth transition of the signal from the first logic state to the second logic state, the fourth transition occurring at a fourth time point after the third time point and also within the first time period, wherein the accumulated time period includes a second amount of time elapsed between the third time point and the fourth time point, but does not include the time elapsed between the second time point and the third time point.

6. The method according to any one of claims 4 to 5, wherein, Detecting the second transition includes: using a first interrupt handler to record the second time point at which the second transition occurs.

7. The method according to any one of claims 1 to 6, wherein, Detecting the first transition includes: using a second interrupt handler to record the first time point at which the first transition occurs.

8. The method according to any one of claims 1 to 7, wherein, Determining that the sensor of the drug delivery device transitions between the states further includes: Determining whether the number of signal transitions occurring within the first time period exceeds a threshold; and Determining that the sensor of the drug delivery device transitions from the disengaged state to the engaged state only when the number of signal transitions does not exceed the threshold.

9. The method according to any one of claims 1 to 8, further comprising: Detecting a fifth transition of the signal from the first logic state to the second logic state, the fifth transition occurring at a fifth time point after the first time period.

10. The method according to claim 9, further comprising: Determining whether the signal is in the second logic state for a second accumulated time period equal to or exceeding a second threshold duration within a second time period starting from the fifth time point; And When the second cumulative time period is equal to or exceeds the second threshold duration continuously, it is determined that the sensor of the drug delivery device transitions from the engaged state to the disengaged state at the fifth time point.

11. The method according to claim 10, further comprising: Detect a sixth transition of the signal from the second logic state to the first logic state, the sixth transition occurring at a sixth time point after the fifth time point and within the second time period, wherein the second cumulative time period includes the amount of time elapsed between the fifth time point and the sixth time point.

12. The method according to any one of claims 10 to 11, wherein: The duration of the first time period is different from the second duration of the second time period; or The first threshold duration is different from the second threshold duration; or both situations exist.

13. The method according to any one of claims 1 to 12, further comprising: Detect a seventh transition of the signal from the second logic state to the first logic state, the seventh transition occurring at a seventh time point; Determine whether the signal is in the first logic state within a third cumulative time period that is equal to or exceeds the first threshold duration during a third time period starting from the seventh time point; and When the third cumulative time period is equal to or exceeds the first threshold duration, determine that the sensor of the drug delivery device transitions from the disengaged state to the engaged state at the seventh time point.

14. The method according to any one of claims 1 to 13, further comprising: Determine the number of sensor transitions that occur within a fourth time period starting from the first time point, wherein the number of sensor transitions indicates the amount of drug delivered using the drug delivery device.

15. The method according to any one of claims 1 to 14, wherein: The first logic state includes an active state; and The second logic state includes an inactive state.

16. A non - transitory computer - readable storage medium comprising instructions that, when executed by one or more processors on a computing device, are operable to cause the one or more processors to execute the method according to any one of claims 1 to 15.

17. A drug delivery device, comprising: A housing that includes a reservoir sized to hold a drug; A printed circuit board; A sensor mounted to the printed circuit board and operable to output a signal, wherein the sensor is operable to transition between an engaged state and a disengaged state, in the engaged state, the signal output from the sensor is in a first logic state, and in the disengaged state, the signal output from the sensor is in a second logic state; and A microcontroller that is in electrical communication with the sensor via a logic input to the microcontroller, wherein the microcontroller is configured to: Receive the signal output from the sensor; and Based on the received signal, at least partially determine whether the sensor has transitioned between the disengaged state and the engaged state by the following steps: Determine whether the signal is in the first logic state within a first cumulative time period that is equal to or exceeds the first threshold duration during a first time period starting from a first time point, the first time point corresponding to the first transition of the signal from the second logic state to the first logic state; and When the cumulative time period is equal to or exceeds the first threshold duration, determine that the sensor has transitioned from the disengaged state to the engaged state.

18. The drug delivery device according to claim 17, wherein, The microcontroller is configured to: when the cumulative time period is not equal to or does not exceed the first threshold duration, determine that the sensor has not transitioned from the disengaged state to the engaged state.

19. The drug delivery device according to any one of claims 17 to 18, further comprising a rotatable element that is rotatable relative to the printed circuit board, the rotatable element having a series of protrusions spaced apart from each other, the rotatable element being positioned such that when the rotatable element rotates, it allows the protrusions to slide against the sensor to move the sensor between the engaged state and the disengaged state.

20. The drug delivery device according to any one of claims 17 to 19, further comprising a resistor - capacitor (RC) circuit electrically coupled to the sensor and the microcontroller, wherein, The signal is a filtered signal, and wherein the RC circuit is configured to: Receive an unfiltered signal from the sensor; and Transmit the filtered signal to the microcontroller.

21. The drug delivery device according to any one of claims 17 to 19, further comprising a timer configured to incrementally count from an initial time point.

22. The drug delivery device according to claim 21, wherein, Determining whether the sensor has transitioned between the disengaged state and the engaged state further includes: Detecting a first transition of the signal; and Using the timer to determine a first time point at which the first transition occurs.

23. The drug delivery device according to any one of claims 21 to 22, wherein, Determining whether the sensor has transitioned between the disengaged state and the engaged state further includes: Detecting a second transition of the signal from the first logic state to the second logic state, the second transition occurring at a second time point after the first time point and within the first time period; Using the timer to determine a second time point at which the second transition occurs; and Determining an amount of time elapsed between the first time point and the second time point.

24. The drug delivery device according to any one of claims 17 to 23, further comprising a drug contained in the reservoir. The drug delivery device according to claim 24, wherein, The drug is insulin.

Citation Information

Patent Citations

  • Medication injector apparatus with drive assembly that facilitates reset

    US7195616B2

  • Medication dispensing apparatus with triple screw threads for mechanical advantage

    US7291132B2

  • Automatic injection device with delay mechanism including dual functioning biasing member

    US8734394B2