gnea / grbl

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino
https://github.com/gnea/grbl/wiki
Other
4.07k stars 1.61k forks source link

Does grbl work on Ardunino uno wifi #577

Open thawkins opened 5 years ago

thawkins commented 5 years ago

Before I go off and buy one, does anybody know if grbl will work on the Arduino Uno Wifi with a grbl shield?. It appears to be an uno clone with the following differences.

https://store.arduino.cc/usa/arduino-uno-wifi-rev2

  1. Wifi hardware integrated (obviously), hardware tcpip stack
  2. 48k vs 32k flash
  3. 6k vs 2k sram
  4. 256 bytes vs 1k eeprom it has a few other things probaly not relevant to grbl, like an IMU (inertial management unit, whatever that is), and crypto processor, also used by the wifi function. Its based on a new Microchip clone of the 328, with more flash and sram, although i was not sure tbe reduced size eeprom woukd be an issue. It would make a good half way house between a 328 and a 2560, more space for code without all the pin remapping.
carneeki commented 5 years ago

Short answer: not yet, there's a small difference in timers, but it might be workable if the other devices (cypto, IMU, wifi) don't interfere.

Long answer: The chip that runs the Uno Wifi Rev2 is the ATMega 4809, https://www.microchip.com/wwwproducts/en/ATMEGA4809

I'm sort of thinking that a halfway point between the the 2560 and the 328 isn't really necessary, and that maybe the 2560 would make for a better target as there is substantially more IO which is incredibly valuable for things like switches, and more axes.

A quick comparison (of the Uno, the Uno Wifi Rev2 and Arduino mega boards):

- Uno / 328 Uno Wifi R2 / 4809 Arduino Mega / 2560
Flash 32k 48k 256k
SRAM 2k 6k 8k
EEPROM 1k 256b 4k
Timers 2x8bit, 1x16bit 5 x 16bit 2x8bit, 4x16bit
DIO (PWM) 14 (6) 14 (5) 54 (15)

The difference in timers may mean some small changes to the clock division / scaling is all that's needed. I would still be concerned about the Wifi, Crypto and IMU interfering with the operation of steppers or input pins (though, I didn't see any documentation on how they are to be interfaced, so it may be totally safe as well).

bdurbrow commented 5 years ago

If you want WiFi, I would suggest a Mega2560 and either an ESP8266 or ESP32 board. I would also suggest considering a RAMPS 1.4 + character LCD instead of a standard grbl shield; I've got a fork of the Mega2560 version of grbl that I'm working on that supports streaming from the SD slot on the LCD board as well as some other features; extending that to support WiFi via esp card won't be difficult.

PCSDIAS commented 5 years ago

If you want wireless communication you could try a HC05/HC06 Bluetooth module connected directly to Arduino Uno TX and RX pins. In this case the USB must be left disconnected. The Arduino will be powered via its supply pins. Paulo

HuubBuis commented 5 years ago

I use an arduino uno and ESP8266 module for a WiFi connection for the GRBL controller. It works more reliable than the Bluetooth solution. I started using a separate ESP8266 module but now the are Arduino Uno and Mega versions having a builtin ESP8266 board https://robotdyn.com/uno-wifi-r3-atmega328p-esp8266-32mb-flash-usb-ttl-ch340g-micro-usb.html. I have the Uno version of this board and ordered the mega version. I have written a sketch to run the ESP8266 as transparant WiFi bridge and a manual for programming the ESP8266 just look here: http://www.mwt.messageboard.nl/forum/viewtopic.php?f=4&t=11

PCSDIAS commented 5 years ago

@HuubBuis Nice solution. What controller software do you use in order to stream the g-code to the GRBL via WiFi?

HuubBuis commented 5 years ago

I have tested it using my own software and Grbl-Panel https://github.com/Gerritv/Grbl-Panel/wiki.

If you add a separate ESP module on the PC's USB port that connects (automatic) to the ESP module on the Arduino, you can use all GRBL GCode senders even if they don't support IP communication.

PCSDIAS commented 5 years ago

@HuubBuis A custom solution as I had imagined. I used the Bluetooth module because I wanted to be able to use any control software available for the GRBL, with just one part more. I suppose the next step would be to put the streaming software inside the ESP8266 and expose its user interface via HTML on a cellphone, tablet or elsewhere. Total portability.

Oldie-driver commented 5 years ago

For wifi and streaming, i use a raspberry pi 3+ with cncjs. So i have a webserver with cam and can send from desktop the cnc files to the raspberry. The little miller is 50 meters away in a garage, connect over powerline adapter and wifi for the last meter. For preparing the work, the raspberry got a cheap touchscreen for jogging / homing.

The Arduino is connect to raspberry over USB. Streaming just in time over 50 meter powerline and then wifi may to danger, i fear missing / corrupt data.

Just check on github for cncjs. Is a bigger solution then just a wifi module, but less work then use a Atom mainboard with vnc.

Quajetson commented 5 years ago

If u want wifi look at this, wifi version is available https://github.com/makerbase-mks/MKS-TFT support grbl and custom commands/ buttons

Quajetson commented 5 years ago

Tested on woodpecker board:)

manojprasanga commented 5 years ago

can we use Arduino UNO R3 D1 R32 microcontroller to control cnc v3 shield cnc-shield01 FS06XU2JIAJN9X8 LARGE

Quajetson commented 5 years ago

No. This is ESP based device.

pt., 26 lip 2019 o 09:52 manojprasanga notifications@github.com napisał(a):

can we use Arduino UNO R3 D1 R32 microcontroller to control cnc v3 shield [image: cnc-shield01] https://user-images.githubusercontent.com/52038093/61935522-5233be00-afa8-11e9-9f83-3b3acd0c7826.jpg [image: FS06XU2JIAJN9X8 LARGE] https://user-images.githubusercontent.com/52038093/61935524-5233be00-afa8-11e9-9161-a78fb3f3afff.jpg

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gnea/grbl/issues/577?email_source=notifications&email_token=AEFA55ANZ3FD7PRR2ULZFWDQBKULPA5CNFSM4GK5WHEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD23ZU4Q#issuecomment-515349106, or mute the thread https://github.com/notifications/unsubscribe-auth/AEFA55CEXHANP77BGOWCKGTQBKULPANCNFSM4GK5WHEA .

manojprasanga commented 5 years ago

But some one says most Arduino shields compatible with Arduino UNO R3 D1 R32 microcontroller. Refference:-https://www.instructables.com/id/The-Greatest-Arduino-UNO-in-the-World/

luc-github commented 5 years ago

@manojprasanga you can check https://github.com/bdring/Grbl_Esp32 but I do not know if such config is supported

manojprasanga commented 5 years ago

@luc-github thanx

atrejo commented 3 years ago

the answer is yes, the board and the wemos d1r32 and the cnc shield work at least with the a4988 drivers, the problem is with grbl https://github.com/bdring/Grbl_Esp32 I cant make it work with the wemos, but I think this sw problem is easy to workaround