Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

My Netduino CNC Machine


  • Please log in to reply
188 replies to this topic

#1 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 08 November 2011 - 04:22 AM

About 5 years ago, I got this crazy idea that I wanted to build a small CNC machine. I have no idea why, but I couldn't shake the thought. Little did I know at the time that there's an entire geek hobby out there, full of people doing just that!

So I started reading and scouting for parts for my machine. I slowly accumulated stepper motors, linear bearings and lead screws from eBay, mostly second hand to save money while still getting industrial quality.

As a software developer, I wanted to create the motion control software entirely from scratch, and my first attempt was to use a PIC for the stepper control. My thought process was that I would create a windows application to pre-process the g-code and translate this into an efficient stream of packets that I would send to the PIC that would then translate this into the essential stepper direction and control pulses to make the movements happen.

Life got busy, and the project went into mothballs (as these things tend to do). About 6 months ago I discovered the Arduino while reading online, and then a week later discovered the Netduino. This re-awakened my nerdy dream! I write C# for a living, and so the idea that I could write my CNC firmware in C# was almost too good to be true!

I ordered my Netduino, read everything I could about them, then pulled my CNC mechanics out of storage and dusted off the cobwebs.

My lunch breaks and weekends have been consumed with the coding of a controller and creating sketches of a machine that has slowly taken shape and is now cutting parts to aid in its own completion (machine.. build thyself!).

The netduino has proven to be a joy to work with and has been a more than worthwhile replacement for the PIC. It has allowed me to create a feature-rich CNC machine out of thin air, and I'm blown away at how much better it is performing than I had expected.

So I thought that I would share my progress as I round onto the home stretch of having a fully functional CNC machine that can create parts and PCB's from CAD drawings.

For anyone who is interested, I will share the code and the lessons I've learned. Just ask!

Attached Files



#2 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 08 November 2011 - 04:29 AM

It's too late to fully re-create a project journal, so I'll just post a few of the older pics and videos that I have captured during this adventure. This first photo is my experimentation with a stepper motor and a PIC chip controlled stepper driver that I built to explore and learn with 5 years ago. I was also experimenting with linear motion. These tests didn't go so well, and discouraged me at first, which is probably why the project went into hibernation.

Attached Files



#3 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 08 November 2011 - 04:32 AM

Using a "Laser beam" (said like Dr Evil) - to make everything nice and square!

Attached Files



#4 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 08 November 2011 - 04:39 AM

My first official Part! I've only completed 2 of the Axes (Y and Z) but they are laying down on their side acting as an X/Y, which has allowed me to test my software using a sharpie pen to draw circles and lines, and now a temporary Z-axis (with a hobby servo) to lift and lower a dremel to actually cut parts. That's right, the machine is barely half complete and it's now cutting parts to help finish itself.. amazing! The motion control netduino and the windows g-code parsing application are working great.

Attached Files



#5 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 08 November 2011 - 04:42 AM

And finally, a video. This shows the incomplete CNC machine cutting a part that will be used for the X-axis.



#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 November 2011 - 10:52 AM

Hi Darrin, Wow, this is pretty awesome! I love the meta nature of this machine! Would you be willing share schematics (Fritzing perhaps) and source code? I can imagine that a number of community members would love to follow in your footsteps and build their own! Chris

#7 Stefan

Stefan

    Moderator

  • Members
  • PipPipPip
  • 1965 posts
  • LocationBreda, the Netherlands

Posted 08 November 2011 - 10:58 AM

Very impressive!
"Fact that I'm a moderator doesn't make me an expert in things." Stefan, the eternal newb!
My .NETMF projects: .NETMF Toolbox / Gadgeteer Light / Some PCB designs

#8 Dan Morphis

Dan Morphis

    Advanced Member

  • Members
  • PipPipPip
  • 188 posts

Posted 08 November 2011 - 12:52 PM

So I thought that I would share my progress as I round onto the home stretch of having a fully functional CNC machine that can create parts and PCB's from CAD drawings.


Its funny you bring this up right now, I just did a test cut of a PCB with my CNC machine (Fireball V90) last night. I've been in the process for over 6 months to get it setup and dialed in.

I can't quite tell from the picture you posted, but that looks like acetal (trade name Delrin). What feed speed and mill bit did you use to cut that?

If your looking for a very precise spindle for cutting PCB's, the TB-650 package by Richard Stethem is an excellent (albeit expensive) spindle. The run-out on a Dremel is way to bad to etch a PCB with anything less than .012 to .015 traces. With a dialed in CNC, a low run-out spindle, and the proper bits guys have etched traces for QFP chips.

IIRC, the run out on the TB-650 is a thousandth of an inch. He doesn't have any TB-650's listed on his store right now, but if you email him he can get you one in about a week as they are all custom made. One of the super nice things about the spindle is its entirely tool-less, and the design of collet mechanism means everything is perfectly balanced. Which is pretty important when your spinning at 25,000 RPM :-)

One thing to keep in mind with this setup is the motor draws about 10 amp continuous. To power my spindle, I used a HP DPS-600PB power supply that had some conversion work done to make the 12v and gnd leads easy to access.

Where have you been getting your bits from? I've been buying the resharpened bits from Drill City.

Have you thought about limit switches? I'm using Opto-Interrupter Electronic Limit/Home Switch for my limit switches. I was originally going to go with simple mechanical switches, but it is really hard to get 100% repeatable precision with mechanical switches actuated by a push rod of some sort.

One thing you may think about adding to your setup is a relay to automatically turn on/off the mains for your cutting head. Not only will this reduce the run time on the cutter, but it will also ensure you don't snap a bit by forgetting to turn on the spindle. This is how I have things setup on my CNC, its really nice to have everything startup/shutdown automatically for noise reduction.

A mod I'm going to do to my CNC is build a plastic skirt with slits cut in it (think the heavy plastic "doors" you walk through at the warehouse clubs which separates the big walk-in coolers from the rest of the store) and hook up a vacuum to that to hopefully automatically suck up the dust. If you use a vac for sucking up the dust from cutting a PCB, you will want to use a HEPA filter. The material PCB's are made from is nasty when ground up.

Anyways, its *way* past bedtime.

-dan

#9 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 08 November 2011 - 01:19 PM

Hi Darrin,

Wow, this is pretty awesome! I love the meta nature of this machine!

Would you be willing share schematics (Fritzing perhaps) and source code? I can imagine that a number of community members would love to follow in your footsteps and build their own!

Chris


Thanks!

I'm absolutely happy to share the schematics and code for both the Netduino app, and also the Windows app that reads the g-code and controls it all.

I haven't captured the schematics yet as they change every day as it evolves and grows, but I'll take a few minutes and whip up a fritzing and post that shortly. I'll also put up the code (which is also a work in progress) for anyone who wants to critique, borrow or follow along. Stay tuned.

#10 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 08 November 2011 - 01:31 PM

Its funny you bring this up right now, I just did a test cut of a PCB with my CNC machine (Fireball V90) last night. I've been in the process for over 6 months to get it setup and dialed in.

Hey Dan, thanks for all of the great advice, that's always very helpful!

I can't quite tell from the picture you posted, but that looks like acetal (trade name Delrin). What feed speed and mill bit did you use to cut that?

I believe that it is Delrin, but to be more specific, it's a cutting board from walmart! I plan to find a better source of materials once I have a fully functional machine! :)

I'm using a 1/4" router bit that I picked up at home depot, and the feed rate was close to 6 inches per minute. I'm running it slow during my experimentation as the Z-Axis is entirely jury rigged right now and is very sloppy.

The machine is able to feed accurately up to around 60 IPM at the moment, but I will improve that with better stepper drivers in V2.

If your looking for a very precise spindle for cutting PCB's, the TB-650 package by [...]

Thanks for all of the spindle info. The dremel is a stand-in for now until I get a better one. I was thinking of going with a roto-zip on the next version, or building my own spindle using various information I've found online. I do intend to cut PCB's so I'll be looking for all the specs you mentioned, as well as good tooling!

I hope to build a tool-changer in a V3 or V4 version, but that is probably quite a bit down the road from where I am now! :)

Have you thought about limit switches?

I have 2 mechanical limit switches on the Y and Z axes (standing in as X and Y temporarily). They allow me to home the machine to 0,0 with a very usable accuracy. But I like the idea of using something more accurate as a future upgrade, I'll check out your links.

I also plan to add 110V control as you suggest to turn on/off the spindle and vacuum, which will also be incorporated into a "dust-extraction" assembly around the spindle in the not too distant future.

Thanks again for your suggestions!

#11 Daxl-B

Daxl-B

    Member

  • Members
  • PipPip
  • 10 posts

Posted 08 November 2011 - 03:49 PM

Wow! impressive, as I was reading your first post I was thinking: did I wrote this?, I have exactly the same idea and I came from the same C# for living background, my initial idea is to use old printers parts and I have several steppers but I have been thinking about using servos with encoders but no sure if a PID controller could be implemented on netduino. At this point I have been focus on implementing a general purpose protocol over TCP to keep communication between netduino and the PC still under development but I have been able to transfer 400kb in 1 minute (writing it to the SD) but I think faster transfers rates can be achieved if data only needs to be processed by netduino but no saved, if you some one is interested I can post code here when I got it complete.

#12 Pete Brown

Pete Brown

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationAnne Arundel County, MD

Posted 09 November 2011 - 05:46 AM

Awesome machine and a REALLY fun project. I'm totally jealous :) If it's a cutting board, it's most likely HDPE. It'll have a sort of slick almost waxy feeling. It machines very well and at high speed and machines smooth. It's also pretty strong. I used it to make some motor mount adapters for my Sherline at one point. On speed/feed, remember to keep them proportionate. If you have a really slow feed, try turning down the RPM on the dremel. HDPE is pretty forgiving, but many other plastics will melt and wood will burn. My questions: Sounds like the gcode parser is on Windows. Did you write that completely yourself, or did you create something like a netduino plug-in for Mach? If you wrote it from scratch, do you have things like acceleration/deceleration for rapids? The interpolation, pocketing, finishing etc. stuff always killed me when I considered doing this. How does the PC communicate with the netdunino? Have you had any timing issues or does the netduino buffer the moves? Pete
Pete Brown - http://10rem.net (NETMF, C++, Windows, C64, and general geekery) Twitter: @pete_brown
I work for Microsoft. Opinions expressed here are my own and do not necessarily reflect those of my employer,our partners or customers.

#13 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 09 November 2011 - 06:22 AM

Awesome machine and a REALLY fun project. I'm totally jealous :)

Hi Pete,

Thanks for the comments and great feedback. That's very useful information about the HDPE!

Sounds like the gcode parser is on Windows. Did you write that completely yourself, or did you create something like a netduino plug-in for Mach?

You're correct, the g-code parser is a C# windows app that I wrote (well I'm still writing it.. worked on it today at lunch in fact). It parses the g-code, and also gives me a UI for controlling manual movements and experimenting with the mechanics easily. Think of it as a poor man's Mach3.

It handles interpolation, arcs and adjustable coordinate systems. It also has a few other built in functions that I can call from the g-code, such as circular pocketing with z-depth stepping.

I don't have a true CAM package yet (thinking about CAM BAM though), and so I'm outputting DXF's from turbocad (v10), and tool-pathing to generate g-code with another application I wrote about 8 years ago in VB6 (for the staircase industry).

If you wrote it from scratch, do you have things like acceleration/deceleration for rapids?


It's funny because just before you posted this, I was in the process of researching acceleration/deceleration. I currently don't handle that, and I just jump straight to the requested feed rate, which can't be good. So I'm trying to figure out now how to add this to my motion controller. Maybe I can get faster rapids this way?

Right now I can run about 60 IPM without stalling the steppers and I'm pretty happy with that, but I expect I'll want faster in the future. I'm running 12V and anticipate cranking that up to 30-40v once I know how to do that without toasting my motors.

My mechanics are also a bit high on friction, so my next improvements will also need to be in that area.

How does the PC communicate with the netdunino? Have you had any timing issues or does the netduino buffer the moves?


Right now the communication is through TCP/IP. My windows app connects and sends the commands via ethernet (I'm using an N+). I will probably replace this with a USB link fairly soon, but the ethernet link is working quite impressively. Response is nearly instant.

As far as buffering moves, initially I was sending each movement one at a time, but the pauses between short line segments (such as during an arc movement) were terrible. So now the netduino buffers 80 moves at a time. The pauses between each batch of 80 is barely noticeable, but I plan to mitigate that by adding a larger buffer with an SD card.

On very rare occasions, movement will pause for 250ms when the garbage collector or some other background .NET task kicks in, but I see that so infrequently that I'm not at all concerned about it.

I'm thrilled that the performance I'm getting is far better than what I was shooting for!

Cheers!
Darrin

#14 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 09 November 2011 - 08:00 AM

Started to layout the final Axis tonight. This is the table that will become the X-axis underneath the Y/Z that I've been playing with. You can see a few plastic parts that the machine has made for itself in this shot.

Attached Files



#15 Dan Morphis

Dan Morphis

    Advanced Member

  • Members
  • PipPipPip
  • 188 posts

Posted 09 November 2011 - 05:57 PM

Right now I can run about 60 IPM without stalling the steppers and I'm pretty happy with that, but I expect I'll want faster in the future. I'm running 12V and anticipate cranking that up to 30-40v once I know how to do that without toasting my motors.


If your not afraid to spend a bit of money, Probotix has a 40v, 10 amp DC linear power supply for $86.

What are you using for your hold down? I'm currently using MDF, but I have delusions of one day building an 80/20 T-slot spoil board. I could make one for about $40, however they want $39 per stick to ship to Alaska, and I would need two 3"x36 sticks. You can get shipping on that down a lot if you live in the states.

-dan

#16 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 10 November 2011 - 06:54 AM

If your not afraid to spend a bit of money, Probotix has a 40v, 10 amp DC linear power supply for $86.

What are you using for your hold down? I'm currently using MDF, but I have delusions of one day building an 80/20 T-slot spoil board. I could make one for about $40, however they want $39 per stick to ship to Alaska, and I would need two 3"x36 sticks. You can get shipping on that down a lot if you live in the states.

-dan


Thanks Dan, I'll check that out!

For hold down I'm currently just screwing the material into the spoil (a piece of MDF), but like you I plan to use a T-slot system as soon as my X table is completed. Either that, or I was considering threaded inserts that I would scatter all over the table, but that seems like more work than just dropping in a couple of channels for the t-slot.

#17 japerr

japerr

    New Member

  • Members
  • Pip
  • 2 posts

Posted 12 November 2011 - 05:28 AM

Came across this project today, http://cncstudio.codeplex.com/ might be helpful others. I don't have a cnc just yet, but accumulating the parts.

#18 papnkukn

papnkukn

    New Member

  • Members
  • Pip
  • 2 posts

Posted 12 November 2011 - 05:33 PM

Thanks japerr for awakening the CNC Studio project. You're the first one to show some interest so I'm glad to help you guys. For the startup, I will try to fix some bugs in a week then do a check-in to SVN on CodePlex.

By the way, there is also a WP7 version of CNC Studio but unfortunatelly CNC server is currently down.
http://www.windowsph...6b-78e7d1fa76f8

#19 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 12 November 2011 - 05:51 PM

Came across this project today, http://cncstudio.codeplex.com/ might be helpful others. I don't have a cnc just yet, but accumulating the parts.


Hey, this looks awesome.. and it's written in c# too from what I can gather. Thanks for the link, this could integrate nicely with the motion control software I've written!

#20 Darrin

Darrin

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 12 November 2011 - 05:53 PM

Thanks japerr for awakening the CNC Studio project. You're the first one to show some interest so I'm glad to help you guys. For the startup, I will try to fix some bugs in a week then do a check-in to SVN on CodePlex.

By the way, there is also a WP7 version of CNC Studio but unfortunatelly CNC server is currently down.
http://www.windowsph...6b-78e7d1fa76f8


Nice looking application you've got there papnkukn.. I'd be very interested in this also! I am writing a g-code parser and motion controller for my self-built CNC machine in C# (.NET 4.0), and have written a very crude g-code editor with plans to make it better.

But it might be nicer to work with yours instead. I'd be happy to contribute and help with your project.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.