The DoorBot

by gabrielbtan in Circuits > Arduino

195 Views, 1 Favorites, 0 Comments

The DoorBot

Doorbot#1.jpg

As part of a school project, I designed a robot that closes my bedroom door on sound command, which I have named “The DoorBot”. The idea originated from my roommate, who often comes into my room and leaves my door open. In looking to solve this problem, I wanted to design something that would be able to close my door while I remained at my desk.

The DoorBot consists of two main functions. As mentioned previously, the first is automatically closing the door and then preparing for the door to be reopened. This is achieved through a sound sensor which is capable of detecting loud noises such as a clap. On clap command, a motor is activated that would wind up a spool of rope that is attached to the door. The motor would then unwind, creating slack and allowing for the door to be reopened. Once this happens, a green LED is turned on, informing the user that it is safe to open the door.

The second of its function is to work as a type of door stop, where I will be manually able to control how ajar my bedroom door. This was done through two buttons that will manually control the motor to wind or unwind the spool of rope connected to the door. This is beneficial when I am trying to direct airflow throughout my apartment as we lack central air.

For The DoorBot, I utilized a high sensitivity microphone attached to an Arduino uno as a digital input. The model used acted as a comparator, in which I was able to set a sound level that, when surpassed, would provide a digital “trip”. Once the microphone was tripped, a high torque, brushless DC motor was activated which was connected to the Arduino uno using a H-Bridge to allow for direction control of the motor. The motor would wind in a rope that was attached to the door, closing the door. Once the motor had successfully wound up all of the rope and closed the door, the direction of the motor would then switch, unwinding the rope and creating slack. Once all of this had been done, a green LED that was attached to the Arduino is activated and would glow for 10 seconds, informing the user that the door is ready to be opened within harming The DoorBot.

Finally, manual controls for the motor were added through the use of buttons. Two buttons served as digital inputs for the Arduino and were each assigned to a direction of motor rotation, allowing for the user to wind up or unwind rope to a specific length.

All of the components of The DoorBot were placed and taped into a cardboard box which would then be secured to the wall using command strips or tape. The rope which was attached to the spool would then be secured to the top of the door allowing using more tape. The high torque motor was housed in a custom-made motor stand that was 3D printed and was then attached to spool by a 3D printed, keyed driveshaft. One end of the driveshaft was glued into the rotating axis of the spool and the other was designed to interface with the keyed rotor of the motor . This entire assembly was then supported on the other end using a simple support pin that was also 3D printed and taped to the bottom of the cardboard box. The two buttons, the microphone and the LED were all exposed externally, allowing for user interactions.

Design Consideration and Future Changes

In terms of the design, the largest consideration that I dealt with was ensuring that the motor I chose would provide enough torque to close the door. As I didn’t have a spring scale to determine the force needed to close my door, I looked for motors that provided high torque, were affordable and were able to run off a battery packs. The list of options available on Digikey was limited.

If I was to redo the project , I would have tried to find a way to explicitly measure the torque needed to close my door. Despite knowing the calculations needed to find the required torque, I simply lacked the instrumentation to perform a relatively simple yet import calculation. Furthermore, I would have implemented a gear train system in order to maximize the torque conversion. As speed of door closing is not a defining factor of the design, I wish I had thought about implementing a gear chain earlier in the design process. Additionally, if I were to redo the project, I may have tried to get a more accurate microphone. Instead of a digital mic, I would have opted for an analog microphone that would have allowed me to read the value that the mic was picking up to allow for user feedback.

If I were to redo this project without restrictions, I would have 3D printed the entire housing of The DoorBot. Within this design, I would have created specific housing areas for each of the components, instead of simply taping things to cardboard. I would also have been able to design specific ports for the microphone head, LED and buttons instead of just cutting holes in the box, punching the ends through and securing everything with duct tape. This would have made everything more professional and easier to work with. It would also mean that the motor stand would be attached more securely as it does have large forces acting on it. Additionally, if I had more money for the project, I would have 3D printed my own spool. To save money, I ended up using a spool that was originally filled with sewing thread. The spool that I used was not deep enough to hold large quantities of rope, which ended up being a huge problem. On multiple occasions, the rope overfilled the spool and ended up being wrapped around the main rotor of the motor. Spools online were surprisingly expensive, and I did not have enough money in my budget to be able to 3D print a spool, so without restrictions, this is surely something that I would change.

Bill of Materials

Please see attached PDF which includes place of purchase, serial number, quantity, etc.

Downloads

Assembly and CAD Files

Doorbot#1.jpg
CADSS#3.JPG
Doorbot#3.jpg
CADSS#6.JPG
CADSS#8.JPG
Doorbot#4.jpg
Doorbot#2.jpg
CADSS#4.JPG

Step 1: Get a cardboard box approximately 10in x 8in x4 in in size.

Step 2: Using an Xacto knife, cut out a 2in x 2in hole 3 inches away from the lower front face of the box.

Step 3: Tape wooden craft sticks around the edge of the opening made in Step 3 to allow for rope to easily pass through.

Step 4: 3D print all of the individual components.

Step 5: Wrap about two yards of rope onto the spool. Glue half of the 3D printed “driveshaft” into the main axis of the spool with the keyed end facing out of the spool.

Step 6: Insert the high torque motor into the 3D printed “motor stand”. This should fit using a press fit, but sand or apply epoxy where needed depending on 3D print tolerance.

Step 7: Glue the keyed drive shaft that was glued to the spool to the rotor of the motor.

Step 8: Insert the 3D printed “support pin” into the motor stand, securing the spool in place.

Step 9: Tape the Arduino, breadboard, battery pack and motor housing into the box as seen in the images or as you see fit. You may move the Arduino, breadboard and battery pack as needed to fit container, however the motor mounting system must be half an inch from the lower left of the container with the spool in line with the opening made in Step 2.

Step 10: Assemble the circuit as seen

Step 11: Using the Xacto knife, cut two holes about 0.25 inches in diameter on the left and right face of the box. They should be near the center of the box and about an inch apart, however exact dimensions are not vital. Place the mic and LED through the left side of the box and the two button on the right side.

Step 12: Secure the entire assembly to the upper corner of the doorframe using duct tape on the side opposite where the hinges are. Attach the end of the rope from the spool to the top of the door using duct tape.

Circuitry

Doorbot#6.jpg

Operation Instructions

Once installed, The DoorBot is extremely easy to use. First plug in the Arduino into a computer and upload the attached code, see Code below. Then turn on the battery pack. Now turn the dial on the microphone all the way clockwise. This has been a good threshold for activation upon hearing a clap. However, this can be changed as seen fit. The DoorBot is now fully functional. Once the attached door is left open, simply clap loudly in the direction of The DoorBot and the motor will turn on and begin to close the door. Furthermore, pressing on the two buttons on the right side of the box will wind or unwind the rope attached to the door.

Arduino Code