Ramadan is a time of reflection, spirituality, and togetherness, and decorations play a significant role in setting the festive atmosphere. Among the most iconic symbols of Ramadan is the crescent moon, representing the beginning of the holy month. With advancements in technology and a growing emphasis on sustainability, a Smart Ramadan Crescent offers a modern yet eco-friendly way to celebrate.
The crescent will have the following features:
An On and off switch enables the servo motor to move the crescent.
An IR sensor that senses the closeness of a person and enables the circuit to open the RGB light bulb in different colours.
This decoritive piece is energy effecient because it will only start working when someone is close by or when it's switched on. Enabling it to be effecient and fun.
I used Fritzing to simulate my circuit and show the electrical components connections easily.
Used A breadboard, jumper wires (male male, and male female).
RGB: Output; to make different colours when the place is dark.
Servo motor: Output; to move when someone turns on the switch of the crescent.
IR sensor: Input; to sense when someone is around.
Switch : Input; to control moving the crescent.
Arduino Uno: to code all components.
Arduino IDE to write the text code, compile it, and to transfer the code to the Arduino Uno.
Three 330 Ohm resistors: For the safety of the electronic components (RGB LED).
Cardboard.
Parchment paper.
Cutter.
Glue gun.
Designing the circuit on Fritzing:
1️⃣ Arduino UNO – Main microcontroller to process sensor input and control output.
2️⃣ IR Sensor module – Detects if something is close to the sensor. (The component wasn't found in fritzing library so I used the humidity sensor as it was also connected using 3 pins)
3️⃣ Switch– to turn the servo motor on and off.
4️⃣RGB LED – Alternates between the beautiful colours.
5️⃣ 3 Resistors (330Ω) – To protect the RGB LED.
6️⃣ Breadboard – For easy wiring connections.
7️⃣ Jumper Wires – To connect all components.
7️⃣Servo motor- To move when the switch is on.
All reference images for connections are added in this section.
The logic behind the coding process is represented by this flow chart:
Connected the circuit the same way as in Fritzing and it worked as intended. The switch controlling the servo motor and the IR sensor controlling tha RGB LED.
Started the enclosure process by cutting two crescents.
Removed some star shapes from the cardboard and added parchment paper in those areas to allow light through in a nice manner.
Connected the two crescents together with cardboard and implanted the RGB LED as well as the servo motor.
Used tape to keep the servo motor in place..
This is how it looked from the side with the implantation of the servo motor and the RGB LED.
I then implanted the switch and the IR module sensor.
working crescent in action.
The start of the code
coding servo and switch
Coding RGB and IR
While working on Week 7 assignment:
My initial idea was to use a an LDR sensor to initiate the RGB LED. However, it wasn't working and that's when I took a video of it and sent it to "Ahmed Tallat" who recognised that the pin responsible for the Analogue reading in the LDR module wasn't working properly. And that's when I used a different sensor "IR".
During End of week session:
I had the chance to work with Mohamed on the smart home circuit which responds to the LDR sensor as well as the Temperature and humidity sensor. Mohamed really helped me understand the role of libraries in working on the project as well as how we can get the pieces of the code that we need to work for our favour. It was an outstanding experience and we both learned ALOT throughout the process.
The LDR sensor was acting up and I didn't know what was wrong with it.
The above video shows that when I pushed my finger against the pin (A0), the LDR sensor would work fine. So, I knew that it wasn't working efficiently and decided to change it and use the IR sensor instead.
My servo motor didn't respond to the switch after enclosure. At first I thought it was camera shy, but then I realised that it wasn't working at all.
The switch was connected using crocodile clips which proved to be a not very effecient way of connection. The crocodile clips were loose and I had to revise all my connections after the enclosure. Once I revised them it worked very well.
Understanding the coding process and the text code is enabling me to have a very clear vision of my final project. I have also gained enough confidence this week to work with components that I haven't used before like the microwave sensor. I also gained the confidence to order an OLED screen for my final project and I researched how it works as well as how to code photos on it.
This week has been awesome and a true learning experience on so many levels.