CNC - The New Plan... Any Feedback?

Over the last month or so, I have been working on making parts for a new machine, which will be a 12 foot long rotary plotter. Although some folks will say that a plotter is not a CNC machine, I think it is.

Concerning many of my projects (with the exception of the spring bender CNC), the problem has always been reinventing the wheel to use the Propeller. Linear interpolation, circular interpolation, ramps, feed rates, and the code required to support these items, has been an issue that has plagued me for many years now. Life is too short to remain stagnant and I must move forward, so I will be taking a different approach this time around.

My new approach will be to combine the assets of the Propeller, with the assets of the Arduino Uno. In essence, I will be using the Propeller for all interfacing needs and I will be using an Arduino Uno to control all movement. I believe I know the Propeller well enough to create many interfaces and solve many interfacing needs. As for the Arduino Uno, I am simply going to load it up with GRBL, set configurations to match specified parameters, and wire it up to the machine, regardless of whether it is a 3D printer, CNC mill or router, or a simple plotter. The Propeller interface will be responsible for serially sending G-Code commands to GRBL for machine processing.

The more I think about this plan, the more I like it. It seems and sounds like a no muss, no fuss, solution to fast and easy development of small machines. If you have any feed back to this plan, please share your thoughts.

By the way, just as soon as the spring weather warms up a bit, I will be making some of my promised videos, which will include metal melting, casting, the spring bender CNC in action, as well as various other tid bits.


Novel Solutions - http://www.novelsolutionsonline.com/ - Machinery Design • - • Product Development
"Necessity is the mother of invention." - Author unknown.

«1

Comments

  • 36 Comments sorted by Date Added Votes
  • "CNC", why not? It's Computer Numerical Control machine. Might not be typical usage but lines are blurred now a days.

    Anyway, sounds like a plan.

    A guess you have Arduino Uno specific software to use there. Otherwise I'd be inclined to use a Raspberry Pi for the heavy code lifting and the Propeller for the interfacing.


  • Heater

    Actually the more I investigate this, the better it sounds.

    1. GRBL loads onto an Arduino Uno, to be the G-Code interpreter and machine operator
    2. The Propeller provides a user interface, as well as a serial interface to GRBL
    3. An Arduino CNC Shield plugs into the Arduino Uno
    4. (4) Pololu DRV8825 Stepper Motor Driver Carriers plug into the Arduino CNC Shield

    An inexpensive solution to CNC machines


    Novel Solutions - http://www.novelsolutionsonline.com/ - Machinery Design • - • Product Development
    "Necessity is the mother of invention." - Author unknown.

  • Heater.Heater. Posts: 19,814
    edited March 14 Vote Up0Vote Down
    Ah, that is exactly the reverse of what I had in mind.

    You have the machine interfacing on the Arduino and the user interface on the Propeller.

    I guess the Arduino is a hard requirement if you want to use the GRBL software.

    I which case I'd be using a Pi for the user interface. Probably work out just as cheap and be a million times more capable in that role.

    Edit: Strangely enough I find there is already a Raspi/Arduino/GRBL solution: http://wiki.protoneer.co.nz/Raspberry_Pi_CNC
  • Yea, the Arduino is a hard requirement, but GRBL is tried and true, so no reinventing the wheel. Yes, there is also Raspi/Arduino/GRBL, but I have not investigated it thoroughly yet.


    Novel Solutions - http://www.novelsolutionsonline.com/ - Machinery Design • - • Product Development
    "Necessity is the mother of invention." - Author unknown.

  • jmgjmg Posts: 10,611
    idbruce wrote: »
    Yea, the Arduino is a hard requirement, but GRBL is tried and true, so no reinventing the wheel. Yes, there is also Raspi/Arduino/GRBL, but I have not investigated it thoroughly yet.

    GBRL is open source and I notice the Ardunio hex image has a top address of ~30338, so there is not much room left.
    Could be worthwhile checking the Raspi pairing, as that is likely to be where code expands to...

    Has anyone tried porting GBRL to the Prop C tools ? Could be a challenge ?

    Or, you could join the Cypress PSoc6 early adopter community ?
    http://www.cypress.com/event/psoc-6-purpose-built-iots

    that has 2 cores (looks like M0 one runs BLE) and 150MHz ARM4 with QuadSPI XIP code support.
  • jmg wrote: »
    Has anyone tried porting GBRL to the Prop C tools ? Could be a challenge ?

    Bruce has. I remember I poked at it too, while following his thread. I thought maybe it'd be a good way to show off how awesome PropWare is. It was not easy... quite a large codebase with a lot of incompatible code that needed fixing. It's not necessarily impossible, but it's not easy.
    David
    PropWare: C++ HAL (Hardware Abstraction Layer) for PropGCC; Robust build system using CMake; Integrated Simple Library, libpropeller, and libPropelleruino (Arduino port); Instructions for Eclipse and JetBrain's CLion; Example projects; Doxygen documentation
    Tag me with "@DavidZemon" if you have a question for me. I will be checking these forums far less for the forseeable future.
  • jmgjmg Posts: 10,611
    DavidZemon wrote: »
    jmg wrote: »
    Has anyone tried porting GBRL to the Prop C tools ? Could be a challenge ?

    Bruce has. I remember I poked at it too, while following his thread. I thought maybe it'd be a good way to show off how awesome PropWare is. It was not easy... quite a large codebase with a lot of incompatible code that needed fixing. It's not necessarily impossible, but it's not easy.
    Figured as much. How far did you get ?
    I noticed even on the Pi version, they avoided porting the code, merely using the Pi as a head-unit.

    I see there is a port to the Arduino Mega2560, which should buy more code spare - that >92% full in a 32k AVR would worry me.
  • jmg and DavidZemon

    I haven't tried porting GRBL, which has a an Arduino code base, but I have tried porting Teacup, which is also an Arduino code base.

    One of the biggest problems with porting these, besides the memory required for CNC programs, is the numerous interrupts utilized for the Arduino base.
    GBRL is open source and I notice the Ardunio hex image has a top address of ~30338, so there is not much room left.
    Could be worthwhile checking the Raspi pairing, as that is likely to be where code expands to...

    My thoughts are that the Arduino Uno will handle GRBL, because that is what they recommend. Which in my eyes is basically a load into to memory, forget about it, and let it do it's job. Now the user interface and providing G=Code to GRBL is a much different issue, which can become quite huge and complicated on it's own. Perhaps RasPi is a good solution, but I know the Propeller can handle a decent size interface for a simple machine. Although I have been investigating the RasPi, to find out what all the hype is about. Probably the main thing that interests me so far, is the ability to have a touch screen


    Novel Solutions - http://www.novelsolutionsonline.com/ - Machinery Design • - • Product Development
    "Necessity is the mother of invention." - Author unknown.

  • I've looked at it before, and it's not trivial code. In order to make it work, and fast enough, they're essentially multi-tasking with interrupts. They use interrupts to drive the motor pulses, and there's a lot of hardware specific code in there for doing things like adjusting the timing of interrupts dynamically, setting specific pin/port masks, and so on.

    The higher level code could likely be ported fairly trivially, but the low level bits are ugly and would require a fairly solid understanding of what they do on the Arduino hardware in order to port to the Prop.
  • Here's my attempt. It's working against a very, very old branch of PropWare though. I don't have PropWare binary archives that old lol

    https://github.com/DavidZemon/grbl
    David
    PropWare: C++ HAL (Hardware Abstraction Layer) for PropGCC; Robust build system using CMake; Integrated Simple Library, libpropeller, and libPropelleruino (Arduino port); Instructions for Eclipse and JetBrain's CLion; Example projects; Doxygen documentation
    Tag me with "@DavidZemon" if you have a question for me. I will be checking these forums far less for the forseeable future.
  • The higher level code could likely be ported fairly trivially, but the low level bits are ugly and would require a fairly solid understanding of what they do on the Arduino hardware in order to port to the Prop.

    Yep


    Novel Solutions - http://www.novelsolutionsonline.com/ - Machinery Design • - • Product Development
    "Necessity is the mother of invention." - Author unknown.

  • There's a very functional CNC controller (all Propeller) recently made by a customer of ours that runs G code.

    If you're interested in being connected to him please drop me an e-mail kgracey@parallax.com. We should consider rallying behind his product if it's suitable for a number of our customers. At my first look, it certainly is.

    Ken Gracey
  • jmgjmg Posts: 10,611
    Ken Gracey wrote: »
    There's a very functional CNC controller (all Propeller) recently made by a customer of ours that runs G code.

    If you're interested in being connected to him please drop me an e-mail kgracey@parallax.com. We should consider rallying behind his product if it's suitable for a number of our customers. At my first look, it certainly is.

    Ken Gracey

    Do you know if he ported GRBL libraries for that ?

  • Ken

    The controller really is not the issue, because the Propeller can easily be used as a controller. The problem is reliable, understandable, and configurable software, which has community support. This particular issue has been my stumbling block for years.

    GRBL has already gained a wide range of support, as reliable and open source CNC software.

    For approximately $75, in stackable form, a 3-axis, potentially 4-axis, solution exists, with huge community support.
    GRBL $FREE
    Arduino Uno $20
    Arduino CNC Shield $20
    (4) Pololu DRV8825 Stepper Drivers $36

    At this point, I sincerely believe that a Propeller user interface board should be created to work with this solution. I think it would be a good product for the Propeller.


    Novel Solutions - http://www.novelsolutionsonline.com/ - Machinery Design • - • Product Development
    "Necessity is the mother of invention." - Author unknown.

  • Heater. wrote: »
    "CNC", why not? It's Computer Numerical Control machine. Might not be typical usage but lines are blurred now a days,

    A heater with no closed-loop feedback is just that...a heater.

    A heater with feedback becomes a temperature control system.

    I regard an open-loop CNC as "Computer Numerical Command"

    PropBASIC ROCKS!
  • not every language distincts between control and command
  • MicksterMickster Posts: 972
    edited March 15 Vote Up0Vote Down
    idbruce wrote: »
    At this point, I sincerely believe that a Propeller user interface board should be created to work with this solution. I think it would be a good product for the Propeller.

    Hey Bruce, I am a couple of months short of five years of using Android tablets for HMIs. It doesn't really matter what technology I use to control the machine because the people that I sell to, don't understand or care, as long as it works. However, I have to make the sale in the first place which usually involves a presentation in front of engineers and managers.
    I take one of my heavily protected tablets to the presentation and hand it around and people start to smile.
    I perform a factory reset to the tablet (as if I'm replacing the tablet), re-enter the appropriate email address, the machine's app appears in the Inbox and I install it....all within minutes.

    HMIs are subjected to a lot of abuse on the factory floor and many a production machine is dead-in-the-water for the sake of a failed operator interface. You will not achieve a faster MTTR (mean time to repair) than something that can be obtained, locally, 24/7.

    The tablet is one of the least expensive elements of my control systems but it's the one element that gets the sale.
    PropBASIC ROCKS!
  • ErNa wrote: »
    not every language distincts between control and command

    Not quite sure of your point in that cryptic response but if one can only assume that his command is being obeyed then one is not really in control. Heck, even simple actuators typically have a feedback device (limit switch, etc.) to verify that they obeyed their command.

    Nobody wants a heap of scrap parts to make them aware that the process is out of control.

    PropBASIC ROCKS!
  • Mickster,
    A heater with no closed-loop feedback is just that...a heater.
    I give lot's of feedback. I am more than just a heater :)
    Mickster,
    I regard an open-loop CNC as "Computer Numerical Command"
    Feel free to make up any redefinition of "CNC" you like. At risk of confusing people of course.

    Those lathes, mills and other machines I was preparing mylar punched tapes for in 1980 were called "Computer Numerical Control" (CNC) machines. They gave no feedback except the, hopefully correctly, machined parts.

    Your HMI for CNC sounds very cool.


  • Heater. wrote: »
    Those lathes, mills and other machines I was preparing mylar punched tapes for in 1980 were called "Computer Numerical Control" (CNC) machines. They gave no feedback except the, hopefully correctly, machined parts.

    I am unaware of any big-name lathe or mill that didn't have closed-loop position (encoders)/velocity/current control.

    PropBASIC ROCKS!
  • Mickster,
    I am unaware of any big-name lathe or mill that didn't have closed-loop position (encoders)/velocity/current control.
    That is why I said "They gave no feedback except the, hopefully correctly, machined parts."

    It was, tape in, parts out.

    Perhaps the motor controllers on those old machines had closed loop control. Nothing the operator knew about. He had to watch the machine and make sure it did not go crazy, then measure the finished parts for correctness.

    Anyway, this little meander started when idbruce wanted to call his plotter CNC. I see no reason why not. Much of the same applies when controlling a plotter as a mill.
  • Heater. wrote: »
    Your HMI for CNC sounds very cool.

    Thanks but the really cool bit is the long-term masterplan which is already starting to work for me. When you retrofit a control system to a CNC machine-tool, you unwittingly take responsibility for every problem that the machine has in the future because, unless it's something really obvious to the maintenance guys....it MUST be a "software problem". It's like they think that the software wears out or something.
    Thanks to decades of experience, there is not much that I can't diagnose, remotely, via TeamViewer that I have on the tablet. I charge a minimum of $450, prepaid, just to log-on and have a look.
    Nobody has ever complained because they know that the alternative would be to have me visit, which would cost a heck of a lot more in terms of my-time/expenses/down-time.

    The more I install, the more remote service I get. Lil lady no-longer complains when I am called at say 3am and right from our bed make a bit of quick cash. She even sits-up and watches as I remotely drive a machine that's thousands of miles away...LOL. This is my retirement planning :-D
    PropBASIC ROCKS!
  • MicksterMickster Posts: 972
    edited March 15 Vote Up0Vote Down
    Heater. wrote: »
    Anyway, this little meander started when idbruce wanted to call his plotter CNC. I see no reason why not.

    Sure but Bruce is clearly a budding entrepreneur, looking for his big break. My feeling is that he is focussing too much on low-end/low-cost products. To make money with that, he will need huge volumes. People today are obsessed with portable devices, jump on the bandwaggon with something that people get excited about. It seems like people living off baked beans are walking around with the latest/greatest hand-held devices so I bring the same stuff to the factory floor where the serious low-volume money is.
    PropBASIC ROCKS!
  • Ha, decades ago I was called out to find why our new software was reporting the speed of some machine incorrectly. Multi-million dollar machine, 10,000 product per minute. Turns out the software was fine, the engineers had built the machine with the wrong gear ratios. It was actually running slow.
  • Heater. wrote: »
    Ha, decades ago I was called out to find why our new software was reporting the speed of some machine incorrectly. Multi-million dollar machine, 10,000 product per minute. Turns out the software was fine, the engineers had built the machine with the wrong gear ratios. It was actually running slow.

    A few red faces there, I bet. Yeah I have had some laughs with the crazy, exotic theories put forth by my customers' resident "experts".

    @idbruce: What about having the user interface simply pop-up on anyone's device? https://www.simblee.com/

    PropBASIC ROCKS!
  • Mickster

    Thanks for your input.

    I agree, the use of tablets sounds very enticing. In fact, I was considering the use of a laptop to run the machine, but there were several considerations that ruled it out, such as human traffic and harsh environment. Additionally, there will be many XBees involved, so the obvious choice for me is to stick with the Propeller, since there is a code base to work with.

    However, I recently discovered, an old, but new to me, CNC trick, which should allow me to better pursue my past and future CNC ambitions, so the use of tablets or laptops for future projects will not be ruled out.

    The main thing for me at this point, is to not get bogged down with software development. When I build a machine or machine components, of course I want to see immediate results. To be perfectly honest, I am more interested in machine development than I am in software development. I am sure you can relate to that.

    Over the years, I have wasted a lot of time pursuing difficult to impossible endeavors, but over the last year or so, I have been trying to keep very focused to streamline my endeavors. It is starting to look promising once again.


    Novel Solutions - http://www.novelsolutionsonline.com/ - Machinery Design • - • Product Development
    "Necessity is the mother of invention." - Author unknown.

  • For on-site work I have a couple of Panasonic Toughbooks (one for backup). It's unbelievable what these things can survive. They even have heating elements in the hard-drive carriers that kick-in at very low temperatures.

    I think you have seen my CNC billet tablet housing with the rugged external power connector(?). Not a single failure thus far and they are subjected to fingers covered in oil and metalic chips every day...I didn't even bother with screen protectors.

    Oh, I'm a big believer in keeping the software development as simple as possible as it's only one part of my puzzle.
    PropBASIC ROCKS!
  • Mickster

    That Simblee device looks very interesting and promising, and I am going to take a serious look into it. What about indoor range, like in a multi-story concrete building? If everyone had Andriods and were at various locations in the structure, would there be any connectivity problems?


    Novel Solutions - http://www.novelsolutionsonline.com/ - Machinery Design • - • Product Development
    "Necessity is the mother of invention." - Author unknown.

  • Mickster
    I think you have seen my CNC billet tablet housing with the rugged external power connector(?). Not a single failure thus far and they are subjected to fingers covered in oil and metalic chips every day...I didn't even bother with screen protectors.

    Yes I did. And to my recollection, it was truly impressive.


    Novel Solutions - http://www.novelsolutionsonline.com/ - Machinery Design • - • Product Development
    "Necessity is the mother of invention." - Author unknown.

Sign In or Register to comment.