Reference no: EM13375965
A medical infusion pump operates in the following manner:
The user selects the infusion rate between 00.0 and 99.9 ml per hour by acting on buttons on a key pad. The selected rate is displayed on a connected LCD Display. There is a button to allow adjustment of 10's of ml, a button for 1's of ml and a button for 1/10 ml.
Only one button is pressed at a time and the corresponding displayed digit is incremented on each button press, or, if the button is held down will increment with a rate of change each half second.
The selected rate is stored within the pump. When a START button is pressed, the system generates drive impulses to a uni-polar stepper motor where each step is 7.5° of shaft movement i.e. 48 drive impulses to the stepper will create 360° of output angular movement from the stepper motor. When the STOP button is pressed the drive and hence actuator stops movement.
The stepper motor is connected via a 64:1 gear reduction to an M6 drive shaft with a 1mm pitch. This means that one rotation of the gearbox output will cause a captive nut mechanism attached to the drive shaft to advance by 1mm.
The captive nut mechanism holds the plunger of a 50ml capacity medical syringe which is dimensioned such that 1.8mm of plunger travel will cause 1ml of fluid to be exited from the syringe. The following FIGURE ONE details the arrangement:
![237_Medical infusion pump.png](https://secure.expertsmind.com/CMSImages/237_Medical%20infusion%20pump.png)
THE EMBEDDED SYSTEM
TASKS:
1. Calculate the number of steps per second required to deliver fluid at the commanded rate taking into account the step angle of the motor, the gear reduction, the pitch of the drive screw moving the captive nut and finally the syringe calibration detail.
2. Design an embedded solution using 5 pushbutton switches, an LCD Display Module, a ULN2003 Darlington driver and stepper motor. The stepper motor will rotate by one angular increment at each change of the digital code applied to its coils (phases). As an example a project called PROJECT_STEPPER is supplied for your reference to give you the idea of how to drive the stepper. This folder contains a schematic and shows the use of PORTC to drive the stepper through the ULN2003 as shown below:
![1867_Medical infusion pump1.png](https://secure.expertsmind.com/CMSImages/1867_Medical%20infusion%20pump1.png)
3. Your design solution should be capable of simulation using the Proteus ISIS tools. Create the project schematic as PROJECT_SOLUTION.dsn. You should use the supplied LCD library LCD.c and LCD.h. All necessary switches should be de-bounced. The STOP switch should be immediate in operation so taken to an external interrupt input RB0.
4. Carefully design an embedded solution based on the 18F25K22 microcontroller and using a state machine method to allow the user to set and display a rate and, when the START button is pressed, cause the stepper and hence the fluid delivery to commence. The stepping rate should be LINEAR throughout the range 00.0 to 99.9 ml/h! You must devise a suitable method to minimise any step error.
5. Fully utilize MPLAB and Proteus ISIS to simulate your design.
6. Whilst you should work in your group to produce a working design you must submit a full and INDIVIDUAL report of your work.