I found a smart dispenser project that control water pump, which I liked but of course I will put my touch on it, So lets see how.
Fusion360 is a very useful/easy to learn tool. which I used is to design the 2.5D parts and the 3D parts.
For the laser cutting a 3mm thickness Plywood is used.
The material used in 3D fabrication is the PLA filament
Design and Preparations:
Referring the cardboard model I started to make the design and start working on fusion to shape the main shape of it and then implemented the internal details.
the 3d parts is limited to a bracket that holds the ultrasonic sensor in it's place and part that holds the water pipe.
For 2.5D parts the first thing needed is to save DXF for laser cutting then complete the preparation on RDWorks.
on RDWorks import DXF files one by one and set the parameters for speed and power as following:
cut(speed= 40mm/s & power=60)
Now at the Elmalki laser cutter UI I select the file and set the origin and make sure the frame is in the sheet area then start the cut.
For 3D parts the first thing needed is to save as mesh then complete the preparation on Cura.
On cure after selecting the machine (Prusa i3 MK2), we should set up the parameters as following:
resolution =0.3mm
infill =20%
then click on slicing to get the material wight and machine time.
See Full circuit diagram on Tinkercad
The input component is the Ultrasonic sensor which responsible for sensing whether the user put the cup or not.
The action components are the water pump and the LCD. the water pump pumps the water once the user put the cup in it's place, and the LCD shows the state whether the cup is left in it's place or not.
other component used:
-One channel relay module: allows to control the 12v water pump with Arduino.
-Voltage regulator: Step the 12 volts down to 5 to power the Arduino.
Power Management:
By looking at each component datasheet we can find that :
water pump consume 0.7 Ampere.
Arduino with LCD around 0.9 Ampere
So a 12volts ,2Ampere adapter is more than enough.
LCD:
This "hello world" code is an open source code, it starts with import the LCD library "LiquidCrystal_I2C" then set up and initialize the screen.
Ultrasonic:
As same as LCD this is an open source code contains a function to calculate the distance for ultra sonic "readUltrasonicDistance"
With migration of both 2 codes it is time to set the logical conditions for the ultrasonic, LCD and pump connected to bin 7.
This part of code is setting the conditions that controls the pump operation with ultrasonic.
You can find the full code here.
Each module is connected according to it's data sheet the full connection is shown in the diagram
Each single part is connected as shown:
At the End, we got it fully functioning:
My friends suggestions were focusing on the design, since it is very basic and it would be better if it shaped quite different. and these is one of the suggestions, but it was too late to redesign the project.
As I have a good experience with Arduino code I used to debug my peers code and help them fixing errors all along the diploma.
My instructor is the best mentor and I was asking her a lot to know were to find in solution to my problems, especially in the power management part.
when it comes to multipart design on fusion the joints are tricky, so my advice is to make sure that the joints are well designed and it is good to fabricate it in a small scale to make sure everything is good.
Connecting multiple parts at a time especially voltage regulator and relay module was tricky the amount of wires caused many conflicts.
but with trial and error at the beginning and after referring to connection guide (find the link Here) the conflict just solved.
if i had more time i would implement the cooling unit, so i can cool down the water, and also it would be cool to power the project with solar panels.