3018 CNC Machine [Fitting Limit Switches]
by Palingenesis in Workshop > CNC
3736 Views, 8 Favorites, 0 Comments
3018 CNC Machine [Fitting Limit Switches]
I have acquired a 3018 (30cm x 18cm) CNC Machine.
- It was quite cheap, hence no limit switches.
- I was going to design my own, but these days, I have found it cheaper to by a kit (Find a good deal), than buy all the parts separately.
- Buying a cheap kit still gives you the fun of upgrading.
This Instructable is how I added limit switches to the version I have.
- I have made all my brackets on my 3D Printer.
- If you don't have a 3D printer, there are places that do 3D printing for you.
- The version of machine I have is as shown in the image. All are pretty much the same so this Instruction should be good for most machines.
- Maybe you have bought End Stop Kits and not sure how they should be fitted.
- The Firmware on these machines is usually grbl. So I will give some details about configuring grbl for limit switches.
- grbl site does a page about Limit switches, mine adds an extra resistor in the circuit.
- Normally I would say: Take a look at grbl wiki, it's all there. But some times its nice to have all the info of one subject pulled together and elaborated a bit in one place.
- I have gone on a bit and done it my way, but hopefully it will help some.
- This is targeted at those that are new to this type of CNC Machine.
Note!
I thought I should say adding Limit switches to one of these Desk-Top CNC machines may not be for you:
- If you are new to G-code.
- If you have a laser attachment and just start cutting from any position.
- It does not work well with the Off-Line Controller. If you have Homing enabled; You need to Home first (No button for that). Hitting a stop is a disaster. Some advanced settings can be changed in the firmware to try and make things work.
I would say that adding Limit-Switches to this type of machine is necessary if you intend to do complex machining using software connected via a USB cable.
- Having Limit-Switches, enables you to use Homing.
- Using Homing; any job can be restarted from a known set position.
- Having Limit-Switches will reduce your work area by a few mm.
Basically, Limit-Switches are for the advanced user.
Supplies
A 3D printer will be required to print the bracket for the limit switches.
Bought items are:
- Six Micro Switch. The size of the I have used is about (body) 12.6mm X 6.5mm X 5.7mm. hole centres are 6.5mm.
- Cable. I used 3 core flat JR cable 32 awg. Needs to be long enough to reach from the switches to your CNC controller.
- Connectors, Whatever connectors you need to connect to your CNC controller.
- Three Capacitor 100 nF.
- Six Resistors are needed: Three 10k and three 100R.
- Eight M1.7 Self Taping Screws x 6mm Long.
- Twelve M1.7 Self Tapping Screws x 10mm Long.
- Sixteen M3 Self Tapping Screws x 10mm Long. This what I used, because I had them. What would be better, would be: Allen-Head Self-Tapping Screws. It will make adjustment easier.
Specific Tools:
- Hand/Electric Drill with: 1.2mm (3/64") diameter drill bit and 2.4mm (big 3/32") diameter drill bit.
- Soldering equipment.
- A spanner that fits Posi-Drive Hex bits, if you use Pan-Head Posi-Drive Screws.
Attached are the files needed:
- Limit_Switch_Mount_X.stl Two Required.
- Limit_Switch_Mount_Clamp_X.stl Two Required.
- Limit_Switch_Triger_X.stl Two Required.
- Limit_Switch_Mount_Y.stl One required As-Is, One Required Mirrored.
- Limit_Switch_Mount_Clamp_Y.stl Two Required.
- Limit_Switch_Trigger_Y.stl One required As-Is, One Required Mirrored.
- Limit_Switch_Trigger_Clamp_Y.stl Two Required.
- Limit_Switch_Trigger_Z.stl One required As-Is, One Required Mirrored.
- Jig_Switch_Z.stl Use for drilling Holes.
- Jig_Tiggers_Z.stl Use for drilling Holes.
- Jig_Triggers_X.stl Use for drilling Holes.
- Cable_Clip_20x20.stl I use Six, But you can have more if you like.
- Cable_Clip_20x20_Protector.stl One required where I ran the cable under the machine.
- Cable_Clip.stl I used two of these.
You should have option to print a piece Mirrored in the printers software.
Downloads
Print [pre-Assemble]
First Print all Plastic Parts as listed previously.
- When printed I usually run a 1.2mm drill bit through all the holes for the M1.7 screws.
- If the holes are too tight the screws can snap, so care is needed when fitting.
Do a pre-assemble.
- It is a lot easier to form the treads in the holes with the screws at this point.
Choices
What Choices and why.
I thought I had better tell you why I am adding cable to every pin on every switch.
- Simple answer is: I may change the way it is wired at a later date.
- I may not.
- But I like to leave my options open.
Each axis has a pair of Limit Switches.
- One for maximum amount of travel.
- One for minimum amount of travel.
The switches can be wired two ways.
- With the switches normally open.
- With the switches normally closed.
Each way only requires two wires from the controller to each pair of switches, but are wired differently.
- Normally open, requires that they are wired in parallel. (Both wires go to each switch)
- Normally closed, requires that they are wired in series. (One wire to each switch and a wire links the switches)
So, to make things easy for me. at a later date.
- Should I change my mind at a later date.
- Add extra feedback, circuit checking the switches.
- I am going to do all the wiring options at the controller end.
This requires three cables from each switch.
- As I am using 3 core flat JR cable 32 awg This is no problem.
- If I was to do it one of the other ways, I would just be removing/wasting a wire from the cable.
The choice is yours
- If you only have some 2 core cable, feel free to wire it one of the other ways.
- The only current going in these wires is for the logic circuit, so the wire does not need to be thick.
There are different types of Controller Board.
- I will go into more detail when i come to wiring the switches.
Cable Lengths
Measure and cut your cables to length.
Important!
- Make sure the cable for the Z axis, is measured when the Trolley (X axis) is at it's Max travel.
All other cable lengths don't change.
- you may want to give the cable a couple of inches extra at this time.
The images show the path I will be placing the cables the cables.
- Where possible I will be placing the cable inside the grooves of the aluminium extrusion's.
Once all cables are cut.
- Solder cables to the Switches.
- Try to keep colour coding of wires the same on each switch.
- You may want to mark the floating end of the cable with some sort identification, for when it comes to connecting to the controller.
- The wire I am using is small, so I have attached paper labels.
My Colours are:
- C = Common = Brown.
- NO = Normally Open = Red.
- NC = Normally Closed =Orange.
Mounting Holes
Some Switches and Triggers need hole drilling to mount them.
- The Triggers for the X axis require 2.4mm diameter holes drilling in the Trolley.
- The Switches for the Z axis require 1.2mm diameter holes drilling in the Trolley.
- The triggers for the Z axis require 1.2mm diameter holes drilling in the Motor Mount.
I have made 3D Printable jigs to aid the drilling of these holes.
- I use a small hand drill to mark the hole locations with the aid of the jigs, before using a powered drill.
X Axis Triggers
Two pairs of 2.4mm diameter holes are required for the X Axis Triggers.
- Looking from the Back of the CNC Machine.
- One pair in the bottom right.
- One pair in the top left.
- Rotate the jig for the top left holes.
The jig sits on top of the extruded aluminium with the notch towards the centre of the trolley.
- The Jig has a lip that sits against the trolley.
Each Limit_Switch_Triger_X.stl is fitted with two M3x10mm long self taping screws.
Z Axis Switches
Two pairs of 1.2mm diameter holes are required for the Z Axis Switches.
- Looking from the Front of the CNC Machine.
- I am placing the Limit Switches on the Left side of the Trolley.
The Jig fits over the top and bottom parts of the Trolley (two positions), with the end of the Jig that is not notched facing front, the other end seated against the back of the trolley.
- The hole should be at least 5.5mm deep.
Each Switch is fitted with two M1.7x10mm long self taping screws.
Z Axis Triggers
Two pairs of 1.2mm diameter holes are required for the Z Axis Triggers.
- The two Z Triggers fit to the Motor Mont.
The Jig Fits over the Motor Mount with Edge without a notch seated against the back of the trolley.
- The hole should be at least 4mm deep.
Each Triggers is fitted with two M1.7x6mm long self taping screws.
Fit Remaining Switches
Fitting the Remaining Switches will require some dismantling.
- The Clamps for the Switch Mounts need to be inserted inside the slots of the Aluminium Extrusion's.
Y Limit Switches
- I found it easiest to remove the Front Support to fit the Y Axis Clamps.
- Slide both Limit_Switch_Mount_Clamp_Y.stl into the bottom slot. (I just slackened the screws holding the Switch Mounts)
- Refit the Front Support.
- If you removed the Switch mounts from the Clamps, fit both Limit_Switch_Mount_Y.stl (with switches attached, one Mirrored) to the Limit_Switch_Mount_Clamp_Y.stl.
- Position the switches as shown.
- Leave the clamps slack for now, have it so that they still slide along the slot.
X Limit Switches
- I removed the X Axis restraints to fit the X Axis Clamps.
- Slide one Limit_Switch_Mount_Clamp_X.stl into the bottom slot of the top bar. (I just slackened the screws holding the Switch Mounts)
- Slide one Limit_Switch_Mount_Clamp_X.stl into the top slot of the bottom bar. (I just slackened the screws holding the Switch Mounts)
- If you removed the Switch mounts from the Clamps,fit both Limit_Switch_Mount_X.stl (with switches attached) to the Limit_Switch_Mount_Clamp_X.stl.
- Position the switches as shown.
- Leave the clamps slack for now, have it so that they still slide along the slot.
Y Triggers
The Y axis Triggers should not need any dismantling.
- You may have to separate the Clamp and Trigger to fit them.
- Attach the Limit_Switch_Trigger_Y.stl to the Limit_Switch_Trigger_Clamp_Y.stl and fix them so that they protrude the Table and are 6mm from the outer Aluminium Extrusion.
Setting the Switches/Triggers
I was going to suggest use a Circuit tester (Multi-Meter) to set all the Triggers and Switches to there correct position.
- But there is another consideration: What if it fails to stop at a Limit Switch?
- So I will be adjusting all Limit switches so that if the Axis in question continues as far as it will go. It won't damage the Switch.
You will need to move each Axis to the Minimum and Maximum limits to adjust each Limit switch.
- All that should happen if you try to move an Axis further than it can is: The Stepper Motor get angry and screams. (Most Stepper motors that come with these cheap CNC Machines are usually just strong enough to do the job) If you have upgraded you Stepper Motors take care.
- Adjust the Switch Mount (In the case of Z, it will be the Trigger) until it is right up to the Trigger (In the case of Z, it will be the Switch).
- Tighten up the Switch Mount at this point (In the case of Z, it will be the Trigger).
Because the Axis is a s far as it will go, there is no chance of damaging the switch.
- The actual point at which the Switch will witch its state will be before this point.
I have just shown one extent of each Axis, the opposite existent will be similar.
I messed up a little:
I designed it with Posi-Drive Pan-Head Self-Tapping screws.
- I had to make up a tool to adjust the switches. (Only for the X Axis)
- Thankfully it should only need doing once.
- I suggest using Allen-Head Screws.
Tidy Cables
I have made some clips to secure some cables inside the Aluminium Extrusion's.
- Rout all the cable to the controller.
I also Made some Clips for 8mm diameter cable.
- This is for securing the existing cable, that is wrapped in the plastic spiral cable tidy.
- I have routed some of the cable from the Limit Switches in the spiral cable tidy.
- The clips require holes drilling for Two M1.7x 6mm long self taping screws. (I I used two of these)
- If you are drilling into the tough Bakelite type plastic, the use 2.4mm drill bit.
Controllers
There are many types of Controller.
- All are based around the grbl Arduino Shield.
- There are some older than others.
- Depending on what version you have, will determine what sockets or pins are available.
- There are actually only three pins and ground used for all Limit Switches.
- One pin is used for each axis.
- If any pin is activated the machine disables all movement and a reset is required.
- The reason there are three pins and not just one, is for the homing sequence.
The Pins used are:
- Arduino pin D9 = X Axis.
- Arduino pin D10 = Y Axis.
- Arduino pin D12 = Z Axis.
You can find more details on Arduino Shields on the grbl GitHub web site.
My controller is a custom made version by the manufacture of my CNC Machine.
- The only difference between an Arduino shield and a custom board, is that there may be added functionality by the addition of power outlets and switched-outputs.
- The circuitry is pretty much the same.
So, saying all that, lets look at my controller.
- I have marked the image to show how the pins are actually connected.
- Other boards may look slightly different, but the circuitry will be the same.
If you have a similar Controller that has a pin for each switch and you want to keep it simple, you can't really go wrong with the Limit Switch connections.
- If you go with the NC (Normally Closed) option, you will only use one socket of each.
- If you go with the NO (Normally Open) option, you can use two or one socket(s) depending if you tapped the second switch of the first switch.
- With the above circuits it don't matter which way around the plug goes in the socket.
I of course, am not going for the simple option ha-ha.
- You can leave the wiring to one of these choices if you like and not bother with Steps 9 and 10.
- Or if you feel up to it continue and do Step 10.
BTW During my research I found a manual for an earlier version of my board.
- It has the labels for Z and X switched, they should be as mine.
Noise Filter and De-bounce
For those that follow me, may notice I likes to add physical circuitry to buttons/switches, to overcome de-bounce, rather than leave it to firmware delay routines.
- I will be doing it here.
- It's just my preferred choice.
This requires a power (5v) supply.
- Luckily my controller has a 5 volt supply socket next to the limit switch sockets.
A de-bounce circuit usual with a Normally Open Switch that is closed to Ground when activated.
- I am going for the NO (Normally Open) option.
What is Bounce?
Bounce is: The contacts of a switch usually have a spring moving them. When a Switch closes, the contacts bounce against each other slightly for a brief moment.
- It happens so fast, if it was a switch turning on a light we would not notice.
- But because it is a Microcontroller detecting the connection, it notices the contacts open and close a few times, before finally settling in the closed position.
Remedy
We can reduce/dampen this effect by adding an R/C (Resistor Capacitor) Circuit.
- In the De-Bounce Circuit, it is the 100nF Capacitor and the 100R resistor.
- While the Switch is open, the Capacitor is charged from VCC via. the 10k Resistor.
- When the Switch is closed and while the contact are bouncing, the Capacitor holds the Circuit HIGH.
- The 100R Resistor limits the rate at which the Capacitor discharges.
- When the Capacitor is discharged, the circuit falls LOW.
- By this time the bouncing has stopped.
- This is all done in milliseconds. (Changing the values of the 100nF Capacitor and 100R Resistor changes the speed at which this happens)
The 10k Resistor is there to pull the circuit HIGH with limited current.
- The processor has an internal 47k pull-up resistor, so VCC ends up about 8.2K resistance.
- Why have I used 10k resistors? and not 4.7k like in the grbl wiki? I have a
sh**-loadlot of them, they are good for a lot of things.
With this circuit we still have the noise filtering as shown in the grbl wiki.
Connect the Switches
Note!
- it is important that the wires are connected to the right pins doing it this way.
I thought I would use Fritzing for this part.
- It should show the wiring much clearer.
- I have tried to draw the circuit as it would look.
- I have done it how I have done mine.
Rather than make a circuit board to hold the resistors and capacitors, I have put these components on the plugs.
- You will notice that because I am adding components to the circuit I have wired the both switches to the same plug.
- I am only using one plug per Axis.
Hopefully the photo shows how i solder it all together.
- I started by attaching the three 10k Resistors to the 5 volts pin of the power 5 volts plug. From each resistor I attached about 8mm red cable to each resistor.
- I then attached the Capacitors to each of the Axis plugs, one leg of the capacitor to each pin of the plug. Leave enough of each leg of the capacitor to attach other wires.
- I joined each Axis pair of switch cables together.
- I then attached a 100R resistor the end of each of NO (red Normally Open) wire.
- I attached the other end of the 100R resistor and the wire from the 10k resistor to the Signal (Arduino Pin) side of the leg of the capacitor.
- The C (Common brown) wire was then attached to the ground side leg of the capacitor.
I marked up the plugs relative to there socket and removed my paper labels.
- Plugged all into there sockets.
Micro-Switches and Stepper Motors
Before we go and configure grbl for Limit-Switches.
- I thought it best to explain some of the mechanics of micro-switches.
- Also some mechanics of Stepper Motors.
Micro-Switches
Most micro-switches can have a lever attached to them.
- Some may be a plane flat lever like the micro-switches I have used.
- Some may have a roller on the end of the lever to reduce friction.
- Some may have nothing.
In any case the points at which a micro switch turns ON and OFF are not the same.
- It may be only 1mm difference, less on small switches like the ones I have used.
- In certain serum stances this can lead to a position that is not known.
- To overcome this, and to be sure of a known potion, a sequence of events takes place.
Stepper Motors
Stepper Motors like other types of motors in normal practice don't/can't stop instantly.
- There is usually a slow down period.
- Trying to stop a motor instantly requires a lot of power and things tend to get hot.
Keeping it simple:
- A stepper motor has a magnetic rotor inside and is spun by changing the magnetic field around it.
- From a standing start, If the magnetic field is changed too quickly when starting, the rotor would not have time to move before the magnetic field is back to where it started. The rotor would vibrate back and forth.
- Each change in the magnetic field is one step.
- So when a stepper motor starts, it starts with slow steps and accelerates up to faster steps until it reaches the speed you want it to run at.
- The same approach is used for stopping.
- If you try to stop a stepper motor too quickly the inertia of the rotor my be to much for the magnetic field around it, to stop it from moving and will result in the rotor being out of synchronization with the magnetic field.
- The system that grbl uses is Open-loop, that is, there is no feedback, it relies on keeping count of the steps it rotates the rotor, to know the position on each Axis.
A Sequence Of Fortunate Events
- Excuse the pun.
In order to over come the above possible shortfalls, a CNC Machine has a pre-programmed homing sequence it goes through to get/find it's Axis Origins.
- It first finds/seeks the Limit-Switch for an Axis. It does this fairly quickly, we don't want to be waiting all day for it to travel the length of an Axis.
- As I have said when we cant stop a motor instantly, it needs to slow down to a stop. So when it triggers a limit switch, it slows down to a stop, it has now gone past the point the switch triggered.
- So it now backs off the way it came a little, enough for the Limit Switch to reset its self.
- It then travels back to the Limit Switch at a much slower speed, a speed at which it can stop very quickly.
- Because it was traveling at such a slow speed it stops pretty much as the Limit Switch is triggered.
- It then moves a pre-set distance away from the Limit Switch.
- This new position is set as a Soft-Limit.
- The Soft-Limit is set away from the limit switch so that in normal use the limit switch should never be activated.
Note!
During the Homing sequence, this is the only time the three limit switch pins are used individually.
- During normal use, any Limit Switch activated shuts the machine movement down.
Candle
Ok it's time to activate Limit-Switches.
The following settings are what we need to check/set:
- $3 = Direction port invert, mask
- $5 = Limit pins invert, boolean
- $20 = Soft limits, boolean
- $21 = Hard limits, boolean
- $22= Homing cycle, boolean
- $23 = Homing dir invert, mask
- $24 = Homing feed, mm/min
- $25 = Homing seek, mm/min
- $26 = Homing debounce, milliseconds
- $27 = Homing pull-off, mm
- $130 = X Max travel, mm
- $131 = Y Max travel, mm
- $132 = Z Max travel, mm
To check/set the settings I am going to use the software that I got with my machine.
- I suspect it will come with all of this type of machine.
- It's free Open Source.
- Here is the link if you don't have it: Grblcontrol(Candle_1.1.7 )
I suggest that you have no Tool fitted to the Spindle at this point.
You will need to have your machine connected to you computer via USB cable.
- With Grblcontrol(Candle) open, click the "Service" menu and choose "Settings".
- Select your USB Port for your machine.
- The speed will usually be 115200.
- Close the "Settings" window.
Once connected you can check your current settings.
- Type: $$ in the bottom right box.
- Where I have written "We Type" on the Image above.
- Click the button I have marked as "We Send".
- I recommend you take screenshot of these settings or copy and past them to a file, in the event you want it all back as it was.
We will be using this box and button to change the settings of grbl firmware on your machine.
Types of Setting
There are four types of setting:
- Booleans - These are one bit/binary values that can have one of two possible values, 0 (False/No) or 1 (True/Yes).
- Mask - This is an 8 bit/1 byte (binary) value. The range could be from 0 to 255. The 3 least significant bits represent X, Y and Z. So in actual fact the range used is 0 to 7. (Binary = 00000XYZ). See the Table.
- Float - A float is just a decimal number to 3 decimal places. It's written how I write numbers, with a "Period", "Full Stop" as the decimal place. Well I cant conform this as I don't live in Europe on a European computer using this software. I suspect a dot may be used, I have had issues like this before.
- Integer - This is a number without a decimal place.
I think I only need to explain Mask more.
- Some settings may need information for all three Axis.
- To put information for all three Axis, it uses the last three bits (3 LSB) of a byte as switches, ether ON or OFF.
- It is using binary values, which can be represented as normal numbers.
- The table shows how the switches for X, Y and Z are represented as numbers.
To Change a Setting [$]
To change a setting.
- We enter in the box (The one I wrote "We Type") a $, followed by the setting number, followed by an =, then the value.
- Then click the send button. Carriage Return usual works as well
Example:
$3=2
Are We Going in the Right Direction
It is very important that the buttons move the Tool in the right direction.
- What can be confusing is the "Y" direction.
- The "Y" direction is the direction the Table moves.
- If the table is moving away, then the Tool is relatively speaking coming towards you.
- It is this relative direction of the Tool that we use.
So the first step is to check that the position of the Tool moves correctly when you click one of the "Jog" buttons in the software Candle.
- Move the Tool to the centre the way you normally do. My machine has an Off-Line Control Pad.
- Looking from the front of the machine, place a piece of paper with an arrow drawn pointing to the back of the machine and an arrow draw pointing to the right of the machine, on top of the machine table.
- Using the "Jog" buttons in Candle to move the Tool.
- The Top Button should move the Tool along in the Direction of the arrow pointing to the Back.
- The Bottom Button should move the Tool along in the Opposite Direction of the arrow pointing to the Back.
- The Right Button should move the Tool along in the Direction of the arrow pointing to the Right.
- The Left Button should move the Tool along in the Opposite Direction of the arrow pointing to the Right.
- The two buttons on the far right should move the Tool up and down.
If all is fine we can go to the next step.
- If not continue.
If the above does not happen as it should.
- Take a note of which Axis(s) go in the wrong direction.
This is where setting $3 comes in.
- Setting $3 is a Mask setting, so you need to refer to the table in the previous step.
- Look down the table for a line that has a "Y" for an Axis that went the wrong way and a "N" for those that where correct.
- Take note of the setting value.
Lets say Axis Y went in the wrong direction.
- Look for the row in the table that has N(Z), Y(Y) and N(X)
- Look to see the setting Value, in this case it is 2.
- So in the box we type: $3=2
- Press the send button.
After changing the setting all should move as it should.
- Oh, this is providing the original setting was 0 (zero).
This should have been all been correct, but it is a check that needs to be done before continuing.
Grbl Settings [Max Travel]
This is the Maximum amount of travel the Tool can move in each Axis.
This is a 3018 CNC Machine, so it probably will be:
- X = 30cm = 300mm.
- Y = 18cm = 180mm.
- Z = 4.5cm = 45mm.
To set these we use the settings $130 for X, $131 for Y and $132 for Z.
- These settings are floats.
- So a number with a decimal place (3 decimal places) can be use. Remember what I said in Step 13.
- These values are used for Soft-Limits if Homing is enabled, which requires Hard-Limits enabled.
So as before enter and send the following:
- $130=300
- $131=180
- $132=45
Grbl Settings [Limits]
There are two types of limits:
- Hard-Limits, these are the positions of the Limit Switches. Nothing is aloud past these points.
- Soft-Limits, these must be within the Hard Limits.
To enable these limits we use settings $20 for Soft-Limits, $21 for Hard-Limits.
- These are Booleans.
- Values are ether, 1 for enabled or 0 for disabled.
So as before enter and send the following:
- $20=1
- $21=1
Grbl Settings [Home]
OK, the way I see it you can have this several ways. have it right, have it wrong or have it wrong but right.
- There I just confused someone.
- Basically as you look at your machine, you can have your Home at any place you wish.
- It depends on you machine.
- It depends on how you use it.
- It's your preference.
- The correct way would be for it to Home top-right (looking down on it), leave your work area clear to mount your job, then use command G28 to position the tool to an area you usually start from.
- G30 does the same, but this is best used for a position you usually change a tool.
- As this is an Instructable I guess we should do how I think is the correct way.
You will notice that when Homing is enabled and you Home your Tool, that the coordinates for the machine are negative values.
- This is normal.
If we where to look at the source code for grbl, we would see that this is an option in the configuration header "config.h"
125
126 // After homing, Grbl will set by default the entire machine space into negative space, as is typical
127 // for professional CNC machines, regardless of where the limit switches are located. Uncomment this
128 // define to force Grbl to always set the machine origin at the homed location despite switch orientation.
129 // #define HOMING_FORCE_SET_ORIGIN // Uncomment to enable.
130
So unless you are going to a reinstall of you machines Firmware, that's how it will be.
- Don't worry all will work fine, the coordinates it uses to do a job are still normal.
- It's just the machines internal values.
The setting to enable Homing is $22
- This is a Boolean.
- The value is ether, 1 for enabled or 0 for disabled.
So as before enter and send the following:
- $22=1
You should now be able to home your Tool using the Home button in Candle.
- It should by default move your tool to the Top-Right looking down on your machine.
Should you wish to home your Tool at some other position, then the setting $23 can be set.
- This setting is a Mask setting, so you need to refer to the table in Step 13.
- Look down the table for a line that has a "Y" for an Axis that you want to change the end at which it Homes and "N" for an Axis you don't want to change.
- Take note of the setting value.
So as before enter and send $23="Settings value"
I recommend you always have Z Home to the highest point.
I mentioned in Step 11, Homing goes through a special sequence in which there are two speeds involved.
- These speeds can be set.
To set these speeds we use settings $24 for Homing Feed (slow), $25 for Homing Seek (fast).
- These settings are floats.
- I suggest you keep the setting $24 for Homing Feed low, I have it at 25.
- The setting $25 can be quite quick, I have it at 800. Don't have it too quick that it crashes into the end, remember motors need to slow down.
- Set these settings the usual way.
There are two other settings to do with Homing:
- $26, Homing De-bounce. I talked about this in Step 9. Use something between 5-25 (Integer). If you have added hardware like me then its not really needed, I set mine to 5.
- $27, Homing Pull-Off. I talked about this in Step 11. You need enough distance to clear the Limit-Switch (Float).
- Set these settings the usual way.
I Have an Off-Line Remote
Oh ***, my "Off-line Remote" does not work now.
- Don't worry.
Why is it happening?
- When Homing is enabled, by default when grbl starts up it wants to know where the Tool is.
- It throws up an error, "I am doing nothing until you start the homing sequence"
- It won't let you do anything until it runs the Homing sequence so that it knows where the Tool is.
- Don't know why they didn't add a "Homing" button to the remote. You would need a "Set Origin" button also.
If you want to use your Off-Line Remote instead of using Software (Candle) to control your CNC Machine there are several options.
- Disable "Homing", this will stop grbl from throwing a wobbly at start up. But this also disables Soft-Limits, because it has no reference. So if you accidently hit a Hard-Limit, you will have to manually move the Axis away from the Limit-Switch and do a re-set. So you may as well disable the Hard-Limits also. What the F***, why did we bother.
- Alter the Firmware. Altering the firmware we can put a gag on grbl to stop moaning. But this requires programming skills. (Arduino skills will do. The controller uses an Atmel MEGA328P)
So for the time being:
- When using software control: $21=1 and $22=1
- When using "Off-line Remote": $21=0 and $22=0
I looked into:
- Modifying the grbl firmware. The workarounds didn't really work, I just ended up pulling my hair out, what's left of it.
- Modifying the "Off-line Remote" the one I have has a processor with a lot of empty pins. see next step.
Modifying the "Off-line Remote"
Modifying the Off-Line Remote is going to be more complicated.
- The Off-Line Controller has it's own microcontroller.
- I need to find the Source Code.
- Adding buttons to the pins of an installed microcontroller needs good eyes and a steady hand ha-ha.
Why ***** they didn't add a "Homing" and "Origin" button I don't know. Actually a "Probe" button would also be useful.
This may have to be a separate Instructable.
So far I have found this: Open-source firmware for popular cnc3018 stm32-based offline controller (github.com)
- My eye sight is bad, so I would preferer adding buttons.
- I will look at this at a later date.