Spectrum
Introduction
Spectrum is a handheld spray paint machine that instantly sprays any color you choose from hundreds of options.
I’ve always been fascinated by spray-painted graffiti. Spray paints have popularized and elevated graffiti art because they allow artists to create large, vibrant paintings with ease—no brushes or preparation required—just grab a can and start spraying with incredible speed!
One fundamental difference between spray paints and regular paints is the ability to mix colors. With regular paints, you can blend colors to create any shade you desire. However, with spray paints, this isn’t possible. Two converging sprays don’t produce a new color. This limitation inspired me to create Spectrum.
Spectrum is a machine that takes basic colors from spray paint cans and precisely mixes them in real time, right before the paint is sprayed out. And as far as I know, based on extensive internet research, it is the world’s first multi-color spray paint machine of such a kind.
//picture
The Challenge
Since this was a personal project, I wanted to keep it both fun and challenging, so I set the following constraints for myself:
Inexpensive: My goal was to make Spectrum open source, with no intention of creating profit. Hence, I made it a priority to ensure the design was inexpensive to build, using widely available parts and tools.
Real-Time Mixing (No Reservoirs): The mixing had to occur in real time as the paint was being sprayed, without any reservoirs holding pre-mixed colors.
No Pumps: I wanted to avoid using pumps or external pressurizing methods for the spray. The pressure for the machine would come directly from the spray cans themselves, which also removes the possibility of having a reservoir.
Regular Spray Cans: The machine had to work with regular, store-bought spray paint cans for the basic color inputs.
The Working Principle
Experiments:
How do you precisely mix colors in very small quantities as they flow out of a pressurized paint can and into the atomizing nozzle (the part of the nozzle responsible for creating a diverging spray)? I couldn’t find straightforward solutions during my research. Most real-time mixing methods were designed for fluids moving at much lower velocities. For high-velocity outputs, the fluids were pre-mixed and stored in a reservoir in all the solutions I found.
With no ready-made solutions, I relied on intuition and conducted numerous experiments. Admittedly, I didn’t document these methodically—I was young, and my approach was more artistic than scientific. In some cases, I didn’t document them at all, especially when the experiments failed and left me too frustrated to take notes. For instance, one failed attempt involved designing a laser-cut passive micro-mixing channel through which the paints would flow.
//picture
Major Learning: I discovered that the pressures inside different spray cans are never equal and also fluctuate with the paint level inside them. This meant that when multiple cans were opened into a shared tube at the same time, back-flow and paint leakage were almost inevitable. This issue was the primary cause of failure in most of my experiments.
How Spectrum Works:
The next methodical experiment involved creating a system where paint from only one can entered the tube at a time. Essentially, pulses of paint from different cans were alternated into the tube, and they successfully sprayed out without any backflow. I could also control the mixing ratio of the colors by adjusting the duration of each pulse.
To my surprise, I discovered that if the pulses were small enough, the turbulence inside the tube as the paint was being sprayed out was sufficient to passively mix the colors effectively. For a 1 mm tube, any pulse under 250 milliseconds was short enough to blend properly with the rest of the pulses as they exited the nozzle. So effectively, pulses of time lengths between 25 to 250 milliseconds was good enough to create a good combination of ratios of basic colors for mixing.
For example, to create pink, the white valve would open for 250 milliseconds, followed by the red valve for 25 milliseconds. These alternating pulses, entering the same tube, would mix to produce pink as the paint was sprayed out.
//Gif
The “Rotary Pinch Valve”
To implement the design, I needed an electronically controlled valve that could handle the pressure of regular spray paint cans and also be fast enough to have a minimum response time (the shortest duration the valve takes to physically open and close) of about 25 milliseconds.
Early Stages:
Initially, I used a regular water-purifier solenoid valve since it was fast enough and rated for the needed pressure. These valves have excessive internal space that can unintentionally act as cavities for paint, so reduce this internal volume, I used 3D-printed fillers and modified the valves. This modification worked, and my first successful prototype utilized these valves.
//pictures
However, it wasn’t suitable for extended use—paint would clog the valve mechanism over time, requiring frequent disassembly and cleaning. Another issue was that the valve only prevented backflow when pressurized from the inlet. If any paint can was disconnected, it would immediately cause a leak.
Unfortunately, most off-the-shelf solenoid valves designed for higher pressures are meant for pure water or oils. These fluids don’t dry up or clog the valve mechanisms, so the pathways in such valves are generally not isolated from their internal mechanisms. Additionally, valves that were normally closed without active pressurization were either too slow, too expensive, or both.
Reframing Requirements:
Since no store-bought valve was suitable for spray paint, I decided to take the bold step of building one myself. After careful consideration, I finalized the following requirements:
Isolated Fluid Pathway: Ensure the paint doesn’t clog the internal mechanism.
Normally Closed: The valve should be closed in its de-energized state to prevent leaks if the power goes off.
Backflow Prevention: Stop backflow even when there’s no pressure at the inlet, allowing easy swapping of cans.
Response Time: Achieve a minimum response time of 25 milliseconds.
Pressure Handling: Withstand the pressure of spray paint cans (up to 10 bars, with an added safety factor).
Cost-Effective: Use inexpensive, readily available, and open-source-compatible parts.
Inventing The Rotary Pinch Valve:
To meet all the above requirements, and after conducting numerous quick experiments (which I regretfully did not document well enough), I designed a novel valve—at least as far as my internet research could confirm—which I named the Rotary Pinch Valve.
To clarify, there are existing versions of rotary pinch valves, which use a rotating mechanism to pinch a tube and stop fluid flow. However, I needed one that was electrically controlled and normally closed, so I had to design it from the ground up.
//Overview Video
Pinching Mechanism: Animated
Pinching Mechanism: The valve features a lever attached to a motor shaft, with a bearing at the end of the lever acting as a cam to pinch the flexible tube against a wall. As the lever rotates, the bearing rolls onto the tube, pinching it and closing the valve. Rotating the lever in the opposite direction unpinches the tube, opening the valve.
Spring pulling the lever when the motor is not energized, making the valve normally closed: Animated
Normally-Closed Mechanism: To ensure the valve remains normally closed, a spring pulls the lever into its closed position by default when the motor is not powered. The spring is designed to overcome the combined forces exerted by:
The pinching of the tube at all positions.
The detent torque of the motor, which includes the residual torque from the magnetic circuit and the frictional forces of the shaft bearings.
Combined mechanism of pinching and un-pinching the tube with the spring: Animated
Combined Mechanism Overview: The motor must be capable of:
Pinching: Providing enough torque to overcome the counterforce exerted by the tube at all positions.
Unpinching: Generating sufficient torque to counteract the spring's pull, allowing the lever to return to its open position.
Motor Torque required to un-pinch the tube
Spring Torque Required to Pinch the Tube when the Motor is Off
The Pipeline:
Designing the pipeline was as critical as the valves, as there were no off the shelf solutions available.
There needed to be custom connections for the pipeline, for example from the spray paint can to the pipe. And the pipes needed to be narrow enough so that too much paint does not come out of the valve, because if the cross section of the pulses were too thick, they would not effectively mix anymore as the paint quantity would be too much for micromixing pasively within the turbulense of the tubes. Ofcourse too thin would cause too much pressure drop across the tubes to properly spray out of the atomizing nozzle. Ofcourse there is a proper way to calculate the optimal cross sectional width of the pipe for the best outcome, but for me a 1mm cross section worked well so I went with it.
For such a thin cross section and custom cionnection, off the self solutions like pneumatic piping wasn’t suitable. For the pipe, I ended up using silicone tube with ID 1mm and OD 4 MM (anything less than 3MM OD actually caused the pipes to burst at the connections.
For the connectors that connected the tubes to the spray paint intake, converger, and atomizing nozzle, I 3D printed barbed connectors that the silicone tubees could be slipped on to, and spring clamped for an extra tight seal. This is perhaps the biggest relevation I had in the process: which material that can be printed on a regular FDM printed is both water tight between the layers, and doesn’t corrode with exposure to liquid. PLA was obvious really bad. Turns out PETG was a very clear winner. Furthermore, it is extremely easy to print with PETG on regular FDM printers as long as the parts support 240 C nozzle teperatures.
To get paint from the pressurize spray paint can, I had to find a way to press its nozzle down and keep it pressed, as the valves would take over the control of paint flow and they are closed by default. However, I also had to make sure that there was a way to manually quickly disengage the spray-can nozzles incase there’s an emergency. For this, I designed a toggle-clamp mechanism that achieved this.
Controls:
The valves had to be precisely controlled by a microcontroller, and I chose a regular arduino nano for it.
But there had to be an interface to select the color you want to spray. At first I decided a smartphone app would be good and I went that way. For a brief period I went down the rabbit hole of actually picking the color you want as an output, but I quickly realized that mapping the color in RGB on screen to paint combinations is a whole another challenge in itself so I quit that route. I then settled on directly setting the level of each color on the app, and fine tune the exact color i want by trial and error of spraying.
But eventually I realized that touching my phone while spray painting is a messy affair, and so the control needs to be more analog and resilient to accidental paint-touches. I then built a controller with dials for each color, and programmed a small screen that showed the what was going on. Very simple and effective.
I also added a force sensor on the atomizing nozzle for a special “gradient mode” that changed the color as a gradient between two set colors, depending on how hard you pressed the nozzle. Perhaps over-engineered and an unnecessary feature, but it really showed the “real-time” mixing of the spray paint.
The entire build can be under ~$150 dollars and all the parts are easy to find, or easy to make with basic makerspace tools. and if this gains enough requests and I have some time in life, I will make this open source and put up instrunctions and designs so you can make one for yourself.
This was one of the craziest things I’ve ever done, and I learnt so much from it. I’m glad I get to share this with everyone. Keep making!