Tim's 10 Colour Plotter Pen

5.7K8333

Intro: Tim's 10 Colour Plotter Pen

Most CNC (Computer Numerical Control) D.I.Y. Pen Plotters have only one pen holder, so if you want to plot something with multiple colours, you have to physically change the pen from time to time.

There are more advanced plotters that have carousels to hold multiple pens, these plotters have more complex mechanisms and code commands to enable their use.

I thought I would have a go at making something that could be used on most D.I.Y. Plotters and uses something readily available to buy.

I also wanted to make something that could be use using the most common free Firmware currently used, grbl.

STEP 1: Print All the Parts

The first thing to do is print all the parts.

I have used PLA.

I have designed the parts to be printed a certain way, so take a look at the image for reference.

The wall thickness was set to 1.6mm, these are functional parts, so they need a good wall thickness.

The fill density won't really matter. I had it set at 20%.

Layer thickness was 0.2mm.

Nozzle size I have is 0.4mm.

STEP 2: Motor Circuit

A small circuit is required to control the motor.

The current that the motor uses, is too much for a pin on a microcontroller to handle, so we need to use a transistor to switch the motor on and off, the transistor will be switched by the microcontroller.

Basically, we are making a SSR (Solid State Relay), but because the current the motor uses, is low, about 600 mA, we can use a transistor.

To keep the Transistor stable and we want to protect the microcontroller we will also need two resistors.

So, because the circuit consists of only a transistor and two resistors, I feel there is no need to make a PCB, the components will be mounted onto the micro switch. (Old school, before we had PCB, Hehe).

I have done the circuit using Fritzing to make it easier to follow.

Connection:

  • Red = 5v
  • Brown = GND
  • Orange = Microcontroller.

Cable. I used 3 core flat JR cable 32 awg. Needs to long enough to reach from the motor on the tool at whatever position the pen is, to your controller (CNC Shield).

  • The length of cable between the motor and the switch needs to be about 60mm.

The switch lever needs to be a little wider on the end.

  • I just soldered a little piece of metal strip on the end.
  • About 8mm.
  • You will have to remove the chrome plating with some abrasive paper, to enable you to solder to it.

Try to keep all the components to one side of the switch as show in the photos, where it fits is a tight area and one of the linear bars fit verry close to the contacts of the switch.

STEP 3: Pen Top Removal

The pen top is a push in fit that is not supposed to come out.

  • It has a shape on the end inside that pushes into a hold and not come out.

To get the pen top out, the end of the pen top has to squeezed/miss-shaped so that it can be pulled back out of the hole.

  • The end can only be accessed from inside after removing the pen bottom.
  • The pen bottom just unscrews.

Hope you can see what needs to be done from the photos.

  • The pen top is not going to be used again, so any damage done to it to remove it does not matter.
  • Make sure you don't damage any of the other parts.

After you have removed the pen top, you can replace the pen bottom.

  • The pen bottom just screws back on.

STEP 4: Tool Holder

As I have stated: The Multi Colour Pen is designed to fit my plotters, Tool Holder.

You will have to make some mount for it to fix it to your plotter, it is best to use the four slotted holes to mount it, this will give you some adjustment.

  • I have done a sketch to show the position of the mount holes.

The Tool Holder requires a Servo fitted; the type is a SG90.

  • The servo is fitted from the back of the tool holder and held in place with two screws.
  • The servo requires a single horn fitted, held in place with one screw.
  • The horn should be set horizontal pointing to the right when the servo is set at mid-way.

The multi coloured pen will be held in place using two 3mm diameter, 90mm long linear rods.

  • The rods are held in place with two clips.

STEP 5: Assembly [Pen Holder Support / Up-Down Slide]

Slide the Up-Down Slide over the Pen Holder Support as shown.

  • Do any fettling to make the Up-Down Slide, slide freely over the Pen Holder Support.

STEP 6: Assembly [Up-Down Cam]

Place the Up-Down Cam Servo from the back into the hole at the top of the Pen Holder Support as shown.

  • The place for the servo horn should be pointing up.

Place the Up-Down Cam Pen from the front into the hole at the top of the Pen Holder Support and mate it up with the Up-Down Cam Servo as shown.

  • The cam should be pointing up, the same way the place for the servo horn points.
  • Fix in place with a screw.
  • Do any fettling to make the cam rotate freely.

STEP 7: Assembly [Up-Down Stops]

Fix the Up-Down Stops to the front of the Up-Down Slide using four screws.

  • Make sure the Up-Down Stops is fitted the correct way around as shown.

STEP 8: Assembly [Rotation Spring]

Fit the Rotation Spring to right side of the Up-Down Stops using a screw as shown.

  • There is nothing to align the Rotation Spring, just try to keep it at its correct alignment while you tighten the screw.
  • You will be able to align it perfectly once the Pen Selector is fitted.

STEP 9: Assembly [Switch Mount]

Fit the Switch Mount on the front of the Pen Holder Support as shown using two screws from the rear.

  • Note the orientation of the notch.
  • The notch is where the switch will be mounted.

STEP 10: Assembly [Switch]

Fit the switch to the Switch Mount as shown using the two 10mm long screws as shown.

  • Note the orientation.
  • The motor will have to hang loose for the moment, take care.
  • Check that the 3mm diameter linear rod dose not foul any of the terminals or components.

STEP 11: Assembly [Pen Rotator Cam]

Fit the Pen Rotater Cam to the end of the Motor.

  • Take note that there is a flat to be aligned when fitting.
  • The side of the Pen Rotater Cam that has a hole with a flat goes to the outside.

STEP 12: Assembly [Pen Pre-fit]

Place the Pen Selector into the top of the pen.

  • Make sure all the pens are located in their slots.

Loosely fit the Pen Holder Top and Pen Holder Bottom onto the pen.

  • Do not tighten the clamps yet.

STEP 13: Assembly [Pen]

Put the pen in place, so that the Pen Selector sits inside the Up-Down Stops.

  • Use two screws to secure the Pen Holder Top in place.
  • Use two screws to secure the Pen Holder Bottom in place.

Position the height of the pen so that the joint of the pen top and bottom where they are screwed together is in line with the bottom of the Pen Holder Top.

Align the Black pen to the front.

  • Adjust so that when the Up-Down Cam is rotated to push a pen down, other pens go inside slots in the Pen Selector.
  • There is a section that has no slot, this is where the selected pen is. It is a good idea to mark the top of the Pen Selector on the top so you can see which pen is selected.

When all is aligned, carefully tighten the clamps on the Pen Holder Top and Pen Holder Bottom.

  • One screw at the front of each.

STEP 14: Preparation [Pen Rotator]

The face of the little hook on the Pen Rotator needs to be smooth.

  • Make the face smooth using some grit paper or a smooth file.

STEP 15: Assembly [Pen Rotator]

The Pen Rotator is held in place by the Pen Rotator Retainer and a screw.

  • Don't over tighten the screw. The Pen Rotator Retainer is recessed to give a close tolerance fit of the Pen Rotator.
  • The screw may need backing of a little to allow the Pen Rotator to move.
  • Adjust the screw just tight enough so that the Pen Selector rotates when the Pen Rotator is moved back and forth.

STEP 16: Assembly [Motor Pre-fit]

Clamp the Motor into the Motor Mount using the Motor Mount Cap and two screws.

  • Note the orientation of the Motor.
  • It does not matter which way up it is, it's the motor body needs to be on the thicker side of the Motor Mount.

STEP 17: Assembly [Motor]

Fit the Pen Rotater Cam into the Pen Rotator and fix the Motor Mount to the Pen Holder Support using two screws.

STEP 18: Assembly [Complete]

The assembly is now complete.

  • Hopefully have made a mount to fix my Tool Mount to your machine.
  • The 10 Colour Plotter Pen should now be fitted to the Tool Mount using two 3mm Linear Rods.
  • The Linear Rods can be held in place using two Bar Caps.

STEP 19: GRBL [Install]

I have a bespoke plotter; I can wire it as I like and create commands to control special functions.

I know that most people will be using grbl Firmware on the plotters. So, I will show you how to connect the 10 Colour Plotter Pen to a grbl system.

Well actually it needs to be a modified version of the grbl Firmware.

Use the version of grbl Firmware that has been modified to control a Servo on my GitHub.

  • I have made some updates to make it work, that may not have been pulled yet.
Note!

There is a setting in the code prior to uploading the firmware that may need to be changed.

  • In the file grbl/spindle_control.c line 41.
//#define RC_SERVO_INVERT       /* RC Servo , Uncomment to invert servo direction */

Un-comment this line if the Servo direction needs reversing.

Install details
  • Upload the firmware to your device the same way you would do with the original grbl.
  • Copy the folder grbl to the libraries folder in your Arduino folder. drive:\user\Documents\Arduino\libraries\
  • (Replace the original if you have it)
  • Start Arduino IDE,
  • Select Tools and set your Board and COM Port,
  • Select File => Examples scroll to grbl => GrblUpload,
  • Click Upload Button.

STEP 20: GRBL [Wiring]

The Power to the Servo and Motor is 5 volts.

  • Make sure it is a good 5 volts, the Servo uses quite a bit of current.
  • The ground needs to be a common ground to Servo, Motor and Microcontroller.

The Servo Signal wire goes to the Spindle PWM pin (which is Stop pins +-Z on old CNC Shields)

  • Whichever Shield you have; it is the pin that is Arduino Pin D11.

The Motor Switch wire goes to the Spindle Direction pin.

  • Whichever Shield you have; it is the pin that is Arduino Pin D13.

STEP 21: G-Code

I have used the M03 and M04 commands to control the 10 Colour Plotter Pen.

The Servo version of grbl accepts a value with the M03 Command.

  • The value used is a value between the max and min settings set for the Spindle speeds in the settings of the firmware.
  • The code used to set the spindle min and max settings is:
 $30=180
$31=0
  • I recommend setting them to what I have shown.
  • The value in the G-Code is preceded with an S.

Example G-Code:

  • M03 S0
  • M03 S180

Setting the value of Spindle Speed min and max, gives a relation to the angle of the horn on the Servo.

The M04 G-Code command is just used as is. But it must be followed by a M03 S0 command immediately after.

Important

The Pen must be up before using the M04 command to change colour.

So, it is best to always use both commands when changing colour.

  • Start with: M03 S0 (To make sure the pen is up)
  • Next: M04 (To start colour change)
  • Then: M03 S0 (To make sure the pen change stops)

To use the currently selected pen.

  • M03 S180 (Pen Down)
  • M03 S0 (Pen up)

Some delays may need inserting between the commands. To give time for the Servo or Motor to move.

  • G04 P0.5 (Half Second Delay)

I have attached some modified code that should work with this version of grbl.

  • You may want to test the Tool like I did in my first video before running a full script.

STEP 22: Video


STEP 23: Addendum

Now that I have a multi colour pen, I thought I should try some colour plots.

I managed 3, before the ink in this cheap pen ran out, well the 4 colours I was using.

I must admit the plots had a lot of lines to draw, the amount of ink soon adds up.

So, I tried to find some refills, when it comes to looking for coloured refills, the options are limited.

I ended up getting some cheaper and better 10 colour pens, they come as a six pack.

These pens are longer and so I was not able to swop-out the actual pen.

The actual individual pen tubes inside where ok.

  • With them being longer, the tops just needed trimming down to the length of my original ones.
  • The pen tubes were also transparent, you could see how much ink there was.
  • I have taken a picture of one to show how much ink was used on one of the plots I did, it was much the same for the other colours.

I have decided to rearrange the colours in the pen holder, because of the colours I use to do this type of image.

  • Cyan, Magenta, Yellow and black.
  • This is so it only has to move one position for each colour.

I made a coloured label for the top of the Pen Selector, and a new Up-Down Stops.

  • Note the sequence on the label is opposite to the actual sequence of pens when viewed from the top.
  • This is because it is the plunger that moves and not the pens.
  • Black on the label will go to the opposite side to where the plunger was marked.

If anyone is interested in doing similar plots on their plotter, I have done an Instructable on how I did one using the Linedraw Algorithm.

Did a video of the first three images I did; it may give a better representation of how they look.

22 Comments

A fantastic instructable. Well done. I can see the pens running out quickly on some big jobs.
Have you considered these...

AU $3.18 40%OFF | Retractable Gel Pens Set Black red blue Ink Colored Gel Pen 0.5mm Replaceable Refills school Supplies Stationery & Office
https://a.aliexpress.com/_mspYpFk

There are plenty of different colours and insert sizes, search on AliExpress, eBay or your favourite supplier.
May could the set up be adjusted slightly to accommodate these cheap and cheerful gel pen refills?
Thankyou I am glad you like it, thankyou for the comment.
I did a lot of searching around to see if I could get a lot of different colour refills, options are limited.
Looking for specific refill colours, the choice is pretty limited to Black, Red, Blue and Green.
Regards coloured Gel-Pens. it's usually a 25 to 50 pack of mixed.

If you see my Colour Plots Using: Plotterfun and a Pen Plotter : 7 Steps (with Pictures) - Instructables
For images only 4 colours are needed, I have looked for these 4 colours as a refill pack but haven't found one yet.
So it comes back to the multi-pen, luckily I found a cheaper, better option. see step 23.

One day I may look into the refillable brush pens, so I can use the inkjet printer refills.
Okay I just checked the link you mentioned in the above post. Very nice indeed!
Have you ever considered using something else like Technical Drawing Pens, Roting Pen Set, Staedtler, etc...

https://draftex.com.au/collection/pens-markers-inks/technical-drafting-pens

I think these are refillable with dyes and fluid inks. I believe they have no moving parts at the drawing end. A bit like those graph recording machines.

One might use food colouring dyes rose pink, blue and yellow with a 20% glycerine mixture to help stop dying out and correct viscosity.
Yes I thought about using those. I have a set.
I actually served my time as an apprentice draughtsman, before computers.
The medium we used to draw on was like tracing paper but thicker. So it could stand a little force from one of these type of pen when used in a plotter (when we started using computers).
This type of pen is a bit sharp for using on paper at speed.
These pens have a little needle inside the nib to control the flow of ink. (stop blockages)
Because of the size of the pen, the different pen widths or colours where stored in a carrousel and picked when needed.
This means that the plotter firmware needs extra code to know how and which pen to pick.
grbl was not originally designed to cope with this type of thing.
grbl was designed with a basic CNC machine in mind using the minimal number of pins the Arduino Nano has.
This version of grbl is what is found on the cheap plotters from China, so I thought I would make something compatible and not to complicated to use.

Your idea of food dyes is nice. May be cheaper than the inkjet printer re-fills.
I'm always looking for the cheapest option ha-ha.
We use this type of mixture at work on our cake topper printers. You can vary the the glycerine ratio between 10 - 20 % depending on the type of print head you run. Epson printers are by far the more reliable and consistent machine to work with. It's the piezoelectric element in the print head that makes them better suited.
For example if you have a home setup with an external CISS tank setup one needs to get the level of the tanks at height where there's a balance.
If it's too high the ink will ooze over you print job or it won't print if it's too low.

The Action Lab describes this phenomena very well.
https://youtu.be/Gav25xB0LtE

From memory if you run 17.5% glycerine the tanks sit down about 9cm +/- ,depending on the type of printhead, below the printers printhead.

That's why you can't really use print ink from other models across different printers. The viscosity and molecular attractions of the different formulations are tweaked to run on the physical constraints of the printhead.
Conceivably you may be able to make different brands of ink work in machines by using an external CISS tank setup and then vary the tank's height to achieve the best equilibrium.
Interesting......
I did not know you could put food dye through a CISS tank setup.
I can imagine what you are saying.
That would make a good project to find an old inkjet printer and convert it.
But this is beyond the brief I set for this project.
Yes, you absolutely can. It works very well indeed. I would like to see you do an instructable on that. You are very thorough on your articles. I'm more than happy to advise if you hit a snag. I'm sure you won't. You just might be able to refill a gel pen insert for your amazing plotter pen instructable with a mixture of glycerine and food dye. I think there's some type of clear gel in the end of the refill to stop the ink leaking out. Maybe something to explore.....
This was incredible. Thank you so much and I shall be following you from this point on. Would it be possible to show a how-to on gcode please. I am a newbie to cnc and I think that would certainly help. Once again thanks for a superb instructable. .Rob….
Thankyou I am glad you like it.

The basics of G-Code is not that hard if you know how vector graphics or CAD are drawn.
Do you have any experience with CAD?
A script usually starts with settings commands, to set the mode metric or imperial and if all values are from an origin or incremental.
Then its a matter of drawing straight lines, there are arcs but that's not for beginners.
All are XYZ coordinates, you have a start and a finish.
Use G00 X{value} Y{value} Z{value} F{value} to Go to the start.
Use G01 X{value} Y{value} Z{value} F{value} to Draw to the end.
The F{value} is the speed.
There are several commands used to lift the pen, it depends on what you physically use to move the pen.
If it is a stepper motor it would be the Z{value} in the above codes, usually this value would be on its own G00 Z{value} F{value} or G01 Z{value} F{value} this makes sure the Hight is set before any horizontal movement is done.
If the machine has a servo modification to move the pen, the the commands for the Spindle Start and Stop tend to be used, M03 and M05.

Here is a nice sheet to get more info: Common G-Codes For CNC Machines (mmattera.com)
Nice instructions and blog, I'm a bit too lazy to do such writing...
With my color version of plotterfun you get all colors in one SVG (grouped) from the original picture, without the need to seperate C;M;Y;K before using plotterfun (and you could use automatic pen change, later on in GRBL-Plotter).
https://grbl-plotter.de/plotterfun-color_2020/
Oh my, I did not know of this.
You have done an exhalent job.
As I have mentioned some where, with the B+W I thought there was no need to go further, but you have proved me wrong.

Q. You have done just colour version. Why did you not add a radio button for B+W?
This would then cover all.

Have you made yours open source?
It would probably take my slow plotter a day to plot my image using the same settings as I used with the Black and white. ha-ha.
Brilliant. It's a shame that you are not well. Anyone who can do things like this, should be allowed to live forever in my opinion. Thank you for amazing me with your skill and your gift.
I subscribed. I hope for many years of mind blowing projects. Merry Christmas.
Thankyou very much, doing these projects is what keeps me saine ha-ha.
Thank you Judges.
With my winnings I have ordered my self a small CNC Machine.
Hope to do some Instructables using it.
This prototype has thousands of variations, waoooo! Imagine this device with laser and pen mode with multicolor inkjet ink, with a router and inkjet, engrave and paint, given that the device is small and the injection lines are already something natural in continuous ink systems, really this by far the best project now! Thank you, I hope you win and improve your device even more and share it, it's great. Congratulations! I think you should put it somewhere (improve it first for a creative function such as acrylic paint, or laser plus paint, etc.) so that the small amounts will give you many to develop this prototype, greetings
Thank you for leaving a comment.
I am glad you like it.
More Comments