DIY Automatic Juice Mixing Machine : how to make

Chaps Pornprinya
7 min readNov 10, 2019

--

The last blog, I wrote about the theory of the project https://medium.com/@panothai.pornprinya/diy-automatic-juice-mixing-machine-2b3e2c349399

And now I will tell you how I made it.

1. Part List

Equipments :

. Glue Gun — used for assembling acrylic sheets. Soldering Iron — solder electronic parts. Pliers — cutting and stripping wires. Screw Driver — screw hinge, LCD and rotary encoder. Electric Drill — drill holes for hinge, LCD, rotary encoder and peristaltic pumps. Cutter — cut silicon tubes. Sand Paper — sand edges of acrylic

Materials :

. 3mm acrylic sheet. 12V DC peristaltic pump x 3. L298N motor driver module x 2. Arduino Nano with terminal shield. Mini USB cable. DC jack terminal. 12V 5A switching power supply. 1 kg load cell sensor module. LCD 16x2 with I2C interface. Rotary encoder. Lead wire. Soldering flux. 24AWG wire. M3, M4, M5 nuts and bolts. 1 1/2 inch stainless steel hinge. 3x5 silicon tube 4 meters long. Reused plastic bottles x 3

2. Procedure

2.1 Laser cutting

After I designed this machine on Fusion 360, I exported each file in DXF format (2d document) so it will be compatible with the laser cutting machine.

I went to Fabcafe Bangkok, where they provide a laser cutting service, but I have to supply acrylic sheets. For my machine, I have to cut 12 different parts.

Laser cutting machine at Fabcafe Bangkok.

The Trotec Speedy 300 can cut 3mm acrylic sheet with great precision and speed.

Preparing the file to export.
Parts that just came out of the machine.

2.2 Assemble with glue gun, drill and screw driver

The design

After I got all the pieces from Fabcafe Bangkok, I assembled the machine using a glue gun. I glued the inside edges, not the outside, so there will be no glue on the exterior. I also installed hinges to access parts that may need fixing.

Glue gun that used to stick each part together and how to glue it inside.
Installing hinges where I need to open to maintain the machine.

3. Circuit

3.1 Solder electronics and micro-controller

I chose Arduino Nano as my microcontroller unit. The Arduino will send digital signals to the motor driver module. It will then drive a large current to the peristaltic pumps to transfer the liquids from containers to the glass via silicon tubes. After the glass has some amount of liquid, the load cell will sense the weight increase and let the Arduino know whether to stop or to continue pumping. With this system, I can control the ratio of syrup, milk, water, soda, etc to mix a special drink. The user can also change the menu with the rotary encoder and the LCD screen.

Juice Mixer system diagram
I solder all electronic parts and modules by following the system diagram.
Soldering wire on Arduino Nano
This is part of the circuit, that connect together with wires.

3.2 Assemble electronics

After I soldered motor driver, peristaltic pump, and load cell to the microcontroller, I attached everything to the frame using nuts and bolts.

Peristaltic pumps are screwed to the frame with M3 nuts and bolts.
Front and back of the LCD screen when screwed to the frame.
Rotary encoder screwed to the frame.
The peristaltic pumps, motor drivers, load cell module and micro controller all inside the machine.

4. Coding

After all the components are installed, the next step is to program the microcontroller to test the pumps, circuit, and system.

This is the code to test all three pumps:

#define M1P1 2
#define M1P2 3
#define M2P1 4
#define M2P2 5
#define M3P1 7
#define M3P2 8
void M1on(){
digitalWrite(M1P1,HIGH);
digitalWrite(M1P2,LOW);
}
void M1off(){
digitalWrite(M1P1,LOW);
digitalWrite(M1P2,LOW);
}
void M2on(){
digitalWrite(M2P1,HIGH);
digitalWrite(M2P2,LOW);
}
void M2off(){
digitalWrite(M2P1,LOW);
digitalWrite(M2P2,LOW);
}
void M3on(){
digitalWrite(M3P1,HIGH);
digitalWrite(M3P2,LOW);
}
void M3off(){
digitalWrite(M3P1,LOW);
digitalWrite(M3P2,LOW);
}
void Clear(){
M1on();
M2on();
M3on();

}
void set(){
M1on();
delay(1200);
M1off();
M2on();
delay(7750);
M2off();
M3on();
delay(7250);
M3off();
}
void syrup(){
M1on();
delay(160000);
M1off();
M2on();
delay(32000);
M2off();
}
void setup() {
pinMode (M1P1,OUTPUT);
pinMode (M1P2,OUTPUT);
pinMode (M2P1,OUTPUT);
pinMode (M2P2,OUTPUT);
pinMode (M3P1,OUTPUT);
pinMode (M3P2,OUTPUT);
Clear();

}

This is the code to test the load cell:

#include "HX711.h"// HX711 circuit wiring
const int LOADCELL_DOUT_PIN = 12;
const int LOADCELL_SCK_PIN = 11;
HX711 scale;void setup() {
Serial.begin(57600);
scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN);
}
void loop() {if (scale.is_ready()) {
long reading = scale.read();
Serial.print("HX711 reading: ");
Serial.println(reading);
} else {
Serial.println("HX711 not found.");
}
delay(1000);}

5. Testing

I tested the machine by transferring low viscosity liquids (water, juice) and high viscosity liquids (syrup, honey, chocolate, condensed milk) to test the performance of the peristaltic pumps, both of which were successful. After that, I tried to program all three pumps to mix syrup and water with a 1:5 ratio to make a drink (I am not using load cell yet, currently using delay as the parts have not arrived).

Testing the machine
Examples of high and low viscosity liquids.
Test mixing three liquids( water, green and red syrup ). In ration 1:2:3

6. Problems

In this project, I found these following problems and how I solved it.

6.1 Parts were missing

Cutting the missing part

After I came home from Fabcafe Bangkok, I found out that one of the pieces was missing so I cut it myself with a hand saw. The shape of the piece was a square so it was not hard to cut by hand.

6.2 User experience

Before using the machine, the machine needs to fill the tubes with the liquid but I did not program this part which meant that when the machine starts working, water will not come out right away. Also, when turning the machine off, you will need to drain the tubes and clean them with hot water. I will solve this by developing the program further so the overall user experience will be better.

6.3 Silicon tubes that I ordered was too big

When I went to pull the tube out of the plastic bottles, the tube would detach from the peristaltic pump resulting in liquid spilling all over the machine and the floor. I solved that problem by ordering new tubes, the last ones were 4x7 mm, the new ones are 3x5 mm.

The one on the left is the old one, the one on the right is the new one.

7. Future plans

7.1 Utilizing the load cell to make the pumps more precise.

7.2 Adding a user interface, eg. LCD screen, rotary encoder so the user will be able to select the menu.

7.3 Adding a voice activated system, I intend on developing this machine for visually impaired individuals so having a sound navigation system will eliminate the need of the user even needing to see the machine, just say what the user wants and the machine will mix it.

--

--