element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Personal Blogs
  • Members
  • More
Personal Blogs
Legacy Personal Blogs Z probe for the CNC machine [part 1]
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: kk99
  • Date Created: 28 Feb 2021 5:12 PM Date Created
  • Views 489 views
  • Likes 5 likes
  • Comments 1 comment
  • arduino based
  • cnc
  • 3d print mill
  • digispark
  • laser drilling ,
Related
Recommended

Z probe for the CNC machine [part 1]

kk99
kk99
28 Feb 2021

image

I few weeks ago I bought convertible 3 in 1 device (DOBOT Mooz-2 Plus) which allow 3D printing, laser engraving and CNC. After initial testing of each module I decided to try the CNC module in PCB engraving. Initial tests showed me that is required precise leveling of copper plate before engraving. I would like to the Autoleveller tool for 2-stage leveling. Due the my device allows to control via serial I decided to add a external z axis probe which allows to collect a level map of cooper plate and add proper corrections for final G-code.

I have used a Digispark module for which I connected crocodile clips: one to GND and second to PIN0. These clips will be connected to copper plate and the spindle. With this probe I will detect the moment when the spindle reach the top surface of cooper and I could store the actual Z axis position, which will be used for corrections. The code was written in C and is really simple. I was used USBSerial library for communication with PC for get status of probe (if clips are open (O) or close (C)). In main loop is checked status of PIN0 and if we got command to report status of open or close of Z axis probing circuit. Below there is source code:

#include <DigiCDC.h>

#define LED_PIN 1
#define PROBE_PIN 0

void setup() {                
  SerialUSB.begin(); 
  pinMode(LED_PIN,OUTPUT);
  digitalWrite(LED_PIN, LOW);
  pinMode(PROBE_PIN,INPUT_PULLUP);
}

void loop() {
  uint8_t probeState = digitalRead(PROBE_PIN);
  if (probeState == LOW) {
    digitalWrite(LED_PIN, HIGH);
  } else {
    digitalWrite(LED_PIN, LOW);
  }
  if (SerialUSB.available()) {
    char input = SerialUSB.read();
    if (input == 'P') {
      if (probeState == LOW) {
        SerialUSB.write("C\n");
      } else {
        SerialUSB.write("O\n");
      }
    }
  }
   SerialUSB.refresh();
}

I found here a really nice case for Digispark, so I printed it and use it for my Z probe. Below there I are photos from assembly.
image

image

image

In next part I would like to create simple script or application which will communicate with device and probe for process of collecting measurements from copper plate.

  • Sign in to reply

Top Comments

  • DAB
    DAB over 2 years ago +1
    I like your subject and I am looking forward to future posts. DAB
  • DAB
    DAB over 2 years ago

    I like your subject and I am looking forward to future posts.

     

    DAB

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube