element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • 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 Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • 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
  • Settings
Azure Sphere Starter Kit
  • Products
  • Dev Tools
  • Avnet & Tria Boards Community
  • Azure Sphere Starter Kit
  • More
  • Cancel
Azure Sphere Starter Kit
Blog CNC3018 maintenance and safety board
  • Blog
  • Forum
  • Documents
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Azure Sphere Starter Kit to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: vassily98
  • Date Created: 9 Nov 2019 7:13 PM Date Created
  • Views 593 views
  • Likes 7 likes
  • Comments 0 comments
Related
Recommended

CNC3018 maintenance and safety board

vassily98
vassily98
9 Nov 2019

Last month I bought a cheap CNC3018 from China. Is a good machine and I can produce PCBs with satisfying quality. The big noise was however a big problem, so I built a "soundproof" box in which I placed the machine.

This setup needs some extras to fully satisfy me and I decided to implement everything with Avnet's Azure Sphere starter kit.

In order to follow this tutorial you need to have already acquired the basic knowledge of azure sphere environment. Follow Brian Willes series to learn how to install the board and generate connection strings.

 

FEATURES: image

- Temperature sensing (heat builds up fast in the box);

- Air quality sensing (detects the formation of smoke);

- LED strip that turns ON when the door is opened;

- Spindle status monitoring (rotating or not);

- Some sort of predictive maintenance informations (in the Azure cloud).

 

HARDWARE REQUIREMENTS: image

- Avnet MT3620 starter kit;

- Transistor (TIP112 or generic);

- MQ136 sensor;

- 24V LED strip;

- Optocupler, two 1kOhm and one 4.7kOhm resistors;

- Limit switch (with pull-down resistor!);

- (optional but recommended) a CNC3018 or similar with a box like mine.

 

SOFTWARE REQUIREMENTS: image

- Azure Sphere Subscription (free trial/pay-as-you-go/other);

- Visual Studio 2019 with Azure Sphere environment configured;

- Source code is available at the bottom of the page.

 

HARDWARE SETUP AND SCHEMATICS:

The project is fully replicable on bredboard and with dupont jumpers. I preferred to build a perfboard including the transistor, the optocupler and the resistors.

EDIT: pull-down resistors are required for the limit switch and the optocupler! They are not indicated in the schematics but must be used.

imageimageimage

The board is powered by the 5V and GND pins of wookpecker controller. You need a way to get a 24V line (for LED strip) from the power supply, I have cut the cable and made a junction with plastic caps. Then you have to connect two cables in parallel to the spindle +/-. Do it where you prefer, I have connected them at the top of the spindle. Connect the limit switch and place it in a way that the door triggers it. Fix the board in a safe place, better if inside a box or however protected from dust and shortcuts.

imageimageimage

imageimage

 

AZURE IOT CENTRAL SETUP:

Log-in to Azure IoT Central. Create a new application using a name of your choice. Create a new template specifying "Custom board" as base template and set-up telemetry fields as shown in the table below.

 

Telemetry:

Display Name

Field Name

Units

Minimum Value

Maximum Value

Decimal Places

Air quality

air

-

-

-

-

Spindle ON cycles

cycles

-

-

-

-

Temperature

temp

degC

0

80

2

 

State:

Display Name

Field Name

Value 1

Value 1 Disp. name

Value 2

Value 2 Disp. name

Door

door

1

Closed

0

OPEN

Spindle

spindle

1

Running

0

STOP

 

 

Go to the "Rules" tap and add some events that you like to invoke. For example I have added a temperature alarm that triggers when temp is bigger than 40 and sends a email to my address.

An other rule may send you a mail when cycles reaches a value to remember you scheduled maintenance.
Now add a new "real device" in the Device explorer tab. Leave the fields as default and click create.

Generate the connection string and jump to the next chapter.

imageimage

 

SOFTWARE SETUP AND USAGE:

Download and open the solution with Visual Studio. Populate the required fields in variables.h (MY_CONNECTION_STRING) and in app_manifest.json ("CmdArgs" and "AllowedConnections").

Connect the board to the PC via a USB cable and click "Remote GDB Debugger" to compile and upload the code to the board. Now you can unplug the USB cable and turn ON the CNC machine.

The usage is basilar and easy. When you open the door, the limit switch is triggered and Azure Sphere will turn ON the LED strip. Spindle status (ON/OFF) will be monitored for each cycle of the loop, incrementing cycles value locally and sending the value to Azure Cloud when available. The value is resettable by pressing B button on the board.

Spindle cycles count, temperature, air quality and door status are sent to the cloud when a connection is available.

image

 

Source code: https://github.com/VassilyDev/CNCMaintenance

 

image

Attachments:
CNCMaintenance-master.zip
  • Sign in to reply
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 © 2025 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

  • X
  • Facebook
  • linkedin
  • YouTube