How to implement limit on the Arduino Mega 2560 and Cw

You can discuss various control electronics here. RAMPs, Arduinos, Motor Controller boards & etc...
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
dalaura10
Posts: 50
Joined: Mon Nov 10, 2014 1:26 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

How to implement limit on the Arduino Mega 2560 and Cw

Postby dalaura10 » Sat Aug 29, 2015 5:13 pm

Hello everyone
Does anyone happen to know how do I for a limit on the Z axis of a DLP printer that works with the CW , and Marlim , ramps . ?

I thank you for the attention

sodium
Posts: 159
Joined: Thu Jan 01, 2015 2:56 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: How to implement limit on the Arduino Mega 2560 and Cw

Postby sodium » Sat Aug 29, 2015 6:52 pm



this is my working marlin firmware, with upper and lower limits. the upper is for security reasons, but not really needed. check all endstop settings and comments . its easy to understand. Also check #define X_MAX_POS 205 ( change value to your z axis travel ).

dalaura10
Posts: 50
Joined: Mon Nov 10, 2014 1:26 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: How to implement limit on the Arduino Mega 2560 and Cw

Postby dalaura10 » Fri Sep 18, 2015 2:06 pm

Hi, tahnks for your help. I had a problem working with your code.
Look at:


Arduino: 1.6.4 (Windows 7), Placa:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

SdFatUtil.cpp.o: In function `SdFatUtil::FreeRam()':
C:\Users\Windows\AppData\Local\Temp\build8906941252038550266.tmp/SdFatUtil.cpp:33: undefined reference to `SdFatUtil::__brkval'
C:\Users\Windows\AppData\Local\Temp\build8906941252038550266.tmp/SdFatUtil.cpp:33: undefined reference to `SdFatUtil::__brkval'
C:\Users\Windows\AppData\Local\Temp\build8906941252038550266.tmp/SdFatUtil.cpp:36: undefined reference to `SdFatUtil::__bss_end'
C:\Users\Windows\AppData\Local\Temp\build8906941252038550266.tmp/SdFatUtil.cpp:36: undefined reference to `SdFatUtil::__bss_end'
collect2.exe: error: ld returned 1 exit status
Erro compilando.

Este relatório deveria ter mais informações
"Mostrar saída verbosa durante a compilação"
habilitado em Arquivo > Preferências.


The sentences are in Portuguese but it does not matter.
Can you help me with this?
thanks

sodium
Posts: 159
Joined: Thu Jan 01, 2015 2:56 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: How to implement limit on the Arduino Mega 2560 and Cw

Postby sodium » Fri Sep 18, 2015 6:45 pm

just tried in arduino ide 1.0.6 and compile fine, but not in 1.6.5. two choices:

- compile and upload with the old arduino ide, or
- try to update the libraries yourself.

im not a programmer guru, so try the first option.

dalaura10
Posts: 50
Joined: Mon Nov 10, 2014 1:26 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: How to implement limit on the Arduino Mega 2560 and Cw

Postby dalaura10 » Sat Sep 19, 2015 7:15 pm

sodio
Thank you for your prompt reply
I uploaded with Arduino and now 1.0.5 installed .
My question is :
which pin to use for the end of course , want to take the construction platform for home? If use the pin 18 and returns to the platform a few millimeters , this can not happen because then the construction of the platform is not in the exact house.

sodium
Posts: 159
Joined: Thu Jan 01, 2015 2:56 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: How to implement limit on the Arduino Mega 2560 and Cw

Postby sodium » Sun Sep 20, 2015 11:11 am

you want to use two limit switches? or only the lower one ? i dont understand your question very well ...

really, only one limit switch is needed to operate the printer, the one used to home the machine( Z0 ). i use another one at the other end of the axis for security purposes, but not really needed.

if use a ramps 1.4 shield, you can have two end stop or limit switches per axis.

dalaura10
Posts: 50
Joined: Mon Nov 10, 2014 1:26 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: How to implement limit on the Arduino Mega 2560 and Cw

Postby dalaura10 » Mon Sep 21, 2015 6:48 pm

I'm sorry about my English. Some times I can not write in English as i think in Portuguese.

When i use pin 18 (minimum Z) my plataform goes down, find the dispositive wich closes the pin 18 and GND, and then goes up a few milimeters. I want it to stay exactly where is the travel end without goes back. My aplication here uses a travel end to start printing. I have a dispositive that "closes" the pin 18 when my platform goes to the start printing position.

I do not want it to gooes back after find zero position, i want it to stay there and then i will start printing from there.

I do no know if i am using the correct pin, or something else. But my aplication here is not as i want.

sodium
Posts: 159
Joined: Thu Jan 01, 2015 2:56 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: How to implement limit on the Arduino Mega 2560 and Cw

Postby sodium » Tue Sep 22, 2015 11:04 am

I dont know if cw directly or marlin firmware do that.
When i hit home buttom, the plataform goes down until hit the end stop. Then, goes back a few milimeters, but quickly goes down again to the end stop posición. At this point , z is 0 and you can start print.
If i understand you, your plataform goes down, hit the end stop, goes up a few mm and stop.
Try enter M114 at command líne and see where z is .


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable