Artificial Pancreas

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

Moderators: kgudger, bfinio, MadelineB, Moderators

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: 761
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
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: 761
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
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: 761
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
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: 761
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
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: 761
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
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: 761
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
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: 761
Joined: Mon Aug 12, 2013 2:41 pm
Occupation: Science Buddies Staff
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?
Post Reply

Return to “Grades 9-12: Physical Science”