Week 6 Update

Overview


With the presentation date fast approaching, I knew that at this point it was important for me to start wrapping up the project and creating some working prototypes of my insulin pump.

Day 1


Now that I have completed my Python program that will run my insulin pump, it is now time to test a couple different pumping mechanisms that I have found under the thingiverse.com keyword ‘motorized syringe push’. Much of the day was spent making tweaks to the designs and trying to find which design would work best for my insulin pump.

Day 2


On the second day potential disaster struck, but before I get to that I do have good news. After my testing of designs on day one, I have come to the conclusion that this design would work best:This design works off of an rack and pinion set up (explained here) to push the insulin out of a reservoir tube (the container that holds the insulin). This is the only design that produced repeatable results, and in biotechnology consistency is key, so that is why I chose this design.

On to the bad news. Apparently Gettysburg College has been making some changes to its firewall, and my mechanism of pulling data from my database in the cloud has tripped the updated firewall, preventing me from getting any data from the cloud. Unfortunately this issue is impossible for myself to fix, however, I am working with Eric Yurick to help sort out the issue.

Day 3 and 4


While my program was down, I figured that it was important to try and calibrate the pump to actually pump close to the desired amount of insulin. This insulin pump will never actually be connected to someone (because of the dangers it presents), and each person responds to insulin therapy in different ways, so there is no true way to have it perfectly calibrated to someone (and I guess it really doesn’t need to be). With that in mind, I have decided that I will calibrate it to mimic the current insulin settings that I use. To do this I am tinkering with the stepper motor steps and measuring the amount of insulin (I am using water for testing purposes) that is output.

On day three we also had practice presentations with what we have completed so far. Without effectively communicating what you have produced, the technology that you make little impact, so presentation is very important to me. I am now getting more comfortable talking about my project and dialing in the presentation.

Day 5


On day five the network issue has yet to be resolved, however I am meeting again with Eric Yurick on Monday to try and figure it out (thanks Eric!). Until I am able to see how the pump responds to different blood sugar values, I cannot calibrate the pump anymore, so it is back to creating prototypes and testing using the 3D printer. I will update all on the network issues and final designs in next weeks post!

Week 5 Update

Day 1 and 2


Day one and two of this week were arguably some of the most productive of my time here so far. At this point I feel like I have a good understanding of how to produce quality production parts from my 3D printer. I was able to print some possible prototypes for the mechanism that pushes the insulin out of the reservoir. They all work on the same principle, so here is an example of one I am testing:

All of the extruders that I am testing are open source and on thingiverse.com .

Day 3


On day 3 I realized that I had completed all of the pieces necessary to have a crude pump except for the code that controlled the extruder. I used the python code mentioned in my last blog post, along with code to control the stepper motor, and merged the two to work together. Once I had successfully merged the two pieces of code into one python program, I used the blood sugar value that is updated every 5 minutes to control a specific amount of steps (at this point it is not calibrated, but it does work!). I then placed the entirety of the code into one big while loop that allows me to pump a desired amount based off of blood sugar values every 5 minutes for a desired amount of time. This was a huge success in my program having the code finished to the point where I can start making physical prototypes, and the project is really coming together now.

Day 4 and 5


Both of these days were fairly slow considering most of the day was spent waiting for pieces to print out. On the bright side I was able to successfully print out a screw and (basically) a threaded nut that works. For anyone who knows 3D printing knows how difficult this task really is on an FDM printer (the type of printer that I am using). This gives me hope for creating an insulin pump that is completely 3D printed aside from the Raspberry Pi and motor. One of the main issues that I have with current diabetes technology are the astronomical prices for the technology, and one of my main points in my project was making an insulin pump that is very cheap to produce, and 3D printing allows for costs to be far lower.

While I was waiting for my prints to emerge out of the build plates I kept busy with Dr. Remy setting up 3D printers that the IT department had ordered. We wanted to see just how fast we could get a printer from the box to a functioning state. We were able to achieve this task in ~51 minutes, which is pretty impressive considering how many moving pieces make up a 3D printer. Also, setting up 3D printers helps gain a further understanding of how the printers work. This is why I suggest new users to order 3D printer kits rather than fully assembled printers. For one, they are much cheaper when they are in the kit form, and you get a better understanding of how they function.

Hopefully by next week I will be able to have my first fully functioning prototype of an insulin pump which is very exciting. More to come in next weeks blog post!

Week 4 Update

Overview


After last weeks successes with getting the readings from my CGM (continuous glucose monitor) into my cloud database, it was now time for me to figure out how I could get those values out of the cloud so that I could use them to run my insulin pump.

Day 1 and 2


At this point I had realized that getting the readings from the database to be usable would be quite the task taking my lack of knowledge in python into consideration. I knew that I would need to use some type of driver to get the data out of the mongo database, however, I had never coded a task like this before so it was quite the learning curve. A driver basically allows the user to get the data from their collections in the database, and to be able to use that data in their programs. Luckily mongoLabs, the company that I am using to host my database has a driver through python called pymongo that allows me to access my data in python. This would be an efficient way for me to use the data that I was collecting from my CGM.

Early on Monday morning I was also surprised with the arrival of my own 3D printer that I had ordered. After seeing how much was possible with the 3D printers, I knew that I needed to have my own, so much of Monday was spent setting up and tinkering with my new printer.

Day 3 and 4


With help from Dr. Remy, the fourth day of this week I was able to have a working program that would fetch the data that I wanted from my collection and output my blood sugar value, the date and time, as well as the direction in which my blood sugar was trending. With this I am able to start programming my final program that will control my insulin pump. 

Here you can see that I ran my python program, and actively collected my blood sugar values every five minutes for over an hour.

Day 5


Now that I had a working program to collect my blood sugar information it was time for me to experiment with python programs that control stepper motors to pump out the insulin. Essentially a stepper motor allows you to program a motor that will turn a specified amount by the program. I do not yet have a working program that controls the stepper motor based off of my blood sugar values, however it should not be too difficult to program, so look out for that in the next blog post.

On day five we also talked about our project timelines and how our projects were coming along. With four weeks down already, the presentation date is fast approaching. I found that I had achieved many of the goals that I had set out to achieve and more. There are endless possibilities in my project and I am working to implement as many features as I can, and I have decided that I will be trying to achieve my stretch goal of creating a truly closed-loop insulin injection system. In the coming weeks I will be perfecting my program that controls the stepper motors, and 3D printing prototypes for the final insulin pump. The project is beginning to take shape and it is a truly rewarding process. At this point it is promising that I will be able to achieve my stretch goal, and maybe even beyond that.

Week 2 Update

While week 1 was focused primarily on learning the basics behind all of the technology that I would be using, it is now time to determine how all of this technology will interface with the insulin pump that I am trying to create. I realize now that some of the concepts that I talked about in my previous week’s post can be confusing and hard to understand. I will include links to explain 3D printing here, and microcontrollers here, and go into detail on how these technologies work.

3D Printing


3D printing technology has been around for nearly 30 years. There are two main types of 3D printing, stereolithography and fused deposition modeling, and I will be using both in my project. Stereolithography was the first of the two to be created. Stereolithography works through photopolymerization of a resin that is held in a small tank. Basically what this means is that light is projected into the resin, causing the resin to link together on a molecular scale layer-by-layer. The other type of 3D printing that has gained a lot of attention lately is fused deposition modeling. This form of 3D printing works by heating up a filament (in most consumer products the printers use some form of plastic), and pushing it through a nozzle that is controlled via motors in the desired area. This technology also works layer-by-layer and builds the end product from the “ground up”.

 Micro Controllers


Micro controllers allow the user endless opportunities in the world of computing. A micro controller basically works as a mini computer to do whatever job the user programs it to do. Today there are two main micro processors, the Arduino and the Raspberry Pi. Last week I discussed how I was getting the Arduino to do a few basic commands, however, I have found that for my project, the Raspberry Pi will work better than the Arduino. My knowledge on micro controllers is still limited, so for now I will leave it to the links above to explain in better detail.

Week 2 – Day 1


On the first day of week 2 I decided that I wanted to be able to hook an LCD display up to the Arduino and get it to show a message that the user inputs. Using a few online tutorials I was able to get the LCD to display two lines of a message that the user types, and I was even able to get the message to scroll across the screen. This experiment was primarily to work on how I wanted the display of the pump to read.

Day 2 and 3


Over these two days I was mainly doing research into how I can get a glucometer (the device that measures one’s blood sugar) to interface with a micro controller since I would be using the micro controller as the brains of the pump. I came across a webpage that explained a cloud based program that allows the user to store their glucose numbers in the cloud. The project is called night scout and it may be the answer to the problem. The night scout allows the user to send the information from their glucose sensors to a variety of devices and then store the numbers in the cloud. The important part however, is that people have been able to then take the numbers from the cloud and display them using raspberry pi. If I am able to set up the night scout with the raspberry pi, I could make insulin calculations based upon the numbers from that and also have the pump interface with other technology (like phones, smart watches, etc.). The night scout platform is a promising way to solve a major issue in the project.

Day 3 and 4


Thursday and Friday of this week were spent experimenting with the raspberry pi and trying to determine its capabilities. My main goal for these two days was to program the raspberry pi to cycle a stepper motor at a specific speed. Using python I was able to program the raspberry pi to control a stepper motor’s speed based off of an integer input. The stepper motor did cycle, however, I believe that there are some bugs that I need to sort out in order to have the motor function with more precision.