CoreXY CNC Plotter
CoreXY CNC Plotter
by lingib
This instructable describes an A2 plotter made from low cost aluminium extrusion, a piece of particle board, two
NEMA17 stepper motors, and a few belts and pulleys.
The plotter has an on-board interpreter that recognizes the g-code output from "Inkscape" .
Metal work is simple ... all you need is a hacksaw, three drills, a rat-tail file, and a screwdriver.
12 October 2017:
16 November 2017:
17 March 2018:
Step 1: Circuit
The wiring diagram for this plotter is shown in photo EasyDriver module for a current reading of 0.4 amps
1. (400mA) on the CPS-3205 power supply.
The EasyDriver module expects the wires from each Repeat this process for the remaining motor and Big
motor coil to be adjacent. Check that the motor wires EasyDriver module.
don't alternate ... if so swap the two center wires.
Disconnect the power.
Adjusting the motor current(s):
Substitute motors:
Set your CPS-3205 power supply to 12 volts.
The plotter also works with 6 volt 8 ohm stepping
Attach a 12 volt 30 ohm NEMA17 stepping motor to a motors in which case the CPS-3205 power supply
Big EasyDriver module and apply power to the motor should be set to 6 volts and the motor currents set to
assemby. 0.6 amps (600mA).
Software installation:
[1]
22 December 2018:
The "bool" definitions in the file coreXY_plotter_1a.ino have been rewritten in the following format:
For some reason the original format (in some compilers) no longer works ????
Download
https://www.instructables.com/ORIG/F76/2FZF/JPX4SVW9/F762FZFJPX4SVW9.ino
…
Wood saws are not required if you ask your timber merchant to cut the particle board and and pine supports to
length.
Download
https://www.instructables.com/ORIG/FT2/QDS8/JZD6PRSV/FT2QDS8JZD6PRSV.txt
…
Step 4: Theory
This step derives the pen motion equations and ΔA - ΔX = -ΔB + ΔX ............................................. (5)
may be ignored ...
From which:
If we rotate motor A counter-clockwise by an amount
ΔA then the pen carriage will move horizontally to the ΔX = (ΔA + ΔB)/2 ................................................. (6)
right by an amount ΔX and vertically upwards by an
amount ΔY. The equation for this is: Translating: the pen moves horizontally when both
motors rotate in the same direction
ΔA = ΔX + ΔY ...................................................... (1)
Vertical motion:
If we rotate motor B counter-clockwise by an amount
ΔB then the pen carriage will move horizontally to the Rearranging equations (1) and (2) we get:
right by an amount ΔX and vertically down by an
amount ΔY. The equation for this is: ΔX = ΔA + ΔY ....................................................... (7)
The reason for the ΔY sign/direction change is that Equating equations (7) and (8) we get:
the two timing-belts are moving in opposite
directions... the timing-belt for motor A is being fed ΔA + ΔY = ΔB - ΔY .............................................. (9)
towards the pen which lets the pen to move upwards,
whereas the timing-belt for motor B drags the pen From which:
downwards.
ΔY = (ΔA - ΔB)/2 ..................................................(10)
Horizontal motion:
Translating: the pen moves vertically when the
Rearranging equations (1) and (2) we get: motors to rotate in opposite directions.
H-Bot design:
My first build comprised a single timing belt arranged in the shape of a letter 'H', or "H-Bot" configuration, as shown
in photo1.
If both motors rotate in the same direction the tension at opposite ends of the gantry caused
unacceptable "wracking" [1].
pen wobble was excessive
the timing-belt tension spring was not a good idea ... the belt tension needs to be firm.
CoreXY design:
The timing belt was cut in half and arranged in a "coreXY" configuration [2]. This arrangement has
the advantage that all unbalanced timing-belt tension is in the direction of pen movement as shown
by the arrows in photo 2 and photo 3.
Pen wobble was eliminated by using an extra guide rail for the pen assembly.
Variations in belt tension were eliminated by replacing the spring with cable-ties.
Photo 4 compares the original A4 plotter with the base of a larger A2 plotter described in step 7.
The gantry and pen carriage dimensions are common to all plotters. The only additional parts required for the
larger plotter shown in photo 5 are:
[1]
An H-Bot timing belt pulls the gantry ends in opposite directions whenever the pen moves horizontally (see arrow
directions in photo 1). This causes a twisting motion known as "wracking".
[2]
CoreXY requires two full-length timing-belts. Halving the original H-bot timing belt allowed the coreXY concept to
be tested before longer timing belts were ordered. It also accounts for the reduced plot area shown in photo 2.
Bolt a length of 1.5mm x 20mm x 20mm aluminium "Tee Section" extrusion along opposite sides of the base.
Ensure that both rails are parallel.
The extrusions should be flush with the long edges of the base and positioned under the base such that the edges
just protrude (see photo). These extrusions act as railway lines for the overhead gantry.
Screw 65mm x 18mm timber end supports to the base. The timber supports will need a rebate for the aluminium
extrusions ... make a shallow cut then knock a sliver of timber out using a chisel positioned against the end grain.
Drill four x 3mm mounting holes, and one spindle clearance hole, for each NEMA17 stepping motor as shown in
photos 2 & 3.
The outside 3mm holes are 25mm from each edge of the base [1]. This distance ensures the the motors avoid the
wooden support and the aluminium side rails.
These holes are located 25mm from the opposite end to the motors and 40.5mm from the side rails. This distance
ensures that the pulleys avoid the wooden support. It also ensures that the timing-belts are parallel with the side
rails.
Key points:
Timing belts stretched between each motor and the associated fixed pulleys MUST be parallel to
the side rails.
Separate the pulleys with a 4mm washer. The washer prevents the pulley edges from rubbing.
[1]
The 3mm motor mounting holes are spaced 31mm apart. This means that each spindle is 40.5mm from the
nearest siderail.
Vertical (Y-axis) motion is provided by a movable gantry that runs along the fixed side-rails attached to the base.
Horizontal (X-axis) motion is obtained by running a pen carriage-assembly across two rails attached to the gantry
end brackets.
The gantry wheels are fashioned from VZ624ZZ V-groove sewing machine pulleys (photo 3). The V-groove
prevents the gantry moving sideways.
End brackets:
Cut two 60mm x 130mm brackets from a sheet of 18 gauge aluminium using the method described in instructable
https://www.instructables.com/id/How-to-Cut-Fold-S...
Drill two 3mm holes and four 4mm holes at the locations shown in photo 1.
Sandwich four "V-groove" pulleys between a 4mm nut and bolt. The nut prevents the sides of the pulleys touching
the aluminium.
Now bolt these wheels through the 4mm diameter holes as shown in photo 2.
To do this:
When correctly adjusted the gantry end-brackets should roll freely when the base is tilted slightly.
Top rails:
The over-head gantry rails are attached when we attach the pen carriage-assembly ...
The gantry pulley brackets are cut from 18 gauge aluminium sheet. An approximate [1] drilling template is shown
in photo 1.
Key points:
The smooth side of the timing belts always sees a smooth pulley.
The ribbed side of the timing belts always sees a toothed pulley.
One of the double pulleys on each bracket is NOT used ... it simply acts as a spacer.
Press each pulley bracket against the inside of the gantry bracket such that the bracket is centered and the heads
of the pulley bolts are clear of the base.
Mark these positions by means of a pencil through the two existing holes in each of the gantry brackets.
Now drill 3mm mounting holes and bolt the bracket pairs together.
[1]
The 4mm hole positions for the idler wheels depend on the sharpness of the upturned folds.
Fold each pulley bracket then custom position the holes such that:
The pen support is made from 18 gauge aluminium sheet. The dimensions are shown in photo 1
Custom size the large holes such that your pen slides freely but without any sideways wobble.
Attach a pen-lift collar to your pen. Mine was made from the brass fitting found inside a radio knob and a circular
piece of plastic but anything will do ... so long as the position can be adjusted.
The pen carriage is made from 18 gauge aluminium sheet. A drilling template (not to scale) is shown in photo 1.
Assemble as follows:
Pass two 600mm lengths of aluminium "tee section" between the "V-groove" pulleys as shown in
photo 2.
Attach each gantry bracket to one of the rails by means of two 3mm nuts and bolts.
Position the second rail such that the pen carriage-assembly moves freely. Now drill and bolt the rail
to the gantry brackets.
Key points:
Method:
Two 25mm long threaded spacers are joined together (by means of a 3mm head-less bolt) to form a solid rod.
Attach the top of the rod to the center of the pen carriage-assembly using a 3mm bolt.
Testing:
Upload coreXY_plotter.ino to your arduino if you haven't already done so. Instructions for this are given in step 2.
Connect a USB cable to your arduino and left-click "Tools|Serial Monitor" ... a menu similar to photo 1 should
appear.
Apply 12 volts power to your motors and your plotter is ready to use.
The internal wiring of some motor brands are reversed. If your motor directions are reversed then use the alternate
code in the step_motors() function.
This plotter assumes that co-ordinate (0,0) is at the lower-left corner of your paper. As such it is 100% Inkscape
compatible.
Instructions for creating gcode files are given in the following instructables:
https://www.instructables.com/id/CNC-Robot-Plotter... (step 9)
https://www.instructables.com/id/CNC-Edge-Detectio...
https://www.instructables.com/id/Make-Your-Own-CNC...
Instructions for sending your gcode file to this plotter are given in instructable:
https://www.instructables.com/id/CNC-Gcode-Sender/
https://www.youtube.com/watch?v=YiVmjRIDAq8
Both modules are similar but the "Big Easy Driver defaults to 16 x microstepping whereas the
"Easy Driver" defaults to 8 x microstepping.
If you wish to use the "Easy Driver" you will meed to change line 43 in the *.ino code to read:
#define STEPS_PER_MM 200*8/40 //200steps/rev; 8 x microstepping; 40mm/rev
Apart from this minor code change the wiring, and motor current adjustment(s), is the same as that
set out in Step 1 of the instructable.
Each of the pinouts for the "Big Easy Driver" are explained in
http://www.schmalzhaus.com/BigEasyDriver/BigEasyD...
Ok Thanks, but where i have to connect two wire coming from SG90?
Hi, I have done everything up to send G_code. I have type the file name in command panel and it
not started moving stepper.
Things to try:
(1)
Confirm that your plotter works as follows:
- Launch your Arduino IDE,
- click "Tools|Serial Monitor",
- then issue some manual commands.
- close your Arduino IDE
(2)
Now send a known good file to your plotter
- download and copy Letter_B.ngc into your C:\...\processing3_terminal folder
- launch "processing3_terminal.pde"
- now follow the instructions in Step 3 of the "CNC Gcode Sender" instructable
(3)
Now try your aa.ngc file
- copy your aa.ngc file into your C:\...\processing3_terminal folder
- mimic the the instructions in Step 3 of the "CNC Gcode Sender" instructable using aa.ngc instead
of Letter_B.ngc
If steps (1) and (2) work and (3) doesn't then the problem is with your aa.ngc file.
The SG90 has three wires.
Just follow the wiring shown in Photo 1,Step 3.
The orange wire goes to pin D3 of the Arduino.
CoreXY CNC Plotter: Page 20
The red wire goes to 5V on either the Easy Driver or the Big Easy Driver.
The brown wire goes to GND on either the Easy Driver or the Big Easy Driver.
Thanks Lingib!
I notice that you appear to be using Arduino version 1.6.1 and Windows 7. I suggest that you
update your software to the latest Arduino version for your operating system. The current Arduino
version for Windows 10 is version 1.8.8.
There are two versions of my code in Step 2 of this instructable. Try each of these files. The reason
for two files is explained in my comment dated 22 December 2018.
You have possibly copied the *.ino code into your "sketch_feb14b" twice as your error messages
read: "coreXY_plotter.ino:104:6: error: redefinition of 'void setup()'"
Hi
CPS-3205 power supply not avilable in my place, So alternativly can i use 12V 3A power adafter?
or Please suggest me.
Also 12v power suply need to connect only Big easy driver? please give melittle more details.
Any 12 volt DC power adapter capable of 1 amp should be fine providing that you adjust each
Since power adapters do not have an inbuilt current meter you will need to (temporarily) insert an
amp-meter in series with the power supply while you adjust each of the Big Easy Driver current
limits to 0.4 amps (400 milliamps). Before adjusting the Big Easy Driver currents use an ohm-meter
to check that each of the two motor coil windings are adjacent to each other on the Big Easy Driver
boards.
The 12 volt supply is ONLY connected to the Big Easy Drivers as shown in the CoreXY Plotter
wiring diagram. The 5 volts for the Arduino Uno R3 is obtained from the USB cable connected to
your PC.
Thanks for reply, I got now. 0.4amps should out from each big easy drive and 0.6amps out for
SG90.
Amazing project, very nice and clean.
I have one simple question, in the draw_line() function, is the plane divided into octants or
quadrants.
Many thanks for the project.
My draw_line() function is a variation of Bresenham's Line Drawing Algorithm and uses "octants"
as defined in the attached diagram.
Bresenham's algorithm is only valid for "octant 0" which means that you have to convert each XY
coordinate to "octant 0" for processing, then convert the results back to the original octant.
There are also numerous software solutions, one of which is derived in my instructable
https://www.instructables.com/id/CNC-Drum-Plotter/ (Step 5)
In that instructable I used switch() functions, each with eight conditions, to encode and decode
each of the eight octants. This works but is relatively slow as each plot requires up to twenty-four
comparisons (eight for encoding; eight for decoding the X axis; and eight for decoding the Y axis).
The algorithm that I have developed for this plotter recognizes that a circle not only contains eight
"octants" but also has four "quadrants":
- quadrant 0 contains octants 0,1
- quadrant 1 contains octants 2,3
- quadrant 2 contains octants 4,5
- quadrant 3 contains octants 6,7
If you study the attached diagram you will note that dX is always positive in "quadrants" 0,3 and
that dY is always positive in "quadrants" 0,1. Now add a "swap" flag and the number of
comparisons needed to plot each point in the draw_line() function reduces to eight which is
significantly faster.
Hopefully this clarifies the following comment which appears in my draw_line() function:
"The algorithm automatically maps all "octants" to "octant 0" and automatically swaps the XY
coordinates if dY is greater than dX. A swap flag determines which motor moves for any
combination X,Y inputs. The swap algorithm is further optimised by realising that dY is always
positive in "quadrants" 0,1 and that dX is always positive in "quadrants" 0,3."
Yes sir, I will purchase Big easy driver right now. Thank you
Swap the two center wires if the coil wires are not adjacent. Hopefully this will solve the problem.
That worked! My CNC Plotter works perfectly now, it's a really awesome project, thanks again!
You may also find these instructables to be of interest as they build upon your CoreXY design:
https://www.instructables.com/id/CNC-Pen-Lift/
https://www.instructables.com/id/Make-Your-Own-CNC-Plotter-Image/
https://www.instructables.com/id/CNC-Pen-and-Wash-Portrait/
Hey lingib,
Thanks so much for your instructable, I have found it very useful. Thought I would share with you
how my attempt at building a remix of your design has gone. So far the results are pretty good,
only stumbling block at the moment is circles. Any ideas here, I think it might be something to do
with belt tension. The one major difference is that I haven't used your code but have instead used
grbl, kudos to you though for writing your own code, that's incredible!
Glad that you found my instructable useful. Thank you for sharing ... you've just made my day :)
Can you be a bit more specific about the circles. Are they round, elliptical, or don't the ends meet?
How do GRBL circles compare with the same circles using my code?
"CoreXY Support: Grbl now supports CoreXY kinematics on an introductory-level. Most functions
have been verified to work, but there may be bugs here or there. Please report any problems you
find!"
I'm pretty sure the problem was belt tension. I strengthened the X carriage by adding a bottom
cross support which made it more difficult to attach all the belts, I think this was a catch 22
situation.
I must admit I have now abandoned the CoreXY setup and gone with a more conventional setup
where there is a motor mounted on the gantry to move the X carriage. I am now getting better
results when drawing circles.
I never actually got your code working on my setup, I have different drivers but as you have stated
it should work with easydrivers. However I wasn't very persistent with my attempt.
I am really glad to have been introduced to the CoreXY system though, it really is cool how you
avoid mounting steppers on the gantry.
And thank you for sharing your results :)
Your video is great. Am impressed with your mechanical setup, choice of rails, motor mounts, and
your pen mechanism ... well done!
Here's a youtube clip of another video so downloading isn't necessary:
https://www.youtube.com/watch?v=UCYlUPE-esU
We built the plotter and is working well, both the mechanical and software side.
We are interested to add a bounds function that allow us to go back to the same origin every time
we turn on the plotter.
Drill four x 3mm mounting holes, and one spindle clearance hole, for each NEMA17 stepping
motor as shown in photos 2 & 3.
The 3mm motor mounting holes are spaced 31mm apart. This means that each spindle is 40.5mm
from the nearest siderail
"Mounting the fixed pulleys
These holes are located 25mm from the opposite end to the motors and 40.5mm from the side
rails. This distance ensures that the pulleys avoid the wooden support. It also ensures that the
timing-belts are parallel with the side rails."
The fixed pulleys must be 40.5mm from the nearest siderail if the timing belts are to be parallel.
The distances from the wooden end supports is arbitary ... so long as the motors and nuts don't
touch the wood.
Hope this helps :)
It does, thanks!
Thanks! I'll keep you posted, I'm pretty sure I'll have some other questions in the future ;)
Really impressive instructable, thankyou! Could anyone give me some pointers on sourcing parts?
Having trouble finding some of them anywhere (I'm in Canada). Including but not limited to the
aluminum tee's.
Thank you for your comment :)
Download the file CoreXY_parts_list.txt attached to Step 3. This file lists the website from which all
items were obtained and the product descriptions.
Cut and paste each of the descriptions into the website's search-bar and select the supplier who
offers the best deal.
Two thin aluminium 'L-sections' bolted back-to-back should work If you can't find aluminium 'tee-
sections'. Most hardware stores contain a range of aluminium extrusions.
No video attached!