584,841 active members*
4,632 visitors online*
Register for free
Login
IndustryArena Forum > OpenSource CNC Design Center > Arduino > Arduino Based Zero Touch Pad
Results 1 to 20 of 20
  1. #1
    Join Date
    Nov 2019
    Posts
    8

    Arduino Based Zero Touch Pad

    I've been lurking around these forums for a year or so just gathering information for now, But I would like to get a CNC someday!

    I'm currently working on building a regular router table based on the attached picture.

    I'm also planning on building a motorized lift for the table using a 24 volt DC gearmotor.

    What I'm looking for is some information on setting up a Arduino to stop the gearmotor when the router bit touches a brass plate. I don't know much about the Arduino, But it sounds like it would be possible to use something like a KY-036 sensor module to control some type of relay to stop the gearmotor?

    Doug

  2. #2
    Join Date
    Mar 2009
    Posts
    1982

    Re: Arduino Based Zero Touch Pad

    Depends.
    Don't understand, why you want to involve Arduino here. Anyway, doesn't harm.
    The sensor brass plate isolated eletrically from the body and +24V is connected to it through the action relay coil. The tool tip brings the body ( ground ) potential.
    When the tooltip touches the brass plate, loop is closed and action relay activated. You have the signal and closed / open contact to stop fthe movement and whatever you want to.

  3. #3
    Join Date
    Nov 2019
    Posts
    8

    Re: Arduino Based Zero Touch Pad

    Quote Originally Posted by Algirdas View Post
    Don't understand, why you want to involve Arduino here. Anyway, doesn't harm.
    I'm not really sure if I need the Arduino either that's why I'm checking into it.
    I could probably get by with a simple touch light circuit like the one attached, But I would think the Arduino based touch off plate would be more accurate?

    I know the Arduino's have been used like that before, At about 8 minutes into this YouTube video it shows sort of what I'm looking to do with just the touch off plate.

    https://www.youtube.com/watch?v=QnPmQpd9rLw&t=3s

    At this point I'm not looking to try to get the Arduino to display the height or control the motor.

    For my router table I don't plan to use a CNC spindle like in the video, Mine will just be using a portable hand-held plunge router mounted up-side-down in the table.
    To control the routers lifting I'll just be using a 24V DC gearmotor controlled with a simple PWM controller (pic attached).

    Here's a little more information on how the Maker Barn connected their digital controls to the Arduino.
    https://www.instructables.com/Digita...r-Router-Lift/

    Doug

  4. #4
    Join Date
    Nov 2019
    Posts
    8

    Re: Arduino Based Zero Touch Pad

    Here's a YouTube video showing a Arduino & the KY-036 sensor controlling a relay board that turns a standard light-bulb on & off.
    https://www.youtube.com/watch?v=xQxF8tKccgI

    I figure it could also be used (and re-configured) to just switch off the 24V DC gearmotor when contact is made?

    Doug

  5. #5
    Join Date
    Nov 2019
    Posts
    8

    Re: Arduino Based Zero Touch Pad

    Searching around on a little more I think maybe this standalone 5-pad capacitive touch sensor - AT42QT1070 & a relay board should work out ok with-out the Arduino?
    https://www.youtube.com/watch?v=9zxGipGvLiw

    Doug

  6. #6
    Join Date
    Nov 2019
    Posts
    8

    Re: Arduino Based Zero Touch Pad

    Quote Originally Posted by Algirdas View Post
    The sensor brass plate isolated electrically from the body and +24V is connected to it through the action relay coil. The tool tip brings the body ( ground ) potential.
    The router motor is basically a modified hand-held power tool & it's double insulated so there's no ground connection. The motor will be off (DPDT Switch) during the tool zero set process, So there's no chance of a ground potential.

    The power supply I'll be using is a switching power supply, So that will also help a potential ground problem.

    Doug

  7. #7
    Join Date
    May 2004
    Posts
    210

    Re: Arduino Based Zero Touch Pad

    What you want to do is pretty simple. That maker barn video you looked at is probably using a tactile switch. Easy to set up. The reason for an Arduino is that you need some sort of computer to run the stepper motor and display.

    Those capacitive switches are not going to work very well for you as they rely on a human touching it (conducted through the metal in the video).

    Basically, all you need to do is set up a sensing block like the makerbarn guy - it has a hard plate the bit pushes on when it makes contact. Which, in turn, pushes on the switch. In your code you just look for the signal from the switch, stop the stepper motor and indicate zero on your display. With a good quality spdt microswitch, you can get a high degree of repeatability. You probably need to create a push plate in the sensor that allows a little slop in where you have to position the sensor. Now that will probably leave the bit at the wrong height but you can solve that by determining how much it is off by and lowering (or raising) the motor by that amount.

    You might also want to implement a test/back-off algorithm. The idea is that when you see the switch close (or open, your choice) you stop advancing, back off until it opens (or closes) and then at a slower speed advances until it closes again. This may give you better accuracy and you can move the stepper faster to cut down the amount of time the whole operation takes.

    You could look into an inductive sensor (inductive limit switch search terms) but I think they will trigger at different distances based on bit shape/size.

  8. #8
    Join Date
    Nov 2019
    Posts
    8

    Re: Arduino Based Zero Touch Pad

    Quote Originally Posted by philba View Post
    Those capacitive switches are not going to work very well for you as they rely on a human touching it
    Yeah but they can also be controlled by electrical conductivity as seen in this video at about 2:20 minutes.
    https://www.youtube.com/watch?v=U9vQVqfZrGA

    In my case I could just connect a wire to the contact leg of the sensor and connect that wire to a brass plate.
    A 5V line (maybe from the Arduino) would be connected to a small clamp that would attach to the tool bit (pic attached)
    Once the tool bit touches the brass plate it should allow the Arduino to open a NC relay which would then stop the 24VDC gearmotor.

    At this point I'm not planning to use a stepper motor or a display connected to the Arduino!
    I'm planning on using a regular 24VDC gearmotor for the lift with a normal PWM controller to adjust the speed & direction.
    As for a digital readout I'll just be using a iGauging DRO made for a planner.

    Doug
    Attached Thumbnails Attached Thumbnails IMG_6686.JPG  

  9. #9
    Join Date
    May 2004
    Posts
    210

    Re: Arduino Based Zero Touch Pad

    OK. Sounds like you have a plan. Note that the gear motor will have some momentum that may carry it above the contact point. Also relays don't shut off instantly.

  10. #10
    Join Date
    Nov 2019
    Posts
    8

    Re: Arduino Based Zero Touch Pad

    Quote Originally Posted by philba View Post
    OK. Sounds like you have a plan.
    Well at-least a fairly good idea!

    This project is still somewhat of a work in process, So I'm sure there will be a few bumps in the road.

    I worked with items that were controlled by Arduinos before, But I've never actually tried to set one up from scratch.
    I'm probably going to pick-up one of those Arduino Starter Kits just to get myself use to the coding first.

    Quote Originally Posted by philba View Post
    Note that the gear motor will have some momentum that may carry it above the contact point. Also relays don't shut off instantly.
    Yeah I kind of figured on that!

    That's one reason I figured on trying the Arduino with the KY-036 sensor, The sensor has adjustable sensitivity so it should help me minimize the contact movement.

    Between the gearmotor & the PWM controller I should be able to get the lift mechisium moving pretty slow.
    The PWM controller has a digital display that shows the percentage of reduction that should let me set it the same each time.
    Hopefully I can figure out set-up so that the over-run & relay-delay are fairly consistent & I can modify the touch plate to match the off-set.

    Doug

  11. #11
    Join Date
    Mar 2009
    Posts
    1982

    Re: Arduino Based Zero Touch Pad

    inductive sensor (inductive limit switch search terms) but I think they will trigger at different distances based on bit shape/size
    exactly. Inductive sensor repeatbility is very poor, because depends on many factors including just aging.
    Touch to close electrical loop at about 5mA with about 10V is proven industrial method.
    Sure, there is a good reason to use Arduino for double or even tripple touch - first to determine where the sensor is, roughly, plunging the plate down. Two more with slow feedrate for accurate sense. And generate signal to control "Zero is here". It's also good to use less than 2V for final touch.

  12. #12
    Join Date
    Apr 2007
    Posts
    33

    Re: Arduino Based Zero Touch Pad

    Ok you have peaked my interest. If I was doing the router table and wanting to get into CNC at some point in the future I would build the table this way
    1. https://www.ebay.com/itm/30309613370...kAAOSw~llcThjl This should be a ebay listing for a CNC Z axis mount. I would drill and tap the end opposite the NEMA 23 motor mount and mount this end onto a 3/8" aluminum router plate to set in the table top. You will need to have built a aluminum mount for your router motor.
    2. If you can program an arduino then use https://www.amazon.com/STEPPERONLINE...s%2C315&sr=8-3 from amazon to control the up and down function with a NEMA 23 stepper motor.
    3. For control, height setting and displaying the height a https://www.amazon.com/Nextion-Enhan...%2C295&sr=8-27 display.
    Putting this all together will teach you a lot about CNC machines and programming will not be so difficult since there are many examples of using an arduino with stepper motors.
    With this setup you will have an equal system like the one in Houston with a lot more Flexibility using the Nextion touchscreen display. Also you will need a 24Volt switching power supply for the stepper and a buck converted to drop the voltage for the arduino. Use an arduino Mega 2560 which will give you the best options for setting up auto zero etc. BEWARE - when using a touch Zero to set a zero point you must program de-bounce into the software for accuracy
    I would only use switches for limiting the movement of the Z - you can de-bounce these in software and you won't have to worry about all of the nuances of some of the electronic proximity switches.

  13. #13
    Join Date
    May 2004
    Posts
    210

    Re: Arduino Based Zero Touch Pad

    Quote Originally Posted by wyzarddoc View Post
    Ok you have peaked my interest. If I was doing the router table and wanting to get into CNC at some point in the future I would build the table this way
    1. https://www.ebay.com/itm/30309613370...kAAOSw~llcThjl This should be a ebay listing for a CNC Z axis mount. I would drill and tap the end opposite the NEMA 23 motor mount and mount this end onto a 3/8" aluminum router plate to set in the table top. You will need to have built a aluminum mount for your router motor.
    2. If you can program an arduino then use https://www.amazon.com/STEPPERONLINE...s%2C315&sr=8-3 from amazon to control the up and down function with a NEMA 23 stepper motor.
    3. For control, height setting and displaying the height a https://www.amazon.com/Nextion-Enhan...%2C295&sr=8-27 display.
    Putting this all together will teach you a lot about CNC machines and programming will not be so difficult since there are many examples of using an arduino with stepper motors.
    With this setup you will have an equal system like the one in Houston with a lot more Flexibility using the Nextion touchscreen display. Also you will need a 24Volt switching power supply for the stepper and a buck converted to drop the voltage for the arduino. Use an arduino Mega 2560 which will give you the best options for setting up auto zero etc. BEWARE - when using a touch Zero to set a zero point you must program de-bounce into the software for accuracy
    I would only use switches for limiting the movement of the Z - you can de-bounce these in software and you won't have to worry about all of the nuances of some of the electronic proximity switches.
    I think he is motorizing a router lift. These are designed to fit in a router table and have things like inserts and leveling screws - no need to reinvent the wheel there. I would use that but use a stepper and not a gear motor. This gives a lot of advantages including open loop positioning and very simple control.

    No need for a separate DRO/gauge - the arduino will know the height once you have a zero position. I have a router table with an iGaging DRO in it and it is problematic. Worked for about 2 years and then started acting up. I should probably replace it.

  14. #14
    Join Date
    Apr 2007
    Posts
    33

    Re: Arduino Based Zero Touch Pad

    You are correct in that he is motorizing a router lift. But a router lift and CNC Z axis are the same thing. Commercial router lifts are way overbuilt for the job they do. A CNC Z axis takes a lot more force than can be generated by a person pushing a board. I am advocating mounting the Z axis mounting mechanism to the same type of router base ( only upside down) as is used on most router tables. You will still have the recess, leveling screws and cutout for the bit inserts. His problem will be de-bouncing the electrical controls. Without some type of de-bounce considerations you won't be able to get a accurate return to zero. I am currently building my 3rd CNC machine and I strongly disagree with your comment about the arduino knowing the height because of the fact of arduinos and steppers missing pulses. It happens with my CNC machines and 3d printers. They will miss pulses or skip steps so returning back to zero is not guaranteed. If he has the money a Clear Path stepper system would be ideal. The Nextion display is not a DRO it is a easily programmed Touch screen user interface. You build a screen in software, to look like you want and it sends a message to the arduino to execute a certain part of the code when that area of the screen is touched. Saves from having to wire switches lights etc. The ideal situation would be to make a interchangeable auto zero stick for each of your router bits out of copper tape used for stain glass construction, and wiring back to the arduino inputs of the Mega 2560. They could be made out of wood with a plug to interchange for each bit. Too much work for me but...

  15. #15
    Join Date
    May 2004
    Posts
    210

    Re: Arduino Based Zero Touch Pad

    Quote Originally Posted by wyzarddoc View Post
    You are correct in that he is motorizing a router lift. But a router lift and CNC Z axis are the same thing. Commercial router lifts are way overbuilt for the job they do. A CNC Z axis takes a lot more force than can be generated by a person pushing a board. I am advocating mounting the Z axis mounting mechanism to the same type of router base ( only upside down) as is used on most router tables. You will still have the recess, leveling screws and cutout for the bit inserts. His problem will be de-bouncing the electrical controls. Without some type of de-bounce considerations you won't be able to get a accurate return to zero. I am currently building my 3rd CNC machine and I strongly disagree with your comment about the arduino knowing the height because of the fact of arduinos and steppers missing pulses. It happens with my CNC machines and 3d printers. They will miss pulses or skip steps so returning back to zero is not guaranteed. If he has the money a Clear Path stepper system would be ideal. The Nextion display is not a DRO it is a easily programmed Touch screen user interface. You build a screen in software, to look like you want and it sends a message to the arduino to execute a certain part of the code when that area of the screen is touched. Saves from having to wire switches lights etc. The ideal situation would be to make a interchangeable auto zero stick for each of your router bits out of copper tape used for stain glass construction, and wiring back to the arduino inputs of the Mega 2560. They could be made out of wood with a plug to interchange for each bit. Too much work for me but...
    Sigh.
    A) debouncing can be done in software quite easily, even on a lowly arduino. Grbl does this quite handily.

    B) A CNC Z axis and a router lift may do the same action (move a spindle up and down) but they have a number of differences. The router lift is designed to be relatively compact so as to fit in the limited space under the router table surface. And, even more important, the rails hang from the top plate which forms the routing surface. In addition, the rails of a router lift are centered on the spindle shaft whereas in the traditional CNC Z axis the rails are offset. This distributes the weight and force evenly. Also, the lift mechanism is designed to work in a blizzard of wood chips and dust, a CNC Z axis, not really. You will need some sort a rail/carriage cover.

    C) where are you getting the top plate and leveling screws for the CNC Z assembly? They come with the router lift. And they usually come with inserts that provide support very close to the router bit.

    D) if you use the right size stepper motor and driver, you won't have missed steps. This is not rocket science here. Missed steps happen because you are pushing the motors and/or drivers too hard. Even servos can miss steps, the only difference is they tell you. There are, literally, hundreds of thousands of Arduino based Grbl machines out there doing what they need to do without losing steps as long as one stays within the limits. That pathetic little processor does just fine. I ran a 9 hour job a while back on a Grbl machine, very complex carving. No missed steps. I'm certain it could handle a few router height settings. [edit, I guess with a poorly constructed machine, missed steps are possible - my solution is to do a good job building it]

    E) I don't understand the point about wiring up all sorts of lights and switches. Wiring switches isn't hard at all. Not sure what lights you are talking about. Don't forget to have an eStop switch.

    But anyway, good luck and please let us know of your progress.

  16. #16
    Join Date
    Nov 2019
    Posts
    8

    Re: Arduino Based Zero Touch Pad

    Quote Originally Posted by wyzarddoc View Post
    Ok you have peaked my interest. If I was doing the router table and wanting to get into CNC at some point in the future I would build the table this way
    1. CNC Z axis mount. I would drill and tap the end opposite the NEMA 23 motor mount and mount this end onto a 3/8" aluminum router plate to set in the table top. You will need to have built a aluminum mount for your router motor.
    2. If you can program an arduino then use a NEMA 23 stepper motor.
    3. For control, height setting and displaying the height a Nextion touchscreen display.
    Yeah that's "WAY MORE" than what I'm trying to setup!

    As I mentioned earlier in post #3
    Quote Originally Posted by dwall174
    At this point I'm not looking to try to get the Arduino to display the height or control the motor.

    For my router table I don't plan to use a CNC spindle like in the video, Mine will just be using a portable hand-held plunge router mounted up-side-down in the table.
    To control the routers lifting I'll just be using a 24V DC gearmotor controlled with a simple PWM controller
    Quote Originally Posted by philba
    I think he is motorizing a router lift. These are designed to fit in a router table and have things like inserts and leveling screws
    I think the main detail everyone here is over looking is this part.
    Quote Originally Posted by dwall174
    "Portable Hand-Held Plunge Router Mounted Up-Side-Down In The Table"
    I've pretty much got the lifting mechisium figured out with just the standard 24 VDC gearmotor & the simple PWM speed & direction controller.
    A friend of mine is machining some parts for me that I need for lifting mechisium, So that part of the project is kind of on hold until I get the parts.
    In the meantime I figured I would look for a simple way to set the bit height,

    Doug

  17. #17
    Join Date
    Apr 2007
    Posts
    33

    Re: Arduino Based Zero Touch Pad

    LOL LOL Double Sigh
    Reply to A --> I have already stated that the de-bouncing should to be done in software-- hardware de-bounce circuitry design is beyond most hobbyist
    Reply to B --> You are partially correct in your observation that Z axis and Router lifts are different BUT what your not considering is that a Z axis can be easily adapted to being a router lift mechanism. From my engineering and physics classes the load distribution analysis shows that with a simple brace and mounting arrangement this is very easily done. I do agree that cover would be nice and easier done with a Z axis arrangement than a regular router lift mechanism.
    Reply to C --> To better explain think about a standard router mounting insert plate. On the bottom of the plate we mount a L bracket/brace with the short leg of the L to the bottom of the router plate on the bottom. Next we mount the Z axis with the stepper motor onto the L bracket and the job is done. Mount the router mount to the Z axis mount and your done. And yes adding limit switches on the Z axis with connections for end-stops would be nice.
    Reply to D. --> Partially WRONG (that also means partially right) . Their are feed rate, bit wear, mechanical and electronic issues that will or can cause missed steps including wiring / crosswalk issues that cannot be solved by putting a bigger motor or thicker steel on the frame.
    Reply to E The use of a Nexrion touchscreen panel was to eliminate the switches and lights used in the Houston Maker space machine (uses only 4 wires to talk to the arduino). And you have enough memory in a Arduino Mega 2560 to program many different bit settings that would be accessible from the Nextion panel If you are using micro controllers for grbl machine control you should look into them they will greatly enhance your machine control / interface builds.

  18. #18
    Join Date
    Apr 2007
    Posts
    33

    Re: Arduino Based Zero Touch Pad

    Doug;
    1. Be sure all of your power supply grounds are connected together including the router, the 24 volt power supply for the lift motor and the power supply for the arduino. If not you can get what's called a ground loop and smoke the arduino. It happens to the best of us. If in doubt send me your address and I will mail you one Arduino and 1 ESP32 that I accidentally ground looped and created "magic smoke".
    2. If I can be of any help with the Arduino programming let me know. Their are numerous internet and youtube tutorials on using Arduinos.
    3. Good Luck Keep us posted on your progress.

  19. #19
    Join Date
    May 2004
    Posts
    210

    Re: Arduino Based Zero Touch Pad

    Quote Originally Posted by wyzarddoc View Post
    LOL LOL Double Sigh
    Reply to A --> I have already stated that the de-bouncing should to be done in software-- hardware de-bounce circuitry design is beyond most hobbyist
    Reply to B --> You are partially correct in your observation that Z axis and Router lifts are different BUT what your not considering is that a Z axis can be easily adapted to being a router lift mechanism. From my engineering and physics classes the load distribution analysis shows that with a simple brace and mounting arrangement this is very easily done. I do agree that cover would be nice and easier done with a Z axis arrangement than a regular router lift mechanism.
    Reply to C --> To better explain think about a standard router mounting insert plate. On the bottom of the plate we mount a L bracket/brace with the short leg of the L to the bottom of the router plate on the bottom. Next we mount the Z axis with the stepper motor onto the L bracket and the job is done. Mount the router mount to the Z axis mount and your done. And yes adding limit switches on the Z axis with connections for end-stops would be nice.
    Reply to D. --> Partially WRONG (that also means partially right) . Their are feed rate, bit wear, mechanical and electronic issues that will or can cause missed steps including wiring / crosswalk issues that cannot be solved by putting a bigger motor or thicker steel on the frame.
    Reply to E The use of a Nexrion touchscreen panel was to eliminate the switches and lights used in the Houston Maker space machine (uses only 4 wires to talk to the arduino). And you have enough memory in a Arduino Mega 2560 to program many different bit settings that would be accessible from the Nextion panel If you are using micro controllers for grbl machine control you should look into them they will greatly enhance your machine control / interface builds.
    You seem to have a need to prove others wrong. This is engineering, there is no wrong or right, just tradeoffs. I don't suppose they covered that in your school.

    We can debate this ad nauseum but you should definitely do it the way you are suggesting. Please come back and show us how well it works. You clearly feel strongly, put your money where your mouth is.

    For what it's worth, your comments about wear and such are valid for a machine that runs for thousands of hours a year. The lift mechanism will be used for thousands of seconds a year. Each session will have a couple of settings, each maybe 10 to 15 seconds each. Not a lot of wear. Also, EMI that you might find in a CNC router will not be present because when setting bit height, nothing else will be running. Your hand-waving dismissal just doesn't cut it.

  20. #20
    Join Date
    Apr 2007
    Posts
    33

    Re: Arduino Based Zero Touch Pad

    I think I will let you have the last word as mis-informed as it is because sticks and stones may break bones but miss information will hurt innocent users and my point has been made.

Similar Threads

  1. Touch pad for setting z-zero on a 4896ATC?
    By Anil Kalagatla in forum Shopsabre
    Replies: 2
    Last Post: 02-24-2017, 04:21 AM
  2. Adding tool touch pad (Z) to Chinese Board
    By MikeFelitti in forum Uncategorised WoodWorking Machines
    Replies: 0
    Last Post: 04-10-2014, 10:59 PM
  3. Replies: 12
    Last Post: 06-05-2013, 06:05 PM
  4. touch pad
    By ibrich in forum WinCnc
    Replies: 2
    Last Post: 05-01-2012, 05:46 AM
  5. Touch Pad
    By ardsranger in forum Mach Mill
    Replies: 0
    Last Post: 10-05-2010, 06:13 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •