First successful trial of GRBL on chipkit Max32

Show off your projects to others!
Post Reply
george4657
Posts: 21
Joined: Fri Apr 05, 2013 7:05 pm

First successful trial of GRBL on chipkit Max32

Post by george4657 » Wed Mar 02, 2016 9:30 pm

I have spent the last several months converting Grbl from a mega256 to a chipkit Max32 and today I made my first successful run on an actual machine.

Test machine:
Home made with 3 steppers fed with drv8825 drivers, one stepper on X and two steppers on Y (stepper motors from old floppy drives)
Maximum speed limited by steppers not PIC32 to 6000 mm/min
Drivers and LCD fed with output of 3.3 volts with no problem, no level shifting was done.

Code Changes:
Interrupts had to be completely changed. I used same method as Grbl but all new code.
I added code to toggle for 2 steppers on same axis. A simple change as I toggle all axis at once as they are all on the same port.
I added code for real time display of position on an LCD as this was a function I missed with Grbl.
A lot of try to compile, find errors avr specific,rewrite that code.
Had to account for faster processor. Not 100% yet but close.

Problems:
Grbl is written in C not C++ so I can not use libraries such as lcd one so I had to rewrite my own in C.
Had to find ports with at least 8 bits output for direction bits,step bits and LCD bits
Documentation on grbl code is poor so I had to do a lot of trying to figure out what code was trying to do. There is a lot of defines for several different options so this complicated the code even more.
When I went to try code for the first time I tried using Grbl Controller but that program looks first for response from board that it is running Grbl. The problem is chipkit boot process is so slow it times out first. I wasted a lot of time trying to get it to work thinking I had a problem in my code. There are three solutions,change bootloader,change Grbl Controller or write my own terminal program. I can only do the third one so I had to write my own terminal program to run gcode commands or load and run gcode file.

There is nothing like the feeling of seeing a machine running with your design and your code running it for the first time.

George

mikes
Posts: 74
Joined: Mon May 14, 2012 10:37 pm

Re: First successful trial of GRBL on chipkit Max32

Post by mikes » Mon Mar 07, 2016 5:22 pm

That is very cool. 8-)

User avatar
Jacob Christ
Posts: 723
Joined: Sat May 28, 2011 6:34 am
Location: Southern California
Contact:

Re: First successful trial of GRBL on chipkit Max32

Post by Jacob Christ » Mon Mar 07, 2016 5:35 pm

This is awesome! You made headway where I just banged my head. Couple of thoughts, have you looked at Smoothie? Its a port of GRBL for ARM that can handle 5 axis motion. Also, I think they did a lot of work to abstract out the microcontroller used.

Also, do you have the code posted somewhere so we can try it?

Jacob
PONTECH Quick240 an industrial form factor platform for chipKIT and Arduino users.

reineruhry
Posts: 1
Joined: Tue May 02, 2017 5:17 pm

Re: First successful trial of GRBL on chipkit Max32

Post by reineruhry » Tue May 02, 2017 5:19 pm

Hi George,


I would like to try my Uno32 with GRBL, is it possible to you to share the code?


Best Regards,
Reiner

lstandage
Posts: 17
Joined: Fri Sep 06, 2013 6:03 pm

Re: First successful trial of GRBL on chipkit Max32

Post by lstandage » Tue May 02, 2017 11:02 pm

There is a group of us here at Microchip that are working on a PIC32MZ EF-based controller board for 3D Printing and CNC applications. I have a couple of guys looking at the GRBL code, so they would like to see what you have done.

The first step is a shield for the Wi-Fire, then the actual board. We have a model Kossel-mini based 3D Printer design that is our platform for testing it. If you're interested in those files, we have a private GitHub repo set up for it.

Post Reply