I will show you how to make half liter bottle filling and capping machine using arduino and flow sensor, so so um foreign Music. This video is sponsored by jlc pcb, where you can order 5 pieces of 10 by 10 centimeter pcbs just in two dollars. Nowadays you can avail their free assembly services. You have to pay pcb and component price, but the assembly service will be totally free. You can get more detail about pcb assembly service on this page. One more interesting thing is that now you can order 3d printed parts for your custom projects, starting from just one us dollar, so you can get more detail about 3d, printing and their technologies on this page, okay guys. So here we got our pcbs from jlc pcb this time. I ordered black color. As you can see, the build quality is perfect. Here are all the components that are required to complete our control board pcb. First of all, here are five bc547 transistors five diodes. One n4007 and a tactile switch six one kilo, ohm resistors and four 10 kilo, ohm resistors, a dc power jack, a 12 volt buzzer, two 220 micro farad capacitors, a 5 mm led seven, two terminal blocks: a four nine double eight stepper motor driver, four 12 volt Relays – and here are some male and female header pins – two voltage regulators with these two heat sinks – and this is our pcb. So now i am going to solder all these components to our new pcb, ok guys so component soldering is done.

Here are some materials for our machine. First of all, here is a 20 ml medical, syringe, 10 small wood screws, two 2.5 inches long, four, two inches long and one 1.5 inch long, wood, screws, m3, nut bolts. These are six and these are 12 m4 bolts. These are six m3 bolts, and these are m5 nut. Bolts and again here are three m4 nut. Bolts here is a micro servo motor. This is nema 17 stepper motor with this 5 to 8 mm shaft. Coupling here are six 8mm shaft holding brackets, and these are six linear sliding bearing blocks here are two 50 centimeter long mm shafts and here are two 15 centimeter long 8mm shafts here is a spring and arduino nano 8mm bearing 5 volt air solenoid valve and a 5 volt air pump a 12 volt dc gear motor with this bracket, a 12 volt water pump a solenoid valve for water, and this is a flow sensor, and here is a 50 centimeter long 8mm threaded rod with this brass nut here are some pieces of wood. We will use these pieces in our machine. First of all, here is a 20 by 4 inches long piece of wood. This will be the base of our machine. We will construct our machine on this piece. Here are two 8 inches long and two inches wide pieces of wood. This is a nine inches long and three inches wide piece of wood. This is a six inches long and two inches wide piece of wood.

This is five inches long, and this is seven inches long piece of wood and here are some 3d printed parts. This is linear sliding bearing blocks holder, and this one is capping. Motor attachment capping, motor assembly spacer. This is cap, dispenser, threaded rod, brass nut, holder, nema, 17 stepper motor bracket, syringe holder, and this is shaft spacer 8mm bearing holder, and these two are bottle holders. This is capping assembly holder, and this is capping motor head with this rubber piston. I extracted this part from a 50 ml medical syringe and then i sand it down from here, and this part will go here inside of this thing like this, and this capping assembly made out of five parts. This is one two three four, and this is five and later i assembled them together. We also need 2 infrared, sensors and 2 limit switches. Now, first of all, this piece will be connected here with the help of these screws. I pre drilled all the holes to save the time in video, and now this piece will be connected here now. This piece will be connected here with the help of these long screws now connect these shaft holders. Here with the help of these nut boards. Now we will attach all these sliding bearing blocks with this part. With the help of these screws. Now we will attach this assembly here, with the help of these shafts, now make sure that this thing should move very easily now this bottle holder will be connected here, and this one will here with the help of these screws.

Now we will attach this piece of wood here and later we will connect our stepper motor on this piece. Here are all the parts for our capping assembly. Now we will assemble it now. We will connect this assembly here with this spacer and these wood screws. Now we will attach this bearing block here now. This part will be connected here now. We will insert this threaded rod here and now our stepper motor will be connected here now. This piece of wood will be connected here with the help of this crew and this piece of wood. Here now we will attach our cap dispenser. So first of all, this part will go here and now this assembly will be connected here now. This pipe holder will be connected here. This solenoid and flow sensor will be connected here. I connected this piece of wood here and these nut bolts, so our lcd display will be connected here and our control board pcb will be connected here, and this servo motor will be connected here now we will connect this second limit switch here with the help of Hot glue first limit switch will be connected here. Okay, guys so now its time to make all the wiring connections. Wiring connections are pretty simple, so i will do all these wiring connections off camera, because video is already getting too long. So let me explain a little bit that how you can make these wiring connections. First of all, here you can see a 12 volt dc power supply jack, so you can connect a 12 volt 5 ampere dc power supply source.

Here, after that, you can see this air pump terminal, so the output of this air pump terminal is 12 volt and our air pump and air solenoid valve will work only on 5 volts. So we will use this external 5 volt voltage regulator with this point. After that, you can see capping motor terminal, so the capping motor wires will be connected here. The conveyor belt motor wires will be connected here. Water pump wires here and solenoid valve wires here and first limit switch wires here and second limit switch wires. Here here you can connect first infrared sensor wires and here second infrared sensor wires. Here we will connect servo motor wires. Initially, i thought that i will use two servo motors in our project, but later i realized that only one servo motor is enough. So this second servo motor points will not be used here. We will connect nema 17 motor wires and our lcd wires will be connected here and the flow sensor wires will be connected here. Ok, guys wiring connections are now complete, convert motor wires and the water pump wires will be connected at last. This is first infrared sensor. It will be used to detect the bottles in the holder, and this is the second infrared sensor. It will be used to detect the caps on the bottles. This sensor is removable, so after removing the sensor, we can easily remove arduino from the control board, and here i have connected a power on off switch here.

You can see the pipe connections for the air solenoid valve. This pipe is at the front side of the valve is going to the air pump and the top side pipe is going to the medical syringe. Okay, guys, our machine is almost complete now its time to burn the arduino code. So here is the arduino code for our project. The code is very simple. Consists of these two libraries. This one is used to drive the lcd, and this one is used to drive the servo motor. You will need to install both of these libraries to make your machine work. This section is controlling the water pump and filling amount with the help of flow sensor. So you can set your desired filling amount by changing these numbers, you can change the moving distance of bottom holder from start to the capping motor. By changing these numbers, you can also change the moving distance from capping motor to the second ir sensor by changing these numbers so guys you can find more detail about this code in video description, so after installation of arduino code. Here i made a final setup for our machine. I connected it with the 12 volt dc power supply. I connected this part here, so it will help us to release the filled bottles from the holder, and here is a tab full of water. I added some food color in it to make it more visible on camera and i placed our water pump inside of this tub and the water pump pipe is connected with flow sensor.

I connected this conveyor belt with our machine, which i made in one of my previous videos, and here are some amputee bottles. So now we will power on the machine and then we will start filling bottles, Music, so Music, Music, so Music, so hey so Music. So guys thats it for todays video all necessary information about this project. You can find in the video description.

https://www.youtube.com/watch?v=1LdD2qGaYTI