Independently designed and developed MediKit, a smart medicine organiser featuring six motorised drawers operated through custom rack-and-pinion mechanisms. Powered by an ESP32 and controlled through a cloud-connected web application, the system integrates Firebase authentication, MongoDB medication and alarm records, remote drawer control, scheduled reminders and a four-digit LED display. The complete mechanical enclosure was designed in Fusion 360 and fabricated using 3D printing.
MediKitSmart Medicine BoxHealthcare TechnologyMedication ManagementInternet of ThingsESP32Embedded SystemsMechatronicsMotorised DrawersRack and PinionBO MotorsL298NFusion 3603D PrintingProduct DesignFirebase AuthenticationMongoDBVercelGitHubCloud IntegrationWeb ApplicationFull-Stack DevelopmentRemote Device ControlMedication RemindersScheduling SystemSeven-Segment DisplayDC Motor ControlElectronics PrototypingFreelance Engineering
01 / 05
Automatic Medicine Box
01
Project Background and Motivation
MediKit was developed in June 2026 as an independent freelance engineering project focused on creating an interactive, electronically controlled medicine organiser.
Conventional medicine boxes generally rely on manually opening compartments and separately remembering medication schedules. While they provide a convenient method of organising medicines, they offer limited interaction between physical medicine storage and digital reminder systems.
The project explored how an embedded microcontroller, motorised mechanisms and a cloud-connected application could be combined into a single device that allows users to organise medicines, control storage compartments and receive scheduled reminders.
The system was designed with six independent drawers, each associated with a motorised mechanism and a configurable medicine record.
A primary objective was to create a fully custom product rather than simply adding electronics to an existing storage box. This required designing the enclosure, drawers, mechanical transmission, electronics arrangement and control software together.
The resulting system demonstrates a practical application of IoT and mechatronics in everyday product development.
02
Project Objectives and Functional Requirements
The main objective was to develop a six-compartment medicine organiser capable of electronically opening and closing its drawers through a mobile-accessible application.
Each drawer needed a dedicated drive mechanism, allowing it to be controlled independently of the other compartments.
The mechanical design required the rotational motion of a DC motor to be converted into linear drawer movement within a compact enclosure.
The embedded electronics needed to coordinate six separate motors, control the physical display and interface with the application.
An additional objective was to provide a remote-accessible user interface. The system needed to operate without requiring the user's phone and the medicine box to remain connected to the same Wi-Fi network.
The application also needed authentication, persistent medicine information, drawer-state records and configurable medication reminders.
The final functional objective was linking digital medication schedules with the physical device so that a reminder would appear in the application and the corresponding drawer number would be displayed on the medicine box.
These requirements established the basis for the mechanical, electronic and software development.
03
Mechanical Product Design in Fusion 360
The complete medicine box was designed using Autodesk Fusion 360.
The enclosure was developed to accommodate six independently moving drawers while providing sufficient internal space for the motor assemblies, rack-and-pinion mechanisms, motor drivers, ESP32 controller and power distribution components.
Each drawer was designed as a separate mechanical component capable of moving along a defined linear path.
The dimensions and arrangement of the drawers had to be coordinated with the locations of the motors and gears so that the moving components could operate within the available internal space.
The rack-and-pinion mechanism influenced several important design decisions, including the direction of drawer travel, the position of the motor shaft and the required clearance around the gear assembly.
The outer enclosure was also designed to support the display, power connector and electronic components while maintaining a practical form for everyday use.
After completing the CAD models, the mechanical parts were fabricated using 3D printing and assembled into the final six-drawer structure.
This development process provided practical experience in designing a complete electromechanical product where the enclosure, actuators and electronics must function together.
04
Six-Drawer Rack-and-Pinion Mechanism
One of MediKit's defining mechanical features is the use of individually motorised rack-and-pinion mechanisms for all six drawers.
A rack-and-pinion mechanism converts rotary motion into linear motion through the engagement of a circular gear with a straight toothed rack.
In MediKit, each BO geared motor drives a pinion gear connected mechanically to the corresponding drawer's rack arrangement.
When the motor rotates in one direction, the pinion advances the rack and moves the drawer outward.
Reversing the motor direction moves the rack in the opposite direction, allowing the drawer to retract into the enclosure.
Each drawer operates through its own motor and gear mechanism, enabling independent control of the six compartments.
The system therefore requires coordination between motor direction, mechanical travel and the structure of the drawer guides.
The rack-and-pinion architecture was selected as a practical means of achieving linear drawer movement using compact, commonly available DC geared motors.
The mechanism also demonstrates how custom 3D-printed transmission components can be integrated with electronic motor control to create a purpose-built actuator assembly.
05
Motor Control and ESP32 Embedded Architecture
The complete medicine box is controlled using an ESP32 microcontroller.
Six BO geared DC motors provide the actuation required for opening and closing the six drawers.
Three L298N dual-channel motor drivers are used to operate these motors, with each driver providing control for two motor channels.
The ESP32 provides the control signals required to select the appropriate motor and determine its rotation direction.
When the application requests that a particular drawer be opened, the corresponding command is processed by the embedded controller.
The ESP32 then drives the relevant motor channel in the direction required to extend the selected drawer.
A closing command causes the controller to reverse the motor direction so that the drawer retracts into the enclosure.
This arrangement allows the software to address the six drawer mechanisms individually.
The embedded architecture separates application-level requests from physical actuation, allowing the application to operate the medicine organiser without directly generating motor-driver signals.
The ESP32 also manages the local display, providing the connection between the digital medication reminder system and the physical device.
06
Power Supply and Electronic Integration
MediKit uses an external 12 V DC adapter as its main electrical power source.
A barrel-jack connector is incorporated into the enclosure to provide a convenient connection between the adapter and the internal electronics.
The incoming supply is distributed through the appropriate power regulation arrangement, including a DC-DC buck converter used to provide the regulated voltage required by the electronics.
The ESP32 operates as the main control unit, while the three L298N drivers provide the switching interfaces needed to operate the six drawer motors.
The electronic components were integrated into the custom enclosure along with the display and motor wiring.
The arrangement needed to accommodate both the electrical connections and the movement of the mechanical assemblies without obstructing the drawers.
Particular attention was required when organising the six motor connections because each actuator had to correspond to the correct drawer number in the embedded firmware and web application.
The resulting architecture combines an external power supply, embedded controller, motor-driver modules and user-interface electronics within one standalone device.
07
Four-Digit Seven-Segment Display
A four-digit seven-segment LED display is integrated into the physical medicine box.
The display provides a simple local information interface that can be viewed without opening the web application.
The display supports the system's time-related functions, allowing it to present information associated with the medication schedule.
When a scheduled medicine reminder becomes due, the device displays the number of the drawer associated with that medicine.
This creates a direct connection between the digital reminder information and the physical storage location.
For example, when a medication assigned to Drawer 3 becomes due, the system can present the corresponding drawer number on the physical display.
The user can then identify which compartment contains the required medicine.
The display provides a lightweight alternative to a larger graphical screen while keeping the electronics relatively compact.
Its integration also demonstrates how the ESP32 can coordinate both mechanical operations and local visual feedback within the same product.
08
Mobile-Friendly Web Application
The user-facing software was developed as a web application accessible through a mobile phone or other browser-equipped device.
The application provides an interface for managing the six drawers and their associated medicine records.
Individual controls allow the user to issue open and close commands for the compartments.
The application also provides medication-management functions, allowing medicine information to be associated with particular drawers.
An important requirement was supporting scheduled medicine reminders rather than limiting the application to manual operation.
Users can configure reminder times and select the relevant medicines or drawers.
The application then uses the stored scheduling information to present reminders when medication is due.
The interface serves as the central software component connecting the user's medication records, schedule configuration and physical drawer-control functionality.
By using a web application, the system can be accessed through compatible browsers without requiring the user to install a platform-specific native mobile application.
09
Firebase Authentication and MongoDB Database
The application integrates two separate backend services for authentication and persistent data storage.
Firebase Authentication is used to manage user authentication, providing the sign-in functionality required for accessing the application.
MongoDB is used as the database for storing the information associated with the medicine box and its operation.
The stored data includes records identifying which medicine is assigned to each drawer, the configured medication alarms and the recorded open or closed state of the compartments.
This database-driven approach allows the application to maintain information across user sessions and device connections.
Instead of storing all application information only within the ESP32, the cloud-backed software can manage persistent records that remain accessible through the hosted interface.
The architecture also separates user authentication from the medicine-management database, allowing each service to perform a distinct role.
The combination of Firebase and MongoDB demonstrates the integration of cloud identity services with persistent application data in a physical IoT product.
10
Vercel Deployment and Remote Device Access
A major software requirement was making the application accessible without requiring the user's phone to connect directly to the ESP32's local Wi-Fi network.
To achieve this, the application was developed and deployed using a cloud-hosted architecture.
The project source code is maintained through GitHub, while Vercel provides hosting for the user-facing web application.
This allows users to open the application's hosted address through a browser rather than accessing a webpage served only by the ESP32.
The system uses its cloud-connected architecture to coordinate the application and physical medicine box.
A drawer-control request initiated through the web interface is delivered to the embedded device through the project's remote communication mechanism.
The ESP32 then operates the corresponding motor-control channel.
This design separates the location of the user's device from that of the medicine box, provided that the necessary application, network and device connections are available.
The project demonstrates practical integration between cloud-hosted software, database-backed state management and a physical embedded control system.
11
Medication Scheduling and Reminder Workflow
MediKit incorporates a scheduling system that allows users to configure medicine reminders through the web application.
Each scheduled reminder can be associated with a particular medicine and its assigned drawer.
The schedule information is maintained in the application database so that it can be retrieved and used by the reminder system.
When the configured reminder time is reached, the application presents an alert identifying the medication that needs attention.
The physical medicine box also displays the drawer number associated with the scheduled medicine.
This provides two complementary forms of information: a detailed software alert through the application and a simplified local indication through the seven-segment display.
The user can then operate the appropriate drawer through the application's controls to access the medicine.
The architecture connects three core functions: medicine assignment, scheduled notification and remote mechanical access.
The documented implementation confirms the reminder alert and drawer-number indication. It does not establish automatic drawer opening when an alarm occurs, nor does it establish automatic verification that a medicine has been taken.
These would require additional logic or sensing beyond the features currently described.
12
Hardware–Software Integration and System Operation
The completed MediKit architecture consists of several interacting subsystems: the motorised drawer assembly, ESP32 embedded controller, local LED display, cloud-hosted web interface, authentication service and MongoDB database.
The mechanical subsystem provides the physical storage and movement functions.
The ESP32 handles commands and translates them into actuator operations through the L298N motor drivers.
The application enables users to manage medicine information, control drawers and configure scheduled reminders.
Firebase Authentication manages user access, while MongoDB maintains persistent information about the drawers, medicines and schedules.
Vercel hosts the web application, making the user interface accessible without requiring direct local-network access to the ESP32.
When the user selects a drawer operation, the application communicates the intended action through the project's remote control pathway.
The embedded controller operates the assigned motor, causing the corresponding drawer to extend or retract through its rack-and-pinion mechanism.
When a medication reminder becomes due, the software displays an alert and the medicine box provides a physical drawer-number indication.
Together, these functions demonstrate a complete connection between cloud software and mechanical actuation in a custom IoT device.
13
Final Outcome, Engineering Significance and Future Development
MediKit was developed as an independent freelance engineering project in June 2026, combining mechanical design, 3D printing, embedded electronics and cloud-backed software.
The resulting prototype incorporates six individually motorised drawers, ESP32 control, three L298N motor drivers, a four-digit seven-segment display and a web-based medication-management interface.
The application integrates Firebase Authentication, MongoDB and Vercel hosting to provide user access, persistent data storage and remote operation.
The project demonstrates the implementation of rack-and-pinion mechanisms for motorised storage, the coordination of multiple DC motors through a single embedded controller and the integration of physical hardware with a cloud-connected application.
It also illustrates the importance of designing software and mechanical hardware as parts of one product rather than as independent systems.
Future improvements could include verified drawer-position sensors, motor-stall detection, manual emergency access, power-loss recovery and mechanisms for safely handling communication failures.
Additional software features could include medication inventory tracking, missed-reminder records, improved time synchronisation and user notifications that remain available when the web application is not actively open.
For dependable medication use, further validation would be needed to ensure that reminder records, physical drawer operations and application state remain consistent, particularly after network interruptions or unexpected power loss.
The prototype is best presented as an IoT-enabled medicine organisation and reminder system, rather than as a clinically validated medication dispensing device.
Overall, MediKit demonstrates practical experience in independently delivering a multidisciplinary electromechanical product integrating CAD design, 3D fabrication, embedded motor control, cloud application development and remote user interaction.