New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There are some official project to port GRBL on Arduino Mega with RAMPS #561
Comments
http://sourceforge.net/projects/grblforramps14/ seems to be usable |
Thanks, I know it, but the source code is modified in a strange way, not very integrated with the main codebase. Carlo D. (onekk) |
At the moment the MEGA is not offically supported by GRBL, I have been doing my best to support the MEGA and keep the MEGA code fully functional. GRBL is written to be very efficient with its writting to the step and direction ports and to make it so efficient all the step pins are on one port and all the direction pins are on one port. The compatibility issue with the RAMPS board is that all the step and direction pins are on almost random ports to best suit the routing of the PCB. There was a conversation going on about rewriting the section of the code to allow step pins and direction pins to be on completely seperate ports ( which will drop some efficiency but gain compatability ) which will most likely occur in Version 1.0 At the end of the day it is not that hard to do, but the extra code needed would exceed the flash space of the UNO ( the offically supported board ) If I get some time I will look into it. |
Sure that it will exceed the flash? If so there is the false approach. On 328 branch, the update_step_pins() is no op because there should be one |
maybe not naming it CPU_MAP_ATMEGA2560 , instead name it PU_MAP_ATMEGA260_RAMPS_1_4 |
It will be a very useful improvement, altough it is very available on the market, for example for shapeoko the gshield shipped from the us will cost 50$ plus 50$ of shipping (and it lacks of the Arduino) RAMPS with Arduino MEGA 2560, plus 3 endstop, plus cabling and fan will cost 80 Euro plus 10 Euros for shipping (from Spain to Italy) (it has 5 poulu drivers on it and an Arduino MEGA). Regards Carlo D. |
Can you write me down the pin mapping, using the constants on the ramps wiki for pinout. I can code it, but cannot test it. |
Yes i can write you down the pinout but i can't test it as my card isn't arrived yet, let me see if this is what you want? // For RAMPS 1.4 #define Y_STEP_PIN 60 #define Z_STEP_PIN 46 #define E_STEP_PIN 26 #define SDPOWER -1 #define FAN_PIN 9 #define PS_ON_PIN 12 #define HEATER_0_PIN 10 This is what is on the wiki. TIA and Regard Carlo D. |
Yes, this is what i have extracted with awk. The lines where after "//" is "NA" is wrong, because it was -1 // For ,,0 // RAMPS -- #define Y_STEP_PIN F,6,0 // 60 -- #define Z_STEP_PIN L,3,0 // 46 -- #define E_STEP_PIN A,5,0 // 26 -- #define SDPOWER A,7,0 // NA -- #define FAN_PIN B,1,0 // 9 -- #define PS_ON_PIN B,4,0 // 12 -- #define HEATER_0_PIN B,2,0 // 10 -- |
cri-s please these settings are a base to make the foundation of the PU_MAP_ATMEGA260_RAMPS_1_4 in cpu_map.h ? i have give a look at hte source and din't see any resemblance of the format in it, as example i have #ifdef CPU_MAP_ATMEGA2560 // (Arduino Mega 2560) Working @EliteEng // Serial port pins // Increase Buffers to make use of extra SRAM // Define step pulse output pins. NOTE: All step bit pins must be on the same port. Many thanks for your kindness Regards Carlo D. |
from a quick look at the notes on the code, and at the pins from RAMPS i noted that "NOTE: All step bit pins must be on the same port.", maybe i can use the RAMPS shield (wich has 5 driver to drive the steppers) and wire them by hand with a flat cable and two connectors according the ATMEGA 2560 pinout by @EliteEng in the code (if it is functional). Regards Carlo D. |
if the manipulation of input/output pins were #defines it should be easy to change the underlying code for different platforms and not change anything for the main grbl |
Langwalt, it seems that your statement is not true as is stated in this conversation some post up: GRBL is written to be very efficient with its writting to the step and direction ports and to make it so efficient all the step pins are on one port and all the direction pins are on one port. The compatibility issue with the RAMPS board is that all the step and direction pins are on almost random ports to best suit the routing of the PCB. The only solutions i see is to accept this statement and wiring up by hand using a flat cable and some connectors the signal to the stepper motor and for the limit switch from the Mega to the RAMPS, keeping the connections short or using some shielded cable, maybe some audio shielded cable for each dir and step signal, but I'm open to other alternatives, there are some implementations for the Mega 2560 but the code is modified in a manner that maintaining it when the main code change is difficult. Thanks |
Hi chaps, Instead of going to the bother of creating some weird wire solution to connect an Arduino This board is sandwiched between the Arduino and the RAMPS. I also have 4 axis GRBL code here: (modified for my setup) Again; take and modify to your requirements. I do not have the time to support any technical queries. Best regards, |
Hi Bob, Your solution is very nice and will be a very quick solution for my need, the pcb manufacturer solution seem to be a viable solution but not for a single board, it is a great solution if it came pcb only or maybe in kit, maybe someone other than me is interested in it, have you done some marketing for it. Many thanks and best regards, |
Is there someone that can put arduino uno shield on arduino mega and tray out if it works . |
for uno shield: for ramps: The uno version is less modified. |
hi cri-s, i have noted the links, but for now i haven't the board yet, could you send me a link to the sources, you have modified maybe on github so i can see them, waiting for the real board to arrive? TIA and regards. Carlo D. |
Actually i have only made step, dir and enable pins. 189a190,216
|
Thanks, i will see tomorrow Carlo D. |
cri-s what file are you modifing, the paste of the code in Markdown is too crappy, could you gave me maybe a gist of the files? |
cri-s I have found this version on github, maybe it will be a base for future develpment? https://github.com/LETARTARE/Grbl-xx_with_Arduino/tree/master/Grbl9fMega2560 Regards Carlo D. |
this is the diff |
cri-s Best Regards Carlo D. |
chamnit it's OK for me. Regards |
I have just bought and Arduino Uno solution, for now the Mega2560 is a stalled project, maybe i will build a reprap with marlin on it. Many thanks, to all, but the Mega and the ramps seemed to be a good idea, but from now i want to have a ready made solution, the machine is intended to be a work horse so to be ready without pains is the most viable solution. Regards |
Please see my repo https://github.com/EliteEng/grbl master branch. I have added the ability to have the step and direction pins on different port which will allow the use of the RAMPS board. I have started adding the RAMPS board to the cpu_map.h but it still needs a bit of work to get all the pins in the correct location. |
Many thanks for the reply, when I receive the boards and the machine (eShapeoko didn't answer me yet and didn't know when) I will try your solution. As the moderator told me this tread is becoming too long and tend to be off-topic there is another manner to comunicate? Regards Carlo D. |
I have found some project on internet but they are not much in sync with GRBL, it was a pity not to use/support the widespread and cheap electronics from the reprap to use with CN.
I know that there are more project to use it but the fragmentation on efforts is the hell of the opensource project.
Regards
Carlo D. (onekk)
The text was updated successfully, but these errors were encountered: