In order for supplements to be dispensed properly, the team needed to design a system which would allow one supplement to be dispensed and collected accurately. The team worked off of the previous iteration of a gear system that used rotational motion to be converted into linear motion. After multiple talking points amongst the team, a new design was theorized to complete the desired goal of the mechanism. For the mechanical motion, the device will use two servo motors and one linear actuator. As the device requires multiple parts and it is broken into many various sections, it is important to understand the different roles of each component responsible for the motion of the system.
The first motor will be attached to the disc holding each individual supplement container. This motor will be responsible for positioning the correct supplement for distribution. The servo motor is omnidirectional and has the capacity to rotate 360 degrees. The motor takes input based on angle degrees leading to each supplement having a defined 60-degree marking. The motor, when received a command, will rotate until the given degree value is lined up with the first dispensing plate hole.
The second servo motor will be attached to the middle of the dispensing plates. The role of this motor is to rotate the middle plate to collect the dispensed supplement, and rotate it to a fixed opening, dispensing the supplement to the user's drink. The servo motor is omnidirectional and has the capacity to rotate 360 degrees. The motor takes a fixed input based on angle and will rotate approximately 30 degrees to align with the top dispensing plate and then rotate back to align with the bottom dispensing plate.
The linear actuator will be attached to the frame of the mechanism and will have attached on it a thin piece of material similar to a blade the thickness of a credit card. The role of the actuator will be to open and close the hole on the top dispensing plate. As the supplements rotate into the appropriate position, the team needed to ensure supplements would not accidentally be dispensed and fall into the dispensing hole of the top plate. If this were to happen, then the appropriate supplements would not be dispensed. To fix this, a thin plate will be covering the first hole until the correct supplement is lined up with the correct hole. Once in place, the linear actuator will retract the thin covering, exposing a hole deep enough for one supplement. Once this process is complete, the actuator will extend back into position once again creating the covering from the first hole and allowing for the rest of the dispensing process to take place.
Supplement holding disc
Linear Actuator with thin material
Three discs responsible for dispensing. Top (blue) and bottom (yellow) fixed discs. Middle (green) revolving disc.
The electrical components are broken down into three different systems. Our design utilizes a DC motor with encoder, a linear actuator and a position control servo motor. For the DC motor, the motor requires a separate 12-volt power supply. The external power will be attached to an L9100 motor driver, which will then have various connections to our microcontroller. Additionally, the encoder needs its own 5V source. The five volts will be supplied from the microcontroller’s 5V pin. A sample wiring diagram is provided below.
The motor driver the group will be using for the design is not used in the wiring diagram. A similar motor driver is used in its place. An Arduino Uno microcontroller was used to test the electrical components. Ultimately, this microcontroller will be replaced by the ESP32 microcontroller used for software testing. Substituting the ESP32 for an Arduino Uno microcontroller in the electrical testing allowed for concurrent testing of the electrical and software subsystems. Since the microcontrollers are similar and both programmed using Arduino IDE, the transition from Arduino Uno to ESP32 in the future phases should require minimal changes.
The next system of our design is the servo motor, responsible for rotating the middle plate, collecting and dispensing the chosen supplement. The servo motor is a positional control servo, with a low operating voltage. The servo will be connected to the 5V pin of the Arduino, and the signal wire will be attached to any analog pin.
The last electrical component of our design is the linear actuator. The linear actuator will be responsible for pushing a plate to close and open a space for a given pill to dispense into the collection plate. The linear actuator requires 12V of power and will use the same power that powers the DC Motor. The signal wire of the actuator will be connected to any analog pin. A sample wiring diagram is provided below. Unfortunately, the software used to model the electronics does not contain a linear actuator, so a different motor is used in its place.
Pictured to the left is a circuit design to supply power to the servo motors. A list of component and important details are listed below.
Arduino:
Typical operation: 5V
Supports external power jack : 7 – 12V
Supplies around 900 amps
Servo Motor
Operates: 4.8 - 6V
Current Draw: 150-200mA
Torque: 1.8-3.5kg/cm
Linear Actuator
Operates: 12V
Current Draw: 246mA
DC Motor
Operates: 12V
Current Draw: 150mA
Torque: .98kg/cm
HiLetgo L9110S H-bridge DC Stepper Motor Driver Controller Board
The motor driver being used for the design is pictured left. It is rated between 2.5 - 12V
The supplement dispenser will have a companion app that stores each user's genetic profile and health goals. The app will be developed in JavaScript. The app will identify which supplements need to be dispensed and send that information to the dispenser using this JavaScript interpreter library for Arduino. The app will assign a boolean value to each type of supplement based on whether or not it should be dispensed. The dispenser will utilize this data through the process shown in the software flowchart below.
The flow of the software will go as follows. Once the data is entered into the app, the app’s algorithm will identify which supplements should be dispensed. Upon confirmation, the app will send the data to the Arduino and the dispensing process will begin. The servo motor will rotate the six supplement containers until the desired supplement is above the opening mechanism (linear actuator). The linear actuator will retract allowing for a supplement to drop down to a second rotating disc. After that, the linear actuator will return to the closed position, and the second disc, connected to the second servo motor, will rotate the supplement to the drop location. The process will restart with the rotation of the supplement containers until all desired supplements are dispensed.