Artificial Pancreas

Ask questions about projects relating to: aerodynamics or hydrodynamics, astronomy, chemistry, electricity, electronics, physics, or engineering

Moderators: kgudger, bfinio, MadelineB, Moderators

Post Reply
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Artificial Pancreas (alternative for Peristaltic pump)

Post by StillLearning »

I can't find peristaltic pump in my area within 4 days. So, I need an alternative way to make Artificial Pancreas insulin project. Please reply asap
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Artificial Pancreas

Post by StillLearning »

I have a 12V peristaltic pump. Instructions said, I need to add external power supply. If I connect an adapter with it, what type of adapter should I use? Also, the Arduino code will make the pump stop automatically. But if I give power supply externally then how do I connect the pump with Arduino so that the pump will stop automatically?
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Artificial Pancreas

Post by bfinio »

Hi - I have merged your two posts so we can keep the replies in one place.

Depending on the type of power supply you purchased, there are a variety of adapters you can use to connect it to a breadboard, such as these:

https://www.sparkfun.com/products/10288

https://www.sparkfun.com/products/10811

For connecting the external power supply, you need to slightly modify the circuit shown in Figure 6 of the project procedure:

https://www.sciencebuddies.org/science- ... #procedure

Since your pump is 12V and not 5V, you need to connect the pump's positive wire directly to the power supply's positive wire. Connect the power supply's negative wire to ground on the breadboard (the entire circuit should have a common ground). Do NOT connect 12V from the pump directly to 5V from the Arduino, as this will create a short circuit and potentially damage the Arduino. This video in our Arduino tutorial series also covers how to connect a pump with an external power supply:

https://www.sciencebuddies.org/science- ... ino#step15

Hope that helps.
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Re: Artificial Pancreas

Post by StillLearning »

I'm planning to give this 12V pump external power supply through a computer-charger-like adapter. Will it be okay?

Also, one of my friends told me to use 5V mini water pump and connect it directly with arduino instead of using the 12V peristaltic pump.
But mini pumps usually pump a lot of water unlike a peristaltic pump. So, isn't using the 5V mini pump a bad idea for this project?
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Artificial Pancreas

Post by bfinio »

1. Yes, you can use a computer charger, but the dimensions of the barrel plug on the end will determine what kind of adapter you need to attach wires to a breadboard. The products I linked are for a "5.5x2.1mm, center-positive female barrel jack" which is a very common size (the same one used on the Arduino), but that might not be what your laptop charger has. You could also cut the plug off the end of the charger and strip the two individual wires, but I recommend avoiding that approach if possible.

2. You can control the speed of a pump or motor using the Arduino's analogWrite command to slow the pump down. We cover this on the Arduino tutorial page I linked earlier. Whether it is slow enough will depend on the pump and will require testing. Even at low speeds, it may still pump more water than a peristaltic pump. You could get around this by using larger containers of water for the experiment (think buckets instead of small Tupperware containers).
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Re: Artificial Pancreas

Post by StillLearning »

Can I use IRF740 MOSFET?
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Artificial Pancreas

Post by bfinio »

Yes, that MOSFET should work.
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Re: Artificial Pancreas

Post by StillLearning »

Hi, I got a fullsized breadboard. But I plan to use it like a halfsized breadboard. So, I will ignore the holes after 30. Is it okay?
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Artificial Pancreas

Post by bfinio »

Yes, that is fine. You may find our breadboard tutorial page helpful if you have not seen that already: https://www.sciencebuddies.org/science- ... breadboard
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Re: Artificial Pancreas

Post by StillLearning »

About the Arduino code, "Compilation error: 'conductivity' was not declared"

My distill water was (1.6÷5)×1023=334

Now, what and where am I supposed to enter in "conductivity= analogRead(A0);"
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Artificial Pancreas

Post by bfinio »

Hi - are you using the artificial_pancreas_example_code.ino file that you can download from our project instructions? If so, did you modify the program at all? The conductivity variable is declared at the top of the program in line 8:

int conductivity;

If you delete or comment out that line, then you will get an error message at line 20

conductivity = analogRead(A0);

since the conductivity variable has not been declared yet. So make sure you still have "int conductivity;" at the beginning of the code.
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Re: Artificial Pancreas

Post by StillLearning »

I don't have to change anything and I just have to modify the threshold?

Also, im using normal mini 5V pump. What pumpSpeed should I use?
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Artificial Pancreas

Post by bfinio »

Figuring out what pump speed works best for your setup is part of the experiment, we can't tell you for sure which value to use.

Otherwise, you are correct, you should not need to change anything in the code itself, just the pumpSpeed and threshold variables.
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Artificial Pancreas

Post by StillLearning »

Mistakenly deleted my previous post. So, as you probably know, I'm using 5V mini submersible pump. Motor isn't turning on at all.checked everything. Should I change the pumpspeed value or something?
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Artificial Pancreas

Post by bfinio »

Hi - I read your previous post last week, but then it was gone when I went to reply, so I thought maybe you had resolved the issue and intentionally deleted the post.

Have you confirmed that your pump works by connecting it directly to power, without using the Arduino at all?
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Re: Artificial Pancreas

Post by StillLearning »

Hi, actually few hours after my last question, the whole thing worked. Thanks for helping.

One of the schoolmates asked where and how the artificial Pancreas' position would be on a patient's body. I told him that the machine will on the patient's body all the time with needle under the skin. He was like, "that's painful and I don't see any logic why one should keep it all the time".

he isn't wrong about that being painful but also, how is one supposed to deliver insulin without a needle?

So, as far as I've understood: (kindly correct me if I'm wrong)

1. the needle needs to be changed every few days.

2. Artificial Pancreas/automated insulin delivery system is better for people that can't controll their diabetes at all. Not all patients need to use this/not all patients should be using this.

3. Patients can take on and off their artificial pancreas if needed.

4. The model science buddies has shown: there is not any variable set other than normal glucose level. So, isn't it closed loop system?
deleted-70304
Site Admin
Posts: 581
Joined: Mon Aug 22, 2016 4:39 pm
Occupation: Administrator
Project Question: -
Project Due Date: -
Project Status: Not applicable

Re: Artificial Pancreas

Post by deleted-70304 »

Hi - Your model in this project helps demonstrate some of the technology involved and how it works with the body's chemistry. For the kinds of questions you have related to how a "smart pump" would be used, you might want to go and look at some of the current insulin pumps and continuous glucose monitors that are being used already -- that will give you a sense of what they look like and how they are worn.

Most insulin pumps require wearing some form of "site" that is attached to the skin and has a cannula through which insulin is delivered from the pump. It isn't a "needle" that is left in, but people who use insulin pumps do have to wear a site attached to their body. Sites do have to be changed every few days (or when there is any form of problem). The timeframe varies for different systems. (The site and cannula are typically attached by tubing to the pump itself. The pump is then carried, for example, in a pocket or clipped onto clothing.)

I would encourage you to do a bit more reading about the benefits of a closed loop pump (or even some of the modern open loops available). These benefits are not just for people who can't control their diabetes. Diabetes is always changing. Smarter systems can help increase control for everyone who uses an insulin pump, which can lead to better health outcomes. The kind of system described here is, yes, removable. It involves several parts that work together -- glucose monitor, pump, and the sites that are worn for both of those devices. But for these systems to work, they have to be worn continuously. They can't be taken on and off other than to change the site(s) or to discontinue use.

There are several manufacturers of pumps. One of the newer pumps, however, which is relevant to your research is from Beta Bionics. You might want to take a look at how it works as a model of a closed loop system. https://www.betabionics.com/ilet-bionic-pancreas/

I hope this helps.

Amy
Science Buddies
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Re: Artificial Pancreas

Post by StillLearning »

Hi! I have another question. Is there a way to know how much insulin has entered the body?
amyCC
Site Admin
Posts: 398
Joined: Wed Apr 01, 2020 4:02 pm
Occupation: Moderator
Project Question: *
Project Due Date: *
Project Status: Not applicable

Re: Artificial Pancreas

Post by amyCC »

From a pump? Pumps definitely record how much insulin is administered - and many of them also show how much insulin is "on board" (which takes into account the amount of time insulin works in the body). This information is used when "corrections" are given or when basal insulin is adjusted by even a hybrid loop. If the insulin on board wasn't tracked, then a loop could easily give too much insulin. It's important to remember from your research that insulin doesn't work "immediately"....

(Keep in mind, too, that many pumps use a system where a "bolus" of insulin is administered at times, like when someone eats. The pump also administers "basal" information throughout the day.)

Amy
Science Buddies
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Re: Artificial Pancreas

Post by StillLearning »

Is it possible to show those things in our pancreas model? Specifically, is it possible to show how much tap-water has been added in distilled water? I'm asking this because one of the teachers asked, "How to know the amount of insulin that has been used?"
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Artificial Pancreas

Post by bfinio »

Hi - you would need to look into additional options to modify your project since measuring volume changes is not included in the baseline Science Buddies instructions. I can think of two options off the top of my head:

1. Manual measurements - use something like graduated cylinders to hold the water instead of food storage containers. You can measure the starting and final water levels in each container.
2. Electronic measurements would be more complicated but you could Google "arduino water flow rate measurement" and see if there are electronic ways to measure water flow rate through a tube with a sensor and an Arduino. Science Buddies does not have a tutorial for this so you would have to figure out how to do this on your own.

Hope that helps,

Ben
MadelineB
Moderator
Posts: 973
Joined: Fri Jun 20, 2014 4:42 pm
Occupation: Biostatistician/Data Scientist
Project Question: Interested in volunteering as an expert
Project Due Date: n/a
Project Status: Not applicable

Re: Artificial Pancreas

Post by MadelineB »

Hello,

These are excellent suggestions from the expert Ben. I would just add that it would be good to do the manual measurements with a graduated cylinder even if you decide to also try to get electronic measurements.

Best of luck with this fascinating project!

Madeline
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Re: Artificial Pancreas

Post by StillLearning »

What logic gate has been used in this model? I was asked this by some people.
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Artificial Pancreas

Post by bfinio »

Hi - this project does not use a discrete logic gate. It uses an Arduino, which is a programmable microcontroller. You can program logic into the code, for example using IF statements.
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Re: Artificial Pancreas

Post by StillLearning »

MadelineB wrote: Tue Oct 17, 2023 2:36 pm Hello,

These are excellent suggestions from the expert Ben. I would just add that it would be good to do the manual measurements with a graduated cylinder even if you decide to also try to get electronic measurements.

Best of luck with this fascinating project!

Madeline

Hi, won the first prize! Thanks, sciencebuddies
bfinio
Expert
Posts: 964
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Lead Staff Scientist, Science Buddies
Project Question: Expert
Project Due Date: n/a
Project Status: Not applicable

Re: Artificial Pancreas

Post by bfinio »

That's great to hear, congratulations!
amyCC
Site Admin
Posts: 398
Joined: Wed Apr 01, 2020 4:02 pm
Occupation: Moderator
Project Question: *
Project Due Date: *
Project Status: Not applicable

Re: Artificial Pancreas

Post by amyCC »

Congratulations!

If you would be interested in answering a few questions about your project (why you chose it, how it went, and so on), please let me know. If you are interested, I will reach out to you by email (using the email on your account).

Amy
Science Buddies
StillLearning
Posts: 14
Joined: Wed Oct 04, 2023 4:08 am
Occupation: Student

Re: Artificial Pancreas

Post by StillLearning »

Sure! You can mail me on the address that is connected to this account. And if you can't see my address, then let me know here.
amyCC
Site Admin
Posts: 398
Joined: Wed Apr 01, 2020 4:02 pm
Occupation: Moderator
Project Question: *
Project Due Date: *
Project Status: Not applicable

Re: Artificial Pancreas

Post by amyCC »

Thanks so much. I'll email you.

Amy
Science Buddies
Post Reply

Return to “Grades 9-12: Physical Science”