Hello All,
I'm working with MrGreg on a board and have run into a bit of a fail-to-proceed with the serial connection. With the Pi USB->Arduino link on /dev/ttyACM I get decent response from the grbl firmware and so-so response from EMC2Arduino but from the E2A firmware I get no response at all.
The Pi is content to echo itself over the serial link and there is a physical path between the Pi and the Arduino (pins 14/15) but on either grbl or axis jogging or running a job produces no stepper action. The steppers are energised but reluctant to move.
The Taig mill python file needs to be pointed at /dev/serial (symlinks to /dev/ttyAMA0) or /dev/ttyACM0 to start which I expect (crashes out with a comms error).
The grbl firmware, if I connect to it via serial tells me to the rubbish I type at it is an error (again, expected) but the e2a firmware is silent.
bCNC with the grbl firmware doesn't report 'connected' over /dev/ttyAMA0 but does over ACM.
I did wonder if the Arduino is setup on the wrong Serial port but recompling the firmware against different Serials produces nothing - the board is clearly taking the Pi tx/rx pins to Arduino 14/15 breakouts of the USB->Serial chip.
Am I missing something here?
Serial driver choice
(Edit: note on Dec 28, 2018 this part has been automated in rc1 within the firmware setup script.)
In general, we don't use the PCB UART to bypass the Arduino USB chip yet, as the pull-up on some Arduino PCBs was found to cause issues. So, we are still working out how to eliminate the USB cable requirement, but until then we must use the external USB port cable on the Pi and Arduino.
Example: how to change the firmware to use "/dev/ttyACM0":
Edit /home/pi/APPS/infinity/EMC-2-Arduino/Makefile
UPLOAD_PORT ?= /dev/ttyUSB0
UPLOAD_PORT ?= /dev/ttyACM0
Edit /home/pi/linuxcnc/configs/taig-mill/9axis_arduino
PORT = "/dev/ttyUSB0"
PORT = "/dev/ttyACM0"
Compile and upload EMC-2-Arduino firmware using the above Makefile:
./setup_hardware_for_linux_CNC.sh
look for any errors that may be logged in this part of the process
Notes:
The Green Button with a check-mark in the upper right-hand of the toolbar on the desktop will manually power-up the entire board, and must be done prior to starting linuxCNC (which has it's own Safety-unlock and Run-enable icon buttons in the upper left of the application window). Also, notice when fully activated each power-supply Fuse OK green indicator LED should be lit.
Once the output section is powered on, you can open a terminal window with Ctrl+t and run ls -l /dev/tty* and lsusb commands to list which Arduino is connected to the system.
The Red stop-sign Button in the upper right-hand of the toolbar toolbar on the desktop will power-off the output sections of the board including the Arduino. We still recommend an e-stop power button, but do recommend trying it out a few times to get comfortable manually emergency-stopping the machine.
There are e-stop and process-hold logic inputs defined and labeled on the board, but these will always be firmware specific. This is why there is this Stop-Sign option that pulls the plug on the power section if something goes wrong, or if the pi3 reboots at some point.
Welcome to the forum, and let us know if this gets you running linuxCNC.
J
Serial Comms cont
OK
We (TobyD & myself) had assumed that the UART serial mode was the normal/default comms method as it avoids the busy RPi USB- do everything comms chip, and also the "USB to Serial Transmission errors" problem in "Known Issues" in the GRBL Wiki.
Given that E2A uses the same?ish comms method as GRBL, is there anything known about how this issue may affect E2A?
Are there and workarounds in the offing? I'm not above a little PCB surgery when needs be
MrGreg
Edit BTW how do I add hyperlinks without upsetting the forum sentinel
USB cable
The server rules were loosened, and should be fine for normal URL. You can simply highlight the words you want to be a link, and click on the toolbar chain-icon to set the target to "_blank". This makes a click open a new window/tab for off-site resources.
The two arrows in the photo below show the 4 jumpers that are/should be removed on the gen2 units, so the USB port can be connected without sending a duplicate data steam to the pi's UART. The USB drivers have already been set with the udev overrides to prevent stream corruption from the Network Manager probing for modems.
All firmware in ~/APPS/infinity were tested on several Arduino models. However, not all firmware are interchangeable with every application. bCNC is usually used with GRBL, Marlin with printrun, and EMC-2-Arduino with the LinuxCNC specific RT api driver. They do share some similarities, but very different communication formats.
Was "E2A" referring to another firmware variant you wished to import?
More on serial
OK Cheers
By E2A I meant EMC-2-Arduino
The known grbl - usb comms issue I was flagging was This
Specifically the "USB to Serial Transmission errors" section. This is related to the Arduino comms chip including the 16U2. My concern is that it is the USB comms method via this chip may have the same problem when used for E2A (EMC-2_ Arduino) as with GRBL?
Hence my enquiry.
We will use the USB method for now, however, I would be interested in any ongoing workarounds to getting the uart serial working, even if they are not yet proven
Cheers
MrGreg