“DoorMan” Robotic Door Unlocker

Class Project (Individual)

Class: Mechatronics Design (ME 102B, UC Berkeley)

Timeline: April 2021 - May 2021

Skills used: CAD (Fusion 360), Arduino, circuit design, laser cutting

 

I built “DoorMan” as my project for Cal’s senior design class, inspired by how inconvenient it is to turn the key to my apartment with groceries in hand or while walking my bike. It receives commands via Bluetooth from a phone app and unlocks the door by having a stepper motor turn a slider-crank linkage attached to the door handle to disengage the lock.

The complete project report can be found here, and the presentation slides here.

Parts used in the DoorMan mechatronic system

Parts used in the DoorMan mechatronic system

Finite state machine diagram of the DoorMan mechatronic system

Finite state machine diagram of the DoorMan mechatronic system

Process

Torque calculations

To obtain an appropriate motor, I first needed to calculate how much torque was required to open the door. I hung a cloth bag on the handle and incrementally loaded it with clothes and weighed the filled bag that rotated the handle enough to disengage the lock. Using the moment arm equation averaging three weight measurements in addition to a measurement of the door handle length, I obtain a torque of 5.37 N•cm. From this information and for convenience, I chose to purchase the NEMA 17 Stepper Motor from Amazon that produced a torque up to 13 N•cm.


 
Setup of force calculation with a cloth bag and kitchen scale

Setup of force calculation with a cloth bag and kitchen scale

CAD mechanical components

I sketched out rough mechanism ideas before creating 2D drawings with the intended dimensions on Fusion 360. I was able to manufacture these parts using the remote on-campus makerspace offered during the COVID-19 pandemic, which offered a relatively quick turnaround time for fast iterations.



 
CAD model of first iteration of door-opening mechanism

CAD model of first iteration of door-opening mechanism

Construct circuit

Although I only had access to an electronics kit the ME department sent to students for this class in addition to the purchased stepper motor, it was enough to create a simple, functioning circuit that allowed me to drive the motor with an ESP32 microcontroller.

 
Circuit diagram of main circuit used in project

Circuit diagram of main circuit used in project

Program microcontroller

I used the “Stepper.h” library on the Arduino to code a simple switch-case program dependent on a Bluetooth serial input.


 
Snippet of Arduino code used, including a simple switch-case statement

Snippet of Arduino code used, including a simple switch-case statement

Design and code app

To create a mobile app for this project, I used the MIT App Inventor to send commands over Bluetooth serial communication to the ESP32. Only a simple design was required because all it had to do was send an “Open” command, select the ESP32 device from a list of Bluetooth devices, and disconnect when finished.

 
Simple UI designed with the MIT App Inventor

Simple UI designed with the MIT App Inventor

Testing and iteration

Several issues in the initial design required iteration for proper functioning:

  • The slider-crank linkage was unable to displace the door handle far enough to disengage the lock initially. This is because I failed to measure the distance necessary and apply it to the design. I fixed this by measuring this distance and extending the diameter of the wheel rotating the linkage by 2cm.

  • The slider-crank’s arm was unable to latch onto the door handle firmly with just a blunt edge. I fixed this by adding a notch on the contact point between the two parts to prevent slippage, which is reinforced with a rubber band.

  • The app was constantly sending “Open” commands to the ESP32, causing the robot to repeatedly turn the handle when commanded once. This is because I unintentionally implemented a timer interrupt that sent the same command over Bluetooth every 10ms based on a tutorial video I used to learn how to use the App Inventor. Removing that interrupt timer and only sending the command once helped resolve the issue.

In addition, I also learned that the torque required to turn the door handle in the unlocked state was far greater than in the locked state, and this was far too large for the motor to handle. I was unable to implement a transmission system to decrease the torque required to turn the handle in the unlocked state in time for the project, so I resorted to just an unlocking mechanism that was still enough for my purposes.

 
CAD model of second iteration of door-opening mechanism

CAD model of second iteration of door-opening mechanism

Outcomes

The project was well received by the teaching staff and earned me full points on the project, leading to an A+ in the class. This design is still very basic and I intend on implementing a radio communication system akin to garage-opening remotes so that an app is not necessary.



Previous
Previous

The Warm Up

Next
Next

Ultrasonic Drain Sensor