Close
0%
0%

M5Stack Color Maker

With this device, you can copy the color of an object or create a new color with your imagination.

Public Chat
Similar projects worth following
Features
M5Stack Color Maker has the following three functions.

1.Scan for color information
This device has an I2C-connected color sensor that can pick the color of an object.

2.Edit color information
We are using a development board called M5Stack Core2 for the device UI. This board has a touch-sensitive LCD screen, and the color can be adjusted by controlling the slider.
In addition to editing the scanned color information, it is also possible to create new color

3.Colorize paint based on color information
The device is equipped with a tank of water and four colors of paint: cyan, magenta, yellow, and black. These paints are transported to the paint pan while being metered by a tube pump driven by a stepper motor.


First, see how the device works.
If possible, make some sound and have fun with it.

The configuration of the device is as shown in the following picture.

User Interface & Color Sensor

This device uses a color sensor to read the color information of an object and convert it from RGB to CMYK color format. Color sensor is controlled by the M5Stack Core2 and simultaneously displayed in the UI on the display. UI shows CMYK data on a slider, which can be freely edited. M5Stack Core2 sends the color data to the Raspberry Pi PICO when the make color button on the display is pressed.

Control Stepper Motors & Synthesize the Paints

After receiving the color data, the Raspberry Pi PICO calculates the mixing ratio of the paints. The metering and transport of the paints is done by a tube pump driven by a stepper motor.
In a color printer, colors are represented by a mixture of the four CMYK colors, but since we are using watercolors, we will be using five colors: CMYK + Water.
I used a syringe as the tank for the paints.

Development of high performance tube pumps

A tube pump is a convenient device that can transport and meter liquids simultaneously. However, due to the structure of pumping liquid while squeezing the tube, pulsation occurs. Especially when measuring a small amount, as in this case, the pulsation can cause a large measurement error.

Several methods have been proposed to reduce the pulsation of tube pumps. However, I have developed a tube pump that can suppress pulsation easily and inexpensively without additional components.
Using this method, you can get a tube pump with less pulsation by simply combining a 3D printed part with a motor.

I believe that my pulsation-free tube pump is a valuable invention for medical, chemical laboratory and other commercial applications. Unfortunately, I am unable to release data on the pump at this time as I am preparing to obtain a patent.
However, we plan to make this pump free for personal use in M5Stack color makers, other hobby crafts, educational purposes, or free distribution for such purposes. Please wait a little longer for the data release.

Instead, I will publish the data of a tube pump with a common structure. The device will still work with this pump.

An Unexpected Response

When I introduced the M5Stack Color Maker on Twitter, a color-blind person said.

"For me, a color-blind person, this device is like a dream!"

In addition, when I created a sound visualization device, I received the following comment from a person who was deaf in one ear.

"I can only hear in one ear, which means I can't tell the direction of the sound source, so this is very helpful for me. I wish it could be commercialized."

Even though the results are different from what I had expected, I couldn't be happier if the device I created helps people to overcome the barrier of disability.

This work was planned and created for this contest, but it became a great guideline for my future activities as a maker.

makec_color_code11.m5f

For M5Stack Core2. Firmware should use UI Flow. Controls the UI and sensor of the Color Editor.

m5f - 42.69 kB - 01/24/2024 at 07:31

Download

3d print Peristaltic pump.zip

x-zip-compressed - 191.63 kB - 10/18/2021 at 23:41

Download

3d print sensor.zip

color sensor case

x-zip-compressed - 19.85 kB - 10/05/2021 at 13:49

Download

3d print housing.zip

housing stl data.

x-zip-compressed - 235.88 kB - 10/05/2021 at 13:49

Download

m5stack_color_maker.py

micropython code for Raspberry Pi PICO. Use the micropython firmware. Receives data from the M5Stack and controls the five stepper motors.

py - 5.69 kB - 10/05/2021 at 09:06

Download

  • 1 × M5Stack Core2 Development Board Unit
  • 1 × Raspberry Pi PICO
  • 1 × TCS34725 or M5stack color sensor UNIT M5 Stack Color sensor unit recommended
  • 5 × A4988 Motor Driver Board Stepper motor driver
  • 5 × 28BJY-49 Stepper motor

View all 25 components

  • ​ How to adjust the paint

    AIRPOCKET10/12/2021 at 01:29 0 comments

    I used the following paints, but you can use any kind of watercolors.

    Cyan:
    holbein ACRYLIC GOUACHE D928 PRIMARY CYAN
    Magenta:
    holbein ACRYLIC GOUACHE D926 PRIMARY MAGENTA
    Yellow:
    holbein ACRYLIC GOUACHE D927 PRIMARY YELLOW
    Black:
    TURNER'S ACRYL GOUACHE AG020009 JET BLACK or TURNER'S poster color #58 BLACK

    Dilute the paint in the tank about five times with water.
    When thinning, use a scale to measure the paint as accurately as possible.  1.00g of paint to 4.00g of water.
    The strength of the color will vary depending on the paint, so if the colors do not match well, make adjustments.
    To adjust, change the dilution factor of the paint or change the factor in the Raspberry Pi PICO program.

    I was going to take a picture of the paints, but I can't find cyan. Could it be the work of my naughty daughter?

  • ​ Final step of assembly

    AIRPOCKET10/12/2021 at 01:04 0 comments

    Up to this point, the main unit and the pump unit have been assembled.

    The last step is to connect the main unit and the pump unit.

    Connect the connector of the stepper motor to the connector of the main unit.

    Attach the tube extending from the pump to the tube clamp.

    The M5Stack Color Maker is now complete.

    Let's test it by turning it on.

    Power is provided by a USB cable connected to the M5Stack or Raspberry Pi Pico.
    Since they share the same 5V USB power supply, you can just plug the cable into either one.

    Let's try using the SCAN and Color Make functions to see if the UI and pump work.

  • Assembly of the pump unit

    AIRPOCKET10/12/2021 at 00:58 0 comments

    Attach the stepping motor to the pump case.

    Attach the bearings to the rotor. There should be two bearings per arm of the rotor.

    Attach the rotor to the shaft of the stepping motor.

    Pass the tube between the bearing and the case, and cover it with the lid.

    Insert the tubing into the end of the syringe. If you can't mount it directly, you can use a larger piece of tubing as a coupler.

    Attach the syringe bracket to the case.

    Attach the pump to the base and you are done.

    Make five identical ones and attach them to the base and you are done.

  • Assembly of the main unit case

    AIRPOCKET10/08/2021 at 08:48 0 comments

    Output all the attached parts and assemble as follows.

    Fasten the Bottom and Lower case with 6 M3 screws, and attach the Motor Driver & Stepper Motor connector board.

    Attach the PICO to the Raspberry Pi PICO connect board and attach the board to the case.

    Connect the PICO board to the driver board with the connector.

    Attach the middle component of the case with four screws.

    Connect the M5Stack connect board to the Raspberry connect board with the cable.

    Attach the M5Stack connect board to the housing.

    Screw in the tube bracket and clamp, then attach them to the housing.

    Attach the top part of the housing and insert the M5Stack into the board.

  • Creating 3D Printer Parts

    AIRPOCKET10/08/2021 at 08:25 0 comments

    The device is divided into two parts:

    The main body case and the pump unit. The left half of the main body case is used as the UI, while the right half holds the plates and mixes the paints.

    The pump unit has five tube pumps and five syringes for the paint tanks attached to the stand. 5 tanks and pumps are used to supply water in addition to the four CMYK colors.
    Watercolors use not only the paint, but also the white of the underlying construction paper to produce the color. To take advantage of the white color of the paper, water is mixed with the paint to control the transparency of the paint.

    The 3D printer is a Kingroon KP3S and the material used is PLA.

  • PCB Assembly

    AIRPOCKET10/08/2021 at 08:04 0 comments

    Since I do not have the skills to design boards, I created the circuit using universal PCB boards.
    Although four PCBs are used, all of them are just for connecting devices, so you can use them without boards and just connect cables to each other.

    Here is a table showing the connections for each.

    The resulting board is as follows: 

    1.M5Stack connect board


    2.Raspberry Pi PICO connect board


    3.Motor Driver & Stepper Motor connect board

    I used AWG24 cable or 0.1mm UEW cable for the connections in the boards, as UEW cable does not take up much space and does not need to be removed, so it is very easy to wire once you get used to it.

  • Reducing pulsation

    AIRPOCKET10/08/2021 at 08:00 0 comments

    Based on an idea that came to me in the bathroom, I made a prototype of a tube pump that reduces pulsation.
    I tried and tried again.

    With the improved pump, we succeeded in significantly reducing the pulsation.

    The advantage of the stepping motor used in this project is that it is compact and inexpensive, but it lacks dimensional accuracy and torque, and we decided that it would be difficult to achieve higher accuracy.
    We plan to release the design of this pump as a license-free product for non-commercial use.

  • Building a Tube Pump

    AIRPOCKET10/08/2021 at 07:49 0 comments

    A tube pump consists of a rotor with several rollers around it, and a tube between the rollers and the case. When the rotor is rotated, the tube is squeezed between the rollers and the case to transport the liquid or gas.

    In this project, the rotor and case are made with a 3D printer, and miniature bearings are used as rollers.

    The movement of the prototype tube pump is shown in the video.


    As long as the tube is squeezed, liquid is pumped, and when the roller leaves the tube, it stops. This pulsation interferes with accurate metering, so we will try to improve it.

    The stepper motor is controlled by a Raspberry PI PICO.
    The control program is attached.
    It receives color data from the M5Stack and sends control signals to the 5 motor drivers.

  • Testing the Color Picker

    AIRPOCKET10/08/2021 at 07:42 0 comments

    Let's test the color picker using the sensor.

    Light colors are recognized as slightly greenish. This is probably because the white LED for reference is not completely white.
    Also, the color readings change depending on the distance between the sensor and the object, as well as the surrounding brightness and lighting. In order to stabilize the readings, a cylindrical cover is attached to the sensor case to keep the distance between the sensor and the workpiece constant while shielding it from outside light.

  • Programming with UIFlow

    AIRPOCKET10/08/2021 at 05:00 0 comments

    After connecting the sensors, write the program in the M5Stack Core2.

    The program we have created is as follows. The program file is also attached.

    In this program, when you press the "SCAN" button, it reads the color data, converts it to CMYK format, and reflects it on the slider on the UI. By manipulating the slider, you can edit the color as desired.

    The synthesized color is also reflected in the color of the "MAKE COLOR" button.
    Clicking the "MAKE COLOR" button will output CMYK data serially.

View all 13 project logs

  • 1
    About the instructions

    All the steps of how to make it are uploaded to the project log.

    I can't design a PCB, so I'm making a universal board.
    The wiring connections are listed in the table for your reference.

View all instructions

Enjoy this project?

Share

Discussions

gocre8 wrote 05/21/2024 at 13:43 point

First off, this is an awesome project. Something I've wanted to make for many years, but have made very little progress. So thank you.

Printed the parts for the pump. The housing is much too small for the rotor, or the rotor is too big. Something needs scaling. Are some of the files from older versions? 

The M5 color sensor is very inaccurate at the moment, that's another project once I get the basics functioning. 

  Are you sure? yes | no

Bjarte Aarmo Lund wrote 10/12/2021 at 06:45 point

Looks very nice. As a scientist myself I will be very interested in evaluating the pump design once you have explored your patenting options. How small volumes can you mix in this setup?

  Are you sure? yes | no

AIRPOCKET wrote 10/12/2021 at 23:56 point

Thanks for your interest in my project.

I have never actually measured it, so I calculated it from the design specifications.

The silicone tube is placed on a 25 mm diameter arc. The inner diameter of the tube is 1 mm, and the liquid in the tube is squeezed by a roller to feed it.
The rollers are rotated by a stepper motor with a resolution of 2048 steps per revolution.
Based on the above, the weighing accuracy can be roughly calculated as follows.

(0.5^2 * pi) * (25 * pi) / 2048 = 0.030mm^3/step

In reality, though, I don't think such performance can be achieved because of the accuracy problems of the motor, pump, and fluid circuit.

  Are you sure? yes | no

ekaggrat singh kalsi wrote 10/12/2021 at 05:33 point

super cool project . but u could simplify a lot if u just use 5 wire stepper motors and a uln2803 chip. It will make the circuit very compact and cheap

  Are you sure? yes | no

AIRPOCKET wrote 10/13/2021 at 00:01 point

Thanks for the advice.

As for the motor driver, I didn't think too much about it since I used all the parts I had on hand.
I need to learn the skills to design PCBs in the first place (-_-;)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates