Insuload

by linoyjerbi in Workshop > Science

31 Views, 0 Favorites, 0 Comments

Insuload

WhatsApp Image 2024-09-03 at 19.26.17.jpeg

The InsuLoad device was developed as part of our engineering design course, aimed at addressing a critical challenge faced by individuals with Type 1 diabetes. Managing diabetes requires frequent handling of insulin, which can be particularly challenging for those with limited fine motor skills. InsuLoad is specifically designed to simplify the process of filling an insulin reservoir, ensuring that it can be done easily, accurately, and without the need for precise hand movements. This innovation not only enhances user independence but also contributes to safer and more efficient diabetes management.

Supplies

  1. Cardboard
  2. Ultimaker 3D Printer
  3. Linear Motor
  4. Arduino Mega 2560
  5. 12V Batteries
  6. Jumper Wires
  7. H Bridge
  8. Bearing
  9. Super Glue
  10. Blue Spray Paint (opptional)

Constructing the Body of the Device

To begin, the body of the device is constructed using cardboard. Start by cutting three pieces: the first piece should measure 30 cm by 30 cm (serving as the base), the second piece should be 15 cm in height, 8.5 cm in width, and 2 cm in depth (acting as a vertical support), and the third piece should measure 20 cm by 20 cm (serving as the vertical mount).

Next, take the first piece and cut a rectangular hole in its center, matching the dimensions of the second piece (8.5 cm by 2 cm). Insert the second piece into this hole so that it fits snugly at the edge, as depicted in the video. Secure the connection between these two pieces using super glue. To reinforce the connection, you can add support triangles—small cardboard triangles attached between the first and second pieces to enhance the stability of the structure (in the video, they resemble steps).

For the third piece, cut a hole matching the outer diameter of the bearing. At the end of the second piece, cut a hole that matches the inner diameter of the bearing.

3D Printing

print the following object:

  1. rod: This component has a fixed diameter, matching the inner diameter of the bearing and the outer diameter of the hole in the vertical support.
  2. Support2: This serves as a syringe holder, which will later be connected to the linear motor.
  3. Support: This component is used to secure the insulin vial in place.
  4. Yadit_Ahiza: This is the handle for the user, designed to facilitate the rotational movement of the vertical mount.

Programing the Arduino


To create a new script where a single press of the button makes the linear motor go up, a second press stops the movement, and a third press makes the motor go in the opposite direction, you can follow these steps. This script will cycle through three states: moving up, stopped, and moving down.


Components Needed:

Arduino Mega 2560

Actuonix L12 Linear Actuator

SparkFun Ardumoto H-Bridge Shield

One push button

Resistor (10k ohms for pull-down)

Jumper wires (male-to-male)

Power Supply/Batteries (appropriate for the actuator and Arduino)

USB cable (for connecting Arduino to your computer)


Mount the Ardumoto Shield on the Arduino Mega 2560:


Align the Ardumoto Shield with the headers on the Arduino Mega 2560 and carefully press it down to ensure a solid connection.

Connect the Actuator to the Ardumoto Shield:


OUT1 (M1): Connect this to Motor V+ on the actuator using a jumper wire.

OUT2 (M1): Connect this to Motor V- on the actuator using a jumper wire.

Connect the Power Supply to the Ardumoto Shield:


VIN pin: Connect the positive terminal of your power supply.

GND pin: Connect the negative terminal of your power supply.

Connect the Button to the Arduino:


Button for Toggling Movement:

Connect one leg of the button to Digital Pin 5 (D5) on the Arduino using a jumper wire.

Connect the other leg of the button to GND on the Arduino using a jumper wire.

Add a 10k ohm resistor between D5 and GND for a pull-down configuration.

Complete Wiring Diagram:


Download and Install the Arduino IDE:


Download the Arduino IDE from the Arduino website.

Install the IDE following the on-screen instructions.

Open the Arduino IDE:


Launch the Arduino IDE on your computer.

Write the Code attached below.


Copy and paste the following code into the Arduino IDE:

Go to Tools > Board > Arduino Mega 2560.

Select the Port:


Go to Tools > Port and select the COM port that corresponds to your Arduino Mega 2560.

Upload the Code:


Click the upload button (right arrow icon) in the Arduino IDE to upload the code to your Arduino.

Running the Setup:

Power the Arduino:


Connect the Arduino to your computer using a USB cable to power it.

Verify Connections:


Double-check all connections to ensure everything is correctly wired.

Test the Actuator:


After uploading the code, pressing the button will cycle through three states: moving up, stopping, and moving down.

This is the code of the Arduino:

#define IN1 3
#define IN2 11
#define ENA 10
#define BUTTON 5

enum MotorState { UP, STOP, DOWN };
MotorState currentState = STOP;

bool lastButtonState = LOW;

void setup() {
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(ENA, OUTPUT);
pinMode(BUTTON, INPUT);

digitalWrite(ENA, HIGH); // Enable H-Bridge
}

void loop() {
bool buttonState = digitalRead(BUTTON);

// Check if the button has been pressed
if (buttonState == HIGH && lastButtonState == LOW) {
// Change the state
if (currentState == STOP) {
currentState = UP;
} else if (currentState == UP) {
currentState = DOWN;
} else {
currentState = STOP;
}

// Small delay to debounce the button
delay(50);
}

lastButtonState = buttonState; // Update the button state

// Control the motor based on the state
if (currentState == UP) {
digitalWrite(IN1, HIGH);
digitalWrite(IN2, LOW);
} else if (currentState == DOWN) {
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);
} else {
digitalWrite(IN1, LOW);
digitalWrite(IN2, LOW);
}}


Connecting All the Components

Take the 3D-printed rod and insert the larger diameter end into the support mount. Apply super glue around the larger diameter and secure the connection. Insert the smaller diameter end into the bearing, and glue them together using super glue.

Next, attach the support to the edge of the third cardboard piece as depicted in image1.

Then, take the linear motor and glue it to the third piece of cardboard, parallel to the support. Ensure that the distance between them matches the length of Support2. Attach the rectangular side of Support2 to the end of the linear motor that has been glued in place, as shown in image1.

Attach the Yadit_Ahiza handle to the end of the third piece in a position that is convenient for the user.

Finally, secure the Arduino, along with the battery box, to the surface, positioning the Arduino close to the linear motor.


Using Insuload

  1. Take the insulin vial and attach it to the support.
  2. Draw air into the syringe and connect it to the vial on one side and to Support2 on the other side.
  3. Press the button to activate the linear motor, allowing air to enter the vial from the syringe.
  4. Hold the handle and rotate the platform 180 degrees.
  5. Press the button again to start the insulin extraction process.
  6. Wait a few seconds for the extraction to complete.
  7. Rotate the platform back and eject the ampoule connected to the syringe (where the insulin was drawn).