Supplement Bot

by jachaoui in Circuits > Robots

2023 Views, 11 Favorites, 0 Comments

Supplement Bot

Front.JPG
Backsuppl.JPG

In this page, the "Supplement Bot" is presented, our idea of automatic pill dispenser.

As general introduction, the Supplement Bot is an automatic pill dispensing machine that can extract two different pill types, equipped with a buzzer and a touchscreen interface. The buzzer is used to create a sound alarm for reminding purposes and the touchscreen is used as user interface, in order to set the alarm and save the desired pill combinations.

Abstract

In the following, the whole design process of the Supplement Bot is explained.

First of all, the purpose of the project is provided, defining the problem and identifying the user's need. A brief state of the art review is provided, comparing the existing pill dispensers present on the market, and a patent analysis is conducted. Afterwards, the actual design process is presented, starting from the functional analysis and essential problem decomposition. Each step of the design process is explained in detail: the requirements, the description of all the needed mechanical parts, showing the improvements and evolution from the conceptual design to the final detailed design, the chosen electr(on)ic components, their implementation, and, finally, the whole assembly and integration of the different parts and subsystems.

In addition, a section has also been dedicated to a critical review of the project and to the sustainability analysis of the Supplement Bot.

Finally, a very brief presentation of the authors of the project is provided.

Table of Contents

1. Table of Contents

2. Project purpose

3. Working modes description

4. Functional analysis

5. State of the art and Patent analysis

6. High-level Design

7. Mechanical systems

  • Requirements
  • Design
  • CAD files

8. Circuitry and Sensors

  • Requirements
  • Design process and considerations of components
  • Final circuit diagram
  • Testing
  • Exact components

9. Software

  • Requirements
  • Design process and considerations
  • Code flow diagram
  • Testing
  • Code

10. Integration guide

11. Demo and Quick start guide

12. Critical review

15. Sustainability analysis

16. Bill of materials

17. Team members

  • Achaoui Jihad
  • Cousin Stijn
  • Segaert Martin
  • Zulli Denis

18. Project repo

Project Purpose

Nowadays having a chronic disease, a heart problem or any other health issue may require daily use of pills and medicaments. In addition, even people who don't suffer from any serious disease may need to take vitamins and supplements regularly, for diet and health purposes.

However, for these categories of people, extracting pills manually from their containers is annoying, tedious and time-consuming. Moreover, in case of health problems, forgetting to take the pills at due times represents a dangerous health risk.

For these reasons, it would be smart and handy to employ a pill dispenser, providing automatically the right amount of pills and reminding the person to take his pills at the right moment.

The purpose of this project is exactly the fulfillment of these requirements: designing a "Supplement Bot": an automatic dispensing machine for pills, filled periodically, with an acoustic alarm at needed times.

Working Modes Description

The Supplement Bot is an automatic pill dispenser that can extract multiple pills from different containers. The basic version prototype consists of two containers, each filled with one type of pill. However, in order to provide flexibility to the Bot, it is possible to add multiple modular stages, adding the possibility to extract more than two types of pills. To have an idea of how it would look like, a CAD design is made of the pill dispenser with two stages. This can be found here. A picture of it is visible here.

The Supplement Bot is equipped with a touchscreen display, needed to insert and memorize the desired pill combinations by the user. Through the simple touchscreen interface, the user defines the number of pills he wants to extract from each container. For each saved preset, the user can set an alarm at the desired time. The alarm can only be turned off by pushing on the right button on the touchscreen, forcing the user to reach the Supplement Bot, switch off the alarm and take the presaved pill combination without forgetting it. Moreover, as further security check, the pill extraction is detected with a sensor.

In this lab, two types of pills, with capsule shape, are used to design the pill dispenser. Of course, in reality, there is a big variety in pill shapes and sizes. To make the pill dispenser work for different types of pills, it is enough to modify the design of only one part: the top disk. The design of this part will be explained in the following section.

One of the goals is to make the pill dispenser as flexible as possible. To do so, the top disk is designed in such a way that it is easily interchangeable. For example, if the user would like to extract pills of a smaller size, he would be able to place the correct top disk himself on the extraction mechanism and mount the container on top of it successively.

It is important to mention that pills in a bottle/container are more suitable for the Supplement Bot application. Indeed, pills stocked singularly in tablets could also be used, but it is required to extract them one by one, which is more time-consuming and more unpractical.

Functional Analysis

After having defined the problem to address and identified the user's need, a functional analysis has been carried out, by decomposing the whole problem in smaller essential problems corresponding to each function needed. The essential functions which needed to be addressed in the Supplement Bot development were the following:

  • Pills stocking
  • Extraction of a single pill
  • Combination of multiple different pills
  • Detection of pill extraction
  • Production sound alarm
  • Memorization of pill combinations

As first idea of conceptual design, a potential solution has been associated to each essential function, such as follows:

  • Pills stocking: Pill container
  • Extraction of a single pill: Extraction mechanism
  • Combination of multiple different pills: Funnel
  • Detection of pill extraction: Sensors
  • Production sound alarm: Buzzer
  • Memorization of pill combinations: Memory support (touchscreen)

State of the Art and Patent Analysis

Immagine3.png

Before starting with the actual design process, a review of the existing supplements dispenser machines has been performed, in order to collect information on the state of the art technology and solutions.

Among the multiple solutions present in the market, the most representative machines have been selected and classified according to the following criteria:

  1. Capability of dispensing the pills automatically (or manually)
  2. Capability of positioning the pills automatically (or manually) in the right position for the extraction
  3. Implementation of a sound and visual alarm for reminding purposes
  4. Machine autonomy at standard pill consumption rate
  5. Limitations (or not) in multiple daily pill supply
  6. Possibility of providing multiple pill types

Based on these criteria, a table with the analysed market solutions has been created, highlighting pros and cons of each solution. As it is observable from the table, low automated machines such as "Gogooda" or "e-Pill MedSmart" present a high (theoretically infinite) flexibility in the number of different types of pills that may be supplied, while they show limitations in the autonomy of the containers and in the maximum possible number of daily supply. On the contrary, highly automated machines such as "MedaCube" or "Hero" allow just a limited number of different pill types, but at the same time, they show almost no limit in the number of daily supplies and a larger machine autonomy without filling.

Moreover, in order to respect patents constraints, an extensive patent analysis has been performed, pointing out the fields which may result difficult to work in and the constraints in the design process. In particular, the International Patents Classification (IPC) codes of interest for the pill dispenser mechanism at issue are the following:

A61J 1/03: Containers specially adapted for medical or pharmaceutical purposes (capsules or the like for oral use) for pills or tablets

B65D 83/04: Containers or packages with special means for dispensing annular, disc-shaped, or spherical or like small articles, e.g. tablets or pills

G01G 19/56: Pill counting devices; Arrangements for time indication or reminder for taking medicine.

After having analysed multiple solutions for each IPC code, it can be concluded that multiple and different patented solutions exist, especially regarding the pill container and the pill extraction mechanism. Nevertheless, a rather large freedom of operation is left in the design process of the parts, allowing the development by avoiding the existing patented solutions.

High-level Design

High level design.png

After the functional analysis has been performed, a brainstorming on the high level-design started. Here, the operating principles have been defined and the interaction among the different components and the user have been laid out, as shown in the above block diagram.

In the figure, the arrows are representative of a one-way relationship or influence between the 'sending' block and the 'receiving' block. Instead, the double arrows are representative of a reciprocal influence between the blocks.

As shown, the user can interact with the user interface, which will command the Arduino. The Arduino can then influence the alarm or the dispensing mechanism. In the same way, the alarm interacts back with the user with an audible tone. Moreover, if the dispensing mechanism is activated, the appropriate pills can be extracted for the user and this operation is verified by employing some sort of sensor.

This layout outlines the high-level design for the Supplement Bot and constitutes the basis of all the design steps and choices made in the successive sections.

Mechanical Systems

Separator3_WithContainer.png
Cork.png
BottomDisk3_Top.jpg
Container2.png
AdditionalPart_Bottom.png
rotating disk.png
TiltedPlate2.png
Funnel2.png
box_structure.png

Requirements

In order to successfully design the automatic pill dispenser, the following functions must be fulfilled:

  • The pills need to be stocked somewhere. For this function, a container is created.
  • The pill extraction from the container must be ensured. Moreover, the well-functioning of the extraction is mandatory, ensuring one and only one pill extracted at the time. For this reason, an extraction mechanism is designed.
  • The extracted pills must be collected at a specific location. In order to do so, a funnel is employed.

Design

In the following paragraphs, each part of the pill dispenser is discussed. First, the function of the part is explained, then the quantitative and qualitative requirements of the part are described, the conceptual design that fulfills the requirements is described, and finally, the evolution of the part till the final detailed design is explained. All the different pictures, showing the design evolution of each part, can be found here.

Container

The main function of the container is to stock all the pills.

Concerning the requirements, the container must be fillable by hand and filled just periodically. The container needs to be removable to assure some flexibility. It is also important to check somehow whether the container is empty or not. Since the weight of each pill can vary, the choice for the stock check is to avoid using a weight/pressure sensor, but employing a simple visual check performed by the user.

The first conceptual design for the container is a simple open tube, whose dimensions depend on the pill volume and the pill consumption. In order to allow the visual check for the pill stock, the container is made of transparent material. For testing, a standard 00 pill type is used, a capsule shaped pill with a radius of 8 mm and a length of 24 mm. The volume V of the container can be calculated as V = 3*30*Vpill + 15%. Here, a pill consumption of three times a day and a filling of once per month is considered. A tolerance of 15% is also taken into account. The obtained dimensions for the container are then 100 mm as outer diameter, 94 mm for the inner diameter, and a height of 80 mm. The prototype for the container has been 3D printed and made in PLA.

After experimental testing, some improvements to the part have been applied. In particular, on the top edge, some holes are added in order to shape fit the barrier part (described below) and the cross barrier to provide stability to the barrier wall. Moreover, in order to prevent the part from rotation (which happened during testing, producing unreliable extracion), the bottom edge is modified in order to be fixed via shape fit into the extraction mechanism.

Extraction Mechanism

The extraction mechanism represents, of course, the core of the Supplement Bot. Its function is to displace only one pill from the container to the desired point.

For this part, different conceptual design possibilities have been considered. The first possibility is to use a vertical tube, whose dimensions match with the one of a single pill. This tube ends up in another horizontal tube, that has a shaped notch for the pill. When a pill is in the notch, the horizontal tube turns to let the pill fall. A different possibility is to have a tube, whose diameter becomes smaller (such as a simple funnel). At the end of this tube, a pill comes out and is pushed by a rectangular part attached to a spring. The last possibility is to use a rotating disk positioned on top of a non-rotating one, surrounded by a container. Both the rotating and non-rotating disks have a hole. To place all the pills on the other side of the hole, a separator wall is also present. When the two holes are on top of each other, a pill comes out.

For the Supplement Bot, the chosen extraction mechanism was the last one, with two disks placed one on top of the other and a separator wall. Indeed, the first possibility was discarded due to unpractical filling of the container, while the second possibility was discarded to the necessity of adding an additional component for converting the motor rotation into a linear translation of the spring mechanism. Of course, even though the third option has been chosen, this one is not exempt of criticalities, that were tackled and solved, i.e. simultaneous multiple pills extraction, which results in a malfunctioning of the mechanism.

Top rotating disk

The first part of the extraction mechanism is the top disk. In order to ensure a single pill extraction, the disk has a hole whose dimensions correspond to the extracted pill’s dimensions. To make the disk rotate, it needed to be connected to the motor by means of a shaft.

The idea for the initial design is a flat disk with an embedded shaft. As a first conceptual design, the disk had a diameter of 92 mm and a thickness of 10 mm. The dimensions of the hole are 11mm x 25 mm, which is slightly bigger than the dimensions of a pill to allow a slight backlash with respect to the pill size. The hole is at a 25 mm radial distance from the center. The prototype of the top rotating disk is 3D printed and made of PLA.

After some tests, it is clear that the first design needed to be improved to ensure a single pill extraction. First, a chamfer has been added to the hole to improve the pill positioning in the extraction. Afterwards, the disk’s shape is modified to a conical shape and the position of the hole is pushed far in radial direction, in order to better drive the pills towards the hole thanks to gravity. Finally, the connection of the disk to the motor has been modified from an embedded shaft to a separate connector part which fits into the motor and can be fixed to the rotating disk using brass inserts and screws.

Bottom still disk

The second part of the extraction mechanism is the bottom disk. As for the top disk, the part has to ensure a single pill extraction. However, the bottom disk must be still and, for this reason it is also used as structural support for the container part. For the pill to pass through, the disk needs to have a hole with an equal or greater size than the top disk’s hole. The container must fit inside the bottom disk and an additional hole is needed in order to connect together the motor and the top disk via the connector shaft .

The initial conceptual design of the bottom disk is again a simple flat disk with two holes for the shaft and the pill. Also in this case, some modifications in itinere have been performed, such as the annular cavity is added for the container to fit in. Initially, the bottom disk has a thickness of 40 mm. The diameters are equal to 110 mm, 102 mm and 93 mm. The hole is placed at the same radial distance from the center as the top disk, which is initially 25 mm. The bottom disk prototype is 3D printed and made of PLA.

Since the design of the container and the rotating disk changed, the bottom disk’s design needs to be changed accordingly. Multiple holes are added on the bottom surface as well to fix the bottom disk and the motor.

Tilting

The conclusion after having tested the extraction mechanism multiple times is that the extraction works better when the bottom disk is tilted. Therefore, a part needs to be designed to tilt the whole extraction mechanism of a given angle. This part must have a hole for the pill passage and, if needed, holes for the cables.

For the design of this part, two possibilities are considered. The first one is a holder, which is a rectangular block. Here, the tilting is assured by an extrusion inside this block. The second possibility is simply to use a flat rectangular support plate. To tilt the plate, it is fixed to an external support structure. Since the first possibility requires a lot of material, the second one is chosen. The plate has dimensions 230 mm x 115 mm. This allows placing two bottom disks on one plate. The holes are placed in such a way to perfectly match with the holes of the bottom disks. The plate is laser cut and made of MDF wood. To fix the bottom disk on the plate and the plate to an external support structure, additional holes are added to the plate.

Separator

To avoid multiple pill extractions and create a barrier to the pill displacements, an additional part is used: the separator. Like the bottom disk, the separator cannot rotate. Its dimensions must be compliant with the container and the top disk.

The initial design of the separator is a vertical rectangular plate, fixed to the container via shape coupling. The dimensions of the plate correspond to the dimensions of the container, taking into account that the rotating disk is present as well. The separator is laser cut and made of MDF wood.

To improve the structural solidity, a cross-barrier is added. Since the shape of the rotating disk changed into a cone, the shape of the separator needs to change too. Finally, to gain some space, the edges of the separator are a bit adapted.

Funnel

It is important to collect all the pills, possibly extracted from multiple extraction points, into the same spot. Therefore, a funnel is added to the dispenser. For the correct working of the pill dispenser, the funnel has to cover the distance between multiple extraction points.

Three different possibilities are considered for the funnel. The first one is a 3D-printed plastic funnel. The second possibility is to slide two rectangular parts into the side panels of the external structure. The two parts fit together and a hole is added for the pills to pass. The last possibility is to use a funnel consisting of three parts. The last possibility is used for this project. The first one is eliminated because it requires too much material. The second possibility has the disadvantage of having parts sticking out of the external structure and not being well-fixed. On the contrary, the last possibility fits entirely inside the external structure and it can be fixed to it.

The dimensions of the three different parts can be found in the CAD files. The three parts are laser cut and made of MDF wood. To be able to fix the funnel to the external structure, holes are added to the three parts.

Support structure

To fix the tilted plate, the extraction mechanism, and the funnel, a support structure is needed. Inside this structure, there must be a place for all the electronics. This support has to be solid enough. It also needs to be large enough to contain everything. The containers must be visible as well, since, as mentioned before, the stock of the pills is checked visually. To make the extraction mechanism work, a touchscreen is used, and therefore, needs to be fixed and remain accessible.

The design of this structure consists of a bottom plate, two side plates, a back plate, and a front plate. All the plates are fixed together with bolts and nuts. The plates are laser cut and made of MDF wood. The dimensions of all the plates can again be found in the CAD files . To reduce the chance of breaking, the amount of wood around the holes is increased. The holes needed to fix the touchscreen, the funnel, and the tilted plate are added as well.

Cork

The last part of the pill dispenser is the cork. This is a cover for the container to avoid air coming in all the time, which could have bad effects on the pills. This cover needs to be easily removable, in case the user wants to fill the container. However, it also needs to be tight enough for the container to be airtight.

For the design of the cork, the shape of the container with the separator is taken into account. The cavity dimensions of the cork need to match with the dimensions of the container. The cork has an external diameter of 106 mm and a gap width of 3 mm, which corresponds to the thickness of the container. The part is 3D printed and made of PLA.

Circuitry and Sensors

circuit.png

Requirements

To outline the electr(on)ic components needed, think back to the functional analysis from before. The relevant features are summarized as follows:

  • Acoustic reminder
  • Real time clock
  • Setting of the alarm time
  • Actuation of the pill extraction mechanism
  • Setting and memory of pill combinations
  • Verification of pill passage

Design process and considerations of components

Acoustic reminder: for this a simple piezo buzzer which is compatible with the Arduino is chosen. Using a PWM pin of the Arduino, different tones can be achieved.

Actuation of the pill extraction mechanism: the provided stepper motors and servo motors were considered here. The stepper is chosen because of its ability to rotate continuously and do precise 360° turns without any feedback. This 360° turning is important to keep the non-rotating disk and the rotating disk aligned. The provided servo did not have this ability.

RTC, setting of the alarm time & setting and memory of pill combinations: Alarm time and pill combinations can simply be programmed into the Arduino. In order to display this information to the user, first a LCD display + RTC module was considered. Altouugh this could be an acceptable solution, the resulting interface is thought to be not user friendly, as it has to be controlled using a joystick or buttons and is not very illustrative. The search for a more advanced, more user friendly interface was started, leading to a Nextion Enhanced touchscreen display. The interface is fully programmable using the software provided by the supplier and allows images, buttons etc. to be programmed and simulated first on the PC. In practice, the display can communicate through Serial with the Arduino. On top of this, the Nextion Enhanced series has a built-in RTC, which would also allow to keep track of the time.

Verification of pill passage: two solutions were considered to detect the pill passage: the laser distance sensor and the infrared (IR) emitter and receiver. Both of these approaches yielded a good detection of the pill when dropped next to it. However, the usage of the laser sensor would reduce the amount of total components used, as only one component would be needed per pill passage hole. Anyway, it is important to keep in mind that the laser is designed to measure a distance. In contrast to this, the IR receiver is better used when a perturbation to the light intensity needs to be detected. This leads to a more natural approach when coding. The IR receiver only threw an interrupt when a perturbation was detected. In contrast to this, the laser was constantly throwing interrupts, as it was designed to measure distances. The choice was made to use the IR receiver and emitter, leading to 3 components being employed.

Final Circuit Diagram

The final circuit drawing is shown in the figure above.

Testing

During the lab sessions all of the electr(on)ic components are tested. This is done using very simple, standalone working codes. Following tests were conducted:

  • Stepper motor + driver controlled using Arduino
  • Buzzer alarm using Arduino
  • Communications between Arduino EasyNextion library and Nextion display are set up
  • Pill drop passage was checked using infrared sensor and infrared emitter

These tests proved successful after several attempts. The videos are available here. Now the difficulties were shifted to the code. I.e. making sure that every action is executed at the appropriate time. This will be outlined in the section 'Software'

Exact components

For the basic (one level Supplement Bot, 2 pills type) the following electr(on)ic components were used:

  • 1x KY-005 Infrared emitter
  • 2x KY-022 Infrared sensor
  • 2x NEMA-17 Stepper motor
  • 2x A4988 Stepper driver module
  • 2x 100 Ohm Resistor
  • 1x Piezo Buzzer
  • 1x Arduino UNO
  • 1x Nextion Enhanced NX3224K028 HMI Display 2.8 Inch 320x240
  • 1x Breadboardsome
  • Multiple Jumper wires

Software

left.png
right.png
Nextion display showcase

Requirements

The software requirements run in parallel to those outlined in the part on Electr(on)ic components. More specifically, they are the followings:

  • Let Arduino communicate with the chosen touchscreen display
  • Writing code to let the steppers turn
  • Writing interrupts for the sensors
  • Creating the interface for the touch screen
  • Piezo buzzer alarm
  • Dispensing the presets

Design process and considerations of components

First the display was fully coded. The working principle is shown in the youtube video just above. Setting up communications between Arduino and Nextion was done using the EasyNextion library. This was quite straightforward. Every button will correspond to a code that is executed by the Arduino. These commands are sent through serial using the RX and TX pins of both devices. This allows for the user to input the wanted commands. After that the Arduino will process everything.

Code flow diagram

The code flows for both the touchscreen display and for the Arduino code are seen in the figures above.

Testing

The testing of the full assembly was done on the final day. The demo video (found further) shows the final testing that was done.

Code

The code for the Nextion display can be found on the project repo, as instructables does not allow this file type.

Here is the code for the Arduino.

#include "EasyNextionLibrary.h"
const int buzzer = 9; //buzzer to arduino pin 9
const int dirPin1 = 4;
const int stepPin1 = 5;
const int dirPin2 = 7;
const int stepPin2 = 6;
const int interrupt_pin1 = 3;
const int interrupt_pin2 = 2;
const int stepsPerRevolution = 200;
EasyNex myObject(Serial);
volatile byte STATE1;
volatile byte STATE2;
int alarm;
int numberOfPills1;
int numberOfPills2;
int desiredPill1;
int desiredPill2;
int preset1;
int preset2;

void setup() {
  myObject.begin(9600);
  pinMode(stepPin1, OUTPUT);
  pinMode(dirPin1, OUTPUT);
  pinMode(stepPin2, OUTPUT);
  pinMode(dirPin2, OUTPUT);
  pinMode(buzzer, OUTPUT);
  pinMode(interrupt_pin1, INPUT);
  pinMode(interrupt_pin2, INPUT);
  attachInterrupt(digitalPinToInterrupt(interrupt_pin1), interrupt_routine1, RISING);
  attachInterrupt(digitalPinToInterrupt(interrupt_pin2), interrupt_routine2, RISING);
  digitalWrite(dirPin1, LOW);
  digitalWrite(dirPin2, LOW);
  numberOfPills1 = 0;
  numberOfPills2 = 0;
}
/*
   trigger0: dispense preset1
   trigger1: ring alarm
   trigger2: stop alarm
   trigger3: dispense preset2
   trigger4
*/

void loop() {
  myObject.NextionListen();
  if (alarm == 1) {
    ring_buzzer();
  }
  if (STATE1 == HIGH) {
    numberOfPills1 = numberOfPills1 + 1;
    STATE1 = LOW;
  }
  if (STATE2 == HIGH) {
    numberOfPills2 = numberOfPills2 + 1;
    STATE2 = LOW;
  }
  if (preset1 == 1) {
    if (numberOfPills1 < desiredPill1 ) {
      run_motor1();
      delay(500);
    }
    if (numberOfPills2 < desiredPill2) {
      run_motor2();
      delay(500);
    }
  }
  if (numberOfPills1 == desiredPill1 && numberOfPills2 == desiredPill2) {
    preset1 = 0;
    numberOfPills1 = 0;
    numberOfPills2 = 0;
  }
  if (preset2 == 1) {
    if (numberOfPills1 < desiredPill1 ) {
      run_motor1();
      delay(500);
    }
    if (numberOfPills2 < desiredPill2) {
      run_motor2();
      delay(500);
    }

  }
  if (numberOfPills1 == desiredPill1 && numberOfPills2 == desiredPill2) {
    preset2 = 0;
    numberOfPills1 = 0;
    numberOfPills2 = 0;
  }
}

void trigger0() {
  preset1 = 1;
  desiredPill1 = myObject.readNumber("page4.n0.val");
  desiredPill2 = myObject.readNumber("page4.n1.val");
  numberOfPills1 = 0;
  numberOfPills2 = 0;
}

void trigger1() {
  alarm = 1;
}
void trigger2() {
  alarm = 0;
}

void trigger3() {
  desiredPill1 = myObject.readNumber("page5.n0.val");
  desiredPill2 = myObject.readNumber("page5.n1.val");
  preset2 = 1;
  numberOfPills1 = 0;
  numberOfPills2 = 0;

}
void interrupt_routine1() {
  STATE1 = HIGH;
}

void interrupt_routine2() {
  STATE2 = HIGH;
}

void run_motor1() {
  for (int x = 0; x < stepsPerRevolution; x++)
  {
    digitalWrite(stepPin1, HIGH);
    delayMicroseconds(5000);
    digitalWrite(stepPin1, LOW);
    delayMicroseconds(5000);
  }
  delay(1000); // Wait a second
  digitalWrite(stepPin1, LOW);
}

void run_motor2() {
  for (int x = 0; x < stepsPerRevolution; x++)
  {
    digitalWrite(stepPin2, HIGH);
    delayMicroseconds(5000);
    digitalWrite(stepPin2, LOW);
    delayMicroseconds(5000);
  }
  delay(1000); // Wait a second
  digitalWrite(stepPin2, LOW);
}

void ring_buzzer() {
  tone(buzzer, 2000); // Send 2KHz sound signal...
  delay(1000);        // ...for 1 sec
  noTone(buzzer);     // Stop sound...
  delay(1000);        // ...for 1sec
}<br>

Integration Guide

total.jpg
lateral.png
container.png
funnel.png

In this section the integration of all the components and subsystems into the final machine is explained.

The mechanical parts were the first to be put together, fixing by means of screws and shape fit interlocking the different linked parts. Starting from the first extraction mechanism, the bottom disk has been fixed to the tilted plate by means of screws, and then the stepper motor has been screwed under it. Afterwards, the shaft connector part has been inserted into the motor shaft and linked, on top, with the top rotating disk via screws and brass inserts. This done, the container with the cork has been positioned on the bottom still disk, and the whole operation has been repeated for the second extraction mechanism, next to the first one.

At this point, the IR emitter and the 2 IR sensors have been hot glued to the bottom part of the tilted plate, with disconnected wires in order to facilitate the assembly of the whole mechanism.

The tilted plate (with the 2 extraction mechanisms) and the lateral plate of the funnel have been fixed to the lateral support walls by means of screws. The last 2 walls constituting the funnel were fixed to the front support wall, which was added to the lateral walls where the tilted plate was already fixed together with the floor support wall of the machine.

From the back of the machine (still open) the touchscreen display has been inserted in the appropriate hole in the front panel and screwed to the front support wall. The whole electronics (breadboard with stepper driver module, buzzer, Arduino board) with all the wirings, has been inserted into the space under the tilted plate, and connected to the IR sensors, the motor and the touchscreen display. As last step, the wires that needed an external connection (i.e. power supply) were inserted into the specific back support wall hole, and the back support wall was screwed to the assembly, concluding the integration of all parts.

Demo + Quick Start Guide

Quick Start
Demo

Check out the videos!

Critical Review

Of course, the project may be analysed under a critical point of view and improvements can be made. With the knowledge and the insight that has been acquired after finishing the project, we are going to discuss what we should or could have done differently and talk about what could be added if we had more time available. Some topics will overlap the two fields, because most of the things we could have done better from the start can still be done after finishing the project.

The main critical point is that only one pill extraction mechanism was effectively experimentally tested. This problem was due to the fact that, only on the last day, one of the cables to supply the motors did not work. We couldn’t find another cable and we did not manage to make a new one. So, we had to make it work with only one pill container to finish on time. The fact that we were also running late due to a lot of other little problems did not help. To prevent this, we should have started to finalize the prototype before the last day. We would not have faced so much little unpredicted difficulties and we would have been able to get a working cable.

After some weeks of working all 4 on the extraction mechanism, which was the most important task, only one of us worked on the electronics and programming of the supplement bot. We now believe that it should have been a task for two people at some moments. This could have limited the previous issue, because the majority of little difficulties was linked to the electronics and programming. Since the code has been rewritten on the final day, there is a lot of repetitive code. This could be cleaned up to make it more readable.

Our objective was to have a supplement bot that can dispense a large variety of pill types. This is done by adapting the rotating disk for the corresponding pill type and by adding extra modules of two additional pill containers. If we forget about the fact that only one extraction mechanism was tested, the supplement bot can dispense 2 different types of pills. To continue, more pill types need to be studied to have the adequate rotating disks. Furthermore, the often cited extra modules need to be made and added to the base version of the Supplement bot.

Although the assembly structure is functional, we strongly believe that it can be improved. We used MDF instead of birch because it is cheaper. Now we know that birch is the better choice if we are willing to pay the price. It is lighter for the same strength and a little bit more sustainable. Moreover, even the assembly mechanism could be improved optimizing the design of each part for assembly purposes.

Only one of the two sets of pill extraction mechanism is the final version, and that was done to optimize the PLA usage and do not waste too much material. The container, the bottom disk, and the way the motor is connected to the rotating disk have been improved between the first and the second one. It is obvious that the next step is to make them both as the final version.

Finally, we thought of two other things that can be added. The first one is to include a third pre-set and change the names of the pre-sets to more appealing ones (like the name of the users, or “morning, noon and evening”). The second one is a visual alarm, that starts simultaneously with the buzzer alarm.

Naturally, there are still an immense number of improvements that could be done, but this was a list of the most evident ones according to our tought.

Sustainability

There are two important aspects about the sustainability of a device. The first one is the ability to last long without degrading or losing its functionalities. The second one is being eco-friendly. The two will be discussed for the supplement bot. After considering the actual sustainability of the bot, some possible improvements will be proposed.

Long-lasting

The Supplement Bot is not subject to excessive mechanical stimuli during its lifetime cycle. Indeed, the operation of the bot does not require a lot of movement and force and, also, the environment where it is luckily to be placed, like a kitchen shelf, is not a demanding environment.

However, some basic requirements for the Supplement Bot to be durable in time could be:

· Strong enough to not brake after being hit with an average accidental hitting force.

· Strong enough to withstand multiple mountings and wear due to constant use/displacement.

· Sufficiently water resistant to endure water splashes or humidity. (i.e. kitchen environment humidity)

As it is prototyped, the Supplement Bot is relatively sturdy and doesn't show particular flaws, but it would probably not resist several years of use like a good product should. To make the structure more robust while keeping the same weight, ticker birch plates (6 mm), instead of 4 mm MDF, could be used, since sirch is lighter than MDF but more expensive. ( MDF vs. Particleboard ).

Moreover, some varnish should be used on top of the wood panels to prevent water absorption and make the structure water resistant. In addition, the hole at the front of the structure that enables the user to see the number of pills in the container could be filled with a transparent plexiglass to make the interior more sealed from the exterior. A closed trap on top of the structure could also be added for the same reason.

Finally, the container is not exactly airtight. To improve that, rubber could be added to the cork extremities to have a better fitting. Then a solution should be found to make it airtight from the bottom as well. For now, air can pass between the bottom disk and the rotating disk. This would enable to conserve the pills longer in the container.

Eco-Friendliness

The supplement both is made of MDF, PLA, a touchscreen, an Arduino, some electronic devices, screws and bolts.

MDF is eco-friendly, but might not be as much as birch. The glue that bonds the fibres in MDF (formaldehyde) might not be so good for the health and environment. Not much is known about its effects, so it is not a proven fact.( Is MDF sustainable? ) To be sure, birch can be used instead. It was already proposed in the “long lasting” subsection.

PLA is made of plant matter, which makes it one of the most biofriendly plastics. It’s composition and low melting point, makes it less toxic during manufacture than others. However, plastic is not the best concerning the environment. Even PLA takes about 80 years to decompose by its own. ( Is PLA Really Biodegradable or Sustainable? , Le PLA : quel est ce plastique biosourcé et biodégradable ? , Is 3D Printer Filament Toxic? PLA, ABS & Safety Tips) Unfortunately, the complex form of the 3D printed parts, makes it difficult to use something else than plastic. The only other option would be metal. Determining if it is better to produce the parts in metal instead of plastic is difficult. That should be studied more precisely. One way to improve the environment aspect of the bot is to try to reduce the amount of material needed for each plastic part.

The touchscreen is used to improve the user interface. It is more advanced and nicer to use. However, it is more energy consuming to produce and use. Another approach with simple buttons instead could be explored.

Bill of Materials

table.png

The cumulative cost of all the parts employed is shown in the bill of materials above.

Team Members

DSC_8064.JPG

From left to right: Jihad, Denis, Stijn & Martin

Achaoui Jihad

I graduated in electromechanical engineering at the Vrije Universiteit Brussel in 2021. The subjects that appeal to me the most are those dealing with robotics, mechanics and programming.

For this project, I worked on the mechanical design and the development of each part of the Supplement Bot. I also worked on the assembly of the whole structure. Throughout the labs, I created the different parts and assemblies on Inventor. Besides, I learned to work with PrusaSlicer, which is used to 3D print the parts, and the laser cutter.

I really enjoyed working on the Supplement Bot. It was fun to come up with new ideas, to try and test different things, to then finally be able to create a working robot. The group atmosphere was very nice. The teamwork went smoothly and was pleasant. I am proud of what we have been able to create.

Cousin Stijn

I graduated with a bachelor Electromechanical Engineering from the Vrije Universiteit Brussel (VUB) in 2021. Nowadays, my interests/favorite courses are related to electrical machines/drives, analytical mechanics and control engineering.

I worked primarily on the electr(on)ic components and software during this project. However during the first two to three weeks I was also involved in the conceptual design and prototyping of the extraction mechanism. Afterwards my focus shifted towards the electr(on)ic components and software. There was however a good collaboration with the other teammates, as the electr(on)ic components had to be integrated into the other subsystems, and finally the whole assembly.

During the project, I enjoyed the hands on approach to engineering. The fablab is the ideal location to do rapid prototyping. Prototyping was crucial for the success of our end-product. I found the teamwork in an international setting to be a very pleasant experience.

Segaert Martin

I finished my bachelor in Electromechanical Engineering at the ULB (2018-2021). I chose to do a master in Electromechanical Engineering option Mechatronics, because I like electronics (and electricity), mechanics and programming. This mechatronics project is a good opportunity to put these into practice. I already did similar projects, but this one was the most complete one. We were more independent and I have seen more about every aspects of the work.

During the project, I worked mostly on the design and the construction of the extraction mechanism and the assembly. I designed them on Inventor to make them with 3D printing or laser cutting.

It was nice to advance in the project and have gradually more and more things that we did ourself, to finally make everything work together.

Zulli Denis

I graduated in Mechanical Engineering in 2019 at Università Politecnica delle Marche, Italy and from 2020 I am currently enrolled in the Mechanical Engineering Master's programme at Politecnico di Milano, Italy, focus Mechatronics and Robotics, but since September 2021 I am in exchange at ULB, following courses from the Electromechanical Engineering Master's degree.

I had a strong education in the mechanics field, but I chose to focus also on Mechatronics and Automation because I usually enjoy thinking how to develop existing mechanical products by implementing sensors and electronics and improving their features.

During the development of the Supplement Bot, I worked the most on the mechanical design of the parts and their practical realization in the FabLab through the 3D printers and laser cutting machines. Moreover, I also worked in the iterative process of experimental testing and improvement of the prototype's parts.

It was really exciting to practically build a functional product starting from scratch, since it was the first time for me. Moreover, working in team made me grasp the need of sharing ideas and solutions with the other members, but, at the same time, I really enjoyed the feeling of working together with my mates towards a common objective.

Project Repo

All of the files used for the project are accessible here!