Friday, May 4, 2012

Final Project: Block Diagram


Block Diagram

The following diagram illustrates the hardware and software components of InhaleSur. The inputs for the device are the amount of shaking performed by the user and the button, which is used to determine when the canister has been compressed. The outputs for the device are the three displays on the LCD screen: “ready to use,” “uses remaining,” and “refill required.” When the inhaler is shaken with some quantifiable acceleration, the accelerometer measures this value in terms of x, y, and z components. The Arduino algorithm then determines whether any one of the x, y, or z acceleration values are greater than 800. The threshold of acceleration was set to 800 based on experimental testing which indicated that resting acceleration was around 400, while forceful shaking was around 800. The accelerometer outputs a value between 0 and 1023 corresponding to a voltage between 0 volts and 5 volts. Therefore, a threshold of acceleration of 800 corresponds to a voltage of 3.9 volts. Once the user has reached an x, y, or z acceleration greater than or equal to 800, the user than has 500 milliseconds to surpass the acceleration threshold again. The user must repeat this pattern 12 times, which correlates to a shaking time of 6 seconds. If the user does this in less than 500 milliseconds, the timer immediately restarts for the next 500 milliseconds interval. If the user does not meet the threshold 12 times consecutively, the algorithm restarts.
 Once the threshold has been reached 12 times, the Arduino prints “ready to use” on the LCD screen. The user then compresses the inhaler canister once to deliver the medication. When compressed, the canister also compresses a button on the inside of the InhaleSur case. When the button is compressed, one “use” is subtracted from an internal counter, and then the remaining uses are printed on the LCD screen. If the number of uses remaining is equal to zero, the Arduino prints “refill required” on the LCD screen. The block diagram in Figure 1 also demonstrates the Arduino’s connection to a power source and to a computer via a USB connection.


No comments:

Post a Comment