Introduction: MESOMIX - Automated Paint Mixing Machine
Are you a designer, an artist or a creative person who loves to throw colors on your canvas, but it’s often a struggle when it comes to making the desired shade.
So, this art-tech instruction will vanish that struggle into thin air. As this device, uses off the shelf components to makes the desired shade by mixing the right amount of CMYK (Cyan-Magenta-Yellow-Black) pigments automatically, which will drastically reduce the time spent on mixing the colors or money spent on purchasing different pigments. And will provide you that extra time for your creative.
Let's Hope you enjoy and let’s begin!
Step 1: How It Works?
There are basically two models of color theory which we need to consider for this project.
1) RGB Color Model
The RGB color model is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors. The main purpose of the RGB colour model is for the sensing, representation, and display of images in electronic systems, such as televisions and computers, though it has also been used in conventional photography.
2) CMYK Color Model
The CMYK color model (process color, four color) is a subtractive color model, used in color printers. CMYK refers to the four inks used in some color printing: cyan, magenta, yellow, and key (black). The CMYK model works by partially or entirely masking colors on a lighter, usually white, background. The ink reduces the light that would otherwise be reflected. Such a model is called subtractive because inks "subtract" brightness from white.
In additive color models such as RGB, white is the "additive" combination of all primary coloured lights, while black is the absence of light. In the CMYK model, it is the opposite: white is the natural color of the paper or another background, while black results from a full combination of colored inks. To save money on ink, and to produce deeper black tones, unsaturated and dark colors are produced by using black ink instead of the combination of cyan, magenta and yellow.
Step 2: The Mechanism
As it is mentioned in the "How it Works?" step that both RGB and CMYK color models will be utilized in this Machine.
So, we will use RGB model to feed the RGB color code to the machine while CMYK model for making the shade by mixing CMYK pigments in which volume of the white color will be constant and added manually.
So, to figure out the best possible procedure to build this machine, I sketched down a flow chart to clear the big picture in my mind.
Here is the plan how things will proceed :
- The RGB values and the volume of White Color will be sent via Serial Monitor.
- Then these RGB values will be converted into CMYK percentage by using the conversion formula.
The R,G,B values are divided by 255 to change the range from 0..255 to 0..1: R' = R/255 G' = G/255 B' = B/255 The black key (K) color is calculated from the red (R'), green (G') and blue (B') colors: K = 1-max(R', G', B') The cyan color (C) is calculated from the red (R') and black (K) colors: C = (1-R'-K) / (1-K) The magenta color (M) is calculated from the green (G') and black (K) colors: M = (1-G'-K) / (1-K) The yellow color (Y) is calculated from the blue (B') and black (K) colors: Y = (1-B'-K) / (1-K)
- As a result, I got CMYK percentage values of that required color.
- Now all the percentage values are needed to be converted to the C, M, Y, and K volumes by multiplying each percentage value with the Volume of the White Color.
C(mL) = C(%) * Volume of White Color(x mL) M(mL) = M(%) * Volume of White Color(x mL) Y(mL) = Y(%) * Volume of White Color(x mL) K(mL) = K(%) * Volume of White Color(x mL)
- Then these C, M, Y, and K volumes will be multiplied by the Steps per Revolution of the respective Motor.
Steps required to pump Color = Color(mL) * Steps/Rev of respective motor
And that's it, by using this each color will be pumped to form a mixture of colors which will be mixed with the exact volume of White color to form the desired shade.
Step 3: The Design
I decided to design it in SolidWorks as I am working on it from last 2 years and applied all my designing, subtractive manufacturing, and additive manufacturing skills in design phase while keeping all the parameters in mind which includes using off the self-components, compact and desktop friendly design, precise yet fast and cost-efficient.
After few iterations, I came up with this design which serves all my requirements and I am quite satisfied with results.
Step 4: What We Need?
Electronic Components:
- 1x Arduino Uno
- 1x GRBL Shield
- 4x A4988 Stepper Driver
- 1x DC Jack
- 1x 13cmx9cm Rocker Switch
- 4x Nema 17
- 2x 15cm RGB LED Strip
- 1x Buzzer
- 1x HC-05 Bluetooth
Hardware Components:
- 24x 624zz Bearing
- 4x 50cm Long Silicone Tubing (6mm outer diameter and 4mm inner diameter)
- 1x 100mL Measuring Cylinder
- 5x 100mL Beaker
- 30x M3x15 Bolts
- 30x M3 Nuts
- 12x M4x20 Bolts
- 16x M4x25 Bolts
- 30x M4 Nuts
- and some M3 and M4 Washers
Tools:
- Laser Cutting Machine
- 3D Printer
- Allen Keys
- Plier
- Screw driver
- Soldering Iron
- Glue Gun
Step 5: Laser Cutting
Initially, I designed the frame to be made up of plywood but figured out that 6mm MDF will also work for this machine but the only issue with MDF is that it is prone to moisture and there is a lot of chance that ink or pigments might spill on the panels.
To solve this issue I used a black Vinyl sheet which adds only a few bucks in the total cost but provided a great matte finish to the machine.
After this, I was all set to get my panels cut down via a laser machine.
I am attaching the files below and already removed that logo from the file so that you can add yours easily :)
Attachments
Step 6: 3D Printing
I went through various types of pumps and after a lot of research, I found that peristaltic pumps perfectly suits my requirements.
But most of them on the internet are the pumps with DC motors which are not that much precise and can cause some issues while controlling them, on the other hand, some pumps are there with Stepper Motors, but their cost is quite high.
So, I decided to go with a 3D Printed peristaltic pump which uses a Nema 17 Motor and luckily, I came through a link on Thingiverse where SILISAND made a remix of RALF’s Peristaltic Pump. (Special thanks to SILISAND and RALF for their design which helped me a lot.)
So, I used this Peristaltic Pump for my project which drastically reduced the cost.
But after printing and testing all the parts I realized that they are not quite perfect for this application. Then I edited the Hose Pressure Pipe by increasing its curvature so that it can apply more pressure on the hose and also edited the Bracket mount top to provide more grip on the motor's shaft.
My 3D Printer Settings:
- Material (PLA)
- Layer Height (0.2mm)
- Shell Thickness (1.2mm)
- Fill Density (30%)
- Print Speed (50mm/s)
- Nozzle Temp (210°C)
- Support Type (Everywhere)
- Platform Adhesion Type (None)
You can download all the files that are used in this project -
Step 7: The Bearing Mount
To assemble the bearing mount we will need following parts:
- 1x 3D Printed Bearing Mount Bottom
- 1x 3D Printed Bearing Mount Top
- 6x 624zz Bearing
- 3x M4x20 Bolts
- 3x M4 Nuts
- 3x M4 Spacers
- M4 Allen Key
As described in the images, insert all the three M4x20 Bolts in 3D Printed Bearing Mount Top, after that insert an M4 washer following with two 624zz bearing and another washer in each bolt. Then insert the M4 nuts in the 3D Printed Bearing Mount Bottom, tight the bolts by placing the Bottom mount.
Follow the same procedure to make other three bearing mounts.
Step 8: Preparing Back Panel
To assemble the back panel we will need following parts:
- Laser Cutted Back Panel
- 4x 3D Printed Pump Base
- 16x M4 Nuts
- 8x M3x16 Bolts
- 8x M3 Washers
- 4x Nema 17 Stepper Motor
- M3 Allen Key
To prepare the back panel, take 3D Printed Pump Base and insert the M4 Nuts in the slots on the back side of the Pump Base as shown in the images. Prepare other three Pump base similarly.
Now align the Nema 17 Stepper Motor with the slots on the back panel from the backside and mount the Pump Base using the M3x15 Bolt and a washer. And Assemble all the motors and pump base using the same procedure.
Step 9: Assembling All the Pumps on the Back Panel
To assemble the all the pumps we will need following parts:
- Motors and Pump Base assembled Back Panel
- 4x Bearing Mounts
- 4x 3D Printed Hose Pressure Plate
- 4x 3D Printed Pump Top
- 4x 50cm Silicon Tubing (6mm OD and 4mm ID)
- 16x M4x25 Bolts
Insert all the bearing mounts on the motors shafts. Then place the silicon tubing around the bearing mounts while pressing it with 3D printed Hose pressure plate. And close the pump using the 3d Printed Pump Top with M4x25 Bolts.
Step 10: Prepare the Bottom Panel
To assemble the bottom panel we will need following parts:
- Laser Cutted Bottom Panel
- 1x Arduino Uno
- 1x GRBL Shield
- 4x A4988 Stepper Driver
- 4x M3x15 Bolt
- 4x M3 Nut
- M3 Allen Key
Mount Arduino Uno on Back Panel using M3x15 Bolts and M3 Nuts. After that stack GRBL Shield on Arduino Uno following with A4988 Stepper Drivers on GRBL Shield.
Step 11: Assemble Bottom and Front Panel
To assemble the bottom and front panel we will need following parts:
- Laser Cutted Front Panel
- Bottom Panel assembled with Electronics
- 6x M3x15 Bolts
- 6x M3 Nuts
- 3D Printed Beaker Holder
Insert the Bottom Panel in the lower slots of the Front Panel and fix it using M3x15 Bolts and M3 Nuts. Then fix the 3D Printed Beaker Holder in place using the M3x15 Bolts and M3 Nuts.
Step 12: Insert the Tubes in the 3D Printed Tube Holder
To assemble the bottom and front panel we will need following parts:
- Fully Assembled Back Panel
- 3D Printed Tube Holder
In this step, insert all the four tubes in the holes of 3D Printed Tube holder. And make sure that some tube protrudes through the holder.
Step 13: Assemble the Four Panels Together
To assemble the front, back, top and bottom panel we will need following parts:
- Front and Bottom Panel Assembly
- Back Panel Assembly
- Top Panel
- Cool White Led Strip
To assemble all these panels, firstly fix the Tube Holder on the top of the beaker holder. Then Stick the LED Strips on the bottom face of the Top panel and then insert the top panel in the slots of back and front panel.
Step 14: Assemble the Motor Wires and the Side Panels
To assemble the Motor wires and the Side Panels we will need following parts:
- Assembled four panels
- 4x Motor Wires
- Side panels
- 24x M3x15 Bolts
- 24x M3 Nuts
- M3 Allen Key
Insert the wires in the Motor's slots and close both side panels. And fix the panels using M3x15 Bolts and M3 Nuts.
Step 15: Wiring
Follow the Schematic to wire all the electronics in the following way:
- Fix the DC Jack in the slot of the back panel and connect the wires to the power terminals of the GRBL Shield.
- Then, Plug the motor's wires in the Stepper Drivers terminals as following -
X-Stepper Driver (GRBL Shield) - Cyan Motor Wire
Y-Stepper Driver (GRBL Shield) - Magenta Motor Wire
Z-Stepper Driver (GRBL Shield) - Yellow Motor Wire
A-Stepper Driver (GRBL Shield) - Key Motor Wire
Note: Connect A-Step and A-Direction Jumpers of the GRBL Shield to pin 12 and pin 13 respectively. (The jumpers for A-Step and A-Direction are available above the Power Terminals)
- Connect the HC-05 Bluetooth in the following terminals -
GND (HC-05) - GND (GRBL Shield)
5V (HC-05) - 5V (GRBL Shield)
RX (HC-05) - TX (GRBL Shield)
TX(HC-05) - RX(GRBL Shield)
- Connect the Buzzer in the following terminals -
-ve (Buzzer) - GND (GRBL Shield)
+ve (Buzzer) - CoolEn Pin (GRBL Shield)
Note: Power this machine with at least 12V/10Amp Power Supply.
Step 16: Calibration of the Motors
After Powering the Machine, Connect the Arduino to the Computer via USB cable to install the calibration firmware to the Arduino Uno.
Download the Calibration Code given below and upload it to the Arduino Uno and perform the following instructions to calibrate all the motors steps.
After uploading the code, open serial monitor with the baud rate of 38400 and enable both CR and NL.
Now give the command to calibrate the motor pumps:
START <Pump To Calibrate>
"Pump to Calibrate" argument is needed to command the Arduino to which motor to calibrate and can take values:
C => For Cyan Motor M => For Magenta Motor Y => For Yellow Motor K => For Key Motor
Wait for the pump to load the color into the tube.
After loading, clean the flask if some color spell into it, the Arduino will wait until you send the confirmation command to start calibrating. Send "Yes" (without quotation marks) to start calibrating.
Now the motor will pump the color into the flask which we are going to measure using a measuring cylinder.
Once we have the measured value of pumped color we can find out the Steps per Unit(ml) for the selected motor using given formula:
5000 (Default steps) Steps Per ML = -------------------- Measured Value
Now put the Steps per Unit(ml) value for each motor in the main code in given constants:
line 7) const float Cspu => Holds the value for Steps per Unit of Cyan Motor line 8) const float Mspu => Holds the value for Steps per Unit of Magenta Motor line 9) const float Yspu => Holds the value for Steps per Unit of Yellow Motor line 10) const float Kspu => Holds the value for Steps per Unit of Key Motor
NOTE: All the steps and procedure to properly calibrate the motors will be displayed during calibration in the serial monitor.
Attachments
Step 17:
Step 18: Coding
After Calibrating the motors, its time to download the main code for making colours.
Download the Main Code given below and upload it to the Arduino Uno and use the available commands to use this machine:
LOAD => Used to load the color pigment into the silicon tube. CLEAN => Used to unload the color pigment into the silicon tube. SPEED <RPM> => Used to update the pumping speed of the device. <RPM> take the integer value representing the RPM of the motors. Default is set 100 and can be updated from 100 to 400. PUMP <R> <G> <B> <BASE> => Used to command the device to make desired colour. <R> takes the integer value representing Red value. <G> takes the integer value representing Green value. <B> takes the integer value representing Blue value. <Base> takes the integer value representing the volume of white colour.
NOTE: Before using this code make sure to update the values of default steps for each motor from calibration code.
Step 19: And We're DONE !!
You're finally done! Here's how the final product should look and work like.
Step 20: Future Scope
As it is my first prototype, which comes out to be far better than what I expected but yes it requires a lot of optimization.
Here are some of the following upgrades which I am looking for the next version of this machine -
- Experimenting with different Inks, Colors, Paints and Pigments.
- Development of an Android App which can provide a better user interface by using Bluetooth that we already installed.
- Installation of a Display and a Rotary Encoder which can make it a stand-alone device.
- Will look for some better and reliable pumping options.
- Installation of Google Assistance which can make it more responsive and smarter.
Step 21: PLEASE VOTE!
If you like this project, please vote it for the "First Time Author" Contest.
Really much appreciated! Hope you guys enjoyed the project!