Comments (6)
I added that to the roadmap. Most of the I/O you are talking about uses interrupts. I see there is an interrupt pin option. I'll have to look at that more.
Do you have any suggestions on how to add that to cpu_map.h and config.h?
from grbl_esp32.
Another option is this chip from Microchip which has two interrupt lines, one for each 8-pin port. Consumes one more ESP32 pin, but gives more flexibility:
https://www.microchip.com/wwwproducts/en/MCP23018
I haven't looked at the code until now. My initial impression and ideas:
- I don't think config.h needs to be touched
- Need to add an ioexp.h/.cpp module to handle the IO expander interrupt(s) and I2C communication.
- Pin numbers can be defined in ioexp.h. The upper bit can be set to 1 for the IO expander pins, so we start at 127 (#define GPIO_EXP_NUM_1 127)
- Include ioexp.h in cpu_map.h so that we can assign the IO expander pins to functions like PROBE_PIN
- An abstraction level is needed for at least the Arduino functions pinMode, digitalRead, digitalWrite and attachInterrupt so that we can handle both regular pins and the IO expander pins in the same way from the Grbl code. I would suggest adding a gpio.h/.cpp module to handle this. Existing code would have to be refactored to call i.e. "gpio_set_pin_mode" instead of the Arduino "pinMode" function.
- The IO expander interrupt handler must read the state of all pins and call the appropriate existing interrupt handlers (for instance isr_limit_switches if any of the limit switches were triggered)
The most work seems to be in creating an abstraction layer for GPIO handling (pinMode etc.) and implementing the I2C protocol for the IO expander.
from grbl_esp32.
I've never used it but I was looking for I2C IO expanders and came across these:
https://www.semtech.com/uploads/documents/sx150x_89b.pdf
Digikey sells them for $2.55
They are QFN
Sparkfun has a breakout board for and there is code too.
from grbl_esp32.
How about the cheap PCF8575 as a port expander? There are plenty of chips and modules out there and it's almost gold standard in ways of simplicity.
http://www.ti.com/lit/ds/symlink/pcf8575.pdf
Also, the port-expander could be used to free up i/o for additional step/dir driving on the ESP32, feedback like endstops or spindle speed goes to the expander.
from grbl_esp32.
This guy uses esp8266 and shift registers to control GRBL 8-axis. https://github.com/gcobos/grblesp & youtube video https://www.youtube.com/watch?v=EGESCcurkwA For a Good controller we need 9 axis like g2core https://github.com/synthetos/g2
from grbl_esp32.
Guys at the end all comes to PLC. That is why I am trying to solve all these I/O problems with this modular design.
https://gitlab.com/m10cube/m10
I am afraid we are a bit behind with the redesign (new PCB is 90x90) but you get the idea. Any help welcomed
from grbl_esp32.
Related Issues (20)
- Translate Machine.h for koputo HOT 1
- Translate Machine.h for koputo rs485 wo rts HOT 1
- Translate Machine.h for RS-CNC32 HOT 1
- Translate Machine.h for RS-CNC32 HOT 1
- Translate Machine.h for MFj_CNC HOT 1
- Translate Machine.h for Wolfspaw HOT 1
- 4Axis cnc
- WEBUI problem HOT 3
- Wifi problem HOT 2
- Translate Machine.h for cnc HOT 3
- Translate Machine.h for machine HOT 1
- Translate Machine.h for makerfr HOT 1
- Translate Machine.h for skal HOT 1
- Translate Machine.h for testpurp HOT 1
- Enhancing CNC Workflow: Integrating ESP-NOW Distributed Functionality and RESTful API Scripting with FluidNC Controllers HOT 2
- Translate Machine.h for mks_dlc32_test_board HOT 1
- Translate Machine.h for katrav2 HOT 2
- Translate Machine.h for Pen Plotter HOT 2
- Translate Machine.h for Pen Plotter HOT 1
- Controller Design Guidelines S1 -Solo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grbl_esp32.