Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:14 04 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Maximite g-code interpreter?

Author Message
mattma
Newbie

Joined: 01/10/2012
Location: Australia
Posts: 25
Posted: 05:34pm 29 Jan 2015
Copy link to clipboard 
Print this post

Hi

I've just put together the mechanical and electronic parts for a 'Pocket laser engraver' using salvaged DVD drive parts ( see Instructables 'Pocket Laser Engraver'). The Instructables projects are built around Arduino's and use the GRBL sketch for interpreting g-code.

I'm keen to use the Maximite and wondering whether anyone has written a g-code interpreter for the Maximite? I've search the forum and seen a few people floating the idea but just wanted check in case I over looked it.

Cheers
Matt
Edited by mattma 2015-01-31
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 4033
Posted: 09:43pm 29 Jan 2015
Copy link to clipboard 
Print this post

Is a 'mite with MMBasic fast enough?

Turn that around - how fast need such an interpreter be?

I've seen code in C for a 1GHz ARM and it was fast enough. MMBasic is maybe 1000 times slower.

JohnEdited by JohnS 2015-01-31
 
MicroBlocks

Guru

Joined: 12/05/2012
Location: Thailand
Posts: 2209
Posted: 11:21pm 29 Jan 2015
Copy link to clipboard 
Print this post

I would say it will be at least 100000 times slower.

It is probably not worth the time.
You might get it to work very slowly with those kind of steppers.
There will be no way to get it to work properly with some decent steppermotors. So basically you spend a large amount of time without being able to leverage that in the future.

What needs to be done is to control the sequence of current going through the coils of the motor. That needs to be timed precisely and as fast as possible.
In MMBasic you have to much overhead to be able to toggle pins fast enough.
In combination with cfunctions you might be able to pull it off.
In the end it will be inferior to other solutions.

You might be able to use the Maximite as a workstation. It has SD card support,you can hook up a monitor. I would spend time on making something that you can choose files, send them to a GRBL (maybe line by line) board and you will have a cheap solution that can replace a PC.

Microblocks. Build with logic.
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 05:03am 30 Jan 2015
Copy link to clipboard 
Print this post

Hi Mattma, I am using the uMite to control a small 4 axis board from here. I am not using it in a cnc application, but the option for that is available for this board. It is controlled by the uMite using the serial port on the board. Works very very well with steppers. I am using these to drive some steppers in an kinetic art project... 12 steppers running completely independently using one uMite. Check out the NC version of the firmware, it may work for you.
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 08:07am 30 Jan 2015
Copy link to clipboard 
Print this post

@mattma,

If you want a PIC32 based solution, here is the place you must dig. Advantage is that you can use the same code written in Arduino.

GRBL is out of question: it won't work, as is written in C, using the peripherals and timers of the ATmega168/328P micros (this g-code interpreter really needs at least 16MIPS speed from the micro).

But out there is a g-code interpreter written in Wiring/Arduino language that can be used with MPIDE and a Chipkit board - the only condition is that the Stepper library must exist in the MPIDE. Once you assured that Stepper lib is ported already to MPIDE (sorry, long time from when I looked last time into), it will be easy to compile a simple but good firmware as this one. The firmware can do:
- plotter (2 axis and a servo - here you need also the servo library to be ported on MPIDE)
- laser engraver (2 axis and a laser)
- cnc router (3 axis)

It may help also looking at this page.Edited by vasi 2015-01-31
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
mattma
Newbie

Joined: 01/10/2012
Location: Australia
Posts: 25
Posted: 01:12pm 30 Jan 2015
Copy link to clipboard 
Print this post

Thanks for the feedback and ideas everyone! I really like the idea of writing new firmware and making a dedicated device.

I take everyone's point about the speed issue however I'd like to explore this a bit more before I abandon the idea for the specific application I've got in mind as the upgrade to the current 'toe-in-the-water' project ( a traditional engraver for medals at our athletics group).

Is the 16 MIPS requirement for GRBL main due to the speed needed for the floating calcs for path calcs? If so, then I'm wondering if I pre-processed the g-code to calculate the points for the lines and arcs ( the only motion codes needed) and then the execution would just be load a chunck of the points file into a buffer and send it I/O pins based on the timer interrupt (to set feed rate).

Do you think that buffer loading would be possible without impacting the timing of sending the data to the stepper drivers or always exhausting the buffer?

Thanks
Matt

 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 01:46pm 30 Jan 2015
Copy link to clipboard 
Print this post

GRBL is doing a lot of things and even stepper pulses need maximum speed. Is doing acceleration, is planning ahead, almost everything a PC with a dedicated software does. Read the first page on the github, bellow is a complete description.

But you can use a lower speed micro if you do the g-code processing on PC/Raspberry/Olinuxino side and send pulses and directions on the microcontroller.

Lower micros used in CNC Routers/3D Printers:
- PIC18F4550/2550 at 12MIPS (see RepRap with PIC18F4550);
- PIC16F877;
- PIC16F628/PIC16F76;
- PIC12F629/675

Edited by vasi 2015-01-31
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
mattma
Newbie

Joined: 01/10/2012
Location: Australia
Posts: 25
Posted: 10:37pm 30 Jan 2015
Copy link to clipboard 
Print this post

thanks everyone. I've got a lot of good things to follow up and I think its time to dive into the MM firmware.

cheers
Matt
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025