GithubHelp home page GithubHelp logo

grbl_mpg_dro_boosterpack's Introduction

GRBL MPG & DRO BoosterPack for Tiva C (TM4C123G)

2021-08-30: Pi Pico breakout board design

First batch of boards (for final design verification) to be ordered soon.

2021-05-01: HALification of the code is underway

A RP2040 driver for Pi Pico is nearing completion, watch this space.

2019-08-20: Improved startup sequence

The GPIO line used for signalling MPG mode change is now used to signal the grbl controller ready state during startup.

On a cold start the Grbl microcontroller should pull the line low as early in the process as possible. When the cold start sequence is completed and grbl is ready to receive data the line should be reverted to input mode with interrupt and pullup enabled. The MPG microcontroller will wait for the line going high before starting any communication, displaying a progress indicator in its boot screen while waiting.


Features:

  • SPI LCD and touch interface
  • Up to two MPG wheels (QEI connected)
  • Four GPIO pins, one is preassigned for switching grbl to/from MPG mode
  • Up to 8 LEDs, buffered open drain
  • Feed Hold and Cycle Start outputs, open drain
  • Up to 25 keys (in matrix)
  • Navigator interface
  • I2C port (3V3)
  • On board MSP430G2553 handling keys and LEDs, internal I2C interface to Tiva C

Parts of alpha-version of supporting code is now available. An initial commit of the display driver used has now been made public. The code is written so it is should be easy to port, all processor dependent code is in separate files.

All core funtionality is now up and running, GUI is 100% event driven making it easy to extend with new dialogs. Shared dialogs (canvases) created for common data (such as DOC, feed rate, RPM), input review/confirmation and GCode transfer to grbl.

How it works

The setup comprises 3 microcontrollers: one running Grbl, one handling the keyboard scanning and one (the MPG processor) for the DRO and MPG (user interface).

Grbl/grblHAL microcontroller:

Support for a second input stream and a switch for changing to/from MPG mode has to be added to the code. In "normal" mode the MPG processor listen to the output stream from Grbl, parses the data and displays relevant info on the display. In "MPG" mode Grbl switches its serial input to the second input stream and the MPG prosessor takes over control by acting as a GCode sender. To tell the MPG processor about a mode change the real time report from Grbl is extended with |MPG:0 ("normal") and |MPG:1 ("MPG"), this is only added when the mode change takes place. Some of my grblHAL drivers supports this functionality as does my patched version of grbl-Mega.

MPG microcontroller:

This handles the user interface (keypresses, MPG input, menu navigator input and DRO display). In "normal" mode it passively listen to the output stream coming from Grbl, parses it and updates the display and LED statuses accordingly. For this to work correctly there has to be a PC based GCode sender connected to the controller, such as ioSender, that constantly request the real time status report.

In "MPG" mode it takes over control and acts as a GCode sender itself, ideally the PC based GCode sender should then disable its GUI. When turning the MPG wheels G1 commands are issued with a feed rate that is dependent on the turning speed, simulating the action of the handwheels on the lathe. The jog buttons issues jog commands and most of the other buttons issues real-time commands such as Hold or Cycle start. It is also possible to hardwire some of the button states to the corresponding Grbl input signals.

For the lathe version I am currently working on I am adding canvases (or dialogs) that will be used for some simple tasks such as reducing the diameter of the stock, and possibly threading if the Grbl version supports that. There is a common canvas for streaming task data, this may be used to stream data from a SD card (not yet implemented).

Keyboard handling microcontroller:

Due to limited IO on the MPG microcontroller a separate processor is employed for handling the keyboard and LEDs. Up to 25 keys can be added (in a matrix) and 8 LEDs are supported. Keypresses are sent to the MPG controller via I2C, and there is a strobe signal for telling MPG controller that a key is pressed. The strobe signal suppports different key modes such as single shot, autorepeat and continuous - configurable per key.


Testbench setup

Pi Pico breakout board

Pico PCB top

Pico PCB bottom


2021-08-30

grbl_mpg_dro_boosterpack's People

Contributors

terjeio avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.