Introduction: Arduino Bottlefiller
If you are an homebrewer you know how is boring to bottle 60 or more liters. And you also know how a good bottle filler is expensive.
When I say a good bottle filler i mean one whith at least 3 valves to fill your bottles, a pump to initiate the flow and a way to stop the flow when the bottle is full. This kind of stuff cost 2600€ in Europe.
Soooo, i'll will explain you how to make a very cheap and versatile bottle filler with an arduino. According to your need you can add more or less valves, i tried the system with 2 and it's working well, so now i'll be make it for 6.
All my code and schematics are doing for 6 valves, but you can use them for less. But if you want more you'll need to change some parts!
Step 1: BOM
Here you have the Bill Of Material, the first part is the main system and the second part is what you need to make 1 valve if you want 4 of them you just have to buy 4 times more!
Main system :
- Arduino mega 2560 or clone 7€
- 12v pump 55€
- 1 x right angle connector for multiskin 4,5€
- plastic tube to connect your tank to the pump and the pump to the first valve +/-10€
Valve : (For 1 valve)
- 1 x TIP102(or TIP120)
- 1 x 2k2 resistor
- 1 x 1n4007 diode
- 1 x pushbutton
- 1 x 12v solenoid valve 5,5€
- Little piece of multiskin tube
- 1 x T connector for multiskin 4,5€
- 1 x hose connector 1,2€
In total you can get 6 valves bottlefiller for 150€
Step 2: Electronic
The electronic part is pretty easy, you even don't need any skill to do it, just know how to solder.
Some explaination about the fritzing schematic:
- Green wires are for the overfull. There is not really pushbutton on the green wires, you just have to let each pair of wires on the top of the bottle, when the liquid will make contact, the flow is stopping.
- Orange wires are connected to pushbutton and pushbuttons are actually here to say to the arduino "I've got a bottle right here,let's flow the beer'".
- Yellow wires are connected to solenoids. Solenoids needs 12v dc to works, that's why we need TIP to drive them with the arduino!
- White wire are just connected to the 12v pump, it's work the same than solenoids.
Some explaination about the eagle schematic:
- This one is the same than fritzing one, but i don't figure out the peripherics, i replace them by plugs.
- RJ11 plugs to connect each valve's captor : pushbutton, and overfull.
- Terminals plugs to connect every 12v devices.
Here is my code! there is not much to say about, it's really simple if you used to program with arduino, for the others here some explainations :
There is 3 big part in this code ;
The "head" is the first part, i declare all variables i will use in the programme. In this case i use 3 kind of variables
- "int" is for number storage, the value can change during the program
- "const int" is like int variable, but "const" means that the value can't change during the prgram
- "boolean" holds one of two value, true or false
The "setup" part is the part where you tell to the machine what to do when it starts, this action is made once. In this part i just declare each pin IN or OUT.
The "loop" part is the body of the program. The loop will be executed until you stop the machine. I will try to explain what happened with this.
- First I ask the program to check if one of the valves is open, if there is, it can power on the pump
- Then i check if the push button of each valve is pushed AND if there is no contact beetween the two overfill wires, if it's ok the program open the valve
- I also print all the values on the serial monitor, it's very usefull to debug.
Step 4: Plumbery and Sensor Mounting
Nothing special to say, just set everithing together an be carefull to be waterproof. To fix the pushbutton you can use tie zip, or foodgrade silicon.
Step 5: Bonus - PCB
This is my eagle files if you want print pcb for this project. In the pcb you will see an IRLZ44Z, it's actually TIP102, it doesn't change anything for you.
I hope this instructable was usefull for you and you apreciated it!
We have a be nice policy.
Please be positive and constructive.