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.

Leave a Reply

Your email address will not be published. Required fields are marked *