I have a deep connection with the moon and its energy. I use decor to create a harmonious, cozy atmosphere reflecting my lunar love.
so when I did some research about smart projects I found this wireless magnetic levitating moon.
I liked the idea and I wanted to add some features a clock to know the time and a sensor that detects if the body of the moon closes the base turns on lights.
GRABCAD to download the electronic components that are mounted into the design.
Fusion 360 to make the sketches and the whole design.
First, I skitched the top of the base it contains 3 parts, the first a hexagon with the polygon tool and defined 6 lined dimensions 105 cm and I made a circle hole in the center for the neopixel ring and holes for the nails. Then made the joints and the t-slot hole (make it one time and use a circle pattern to make it symmetric and adjusted)
Then I make some holes for the IR at the three parts of the top, to easily mount it (used project and dimension schematic for some parts)
extrude the parts to 3mm
The second (middle) part is a hexagon shape made by a polygon tool and circles for magnets draw one 13 mm circle and use a circle pattern to make a symmetric, then skitch the holes of LEDs on the ring take its dimensions and with rectangle tool draw a square and make a circle pattern for it.
Tthen, I skitched the bottom of the base into a hexagon with the polygon tool and defined 6 lined dimensions 105 cm, then made the joints and the t-slot hole (make it one time and use a circle pattern to make it symmetric and adjusted). but leave one side for the Arduino.
The last part is very simple it's for holding the magnets from falling .draw a hexagon with 80 mm dimension sides with a polygon tool, and draw a c with 85m dimension at the center of the polygon, then for the wires of the ring draw a place with rectangle tool as shown.
I extruded the parts to 3 mm and dragged the grab cad component and added it to the parts, finally added a purple to the wood appearance.
I sketched a circle with a 133 mm diameter and made a circle hole with a diameter of 75 mm to let the lights of LEDs on the base appear, added some holes to the 3mm nails, and copied two parts of it.
one part with the same design.
and the other made circles to hold the magnet with a 12 mm diameter and made a circle pattern to it around the center of the big circle with a diameter of 80 mm.
extruded the parts to 3mm and joined together.
for 3D sticks , i drew by a rectangle tool 4*4mm square and circle of 6mm diameter and extruded to differnt lengths 40,50and 60 mm
the final design jointing all parts together.
Laser CAd to prepare the files
el malky laser cutting machine
2 sheets of 30*50 ply wood 3 mm.
put the dxf files on laser cad and try to adjust the parts to fit the sheet.
set the settings of cut at speed 20(you can put it at 15) and power 70.
upload the files to the machine and let's cut some wood.
I used Cura.to adjust the part
adjust the stl file in cura.
glowing pla filament.
set the settings with % infill, 0.15 thickness, brim, and no support and slice it save the g code.
I used a Prusa i3 mk2 machine
upload the g code in the SD card, insert it into the machine, download the file, and let's fabricate.
LCD 2*16 to show the clock.
I used Arduino UNO to be the MASTER MIND and control the whole circuit and its functions
relay to control the ring power to turn it on and off like a switch.
RTC ds3231 to know the real-time and date
mini breadboard to connect the wires together.
HC-05 Bluetooth module to control the LED.
jumpers male\ male, female \male to connect the components.
neopixel ring 16.
I used fritzing to explain the circuit
the circuit with all components let's explain it simply way.
first, connect the step-down, the VIN pin, and the ground of the step-down to the VIN and ground of the Arduino, and the v out of the step-down and 5v and ground of Arduino to the breadboard
connect the Bluetooth as soft serial RX of Bluetooth to pin 2 in Arduino and of Bluetooth to pin 3 of Arduino, the ground to ground, and VCC to 5 v.
I connected it in digital pins as soft serial to change the code and upload it to Arduino easily without unplug the Bluetooth every time uploading the code.
FOR TIME CIRCUIT:
connect the LCD at I2c pins on Arduino, and RTC at 5A, and 4A pins of Arduino.
FOR RING CIRCUIT:
now connect the relay (DC-) ground with the step-down (out-) ground, and com pin to (DC+) to 5v of step down on the breadboard, then connect to pin 9 of Arduino, and finally to VCC of LEDs ring.
then connect the ring to pin 7 of Arduino and the ground of the breadboard.
Connect the IR sensor ground to ground of Arduino and VCC to 5v of Arduino on the breadboard, finally out the pin to pin 8 on Arduino
9v adaptor to power the Arduino and components.
DC-DC step-down converter to convert 9v to 5 v with 1.5 Amp to power the neo pixel ring because it requires a high current.
First I included the needed libraries for the neopixel ring ( Adafruit), RTC (RTClib.h), LCD ( liquid crystal) ad for Bluetooth (software serial. h).
For the pixel ring define pin 6.
For Bluetooth define pin TX at pin 2, pin RX at pin 3.
For RTC add char with weekdays to define them and call them easily in the code.
At void setup, I identified the serial communication and ring start and LCD, then put a condition to begin the RTC and adjust it's time and date to the laptop time then at last I identified the pins mode with which one is input or output.
for the neopixel ring mood, I mixed between simple code and hard code This Article helped me a lot, I chose snow falke code and changed the color of the LED from the RGB palette and there were examples in the "Adfruit neopixel. h" library called (no delays).
And define IR and relay pins.
and define mills and delays with their integers which is important for the neopixel rind that controls different modes of lighting.
for the clock, I set a clock void that defines the date of the day and month, the day of the week, and finally the clock time of hours and minutes. This site helped me to make the code.
For void loop call clock code, and if the IR sensor is high incoming data is 6 no lights on.
If IR is low the lights are on at the default mode(snowflake)
if incoming data is 1 play the first mode purple, if 2 play turquoise, if 3 play rainbow1, if 4 play rainbow10
if 5 play the default white snowflake.
First, I tested the floating feature. I assembled the top of the base parts with magnets, and the floating parts with magnets and tested their float. it depends on the same polarity of magnets that make repulsion. It's balanced and move freely
then I put the components and connected them the same way explained in the fritzing circuit after checking the fabrication and every component individually.
I tested the glowy parts and it was magnificent.
Thanks to my instructor Ahmed Atef 💐 , he was follwing up with me till the last minute and helped me alot.
a big thanks to Abdalrahman oraby ✨,helped me to finish the code.
and I can't forget my college encouraged me (Norhan, Mohamed Ali, and Ghareeb).
thanks to the sites i searched on it to learn more
YouTube and git hub,
The first circuit I made was weak so I added a relay and stepped down to regulate the circuit of the ring with 9 v power, the step-down regulated the 9v and powered the neopixel ring with 5v and high current as it requires.
The curve of the laser machine made the holes of the t-slot smaller than the design, and also I added new components that I wasn't mounting holes for, so I used a mini drill to adjust the design.
if there was more time I would add an Alarm & day-starting message; from your mobile, you can adjust an alarm, and it won't shut down until you stand up and shake the device.
I would make the floating part 3D printing Because its weight is lighter, and add more magnets that will make the repulsion stronger.
i wouldmake the moon body by the glow pla