Artificial Pancreas
Moderators: kgudger, bfinio, MadelineB, Moderators
-
- Posts: 14
- Joined: Wed Oct 04, 2023 4:08 am
- Occupation: Student
Artificial Pancreas (alternative for Peristaltic pump)
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
-
- Posts: 14
- Joined: Wed Oct 04, 2023 4:08 am
- Occupation: Student
Artificial Pancreas
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?
-
- 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
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.
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.
-
- Posts: 14
- Joined: Wed Oct 04, 2023 4:08 am
- Occupation: Student
Re: Artificial Pancreas
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?
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?
-
- 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
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).
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).
-
- Posts: 14
- Joined: Wed Oct 04, 2023 4:08 am
- Occupation: Student
Re: Artificial Pancreas
Can I use IRF740 MOSFET?
-
- 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
Yes, that MOSFET should work.
-
- Posts: 14
- Joined: Wed Oct 04, 2023 4:08 am
- Occupation: Student
Re: Artificial Pancreas
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?
-
- 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
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
-
- Posts: 14
- Joined: Wed Oct 04, 2023 4:08 am
- Occupation: Student
Re: Artificial Pancreas
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);"
My distill water was (1.6÷5)×1023=334
Now, what and where am I supposed to enter in "conductivity= analogRead(A0);"
-
- 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
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.
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.
-
- Posts: 14
- Joined: Wed Oct 04, 2023 4:08 am
- Occupation: Student
Re: Artificial Pancreas
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?
Also, im using normal mini 5V pump. What pumpSpeed should I use?
-
- 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
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.
Otherwise, you are correct, you should not need to change anything in the code itself, just the pumpSpeed and threshold variables.
-
- Posts: 14
- Joined: Wed Oct 04, 2023 4:08 am
- Occupation: Student
Artificial Pancreas
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?
-
- 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
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?
Have you confirmed that your pump works by connecting it directly to power, without using the Arduino at all?