Go Back  RCU Forums > RC Airplanes > Scratch Building, Aircraft Design, 3D/CAD
Reload this Page >

Cnc Foam cutting with Arduino - Development log

Community
Search
Notices
Scratch Building, Aircraft Design, 3D/CAD If you are starting/building a project from scratch or want to discuss design, CAD or even share 3D design images this is the place. Q&A's.

Cnc Foam cutting with Arduino - Development log

Thread Tools
 
Search this Thread
 
Old 01-29-2017, 03:42 AM
  #1  
durone
Thread Starter
 
Join Date: Apr 2003
Location:
Posts: 24
Likes: 0
Received 0 Likes on 0 Posts
Default Cnc Foam cutting with Arduino - Development log

After having introduced Theremino into the Cnc Foam Cutting world, I think it's the right time to give a chance to Arduino as well.
I'll keep here a rather unusual 'development log', to describe my project and my development steps.

The basic idea
The 3D printers world gives us a great option: to have cnc controllers with very good performances and low price, ready to use.
I speak for example of the well known setup of Arduino Mega + Ramps + Pololu steppers drivers. These setup is very interesting as:
- You can find this setup on the web for about 40 euro
- To assemble it you must just fit the parts, plugging the Ramps over Arduino, and then the stepper inside Ramps. No soldering or external wiring is required. Also the stepper motor are already supplied with the right connector, to fit the Ramps shield
- You throw away the old parallel port, using a plug & play Usb port instead.
- It also includes 3 medium power PWM outputs, so we can use one of them to control the Hot Wire
- Limit switches input are already included, these can be used to perform an easy and reliable homing function, to setup the right zero position of all 4 axes
- The performance as speed and smoothness are similar or better than other more expensive controllers
- You can finds this hardware from many sources at a very low price, referred to other controller.

So, why this setup is not (or just barely) used in the Cnc Foam Cutting world?

The answer is simple:
actual firmware of Arduino doesn't offer a good management of 4 interpoled axes, with the possibility to select the external pin according to the Ramps setup (or I never found it...)


My project:
I already have devCnc Foam, this is my foam cutting cnc application, linked to all my dev applications devoted to foam cutting.
Actually devCnc Foam support only Theremino or Theremino like (like CobraUsb for example) controllers.
But when I developed it, I structured the application to be expandable to other possible controllers. This is now the case of Arduino.

The first step is to write the right firmware (sketch in Arduino terms) for Arduino.
The requirements I imposed are:

- high frequency and smoothness of the stepper outputs. To get that I'll use internal timers and interrupt, writing directly on registers. The high level function of Arduino (digitalWrite, for example) cannot offer the requested performances here

- 4 linear interpolated axes. Optionally also a 5th interpolated rotary axis will be added, to my next devFoam 3D project (but this is another story...)

- PWM output to drive the hotwire, optionally also in a simple switch on/off mode

- management of input switches to detect the hardware limit. This can be used then to perform a good and reliable Homing function.

- creation of a custom map pin, without the single port rule imposed by many stepper sketches. In this way I can use an external stepper shield without any rewiring.

Said that, I decided to start with the well known Arduino Mega + Ramps + pololu stepper drivers.
This setup is very easy to find, cheap, but good performances. No re-wiring is required and limit switches input and a medium power PWN output is already supplied.

First step: development of the right firmware/sketch for Arduino Mega

I got inspiration from 4 different sketches. Some of them performed a good stepper output generation, some a good fast management of pin mapping, some good acceleration/decelerations management and so on...

After a lot of struggling I have now a very first working prototype. Referring my list, it already includes:

- 5 axes interpolated (the fifth will be used as a rotary axis)

- PWM management

- Free stepper pin mapping setting available both at compile time, or also at runtime (in this way I can then use the same sketch with different stepper wiring, without recompiling and reloading it)

Now I'm working on the Switch limit management, and writing a firmware side robust homing function, that must be tailored in a special way to the foam cutting case.
I explain better this point:
the homing function moves the axes to reach the limit switch position, carefully detect it, then offset to a safe distance from it.
The usual homing functions work on an axis at a time. This is simpler, but creates a possible problem with foam cutting machines: is the axes position is far from the origin, moving a single axis will get a very big angle to the hot wire, and this is bad specially if you use a simple spring as retaining/tension of the hot wire. So I'll try with a first stage of movements of the same speed for all axes, until one axis reach its limit. After that I can apply the 'one axis at a time' logic.
With Theremino I used this same logic, but at pc side, as I cannot write in Theremino custom firmware functions. But putting that function in the firmare will be (I think) more reliable and easy to use. So this is the way I'll try to go...

Just for laugh, you can see here some pictures of my high tech test device, in its first version (I added now light to simulate the hotwire, and I'm going to add switches to simulate the switch limits).
Attached Thumbnails Click image for larger version

Name:	cnc2p.jpg
Views:	124
Size:	190.7 KB
ID:	2198709   Click image for larger version

Name:	cncp.jpg
Views:	114
Size:	386.4 KB
ID:	2198710  
Old 01-29-2017, 05:47 PM
  #2  
blvdbuzzard
 
Join Date: Jun 2002
Location: high deserts, CA
Posts: 3,717
Likes: 0
Received 4 Likes on 4 Posts
Default

I am looking forward to see how this evolves. I have a simple foam cutter, templates, wire, bow, and so on. I would like to be able to pull a design from proili and have a nice smooth cut core.


Buzz.
Old 01-30-2017, 12:43 AM
  #3  
durone
Thread Starter
 
Join Date: Apr 2003
Location:
Posts: 24
Likes: 0
Received 0 Likes on 0 Posts
Default

Originally Posted by blvdbuzzard
I am looking forward to see how this evolves. I have a simple foam cutter, templates, wire, bow, and so on. I would like to be able to pull a design from proili and have a nice smooth cut core.


Buzz.
About Wing cutting, what I'm developing will work with the application chain devWing Foam -> devCnc Foam.

Profili Pro can only product low quality GCode for foam cutting.
Old 02-05-2017, 09:36 AM
  #4  
durone
Thread Starter
 
Join Date: Apr 2003
Location:
Posts: 24
Likes: 0
Received 0 Likes on 0 Posts
Default

A brief update about the actual development stage.
I'm working to integrate Arduino in devCnc Foam.
Done:
- automatic detecting of the right Arduino Board on the right port
- automatic check/upload of the right sketch to Arduino
- Gcode command flow to Arduino done and working
- reverse status flow from Arduino to devCnc Foam, with full synchro of the 3D graphic with the real position of the stepper motors done and working
To do:
- alarm and switch limits management
- automatic Homing
- Jog commands by mouse
- smart pad commands
- parameter setting to Arduino
I think the hardest and more oscure (for me) part is now done and tested.
Rather optimistic now about my project!
Old 02-26-2017, 10:16 AM
  #5  
durone
Thread Starter
 
Join Date: Apr 2003
Location:
Posts: 24
Likes: 0
Received 0 Likes on 0 Posts
Default

The very first Beta 1 version of devCnc Foam 1.02 is now available here: http://www.devcad.com/eng/download.asp

This is a Beta version originally reserved to my official beta tester. You can download and try it, if you find problems please write me by [email protected] and not here.
The help file already includes the info and pictures about how to connect Arduino Mega + Ramps, see the Controllers page of the Help.

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.