inspiration
At first glance, when you look at it, it is just a hanger hanging next to several hangers in your wardrobe, but in reality it is not just an ordinary hanger. The idea came to me when I found myself needing to turn on the room lights when I was just changing my clothes, and when looking at the closet hangers, I imagined if there was a lighted hanger.
After more than 3 years of proposing my idea, I found this similar idea by the designer: Sam Antiqechian
Let's discover the advantages of this hanger together.
Ideation
Features:
The first feature: When you approach the place where you change your clothes or dress, the hanger will sense your presence through the ultrasonic sensor and therefore the LED will light up white, until you finish changing your clothes and all you have to do is press the touch sensor to turn off the LED.
The second feature: You can control the lighting colors and change them between white, red, green, and blue using a potentiometer, which helps you do this very smoothly.
The third feature: It can help blind people reach the place to change clothes through Buzzer and then help them choose the colors to wear.
Fusion 360 Software
i used it to create any concept in 3d modeling , put different materials , and render the model
Steps of Modeling
I drew the front of the hanger with a width of 35 cm and a side height of 21 cm
I made extrude with 3 mm
I made a sketch of the top side, 7 cm wide
Taking into account the lightening of the location of the tabs for installation
I made extrude with 3 mm
I made a sketch of the largest side, 7 cm wide and 21 cm long, taking into account making an upper hole to install the hook or hanger head.
I made extrude with 3 mm
I made a sketch of the smaller side with a width of 7 cm, taking into account the mounting tabs
I made extrude with 3 mm
I made a sketch for one side of the base, 7 cm wide and 53 cm high, taking into account making the T-slot holes.
I made extrude with 3 mm
i drew a sketch with the button holes and the Arduino power
I made extrude cut with -3 mm
I made a mirror for this side and drew a sketch of the ultrasonic sensor openings
I made extrude cut with -3 mm
I made a joint for the power switch and a charging jack for the batteries
I installed the ultrasonic sensor
I installed two brackets to install the sensor
I made a mirror for the front of the hanger
I made a mirror for the largest side
I made a mirror for the smaller side that contains the LED
I drew the base by making projections from the front and back of the hanger
I placed all the electronic components on the base and installed them
I inserted a mounting bracket that I had previously drawn in the shape of the letter L, and then I marked the screw holes in the body of the hanger.
I installed the potentiometer
I installed the neopixel LED and drilled the screw holes through it
Softwares
Use it to send DXF files to the laser cutter after specifying the lines that will be cut in different ways or making holes, engraving by controlling a set of numbers, whether speed or power
software : ultimate cura
i used it to slice any model and send g-code to 3d printer
Malky Laser cutter
Printer : Prusa MK3
PLY Wood 3mm
Material : PLA filament
I designed this bart for the head of the hanger and printed it with 3D Printing
I printed a set of patterns in the shape of the letter L for installation
set The variables are :
Resolution : Fine 0.2mm
Infill : 20 %
Support : yes
Placement : Touching BuildPlate
Adhesion : no
brackets for Assembly
bracket for ultrasonic sensor
Resolution : Fine 0.3mm
Infill : 10 %
Support : no
Placement : Touching BuildPlate
Adhesion : no
Do not forget to adjust the focus before starting to operate the laser
I distributed the parts to fit the sheet area, which is 30 * 50 cm, and I used these
set The variables are :
power : 30 / 35
speed : 40
processing mode : Cut
I made the screw holes with a drill to install the neopixel LED
I put another nut to raise the neopixel LED so I can attach the wires to it
I connected the smaller breadboard and used two to solve the problem of small space. I enlarged their slots with a drill.
I installed the Arduino
I installed a step down converter
I installed the potentiometer and used the same idea, which is to use more than one nut to raise it so that I can connect the wires as shown in the pictures.
I installed the brackets for each face
I was happy when i came up with this idea of making the head of the hanger itself a mounting bracket that combines the two sides🤩
I installed these brackets to prevent the sensor from sliding, with the help of my friend (Yahya khalaf)
I connected the neopixels together, connected them to the converter, connected the battery, gathered the wires together and stored them inside as shown in the pictures.
This is a video for mounting
All Components
Arduino UNO
UltraSonic sensor
Lithium ion battery
Stepdown converter
Mini breadboard
Switch on/off
Jumbers
Touch sensor
Neopixels LED
Input Components
The ultrasound sensor works by sending waves through one eye at a specific range that is determined, and the waves received by the other eye are reflected, thus determining the distance to the object in front of it. In this picture the explanation is clear. It requires 5 volts
The touch sensor has three terminals:
ground is connected to the ground pin on the Arduino
VCC is connected to 5v on the Arduino
signal is connected to any digital pin
Output Components
It consists of four terminals from each side, three of them participating:
Two ground
one VCC
On one side there is an INPUT and on the other side there is an Out-OUTPUT
The best choice of power source for me was 4.7 volt lithium batteries, because the hanger is portable.
But the voltage difference coming out of the battery is greater than what is required for each electronic component, each of which only needs 5 volts, so it was necessary to use a converter that reduces the voltage difference to 5 volts.
Description of smart circuit
I will divide the explanation into parts:
First: All electronic components derive a voltage difference of 5 volts from the Arduino, but the Neopixel has three of them, and based on the three data sheets, it will need approximately 180 milliamps, while the Arduino does not pass more than 50 milliamps.
Solution: An external power source was used which were 7.4V lithium batteries with an adapter. The VIN input is connected to the battery and the 5V output is connected to Neopixels & VIN in Arduino is connected in direct with battery
Second: How to connect the components to the Arduino
Ultrasonic sensor:
Ground with Arduino ground or converter
VCC with 5v in Arduino
echo output pin with pin 9 in Arduino
trig input pin with pin 10 in Arduino
Touch Sensor :
Ground pin with Ground pin in Arduino or converter
VCC with 5v in Arduino
Signal pin with pin 2 in Arduino
Neopixels strip :
Ground pin with Ground pin in Arduino or converter
VCC with 5v in Arduino
Input pin with pin 6 in Arduino
💡Note : i connected 3 Neopixels in series ( input with output )
Wiring Diagram
This program is used through which we transfer to the Arduino, where the code was copied from the Tinker Cad and checked to ensure that there are no errors. Then the download was done and made sure to choose the Arduino Uno from the drop-down list at the top.
Function of Code
If someone approaches the ultrasonic device at a distance of less than 200 cm, the neopixel LED will light up white without turning off.
Until I press the touch sensor to turn off the neopixel
#include <Adafruit_NeoPixel.h>
#define PIN 6 // Pin connected to the Neopixels
#define NUMPIXELS 8 // Number of Neopixels in the strip
#define TRIG_PIN 9 // Pin connected to the ultrasonic sensor's trigger pin
#define ECHO_PIN 10 // Pin connected to the ultrasonic sensor's echo pin
#define TOUCH_PIN 2 // Pin connected to the touch sensor
#define DISTANCE_THRESHOLD 200 // Distance threshold in cm
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
Serial.begin(9600);
pixels.begin();
pinMode(TRIG_PIN, OUTPUT);
pinMode(ECHO_PIN, INPUT);
pinMode(TOUCH_PIN, INPUT);
}
void loop() {
long duration, distance;
// Triggering ultrasonic sensor
digitalWrite(TRIG_PIN, LOW);
delayMicroseconds(2);
digitalWrite(TRIG_PIN, HIGH);
delayMicroseconds(10);
digitalWrite(TRIG_PIN, LOW);
// Measuring distance
duration = pulseIn(ECHO_PIN, HIGH);
distance = duration * 0.034 / 2; // Calculate distance in cm
if (distance <= DISTANCE_THRESHOLD) {
// Turn on Neopixels
pixels.fill(pixels.Color(255, 255, 255), 0, NUMPIXELS); // White color
pixels.show();
// Check for touch sensor to turn off Neopixels
while (digitalRead(TOUCH_PIN) == LOW) {
// Wait until touch sensor is pressed
delay(100);
}
// Turn off Neopixels
pixels.clear();
pixels.show();
}
}
Component wiring and codes testing
I tested the neopixel, connected it to the arduino, came up with a library for its code and ran it.
But I made a modification in this code, which is to stop the delay that occurs between each pixel and the next. I wanted the pixels to work simultaneously.
code
/*
* Created by ArduinoGetStarted.com
*
* This example code is in the public domain
*
* Tutorial page: https://arduinogetstarted.com/tutorials/arduino-neopixel-led-strip
*/
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h> // Required for 16 MHz Adafruit Trinket
#endif
#define PIN_NEO_PIXEL 4 // Arduino pin that connects to NeoPixel
#define NUM_PIXELS 30 // The number of LEDs (pixels) on NeoPixel
#define DELAY_INTERVAL 250 // 250ms pause between each pixel
Adafruit_NeoPixel NeoPixel(NUM_PIXELS, PIN_NEO_PIXEL, NEO_GRB + NEO_KHZ800);
void setup() {
NeoPixel.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
}
void loop() {
NeoPixel.clear(); // set all pixel colors to 'off'. It only takes effect if pixels.show() is called
// turn pixels to white one by one with delay between each pixel
for (int pixel = 0; pixel < NUM_PIXELS; pixel++) { // for each pixel
NeoPixel.setPixelColor(pixel, NeoPixel.Color(255, 255, 255)); // it only takes effect if pixels.show() is called
NeoPixel.show(); // send the updated pixel colors to the NeoPixel hardware.
}
delay(2000); // on time
// turn off all pixels for two seconds
NeoPixel.clear();
NeoPixel.show(); // send the updated pixel colors to the NeoPixel hardware.
delay(2000); // off time
I tested the touch sensor, found a special library for its code, and connected it to the Arduino and a small LED for the experiment.
code
/*
* Created by ArduinoGetStarted.com
*
* This example code is in the public domain
*
* Tutorial page: https://arduinogetstarted.com/tutorials/arduino-touch-sensor-led
*/
const int TOUCH_SENSOR_PIN = 2; // Arduino pin connected to the OUTPUT pin of touch sensor
const int LED_PIN = 7; // Arduino pin connected to LED's pin
void setup() {
Serial.begin(9600); // initialize serial
pinMode(TOUCH_SENSOR_PIN, INPUT); // set arduino pin to input mode
pinMode(LED_PIN, OUTPUT); // set arduino pin to output mode
}
void loop() {
int touchState = digitalRead(TOUCH_SENSOR_PIN); // read new state
if (touchState == HIGH) {
Serial.println("The sensor is being touched");;
digitalWrite(LED_PIN, HIGH); // turn on
}
else
if (touchState == LOW) {
Serial.println("The sensor is untouched");
digitalWrite(LED_PIN, LOW); // turn off
}
}
UltraSonic code
I had it running previously at week 7, you should take a look
I assembled the circuit as I mentioned previously. When you approach a distance of less than 200 cm, the neopixel will light up via ultrasonic. After you are interested in the room or want to turn it off, you can press the touch sensor.
Final Output🤩
Switch on / off
Slider Potentiometer
DC Jack power
Touch sensor
Ultrasonic sensor
She always strives to help, simplify and clarify information. She played a major role in the PIR Sensor code, which there were attempts to operate, but it was not the successful choice. Thank you, Israa, for your guidance and assistance during the journey, not only in the graduation project.😍
I consider him the unknown soldier, and I always come to him in difficult situations. For example, I had a problem while designing on Fusion. He arranged the ideas and presented the problem clearly until he made me reach the solution. The problem is that I do not see the sketches while drawing, and I had hidden them and shown them.
He also helped me manage the power and connections in my project. Thank you, Abdul Rahman😍
There was a problem that most of the electronic components that were integrated on the Fusion during the drawing, their mounting holes did not match the holes in reality, and I cut the wood twice.
The solution: I used this wonderful tool, which is a drill, to make holes for installation
There was a challenge in how to assemble the two sides and make the head of the hanger in the same place
No code has been written for the potentiometer to control the lighting colors, and due to time constraints, I decided to put it in the design, and I will work on running this code so that it becomes a complementary feature.
I will develop a hanger to help blind people recognize the colors of their clothes and coordinate them together