grblhal / sam3x8e Goto Github PK
View Code? Open in Web Editor NEWgrblHAL driver for Atmel SAM3X8E (Arduino Due)
License: Other
grblHAL driver for Atmel SAM3X8E (Arduino Due)
License: Other
Hello Guys,
i compiled grblHAL with your guide(Arduino) for a Arduino Due
I added a my_machine_map.h to reflect the pinout used by the Arduino CNC shield.
I tried to upgrade from a Arduino UNO to a Due to give more raster engraving performance.
Everything seems to work fine except for the Limit switches.
I was running NO switches to GND (not best practice, I know), without problems with the Arduino UNO and grbl.
With grblHAL i cant get that to work.
As grblHAL expects NC to GND, I would have needed to invert the limit switches.
I expected:
Without inverting, the limit switches should be trigged without the switches pressed as the pin would be high without the limit switch pressed
I got (without inverting the switches with $5=1):
Switches show trigged without pressing them. Pressing the switches shows "not trigged" -> everything seems correct.
However I got (WITH inverting the switches $5=1):
Switches show trigged with and without pressing them. They show no reaction to the pin state.
I checked, the pull-ups are still activated as I have 3,3V on the limit switch pins without pressing them (and 0V if I press them).
Seems like something messes up the inverted state of these pins?
i want to make a pcb engraving machine with arduino due, please add BESC Spindles, and tmc driver
support
Hi, First of all, thank you for this project.
After uploading, there is an error: 9, 18. I changed $ 14 to 7 and the alarm disappears.
But the problem I am struggling with is connecting the motors. After connecting the Protoneer v3 CNC board, there is always power on the motors control pins. I have implemented every map and this problem is always there.
What should I change to solve this problem?
My staff:
Protoneer CNC Shield V3 (red)
Arduino Due Atmel SAM3X8E ARM Cortex-M3 CPU
Thanks for any advice.
hi,
i found this Due Core baord which is have EEPROM
can it use with GRBL HAL ?
here's the datasheet
http://www.inhaos.com/uploadfile/otherpic/DOC-DUE-CORE-V03-20200722.pdf
thanks
Happy new year!
I have two systems build for my CNC maschine to test which is better.
The first system is with a BlackPill and CNC-shield. 4 axis with ganged Y-axis. This system runs well.
Then I have build a second system with Arduino DUE and Ramps 1.6, because Ramps have 5 axis and 2 hard limits pro axis.
But the second/ganged Y-axis does not work. I have testet the second axis on the Ramps board on E0 and E1, but without success.
Have you an idea where are my mistake? Attached my json-file to see my configuration what I have build.
SAM3X8E_RAMPS_16.json
Many thanks in advanced,
Helmut
Hi,
I am trying to move from GRBL on a CNC shield to GRBLHAL on SMART RAMPS and Due. I am using NPN NO inductive sensors.
I am having issues getting the end stop config to work using the $5 parameter. I have included the result of the different options below.
$5 = 0
Both Y axis end stops working (auto square) Each one just triggers Y, should they not be Y & Y1?
X & Z do not change state when actuated. They are shown as triggered and don’t change when actuated.
$5 = 1
Both Y axis end stops working (auto square) Each one just triggers Y, should they not be Y & Y1?
X is triggering but is inverted. Z is same as $5 = 0
$5 = 2
All inputs are shown as triggered when not, do not change state when actuated.
$5 = 3
X is triggering but is inverted. Others are shown as triggered but do not change state.
$5 = 4
Y is same as $5 = 0. Z is now working but is inverted. X is not responding.
$5 = 5
XYZ is responding but XZ are inverted.
$5 = 6
XY is inverted and not triggering, Z triggers but is inverted.
$5 = 7
XY is inverted and not triggering, Z triggers but is inverted.
Any help is greatly appreciated!
Jack
I am not able to compile this to my arduino. I had someone at my work help me and it says it complied and is on the due, except I can't get it to link to lightburn or lasergrbl. It has the com port and I can read it through get board info in arduino ide. That is about it. I am getting this on the log file from lightburn.
LightBurnLog.txt
Any help is much appreciated. I am currently using a mega on my machine now but want to go to the 32 bit.
In the web builder the probe input checkbox is greyed out when selecting Ramps SMART board. I also tried the Probing add-on plugin but get this error - DIGITAL IN: available 3, required 4.
I also tried compiling using the Arduino IDE and also get an error when enabling the probe input.
Thanks for the help getting up and running. Unfortunately I have now an issue with running jobs successfully (sorry to be a pain).
Every time I manually end a job, or the job finishes, the board crashes.
Using IOsender I sometimes receive the error message "unhandled exception - COM port does not exist" when I manually stop a job, but more often than not the software just hangs and I can't kill the process in task manager until I physically unplug the USB cable.
Whenever a job finishes the result is the same, returning to home from the final coordinates causes the board to disconnect and hangs IOsender. I tried UGS and the same thing happened. Sometimes it happens in the middle of a job too, though not as often.
I have also tried running a job on the board with the board by itself (not in the machine, nothing connected except USB cable), and the same thing happens.
I can't monitor the console output at the time of it happening as it hangs, so I'm not even sure what line of gcode is causing this.
I love the speed grblHAL has allowed me to reach with laser engravings, but I am experiencing far too many crashes for it to be usable.
Have I done something wrong, missed a setting? Any log files I can check?
Thanks.
Hello everyone,
I've been trying to get grblHAL to work on a g2core shield that I have after not being completely happy with that firmware, but I'm running into some problems that I can't debug.
The main issue is that my machine has two motors for the Y axis, so I've enabled Y_GANGED
and Y_AUTO_SQUARE
, but the secondary Y axis moves only on one direction all the time, e.g. if I ask for a positive movement primary Y moves positive and so does secondary Y, but if I ask for a negative movement primary Y moves negative but secondary Y moves positive again. I've swapped motors, drivers, wirings and pins assigned to secondary motor on my_machine_map.h
and the problem remains, so I can't think about any other source but software.
Thank you in advance for any help.
So with the arduino due my laser is always on. I have a mega also, lightburn had an update so I used the two to make sure it was only the due. When I plug it in the mega the laser acts like it should. However when I plug in the due the laser is on all the time. When i fire the laser my fan on my atomstack laser turns off. I tried to see the difference between the mega load I have for mapping and the due. The only thing I see is on the due it has this, #define SPINDLE_PWM_PIN 23 // Due Digital Pin 7 / PWML6 B. I do not know what the pwm6l b is. The mega does not have that. Any help would be appreciated.
Possible solution Could I just take the mega map I have and open the due mega map delete it all and paste in the mega map I know works?
The shield pin maps for SAM3X8E have pins A.00 and A.01 swapped. PA0 (A.00) is CANTX, and PA1 (A.01) is CANRX.
The correct pin sequence on Due connector P10 is:
Pin Port Fn
1 B.17 A8
2 B.18 A9
3 B.19 A10
4 B.20 A11
5 B.15 DAC0
6 B.16 DAC1
7 A.01 CANRX
8 A.00 CANTX
Hello,
I tried to enable the second serial port to use it for a keypad/MPG. Unfortunately, the controller does not respond to any command I am sending to it. I tried also the other ports than the defined one.
I started with the obvious modification of the my.machine.h:
#define KEYPAD_ENABLE 2
#define SERIAL2_DEVICE 1
After some research I added also this line, which is not original part of the file:
#define MPG_ENABLE 1 (or 2)
After some more research, I found out that other implementations include this part in their their driver.c, which is missing in the implementation for the Due:
serialRegisterStreams();
#if MPG_MODE == 1
if((hal.driver_cap.mpg_mode = stream_mpg_register(serialInit(115200), false, NULL)))
protocol_enqueue_rt_command(mpg_enable);
#elif MPG_MODE == 2
hal.driver_cap.mpg_mode = stream_mpg_register(serialInit(115200), false, keypad_enqueue_keycode);
#elif KEYPAD_ENABLE == 2
stream_open_instance(0, 115200, keypad_enqueue_keycode);
#endif
After adding this section to my driver.c file, the compiling of that code fails because the 'keypad_enqueue_keycode' is unknown.
Anyone an idea what to do next?
Best regards
Georg
Pins are not making sense of their defines
e.g. X_STEP_PIN is not 16 (or A0 as commend says) but its 54 on Arduino Due + Ramps
Z_STEP_PIN should be pin 46 on Arduino Due so comment is this time correct but actual define isn't
How this should work or edited to work? This is unchanged original file which just fries my board if use even this should be made for Arduino Due + Ramps
hi I'm trying to compile using Arduino IDE for sam3X8E. I add all the libraries . but it gives tons of error . please help me to compile with steps
Available driver options are missing, the link is broken
I have tried to communicate VFD via RS485 with the MAX485 chip. But unfortunately, the controller failed to communicate with the controller due RS485 direction driver pin issue. After several testing, I found a fix. Please review and update the repo.
file lib/grblHAL_Due/src/serial.c
line 402 needs to change as,
return BUFCOUNT(tx2buf.head, tail, TX_BUFFER_SIZE) + !(SERIAL2_PERIPH->US_CSR & US_CSR_TXEMPTY);
I am trying to add an analog input to measure the arc voltage of a plasma cutter using the THC plugin.
This is with no changes to the ramps_smart_map.h file.
[PIN:A. 14,Aux in 0,Cutter up]
[PIN:D. 0,Aux in 1,Cutter down]
[PIN:D. 2,Aux in 2,Arc ok]
I then added these lines to the ramps_smart_map.h file
#define AUXINPUT3_PORT PIOB
#define AUXINPUT3_PIN 20 // Analog input for THC - Due D65/A11 // AUX-2 Connector
This is the result of $pins
[PIN:A. 14,Aux in 0,P0]
[PIN:D. 0,Aux in 1,Cutter up]
[PIN:D. 2,Aux in 2,Cutter down]
[PIN:B. 20,Aux in 3,Arc ok]
Everything got shifted down a level. Do I need to define that this pin (B20) is an analog pin somewhere?
My NC Limit switches trigger alarm when machine is jogged to limit. However, homing cycle crashes through z max limit. Tried with UGS and gsender.
Trying to use this code in Arduino Due board, with Arduino IDE (these instructions followed below)
Output what Ive will be only errors saying Im missing files, started by #include grbl/grbllib.h
I even tried manually put all those files into ~grblHAL_Due/src/ and ~src/grbl folders what IDE telling to be missing (took files from core master) but then theres just infinite errors, its not feeling anyway right way to repair this
https://github.com/grblHAL/core/wiki/Compiling-GrblHAL
Arduino IDE section
So I did all the test on the due. it all works and now I have finally found this issue but have no idea how to fix it. So I have my scope hooked up to the pwm wire out of pin 7 and the ground on the same bank. If I use a 1ft wire works flawless. If I use 10ft wire it has a voltage flux of .7 to 1.5v? I am completely baffled at this point.
I have to confess that I am a complete bumblefuck when it comes to C code, but I can't get the SAM3X38 driver to compile. It fails with the following error messages:
/home/tony/snap/arduino/current/Arduino/libraries/grblHAL_Due/src/driver.c: In function 'driver_init':
/home/tony/snap/arduino/current/Arduino/libraries/grblHAL_Due/src/driver.c:1663:9: error: 'i' undeclared (first use in this function)
for(i = 0 ; i < sizeof(inputpin) / sizeof(input_signal_t); i++) {
^
/home/tony/snap/arduino/current/Arduino/libraries/grblHAL_Due/src/driver.c:1663:9: note: each undeclared identifier is reported only once for each function it appears in
Multiple libraries were found for "grblHAL_Due.h"
Used: /home/tony/snap/arduino/current/Arduino/libraries/grblHAL_Due
Not used: /home/tony/snap/arduino/current/Arduino/libraries/src
exit status 1
Error compiling for board Arduino Due (Programming Port).
There are some oddities:
The first is that the code snippet in the error does not appear at line 1663, but does appear in several other places. It also looks like the index variable i IS declared as uint32_t a few lines above.
I have tried removing and re-adding the libraries, and compiing for the native USB port. Same problem.
Hi,
I've been trying to set up my machine with the Trinamic TMC 5160 drivers that use SPI mode. Looking through this current implementation, it doesn't look like the SPI bus was implemented as a HAL layer for the Arduino Due.
Before I start writing any HAL interface for the SPI bus of the Due, I just wanted to make sure this is not already implemented.
Looking through the different Trinamic configuration options, I see that there is an I2C->SPI bridge which is a bit confusing.
If anyone could point me in the right direction as to how to go about implementing this SPI functionality; that would be greatly appreciated.
What's currently getting me stumped is how to implement the chip-select (CSN) SPI specific functionality.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.