AUTOMATED CURTAIN

by jmoreno555 in Circuits > Microcontrollers

374 Views, 4 Favorites, 0 Comments

AUTOMATED CURTAIN

portada2.png
Screenshot 2024-05-24 195927.png
IMG_2894.jpg
Screenshot 2024-05-24 105111.png
IMG_2891.jpg
IMG_2896.jpg

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.png
MO-TT-Metal-800x800.jpeg
Screenshot 2024-05-22 144249.png
DRV8833.png

TPU 1.75 mm filament

PLA 1.75 mm filament

HW-006 Tracker Sensor V1.2 x2

TT Motor Blue

DRV 8833 PWM DC Motor Driver Module

ESP32 camera module

18650 Battery Holder Li-ion Battery with Single Compartment Support USB

Blender Carbon Brushes x3 (We need the spring part)

DESIGN BASIS

Screenshot 2024-06-02 204032.png
Screenshot 2024-05-24 105111.png

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

IMG_2797.jpg

3D PRINTING PARTS FOR TPU FILAMENT

3D PRINTER CONFIGURATION FOR TPU FILAMENT

Screenshot 2024-06-03 131935.png
Screenshot 2024-06-03 131943.png
Screenshot 2024-06-03 131953.png
Screenshot 2024-06-03 132008.png
Screenshot 2024-06-03 132015.png
Screenshot 2024-06-03 132026.png
Screenshot 2024-06-03 132034.png
Screenshot 2024-06-03 132044.png
Screenshot 2024-06-03 132056.png

3D PRINTING: Post Processing

IMG_2801.jpg
IMG_2799.jpg
IMG_2803.jpg

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

IMG_1865.JPG
IMG_1866.JPG
IMG_1867.JPG
IMG_1868.JPG
IMG_1876.JPG
IMG_1877.JPG
IMG_1878.JPG
IMG_1879.JPG
IMG_1880.JPG

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

Screenshot 2024-05-22 144334.png

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

41MHZi1OuaS.jpg

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

DRV8833_2.png

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

IMG_2872.jpg
IMG_2851.jpg
IMG_2870.jpg

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

IMG_2831.jpg
IMG_2832.jpg
IMG_2833.jpg
IMG_2834.jpg

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

Screenshot 2024-06-02 204032.png
Screenshot 2024-05-31 125449.png

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

IMG_2887.jpg
Screenshot 2024-05-24 203729.png
Screenshot 2024-05-24 204002.png
IMG_2883.jpg
IMG_2884.jpg
Screenshot 2024-05-24 203930.png

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

Screenshot 2024-05-31 180120.png
Screenshot 2024-05-31 180614.png
Screenshot 2024-05-31 180550.png
Screenshot 2024-05-31 180509.png
Screenshot 2024-05-31 180345.png
Screenshot 2024-05-31 180303.png

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

Screenshot 2024-05-31 165744.png
IMG_2836.jpg
IMG_2837.jpg

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

Screenshot 2024-05-31 162535.png
IMG_2873.jpg
IMG_2874.jpg
IMG_2875.jpg
IMG_2878.jpg

INSTALLATION OF LIMIT SENSORS

IMG_2825.jpg
IMG_2815.jpg
IMG_2816.jpg
IMG_2818.jpg
IMG_2819.jpg
IMG_2821.jpg
IMG_2823.jpg
IMG_2824.jpg
IMG_2826.jpg
IMG_2827.jpg

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

Screenshot 2024-05-31 162334.png
IMG_2838.jpg
IMG_2839.jpg
IMG_2840.jpg
IMG_2841.jpg

Carefully place the motor at the bottom of the top cover and secure it firmly with two M3x40 screws.

OPRESSOR BLOCK & SPRING INSTALLATION

Screenshot 2024-05-31 160551.png
IMG_2843.jpg
IMG_2844.jpg
IMG_2845.jpg
IMG_2880.jpg
IMG_2881.jpg

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

IMG_2889.jpg
IMG_2890.jpg

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

Screenshot 2024-05-31 161644.png
Screenshot 2024-05-31 161706.png
Screenshot 2024-05-31 161717.png
Screenshot 2024-05-31 161654.png

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:

JOINING THE TOP AND BOTTOM COVERS

Screenshot 2024-05-31 170434.png

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