I'm planning to make an android app that basically gives the user touch control of the CNC (think finger painting in wood). I've only barely started but the general idea is that the app will map screen coordinates to the CNC cut area and moving your finger around on the screen will move the CNC around. On the device it would appear to the user as a simple paint app.
Update: It lives!
- Tic Tac Toe fail: http://www.youtube.com/watch?v=V-9eZLgqRHw
- Tic Tac Toe fail (cont'd): http://www.youtube.com/watch?v=lq2xrWOY0eg
- Smiley face demo: http://www.youtube.com/watch?v=vLpZSTjCVJE
How it works:
Three pieces of software,
- android application translates screen presses into gcode and feeds this data over the network to a...
- java server running on the CNC computer which simply dumps the gcode into a text while which is read by a...
- vbscript executing within mach3 which just keeps reading gcode from a specified file
Current features:
- Supports G00 (fast movement on tap), G01 (slow movement for cuts with long click/drag), G02 for circles
- Bit gets lowered when a "long click" is detected on screen, stays lowered until finger is lifted from screen (in path mode)
- Ability to specify cut depth
- Tool path drawn on screen while cutting (like a paint app)
- Additional cut modes - line, circle, rectangle
- Ability to redefine cut area on the fly
Current challenges:
- occasionally crashes when you get too far ahead of the machine
Future ideas:
- gyro control (kurtis noted this could make some killer art)
- specify feed rate on the fly (as simple as issuing a G94 F<X> command, currently must set this up within mach3)
Code: http://code.google.com/p/touch-cnc/
- this is my first ever android app and I haven't done java in a long time so I know the code isn't perfect
- a few values are still hard coded in (such as my screen size), will change in future revision
CNC Touch Control App
Re: CNC Touch Control App
Picture this: "extreme finger painting" workshop at the space. Goliath positioned where the current CNC bench is, below the window. "Artist" stands on the other side of the window doodling on a tablet, while watching the machine make a mess of the other room. For bonus points, also place the red danger light in the window.
Two videos on sax's YouTube page: http://www.youtube.com/user/thesaxmachine
- DigitalOSH
- Posts: 435
- Joined: Tue Nov 30, 2010 10:03 pm
Re: CNC Touch Control App
The touch painting app seems unreal. You should do an instructable and a submission to hackaday, i feel like that's something that could get us a lot of publicity. Maybe get the painter girl next door to use it for a demo?
Re: CNC Touch Control App
Yeah, I think that's the eventual plan... I kind of want to work on a few things first. For sure I want to clean up my code so that it doesn't get mocked by the masses.DigitalOSH wrote:The touch painting app seems unreal. You should do an instructable and a submission to hackaday, i feel like that's something that could get us a lot of publicity. Maybe get the painter girl next door to use it for a demo?
My next step is going to be to add "shapes"... lines, circles and squares namely. Also want to be able to zoom and pan so you can do more precision cuts in smaller areas.
Re: CNC Touch Control App
Cool... I wish there was 2 spindles so you could play Tron!
I think you guys should make a dedicated Techworks Youtube channel...
I think you guys should make a dedicated Techworks Youtube channel...
Re: CNC Touch Control App
Alright, so I've added shapes (line/circle/rectangle) to the app and they all seem to be working good (haven't tested on actual CNC but the gcode output appears fine)... improved the on screen drawing now too so it's an actual path being draw instead of a dotted line (figured out how to use drawPath properly).
Rather than adding zoom/pan I'm just going to add the ability to redefine your cutting area on the fly, so you can zero the machine on your piece and then set the cut area to be the dimensions of that piece. This will lessen the likelihood of death.
I'd like to test this all out tonight as well as get a good video demo done (perhaps with two cameras - one on the screen and one on the surface).
Rather than adding zoom/pan I'm just going to add the ability to redefine your cutting area on the fly, so you can zero the machine on your piece and then set the cut area to be the dimensions of that piece. This will lessen the likelihood of death.
I'd like to test this all out tonight as well as get a good video demo done (perhaps with two cameras - one on the screen and one on the surface).
- DigitalOSH
- Posts: 435
- Joined: Tue Nov 30, 2010 10:03 pm
Re: CNC Touch Control App
I'll bring my camera