Final Project¶
The Serenity fountain¶
For now my idea for my final project is to make a fountain which I would like to name as, ‘the serenity fountain’ and it’s all to make the user feel serene whenever he/she sees it. My project sketch draft of my Serenity fountain is something the like sketch that I have given below;
You see, I am from Bhutan(Asia), a Buddhist country and to incorporate something original and something so Bhutanese, I decided to make a serenity fountain which will help people be reminded about their religion and Karma accordingly. One of the inspiration for choosing this idea is because my Dad is so into religionn and started prostrating and praying as he grows older and it really inspires me to follow his path and take care of my Karma(action). I want to gift the Serenity Fountain to my Dad to thank him for always reminding me that kindness can do lots more than anger.
To explain how my serenity fountain will work, well I will be incorporating some really interesting and traditional Bhutanese designs to my project and a prayer wheel on the top which will keep on rotating and help one accumulate more of good karma as we believe that the rotation of prayer wheels is as same as chanting them.
I will be inputting one LDR sensor, and audio module and some fancy lightings which will be blinking in the manner the Bhutanese prayers will be sounding. We usually offer water, fruits and flowers early in the morning when the dawn starts breaking so the LDR sensors will trigger the lighting and prayers at dawn and it will give a serene feeling to the one who uses it.
So for now, that’s just a draft plan. I’m looking forward to getting more ideas to be incorporated to my serenity fountain as I progress with the course.
Change of Plans¶
For my final project I wanted to make a serenity fountain but as I went through the course, I decided to make a ‘Fountain lamp’ with the same features with an audio output which will be triggered by the ultrasonic sensor, and will be attaching led strips inside the fountain which will make it glow bright in turn making it a lamp. So the sketch that I made using Gimp is given below;
Things I will be using for my final project;¶
- Speaker
- Ultrasonic sensor
- Relay module
- 12V DC pump
- Led Strips
- PCB board
- Glass bowl
- 3D printed Fountain
- Amplifier module
- Plywood
3D designing the body and tip of the Fountain lamp on Fusion360¶
At first I found the fusion360 software a little complicated but as and when I went on using it and designing stuffs, it felt a lot easier and user friendly. You can get alot of Fusion360 tutorials online. For my final project for CAD design I needed a hollow lamp shade kind of boject with about 4mm thickness which will make the leds light through and form a lamp. So starting off firstly I opened fusion360 and went to cerate sketch to make the shape of the lamp. First I used the’create sketch’ function to make the sketch of half side of the lamp using ‘fit point spline’ with proper measurements. I drew only the half side so as to make it possible to use the ‘revolve’ function to make it round in shape.
Once the sketch is completed, press finish sketch, select the profile and use the ‘revolve’ function to make it round using 360 degrees as shown below;
Now to make the lamp hollow from inside so that I can attach the led strip inside I used the ‘shell’ function from ‘modify’ as shown below. I kept the thickness as 4 mm so that the led light can easily pass outside.
Now that the body was complete, I had to make the tip of the fountain through which the water pumped up using a DC pump will flow down. For that I again sketched the shape of the tip first with given measurements first.
Next I extruded the sketch by 15 mm.
Now I started using the ‘hole’ function to make holes for the water to pass through inside the tip of the fountain.
The 3D printed body and the tip of the fountain are given below. I printed the body by spliting it into half since it wasn’t fitting in the Makerbot print and in the image below I taped the bodies temporarily. I will be gluing it during the final assembly of all the parts.
Electronics;¶
For my final project I decided to use ESP32 microcontroller as when I tried using the Attiny1614, I ended up burning up the board two times leading to a lot of time waste but when I thought of it positively I learned a lot about the advantages and disadvantages of using the Attiny1614.
The Schematic and Board design of the final project board for my final project is given below;
After milling and soldering my final project board came out nice and clean as shown below;
My final project code is given below;
// Playing a simple melody using the XTronical DAC Audio library
// Demonstrates use of the music score object
// See www.xtronical.com for write ups on sound and for hardware required
#include "MusicDefinitions.h";
#include "XT_DAC_Audio.h";
const int pingPin = 32;
int led = 33; // the PWM pin the LED is attached to
int brightness = 0; // how bright the LED is
int fadeAmount = 7;
// Data for the melody. Note followed by optional change in playing length in 1/4 beats. See documentation for more details
int8_t PROGMEM TwinkleTwinkle[] = {
NOTE_C5,NOTE_C5,NOTE_G5,NOTE_G5,NOTE_A5,NOTE_A5,NOTE_G5,BEAT_2,
NOTE_F5,NOTE_F5,NOTE_E5,NOTE_E5,NOTE_D5,NOTE_D5,NOTE_C5,BEAT_2,
NOTE_G5,NOTE_G5,NOTE_F5,NOTE_F5,NOTE_E5,NOTE_E5,NOTE_D5,BEAT_2,
NOTE_G5,NOTE_G5,NOTE_F5,NOTE_F5,NOTE_E5,NOTE_E5,NOTE_D5,BEAT_2,
NOTE_C5,NOTE_C5,NOTE_G5,NOTE_G5,NOTE_A5,NOTE_A5,NOTE_G5,BEAT_2,
NOTE_F5,NOTE_F5,NOTE_E5,NOTE_E5,NOTE_D5,NOTE_D5,NOTE_C5,BEAT_4,
NOTE_SILENCE,BEAT_5,SCORE_END
};
XT_DAC_Audio_Class DacAudio(25,0); // Create the main player class object. Use GPIO 25 (DAC pin) and timer 0
XT_MusicScore_Class Music(TwinkleTwinkle,TEMPO_ALLEGRO,INSTRUMENT_PIANO); // Music score object, handles tunes. Pass Music Data,Tempo
// You can just pass the music data and the rest will default to... well.... default values!
void setup() {
Music.Repeat=2; // We'll repeat it once
DacAudio.Play(&Music);
pinMode(led,OUTPUT);
}
void loop(){
long duration, inches, cm;
pinMode(pingPin, OUTPUT);
digitalWrite(pingPin, LOW);
delayMicroseconds(2);
digitalWrite(pingPin, HIGH);
delayMicroseconds(5);
digitalWrite(pingPin, LOW);
pinMode(pingPin, INPUT);
duration = pulseIn(pingPin, HIGH);
inches = microsecondsToInches(duration);
cm = microsecondsToCentimeters(duration);
analogWrite(led, brightness);
brightness = brightness + fadeAmount;
// reverse the direction of the fading at the ends of the fade:
if (brightness <= 0 || brightness >= 255) {
fadeAmount = -fadeAmount;
}
// wait for 30 milliseconds to see the dimming effect
if (cm <100)
{
DacAudio.FillBuffer();
}
}
long microsecondsToInches(long microseconds) {
return microseconds / 74 / 2;
}
long microsecondsToCentimeters(long microseconds) {
return microseconds / 29 / 2;
}
Laser cutting the base box for electronics;¶
For laser cutting the box I did the designing in Corel Draw and cut it. The 2D designs for the box is shown in the image below. I made holes for the ultrasonic sensor, speaker, reset button, for the 5V adapter of DC pump and a hole to pass through the led strip wire.
Assembling the box after connection of the electronic components.
## The Successfully working Fountain lamp
Design files¶
3D design files¶
tip of the fountain
top body of the fountain
bottom body of the fountain
laser cutting files¶
Electronics files¶
Final project shcematic designe file
Final Project board design file