Even though the COVID-19 pandemic is currently on everyone’s minds, the United States is in the midst of an opioid overdose epidemic. In fact, out of all of the drug overdose deaths, more than 70% of them involved an opioid, and women are hit the hardest by the opioid crisis.

We see that after many injuries, surgeries, or even for conditions such as ADHD, opioids are prescribed as a form of treatment and/or pain management. However, in many of these situations, the dosage given to the patient is more than usually necessary, designed to keep the worst case scenario in mind for the patient in which they may need a larger, but non-threatening dose. While this is with good intentions, this ends up most times leading to an overconsumption of medication than what is necessary, rendering individuals addicted or having a very low tolerance and natural fighting capacity against their conditions. Overdosing to a fatal level is also not uncommon as a result.

Another hurdle with opioid usage is that many times, the drugs prescribed contain multiple active ingredients, and patients sometimes don’t realize this and try to combine their opioids with other seemingly harmless drugs, such as Tylenol. For example, Codeine tablets contain an extremely high concentration of acetaminophen along with codeine phosphate. If Codeine users continue to experience pain after taking Codeine, they sometimes feel that taking a drug like Tylenol can help. However, doing so can be very dangerous, as individuals are not always aware of how important the time difference between dosages is, and what common substances are being consumed when taking multiple medications, leading to, once again, an overconsumption of a particular substance, leaving the patients with severe dependency, addiction, in some cases with new diseases and conditions, and many times death.

Women are hit hardest by the opioid crisis - as the Health Resources and Services Administration Principal Deputy Administrator, Brian LeClair, stated, “women are experiencing increases of use and overdose from opioids at a faster rate than men...The opioid use disorder crisis affects women across all age groups, all racial groups, all ethnicities, all geographic quarters of America and all socioeconomic status levels." Our team’s passion for the role of technology in saving lives along with our passion for women’s health inspired us to create TabLet Tab - to keep tabs on your tablets.

What it does

Our solution was to create a web application and mobile application that are connected to a pill dispenser. The web application allows the user to create an account. The mobile app allows the user to input which medicine they are taking along with the number of milligrams the pill is, along with asking the user a series of questions to gauge their pain level and possibly deter them from taking the medication if they’ve already taken more than is safe. This input is then stored in a cloud database, which is connected to both our mobile app and web app. This information is then extracted from the cloud database, and then used to go through an algorithm we created, eventually updating the user on whether this amount of intake is safe or not on the mobile app. The web application also allows the user to see their recent intakes and see a broader picture of their drug consumption, which can allow them to see if there are any patterns with their consumption that are potentially dangerous.

How we built it

Our project was broken down into multiple components - the hardware (pill dispenser), the database, front-end (of both the mobile app and web app), and back-end (using the database to update front ends which affect the hardware’s behavior as well).

We first began with the hardware. We used a raspberry pi connected to a servo that is controlled by an app which triggers the data on firebase and makes the web app run an algorithm to check for any problems with dosage and once the webapp approves, the pill dispenser functions. We also have a distraction component that is supposed to help people to get their mind off the pain.

Our next step was to create a mobile app that connected directly to the pill dispenser. The mobile app was created by using the MIT app Inventor. It has a very simple interface which connects to the firebase rtdb and updates the values in the database which is shared by the web app and the dispenser. The Application has questions that helps the user reflect and introspect a little about whether they really need to take the dose.

The mobile application sends the data that it collected to a cloud database hosted by Firebase, which is a platform by Google that can host Real Time Databases. The real time nature of this database was especially useful, because it’s API integrated very well within the backend code.

We then created a landing page for the user on our web application. This landing page had multiple components - the first of which was a signup page. The user is able to create an account and input some of their data in this part, and will allow them to use the account in the future to see their statistics. We built this by using HTML, Javascript and CSS.

Then, we tied all of these components together by creating our backend using JavaScript and the Firebase API to get data from the database. We conducted our own research on the different ingredients in different opioids, and what the appropriate milligram content was, different dosages, and how frequently the drug can be taken, and made JSON objects stored in our JavaScript files that we were able to use in our algorithm. We created an algorithm that took in data from the mobile app, determined whether the intake was safe, and updated the user, while updating the statistics seen on the web app.

By integrating all of these components, we were able to integrate hardware, software, and data to create a solution to a problem that is affecting thousands of people in the United States alone, and even more worldwide.

Challenges we ran into

Our main challenges came from some bugs that were present in the data transmission from the hardware, and also some of the back end stuff was hard to do on a time crunch. Some of our other challenges came from using APIs and tools we were unfamiliar with. Thus, this was a challenging, yet positive learning experience for us all.

Accomplishments that we're proud of

We are very proud of our ability to use so many different tools and APIs and services such as CSS, JavaScript, Firebase, HTML, Raspberry pi and microcontrollers to create this project. Our goal was to make this something that could potentially be used and accessible, and our ability to create a complex, yet functional product, was something we are very proud of. We are also all passionate about women in tech and women’s health, so doing something that was very impact-oriented was really meaningful for us.

What we learned

Throughout this process, we were able to create something that integrated hardware, software, and data. Some of us had never worked directly with hardware before, so seeing that in action was really interesting. Some of us had also never used Firebase or Real Time Databases before, so integrating that in JavaScript was really fun, and learning about the Firebase API was amazing.

We also learned and further developed our soft skills through this project. Our team continuously used Discord to check on each other and our progress, and took advantage of the voice channels and Zoom to ask each other for help, update each other on progress, and motivate each other. We all lived in different time zones, so clear communication was key to making this project what it was. This also allowed us to learn more about the individual strengths of our teammates, and leverage that to create a better project.

What's next for TabLet Tab

Using a more comprehensive database of drugs, their ingredients, and their dosages would allow us to grow this project. Furthermore, making the smart pill dispenser more complex which would allow us to store more types of pills, would also make this more applicable. We also think that this project can be used for more than just opioids - it can be applied to many more drugs, and possibly even communicate with doctors about the patient’s pain levels and drug consumptions, which can allow them to notice signs of addiction or understand the patient’s pain and corresponding patterns better. This would not only help public health in general, but also women’s health, as opioids specifically hit women more than others. Integrating Drug Bank’s data (, which is a paid service, is also a potential next step that could really increase the scalability and accessibility of our product.

Share this project: