New minimal control software: RasPyCNCController

rincewind
Posts: 51
Joined: Mon Jan 05, 2015 8:59 am

New minimal control software: RasPyCNCController

Post by rincewind » Sat Apr 16, 2016 6:34 am

Dear forum,

I am not very active in the forum because regarding milling I am pretty much a newbie and I only do basic things, not the fancy stuff that I see here. But I was a bit frustrated with the software choices to control my Shapeoko (especially free and for Linux), and, ideally, I wanted to get rid of a PC in my workshop altogether. So I wrote a piece of software designed to run on a small Raspberry Pi (2 or better) with a small touch display. The idea behind it is to use a joypad to jog the machine and to control the software in general.

I believe it came out as an effective tool. It is very basic in its functionality but my idea was to do one thing and do it well.

If you like the idea, feel free to check it out on my Github page: https://github.com/fsantini/rasPyCNCController
Or you can download a RPi image from my website: http://www.francescosantini.com/threed.html

You can of course try it out on a normal PC as well, and it should be cross-platform (it's written in Python). But if you use it with windows you will need to change at least the serial port value in the configuration file.

I attach a couple of pictures, of my setup and a screenshot of the program itself.

I would be really happy if someone would give it a go, and if you like, give me some feedback on its functionality and on what is missing.

Thank you!

Image

Image

Image
Shapeoko 3 #0166 w/Kress 1050 Spindle
Prusa i3 Mk3

WillAdams
Posts: 8604
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: New minimal control software: RasPyCNCController

Post by WillAdams » Sat Apr 16, 2016 10:10 am

Looks very, very cool! Just the minimal sort of interface and stripped down for performance sort of thing a lot of people have been looking for.

Have you ever considered buying a jog wheel? I just bought a Contour Design Shuttle Express, and looking for a program which will directly support it....
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets

rincewind
Posts: 51
Joined: Mon Jan 05, 2015 8:59 am

Re: New minimal control software: RasPyCNCController

Post by rincewind » Sun Apr 17, 2016 10:38 am

WillAdams wrote:Looks very, very cool! Just the minimal sort of interface and stripped down for performance sort of thing a lot of people have been looking for.

Have you ever considered buying a jog wheel? I just bought a Contour Design Shuttle Express, and looking for a program which will directly support it....
Thanks for the kind words! I hadn't thought of a jog wheel, but I looked into the ShuttleXpress and it seems that it would be recongnized by Linux as keyboard and mouse... So I don't see why it shouldn't work with some adaptation. At the moment I like the joypad interface, but if you come from the machining world I can imagine that you are used to jog wheels. So I will probably invest in a ShuttleXpress, but maybe not before June or so (I won't really have time until then). I'll keep you posted!
Shapeoko 3 #0166 w/Kress 1050 Spindle
Prusa i3 Mk3

Joe Pineapples
Posts: 41
Joined: Sun Apr 10, 2016 1:22 pm

Re: New minimal control software: RasPyCNCController

Post by Joe Pineapples » Mon Apr 18, 2016 12:29 pm

Hi Rince, nice work!
Possibly the answer to what I've been looking for. Does RasPyCNCController receive and process G-Code or is it just a positioning/jogging system?

Also, with regards to a jog wheel, personaly I wouldn't invest in a ShuttleXpress - professional machines don't use them and (in my opinion) they're overpriced. A rotational potentiometer with a larg(ish) knob should do fine and is much more affordable.
If you're after something already assembled and with a USB plug, Logitech do a fantastic free-spinning, heavy flywheel type scroll wheel on some of their mouses (I use one to manipulate CAD models quickly at work), then there's also free-spinning track balls that should do the job.

NOTE: While writing this I've just seen that, actually, the ShuttleXpress can be bought for as little as £35, so feel free to ignore the above :D
Nokia 3310 with custom ringtone
Nintendo Gameboy with backlight upgrade and worn D-pad

rincewind
Posts: 51
Joined: Mon Jan 05, 2015 8:59 am

Re: New minimal control software: RasPyCNCController

Post by rincewind » Mon Apr 18, 2016 12:45 pm

Joe Pineapples wrote:Hi Rince, nice work!
Possibly the answer to what I've been looking for. Does RasPyCNCController receive and process G-Code or is it just a positioning/jogging system?
Thank you! What do you mean by receive and process exactly? It can load a GCode file and run it (it also takes care of truncating MakerCAM coordinates that cause trouble to Grbl). A feature that I think is nice is the possibility of pausing a job, freely move the spindle (e.g. for changing tool, cleaning the area...) and then the program safely repositions the head to the last point when you receive the job. This can also be done inside the gcode by the way with the @pause host command.

Would you like the software to receive GCode via a network stream and run it? I can implement that if you feel that it would be useful.
Also, with regards to a jog wheel, personaly I wouldn't invest in a ShuttleXpress - professional machines don't use them and (in my opinion) they're overpriced. A rotational potentiometer with a larg(ish) knob should do fine and is much more affordable.
Yes I thought about a potentiometer or a rotational encoder. Maybe it could be even attached directly to the Raspberry Pi GPIO ports, but I don't know if they are all used up by the LCD. But maybe it's not worth the trouble after all, the ShullteXpress is not that expensive, as you also noted.
Shapeoko 3 #0166 w/Kress 1050 Spindle
Prusa i3 Mk3

WillAdams
Posts: 8604
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: New minimal control software: RasPyCNCController

Post by WillAdams » Mon Apr 18, 2016 12:51 pm

Moreover, professional machines do use the Shuttlexpress --- re-badged, and at a significant markup:

http://www.tormach.com/Product_PCNC_acc ... llers.html
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets

WillAdams
Posts: 8604
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: New minimal control software: RasPyCNCController

Post by WillAdams » Mon Apr 18, 2016 1:00 pm

There are two main ways in which CNC control works:

- Mach/EMC/LinuxCNC (direct control?) --- where the computer runs in hard real time and directly sends signals to the stepper drivers which then result in the stepper motors working
- Grbl and similar G-code interpreters running on a micro-controller --- the machine is directly run by a small program running on a small computer (micro-controller) --- there is a controlling program which runs on a full-fledged computer and sends G-code files line-by-line, and allows jogging and so forth

This is on the wiki in a couple of places, but if it would be better in some other place, or the wording from the wiki could be improved, please let us know (or get an account and edit it directly)

There are two hybrid techniques:

- micro-controller for hard real time, controlling computer does motion planning --- ESTLCAM does this
- front-panel controller --- this is common on 3D printers, the micro-controller is connected to an LCD panel which controls the machine --- I'm currently working on getting my OrdBot set up for this using an Azteeg X5 mini and Viki 2.0 LCD

I'd love to see a similar setup to the latter for an SO, and RasPyCNCController (RPCNCC?) seems the best option.
Shapeoko 3XL #0006 w/ Carbide Compact Router w/0.125″ and ¼″ Carbide 3D precision collets

rincewind
Posts: 51
Joined: Mon Jan 05, 2015 8:59 am

Re: New minimal control software: RasPyCNCController

Post by rincewind » Mon Apr 18, 2016 1:14 pm

WillAdams wrote: - front-panel controller --- this is common on 3D printers, the micro-controller is connected to an LCD panel which controls the machine --- I'm currently working on getting my OrdBot set up for this using an Azteeg X5 mini and Viki 2.0 LCD

I'd love to see a similar setup to the latter for an SO, and RasPyCNCController (RPCNCC?) seems the best option.
Yes Will you are right. I probably misunderstood the question above. RPCNCC, software part, (I should work on the name uh? :) ) basically is meant to replace UniversalGCodeSender or similar... When integrated on a Raspberry Pi, then it works as a front-panel controller, but you can in principle use it with a normal PC. It doesn't control the steppers, it talks to the SO electronics via USB.

Many 3D printer LCD displays are directly controlled by the microcontroller that also controls the steppers. The raspberry pi solution is in a way an overkill with respect to that, because it is in fact a full-fledged computer, but it's still cheap and I find it very flexible.
Shapeoko 3 #0166 w/Kress 1050 Spindle
Prusa i3 Mk3

Joe Pineapples
Posts: 41
Joined: Sun Apr 10, 2016 1:22 pm

Re: New minimal control software: RasPyCNCController

Post by Joe Pineapples » Mon Apr 18, 2016 1:20 pm

WillAdams wrote:Moreover, professional machines do use the Shuttlexpress --- re-badged, and at a significant markup:

http://www.tormach.com/Product_PCNC_acc ... llers.html
Tormach's PCNC (personal CNC) range aren't generally classed as "professional" machines, they're intended more for home machinists with a lot of money to play with!
Nokia 3310 with custom ringtone
Nintendo Gameboy with backlight upgrade and worn D-pad

Joe Pineapples
Posts: 41
Joined: Sun Apr 10, 2016 1:22 pm

Re: New minimal control software: RasPyCNCController

Post by Joe Pineapples » Mon Apr 18, 2016 1:24 pm

rincewind wrote:
Joe Pineapples wrote:Hi Rince, nice work!
Possibly the answer to what I've been looking for. Does RasPyCNCController receive and process G-Code or is it just a positioning/jogging system?
Thank you! What do you mean by receive and process exactly? It can load a GCode file and run it (it also takes care of truncating MakerCAM coordinates that cause trouble to Grbl). A feature that I think is nice is the possibility of pausing a job, freely move the spindle (e.g. for changing tool, cleaning the area...) and then the program safely repositions the head to the last point when you receive the job. This can also be done inside the gcode by the way with the @pause host command.

Would you like the software to receive GCode via a network stream and run it? I can implement that if you feel that it would be useful.
That's all I meant, load a file and run it, so that ticks my boxes I think :)
Nokia 3310 with custom ringtone
Nintendo Gameboy with backlight upgrade and worn D-pad

Post Reply