AUTOMATED CURTAIN
In this project we are going to see the construction of a low-cost automated curtain device that we can control via Bluetooth through our phone. It is designed for Single Curtain Panel type curtains.
IMPORTANT: This project is in development and what you will see in this INSTRUCTABLE is just the first version where the functionality of the selected components is tested and the operation of the device is evaluated. The Final Comments section indicates the details found in this first version and what are the possible improvements to the project.
Supplies
TPU 1.75 mm filament
PLA 1.75 mm filament
DRV 8833 PWM DC Motor Driver Module
18650 Battery Holder Li-ion Battery with Single Compartment Support USB
Blender Carbon Brushes x3 (We need the spring part)
DESIGN BASIS
The device must operate with 5 Volts
It must have a motor with a reduction box
The motor must operate with 5 Volts or less
The motor must be controlled by PWM
The motor must be controlled by a small format ESP32
The device must be controlled from the phone
The device must have limit switches
The device must be easy to place
The device must have enough power to move the curtains
Design Recommendations - BEFORE STARTING 3D PRINTING
Efficient 3D Design: Use 3D design software like SolidWorks, Fusion 360, Tinkercad, or Blender to create your model. Ensure you are familiar with the chosen tool.
Design the structure to require the least amount of supports during printing. This will make printing easier and reduce the time and material needed.
Print Orientation: Plan the orientation of the part on the 3D printer to minimize the need for supports. Often, a flat orientation is the best choice.
Avoid sharp angles or excessively long overhangs as they might require supports or be prone to deformation.
Printing Material: Choose a suitable material for your application. PLA is common for prototypes, but if you need more strength, consider ABS, PETG, or Nylon. For specialized applications, you might consider materials like TPU for flexibility or resin for high resolution.
Wall Thickness and Infill: Adjust the wall thickness and infill of your design according to your needs. Parts that need to be stronger can have thicker walls and more infill, while less critical parts can be lighter.
Easy Assembly: Design parts that are easy to assemble without the need for additional tools. Consider using clips, bolts and nuts, or slot and tab systems to keep parts together.
Consider Tolerances: Take into account tolerances to ensure that the printed parts fit together properly. 3D printers can have some variability in the dimensions of printed parts.
Modular Structure: Divide the structure into smaller modules that can be printed separately and then assembled. This makes printing, troubleshooting, and part replacement easier.
Iterative Testing: Prototype and test with 3D-printed parts before printing the complete structure. This allows you to make adjustments and improvements to the design without wasting time and material.
Documentation: Document your design in detail. Provide clear assembly instructions, a parts list, and any additional information that might be useful for others looking to build the same robot.
Consider Functionality: Ensure that the structure can accommodate all necessary components, such as motors, wheels, sensors, and circuit boards.
Strategic Reinforcements: If needed, you can add reinforcements in critical areas of the structure to increase strength and durability.
Optimize for Weight: If mobility is a significant factor, look for ways to optimize the weight of the structure without compromising strength.
Respect Copyrights: If you are using pre-existing designs or third-party components, make sure to respect copyrights and relevant licenses.
3D PRINTING PARTS FOR PLA FILAMENT
3D PRINTING PARTS FOR TPU FILAMENT
3D PRINTER CONFIGURATION FOR TPU FILAMENT
3D PRINTING: Post Processing
Once the 3D printer has finished its work, it is often necessary to work on the part itself: this is where post-processing comes in. Post-processing includes several steps on the cleaning of the parts. The goal is to remove all excess material.
The post processing steps are:
- Support Removal
- Sanding
- Joining
- Priming & Painting
Tools that we are going to use in this step:
- Dremel
- Dremel 432 Sanding Band
- Dremel 932 Aluminum Oxide Grinding Stone
- Dremel 9901 Tungsten Carbide Carving Bit
- Retracting-Blade Utility Knives
- Straight Rectangular File for Coarse Finish, 8" Long x 1/2" Wide
- Sanding Sheet with Paper Abrasive Backing, for Smooth Finish, 220 Grit
- Drill Bits: 1/8", 4mm
- HSS Straight Groove Step Drill Bit 3-12mm
HEAT SET INSERTS
For Heat-set inserts tutorial, follow this link
TOOLS:
Heat Insertion Tool For Plastic 3D Printer Soldering Iron
MATERIAL:
Heat-Set Inserts for Plastic, Brass, M3 x 4.2 mm, 3 mm Installed Length x 2 (for HW006 Sensors)
Heat-Set Inserts for Plastic, Brass, M3 x 4.2 mm, 3 mm Installed Length x 4 (for Assembly Top & Bottom Covers)
COMPONENT DESCRIPTION: HW-006 Tracker Sensor
From electroschematics:
The HW-006 (V1.3) line tracker sensor module based on TCRT5000 an infrared reflectance sensor. This is usually mounted at the bottom of a line following robot chassis. This compact tracking sensor module not only can detect transitions from light to dark lines/rails but also objects directly in front of it.
Testing this module is simple because it provides a logic-high level (1/H) output during proximity detection, and the output has a red LED to indicate the detection status. So, simply power up the module with a regulated 5VDC power supply and bring your hand closer to the module’s “eye”. You will see the status LED wakes up instantly when your hand is close to the infrared sensor part. That’s it!
COMPONENT DESCRIPTION: TT MOTOR BLUE
Metal TT motor single shaft 1:90 blue
Specification:
All metal single shaft 1:90 (single shaft full metal shaft 4 metal gears)
Deceleration ratio 1:90
Input: 3V-6V
Output: 110RPM
COMPONENT DESCRIPTION: DRV 8833 MOTOR DRIVER
From Robotica Facil:
DRV8833 is a DC motor driver (upto two DC motors or one stepper motor) with continuous current 1,5A (4A peak). For controlling a DC motor, we can use inputs (IN1 and IN2) and connect the motor to (OUT1 and OUT2) or IN3 and IN4 and OUT3 and OUT4, correspondingly. Motor speed can be regulated with PWM signals on both directions with a maximum frequency of 100Khz. Motors can be stopper or stalled. It requires pin soldering.
Remark: If the motor consumes more than 0.6A, it might be necessary a heat dissipator.
Characteristics:
Chip: DRV8833
Voltage: Vcc = 2.7-10.8V
Output current: Iout = 1,5A (RMS per channel) / 4A (peak)
Save energy mode.
Working modes: Counter-clockwise, clockwise, stall and break.
Downloads
COMPONENT DESCRIPTION: Esp32 Camera Module
I am using an ESP32 camera module, whose camera was damaged. One of the advantages is that it is small in size and has a high intensity LED installed, which we can use as an additional lamp in our controller. Thus, if we have a power outage at night, this equipment also serves as a small emergency lamp. If we do not have this module, we can use an ESP32 C3 Super Mini.
Before Starting to Assemble: ROD CUTTING
TOOLS:
Electric Angle Grinders
Angle Grinder Cutoff Wheel for Stainless Steel, Flush-Cut, 4-1/2" Diameter, 0.045" Thick
MATERIAL:
Multipurpose 304/304L Stainless Steel Rod, 1/8" Diameter
STEPS:
We need to prepare the following steel bars:
3 bars 1/8" in diameter by 78 mm in length.
1 bars 1/8" in diameter by 35 mm in length.
Mark each rod with the necessary distance and make the cuts with the grinder.
Grind the cuts to avoid burrs.
Before Starting to Assemble: Wiring MOTOR
Using two female Dupont jumper cables, cut the protective plastic from one end of the jumper. Carefully bend the tip of the pin and solder it to the motor terminals.
OPERATING PRINCIPLES: MOTOR
The motor has a flexible material roller made of TPU filament attached, just like the free roller. The curtain rod is placed between these two rollers and the springs that we place in the oppressor block exert a holding force towards the rod. This causes the device to move across the bar when power is applied to the motor. The motor can move in both directions, as selected in our phone application, and will stop when the sensors detect the position limit switches.
OPERATING PRINCIPLES: LIMIT SWITCH
The limit switch is made of TPU filament, so that because it is slightly flexible it can be attached to the curtain rod. The limit switch is printed on black material and a little white insulating tape is placed on one end, so that it can reflect the light emitted by the device's detectors.
SYSTEM WIRING
LIMIT_SWITCH_CLOSE output --> pin 12 (ESP32 Cam);
LIMIT_SWITCH_OPEN --> pin 13 (ESP32 Cam);
PIN_MOTOR_AIN1 --> pin 14 (ESP32 Cam);
PIN_MOTOR_AIN2 --> pin 15 (ESP32 Cam);
MOTOR ROLLER INSTALLATION
MATERIAL:
Allen Hewad Screw M3x15 mm
STEPS:
Place the pieces as shown in the images and with the screw secure them firmly to the motor shaft.
FREE ROLLER INSTALLATION
INSTALLATION OF LIMIT SENSORS
MATERIAL:
Multicolored Dupont Wire 40pin Female to Female Breadboard Jumper Ribbon 200 mm
STEPS:
Place the jumpers on the sensors and carefully pass the cables through the holes in the top cover. Once in place secure the sensors with an M3x4mm Phillips screw.
MOTOR INSTALLATION
Carefully place the motor at the bottom of the top cover and secure it firmly with two M3x40 screws.
OPRESSOR BLOCK & SPRING INSTALLATION
Insert the OPPRESSOR BLOCK into the cover and once in place do the following:
Insert each of the three bars through the front of the cover and slide them inside the OPPRESSOR BLOCK UNTIL they appear through the exit holes of the OPPRESSOR BLOCK.
Then carefully press each spring and place it in the space between the OPPRESSOR BLOCK and the holes in the cover and slide each bar until it penetrates the hole and is firmly attached.
POWER SWITCH INSTALLATION
Solder two jumpers to the switch and place it in place.
COMPONENTS INSTALLATION
Install the battery, camera and motor driver module inside the bottom cover.
PROGRAMMING
The programming of the automated curtain rod consists of two different software applications: One is the phone application that sends us commands via a Bluetooth connection and the other is the application within the ESP32 module that receives the commands sent by the phone and is responsible for to operate the motor as well as to read the inputs from the infrared detectors. Let's look at each of these parts:
MIT APP INVENTOR
From Enjoy Mechatronics:
In this tutorial, you'll learn how to use MIT App Inventor to create a Bluetooth app that controls an LED on an ESP32. We'll walk you through the process step-by-step, from starting a new project to building the app and testing the final product. Whether you're new to IoT or an experienced maker, this video is a must-watch for anyone interested in using MIT App Inventor to create apps for your next smart project.
SOFTWARE
For the ESP32 software, download the following program and load it into the ESP32:
Downloads
JOINING THE TOP AND BOTTOM COVERS
Once the ESP32 is programmed, we can close the device, for this we use four M3x8 allen head screws... and that's it, we have finished building our automated curtain rod... it's time to test it.
FINAL TEST
FINAL COMMENTS
During the tests, it was detected that the voltage supplied to the motor (5 volts) is not enough to move the motor on the curtain rod, so it is necessary to modify the design, adding an additional 18650 battery and thus the voltage applied to the motor will be between 7.4 and 8.2 volts.
The logic operates correctly and a point of improvement is to add timers to the device, so that the curtains open and close at certain times, as well as adding remote control routines via ALEXA, in this way our automated curtain device becomes an intelligent part of our house...as soon as these improvements are available in the next phase of this project, this INSTRUCTABLE will be updated.
Greetings from Mexico
Jorge Moreno