Sometimes I forget to turn off the light before going out, and sometimes I need to make sure that the light is turned off while I am outside the house. I designed this product to help me with that.
Overall, a smart lamp that opens when you say "Open" or detects movement is a convenient and fun addition to any home or workspace. With their advanced technology and ease of use, these lamps offer a unique and innovative way to light up your space.
The story of the naming of the Smartlamp
"I named my smartlamp 'Atiyat' which simply came about when I was sitting with my sister, watching the TV series 'Al Kabeer'. I was trying to turn on the smartlamp in the scene where the actor kidnaps a مربوحة and introduces her to his family,and they name the light bulb 'Atiyat' The light bulb in the show was turning on and off, just like the issue I was having'. So my sister said to me, 'Let's just call this lamp Atiyat, it suits it.'"
i used fusion to design model
but before that , i draw sketch on paper
First Step
Drawing sketch on paper
Second Step
Design the sketch on Fusion 360
I made sketches with dimensions (in the paper draft).
I designed the 7 sides , then extruded them as 3 mm for the thickness of plywood.
I used the (extrude - cut ) feature in Fusion360 to make sure that the angles will be perfectly spotted in their place.
i design T- slots, taps ,
Fully defined sketch
Right Side
Back Side
Top Side
Left Side
Front Side
Front Side
Stand for Lamp
bottom Side
Third Step
Extrude & Appearance
Back Side
Right Side
Left Side
Front Side
Front Side
Bottom Side
Appearance (wood)
Stand For Lamp
Fourth Step
Import Component
3D Fabrication On The Project
ultimaker cura
PLA Plastic
Prusa
(3D Printer)
Laser Cutting Fabrication On The Project
El Malky ML149 CO2
Laser Cutter)
plywood mdf(3mm)
3D Printing
Laser Cutting
1- Drag File on Cura it must be *.STL format
2- i change Properties
infill (20)
resolution (0.2mm)
3- then click on slice to show number of grams and time
(17 gram ) -(2 hours 25 min )
4- finally save to disk (extension .gcode)
1- Import file on RDwork it must be *.DXF format
2- change Properties
cut ( Black)
speed 30 - power 50
4- finally download ,The laptop must be connected to a machine
The video for the lasercutting process.
The video for the 3D Printing process.
The sides after lasercutting.
coloring
"I used a wood stain to make the color of the wood more distinctive."
The device is Smart Lamp the input is bluetooth and IR Sensor the output is lighting LED
Design circuits on tinkercad using this component :
1- Mini Breadboard
2- Arduino Uno
3-bluetooth module
4- Neo pixels Matrix
5- IR Sensor
5- Adapter
7- jumber Wires
Arduino uno
ADapter 5v
bluetooth module
jumber Wires
IR Sensor
Neo Pixels 4*4
i used this website to design the curcit Because the compound was not all present in tinkercad
I begin with open the Circuito and drag and drop the component in the working area then built the circuit as shown in the image below.
The circuit will use the IR sensor to detect signals from a remote control and activate the NeoPixels accordingly. The Bluetooth module will allow you to control the NeoPixels from a smartphone app.
Here are the steps to create the circuit:
Open Tinkercad and create a new circuit project.
Drag and drop an Arduino Uno from the components panel onto the workspace.
Connect a 5V power source to the Arduino's 5V and GND pins.
Add the NeoPixels by searching for "NeoPixel" in the components panel and dragging them onto the workspace.
Connect the NeoPixels to the Arduino by connecting the data pin of the first NeoPixel to pin 6 on the Arduino, and the power and ground pins to the 5V and GND pins on the Arduino, respectively.
Add the IR sensor by searching for "IR receiver" in the components panel and dragging it onto the workspace.
Connect the IR sensor to the Arduino by connecting its VCC pin to 5V, GND to GND, and the output pin to pin 11 on the Arduino.
Add the HC-05 Bluetooth module by searching for "HC-05" in the components panel and dragging it onto the workspace.
Connect the Bluetooth module to the Arduino by connecting the VCC pin to 5V, GND to GND, and the TXD and RXD pins to pins 2 and 3 on the Arduino, respectively.
I used 5 V adapter the ardiuno uno powering range is from 5V to 9V. The components also are powered Bettwen 6V-12V.
But for the Neo pixels display I used the 3.3V pin in the arduino to power it.
at the first
I am coding a test code to check if the Neopixel with Bluetooth is functioning properly.
that uses the Adafruit_NeoPixel library to control a strip of NeoPixels (LEDs) based on the serial data received from the serial monitor or another device.
1-In the setup() function, the serial communication is started with a baud rate of 9600 using the Serial.begin() function. The NeoPixel strip is initialized with the pixels.begin() function, and the pin connected to the strip is set as an output using the pinMode() function.
2-In the loop() function, the code waits for incoming serial data using a while loop that checks if the Serial.available() function returns a non-zero value. Once data is available, it is read and stored in the "incomingData" variable using the Serial.read() function.
3-The code then clears the NeoPixel strip using the pixels.clear() function. It then enters a for loop that iterates through each pixel in the strip and calls the pixels.show() function to display the updated color values.
4- Depending on the value of the "incomingData" variable, the NeoPixel strip is filled with white color (255, 255, 255) or black color (0, 0, 0) using the pixels.fill() function. If the received data is not equal to '1' or '2', the code sends the "invalid" message to the serial monitor.
video to test function ( neo pixels with BT)
Then
I am coding a test code to check if the Microwave with Neopixel is functioning properly.
uses the Adafruit_NeoPixel library to control a strip of NeoPixels (LEDs) based on the status of a push button connected to a digital input pin.
1-In the setup() function, the serial communication is started with a baud rate of 9600 using the Serial.begin() function. The pin connected to the NeoPixel strip and the push button are set as an output and input respectively using the pinMode() function. The NeoPixel strip is also initialized with the pixels.begin() function.
2- In the loop() function, the code first clears the NeoPixel strip using the pixels.clear() function. It then enters a for loop that iterates through each pixel in the strip and calls the pixels.show() function to display the updated color values.
3- The state of the push button is checked using the digitalRead() function. If the button is pressed (i.e., the digital input pin reads 1), the NeoPixel strip is filled with white color (255, 255, 255) using the pixels.fill() function, and the status of the button is printed to the serial monitor using the Serial.println() function. If the button is not pressed (i.e., the digital input pin reads 0), the NeoPixel strip is filled with black color (0, 0, 0) using the pixels.fill() function, and the status of the button is printed to the serial monitor using the Serial.println() function.
after that i make integration with 2 codes but sensor not working , i try it more than once finaly change sensor to "IR sensor "
uses the Adafruit_NeoPixel library and an IR sensor to control a strip of NeoPixels (LEDs) based on the data received from the serial monitor or another device.
1-In the setup() function, the serial communication is started with a baud rate of 9600 using the Serial.begin() function. The NeoPixel strip and the IR sensor pins are set as an output and input respectively using the pinMode() function. The NeoPixel strip is also initialized with the pixels.begin() function.
2- In the loop() function, the code first enters a while loop that waits for incoming serial data using the Serial.available() function. Once data is available, the code reads and stores it in the "incomingData" variable using the Serial.read() function.
3- The code then reads the value of the IR sensor using the digitalRead() function and stores it in the "sensorValue" variable. It then enters a for loop that iterates through each pixel in the strip and calls the pixels.show() function to display the updated color values.
4- Depending on the values of the "sensorValue" and "incomingData" variables, the NeoPixel strip is filled with white color (255, 255, 255) or black color (0, 0, 0) using the pixels.fill() function. If the "incomingData" variable is not equal to '1' or '2', the code sends the "invalid" message to the serial monitor using the Serial.println() function.
5-After the for loop, the code reads the incoming serial data again and stores it in the "incomingData" variable. It then clears the NeoPixel strip using the pixels.clear() function, reads the value of the IR sensor again, and enters another for loop that iterates through each pixel in the strip and calls the pixels.show() function to display the updated color values.
6- Depending on the values of the "sensorValue" and "incomingData" variables, the NeoPixel strip is filled with white color or black color using the pixels.fill() function, similar to the previous for loop.
Overall, this code provides a more complex example of how to use an IR sensor and serial communication to control NeoPixel strip lighting effects.
Final video of turning on the Smart lamp
Complete Features
just make sure the lamp is OFF through BT When I'm away from the lamp
steps :
1/ open MIT APP Invertor
2/ Design simple APP (import photo , button )
3/ Create code by blocks
1/Design simple APP (import photo , button )
2/Choose size to fit on my mobile
3/Creat code by blocks
Screenshot for the application on the mobile
video of turning on the Smart lamp through MIT APP
In the beginning, I tested the Neo pixles with bluetooth once and with the microwave once, and added the code for each of them to make sure that the function works correctly before merging them together.
Testing Bluetooth with Neo pixels
Testing Microwave with Neo pixels
Final video of turning on the Smart lamp
In fact, there was a problem with the operation of the sensor, bluetooth, and the lamp, and I tried a lot. My friends Mukhtar and Maryam helped me, and also from the Instructors Menna and Asmaa, they helped me and we solved the problem.
The problem that I encountered when connecting the IR sensor with Bluetooth is that the lamp does not work
But when connecting each one individually, the lamp on at the first i use this code
but this code not work
solve it
that I transferred the entire code to the Loop and write function (IR Sensor ) inside the loop
the problem
the solution
1-the lamp will be open with RGB Color via application
2-use RTC and show time on the lamp and set Alarm