
Drug Infusion Pump
some glimpses

Introduction to Project
When we heard about the word drug infusion pump it was just like riddle for us that made us curious to make this project. In addition infusion pumps are must need of every hospital as anytime serious emergency can occur. Looking at the inflation being increased day by day in Pakistan this pump has a high price in international market so in order to make it easier to buy for a common men of pakistan we designed this project. It basicaaly injects specific amount of medicine we want to deliver to patient in its required time. e.g 5ml/hr.

The Problem
The main problem is that there are such types of patients which require a very very small amount of medicine in a very less time e.g suger patients, asthma patients and many more. There need is 1ml/hr or 5ml/hr. There are drips comparison to infusion pump but the drip is set by human hands and human hands has errors and these small errors can risk a life of patient.
Solution of the problem
This device will help in vastly helping those patients and reduce the risk of loosing there life. It has efficiency to deliver drug in required time as per need.
Design requirements
We want to design a Portable infusion pump that can be carried anywhere. it should look attractive as well as should not be of very large volume. We have resources of 3D-Printing in FabLab and also the facility of Laser-cut Acrylic sheet, utilizng these two resources we wanted to design a product that can be carried anywhere with great portability and lesser size.
Project Execution Plan
We help our clients keep projects on track and realize their vision for improved patient care.
1- Literature Review
2- Understanding the working principle of components
3- deveolping a PCB
4- Fabrication of PCB
5- First soldering the components required by the ATMEGA328p to burn the bootloader and test it.
6- Energizing the circuit and troubleshooting all the errors
7- After getting desireable results, Designing the 3D hardware case.
8- Preparing final Product.

Deligation of Task

Bill Of Material
S.No: | Device | Description | Prize |
---|---|---|---|
1. | ATMEGA328p microchip | resistors,capacitors,etc. | 850/- |
2. | Stepper Motor | A4988 motor driver | 1500/- |
3. | Rotatory encoder & LCD | 450/- | |
4. | Other | PCB, wire, board ,connectors etc | 300/- |

Literature Review
As a starting point we were looking for a prototype which we can implement. We thought of a effective model which looks attractive and more efficient. we went through some websites mentioned below:
The most helpful website we found was jieywoo project. In that we found an easy ways to drive the motor and mainly we found a path for our project that in which way we have to take our project.
Features and Design Requirements
The requirements for our design are already menationed above i.e aurduino, stepper motor, LCD, Rotatory Encoder. The features we wanted to add were infusing rate, if patients condition becomes critical stop the motor, syringe back to its position when infused, bolus function i.e if we want to change the flow rate in between running. An attractive user interface menu system.
Brief Description of Major Components
ATmega328P is a high performance yet low power consumption 8-bit AVR microcontroller that's able to achieve the most single clock cycle execution of 131 powerful instructions. Its fast in operation as compare to others. It has built in digital and analog pins thorugh which a user can read or write its instructions.

A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. The 16 x 2 intelligent alphanumeric dot matrix display is capable of displaying 224 different characters and symbols. This LCD has two registers, namely, Command and Data. Through its I2C protocol we can operate it on only 4 wires namely as Data(DT), Clock(CLK), VCC and GND.
=> Dimension: 85.0 x 29.5 x 13.5 mm
=> Weight: 35 g
=> Communication protocol: IIC
=> Operating Voltage: 3.3-5V
=> Display color: White

3. Stepper Motor description:
A stepper motor, also known as step motor or stepping motor, is a brushless DC electric motor that divides a full rotation into a number of equal steps. The motor's position can be commanded to move and hold at one of these steps without any position sensor for feedback (an open-loop controller). It requires 200 steps to make a complete full cycle. It has 4 wires internally connected in pair of 2's. Advantages of step motors are low cost, high reliability, high torque at low speeds and a simple, rugged construction that operates in almost any environment. It operates through its A4988 driver.
Technical Specifications
=>Operating voltage: 7.5 to 9V DC
=>Current consumption: 1.68 mA.

The A4988 is a complete microstepping motor driver with built-in translator for easy operation. It is designed to operate bipolar stepper motors in full-, half-, quarter-, eighth-, and sixteenth-step modes, with an output drive capacity of up to 35 V and ±2 A.
=> Pins: VCC(external), VCC(microcontroller), GND,Step pin, Direction pin, Sleep, microsteps 1,2,3, Reset & Sleep pin, Enable Pin.

Rotary Encoders are sensors that detect position and speed by converting rotational mechanical displacements into electrical signals and processing those signals. This is used to change specific functions or by pressing it to stop the motor.
=> Pins: VCC, GND, Data(DT), Clock(CLK), Switch(SW,button).

Electrical Schematic
The schematic diagram is taken from the Eagle file we have developed for our final PCB:

Brief Description of Schematic
In above figure we have used different connectors for the components, it is explained below:
1- LCD:
LCD has 4 pins SCL,DT,VCC & GND. SCL is connected to A5 pin of microcontroller, DT is connected to A4, VCC to 5V and GND to ground.
2-rotatory encoder:
Rotatory encoder has 5 pins namely as DT,CLK,SW,VCC,GND. DT is connected to A0 pin, CLK is connected to A1 pin, SW is connected to A2 pin and VCC to 5V and GND to ground.
3-A4988 motor driver:
The upper VCC and GND pins are connected to external power supply the next 4 pins Ao,A1,Bo,B1 are going towards stepper motor. Step pin is connected to D3 and direction pin to D4 while is reset and sleep is shorted and in low state.
.
PCB Layout
We used Eagle software to develop the PCB for our project and we created the layouts in .PNG formats as the Milling Machine available in Fablab needs picture format for its processing. Following is the final PCB layout:

Challenges While Routing
while routing we faced a lot of troubles such as the motor driver pins connecting towards the microcontroller and placing the LCD rotatory encoder parallel to reduce complexity. Unfortunately our motor driver was not routed properly.
Picture of Printed Circuit Board
For fabrication of our PCB, we used SRM-20(Rolland's mills) machine. It needs a monochrome picture for its processing.the monochrome picture we took from Eagle software were then uploaded to the "Fab-Modules.org" and then we generated the ".rml" files needed for SRM-20 to process the milling.


Bill of Material
Following is the Picture of the components taken from the FabLab

Connectivity to components



Picture of soldered Circuited Board
After fully soldering the components, our board looked like this:

Challenges While driving Stepper motor
Actually it was not that much ease which we were thinking to drive a stepper motor. Its isn't that much easy as it looks. Stepper motor was disturbing us lot. Sometimes its voltage requirement was not fulfilling and sometiimes current parrallely. Stepper is controlled by its driver where you can adjust its current. The following websites helped us whle driving motor and there codes are also in below websites:
Picture of fully assembled System

Demonstration of operational circuit
The FlowChart of our software design

Main Functions and Libraries of the code
1- void selection() Function:
flow rate slection.
2- stepper loop; loop:
This method is for speed and direction of stepper motor.
3- rotatory library;:
This is used to interface rotatory encoder.
4- #include Adafruit_I2CDevice.h library :
Include this to avoid compile errors in for lcd display
Challenges faced in coding and Hardware
The major problem we faced during the coding for this project was interfacing the lcd and rotatory encoder for a menu system. We went through many websites and projects. At the end we interfaced them both. And then next move was to interface stepper motor with that. fortunately it was just placing the loop of motor in the function where we selected the flow rate. But the main issue was hardware in which we have to control the current thorugh the motor driver A4988 which will run the motor. Everytime it was giving issue. But at the end we succeeded. Current is control by potentiometer mounted on surfac of motor driver. Coming towards the PCB we have to concentrate a lot on traces while solidering. Our PCB was not operating the motor driver because of traces. It was not providing the required current required for stepper motor. We would suggest to give full time to hardware and PCB.
Mechanical Designs





Below you can have a 3D View of our design by uploading the file named as 'STLfile' placed in this shared folder:
Enclosure Design
For Casing of our prodcut, we used 3D-printing. We wanted to consume lesser filament for 3D-printing.
This blend is a bit unique. we used solidworks software for our 3D design.


Picture of the final design

References
Zip file containing source code
Zip file containing sch and brd files
Zip file containing Enclouser design files
Conclusion
This project was full of learning. We had a lot of practical interaction with our theoratical knowledge. This project proved a golden oppurtunity as we implemented most of our theoratical knowledge. Creating and milling a PCB, designing an enclosure.etc. all of these experiences proved fruitful in increasing our skills and capabilty to do experiments and troubleshooting. Reasearching was very usefull for us. Internet is best guide for a learner. In future, we have decided to continue such kind of practice for further learning and skill development. If we been again given the chance to do this project we will try to improve it on higher level i.e a we will try to improve its coding to add more functions as required by the commercials. In addition we would compact the design in order to make it more volatile. We would appreciate if in future anyone takes this projects and help with our full efforts. Enjoy the process and take full advantage. "Science is about the process its not about the conclusion". 'Steven';
Copyrights:2022,Shahid Rasheed and Ali Bux,All Rights Reserved | Terms and conditions | Privacy policy