Welcome! Log In Create A New Profile

Advanced

RAMPS 1.3 with Techzone opto-endstops

Posted by jsadusk 
RAMPS 1.3 with Techzone opto-endstops
June 05, 2011 07:53PM
I just got a RAMPS 1.3 board to replace the Techzone set that has caused me so many problems. It seems to be working, moving the axies and heating the extruder, but my endstops don't seem to be working. I'm trying to use the same endstops I had from my techzone set, because of that entire set they seemed to work fine. I've wired them up with the same pin configuration in the wiki page, the LED comes on on the endstop, but it doesn't seem to notice when something passes between the sensors. Before the LED would go off when something went between, now it stays solid. Homing my axies causes them to crash into the sides. I'm using the ramps_FiveD firmware right now, but I've tried Tonokip also and get the same results. I've also tried a couple spare endstops to see if it was just the ones on the machine and I get the same results. Does anyone know what's going on here?

For whatever it's worth, the endstops have H21LOB printed on them. ramps_FiveD has that as an option and so I configured to use it. No difference.
Re: RAMPS 1.3 with Techzone opto-endstops
June 05, 2011 09:14PM
you need to swap the black and white wires on one end of the cable.
Re: RAMPS 1.3 with Techzone opto-endstops
June 05, 2011 11:16PM
Did that. And I tried every other pin combination on my spare endstop. With no pin combination does the LED come on while its unblocked but go off when its blocked.
Re: RAMPS 1.3 with Techzone opto-endstops
June 06, 2011 05:02AM
You might have damaged the endstop while poking around. But I suggest using mechanical endstops, they are much more reliable.
[www.reprap.org]


--
-Nudel
Blog with RepRap Comic
Re: RAMPS 1.3 with Techzone opto-endstops
June 06, 2011 08:27AM
I'm also about to switch from TZ gen 3 remix to RAMPS and I was also thinking of using the opto endstops that I already have on the Mendel. So, I'm interested in knowing if the opto endstops I have, which looks exactly the same as shown in the TZ wiki, is pin compatible with RAMPS. I understand that the order is different in RAMPS where GND is the middle pin while the opto signal is the middle pin in the opto endstop. Are there any needed firmware changes?
Re: RAMPS 1.3 with Techzone opto-endstops
June 06, 2011 03:15PM
I would move to mechanical endstops, and even have the switches to do so, but I don't have a good way of mounting them and until I have endstops I don't have a working printer to make mounts. I see that the Prusa mounts work fine for microswitches, but I have a Sell's mendel. I can't see where you'd put at least the Z axis switch, and I'd need something stiffer than my current flag mounted on the z axis to hit the switch.
Re: RAMPS 1.3 with Techzone opto-endstops
June 06, 2011 10:09PM
You can print without endstops. Just dont do any homing in your start.gcode and manually position before a print.
Re: RAMPS 1.3 with Techzone opto-endstops
June 07, 2011 12:15PM
True, its a pain but I guess I could get it working long enough to print something to mount the switches with. Has anyone used mechanical endstops on a non Prusa mendel?
Re: RAMPS 1.3 with Techzone opto-endstops
June 07, 2011 03:01PM
jsadusk Wrote:
-------------------------------------------------------
> Did that. And I tried every other pin combination
> on my spare endstop. With no pin combination does
> the LED come on while its unblocked but go off
> when its blocked.


I'm not sure what firmware you're using but in the Sprinter firmware that I just downloaded, there's a section on endstops in the configuration.h file.

//Endstop Settings
#define ENDSTOPPULLUPS 1
const bool ENDSTOPS_INVERTING = false;
const bool min_software_endstops = false; //If true, axis won't move to coordinates less than zero.
const bool max_software_endstops = true;  //If true, axis won't move to coordinates greater than the defined lengths below.
const int X_MAX_LENGTH = 220;
const int Y_MAX_LENGTH = 220;
const int Z_MAX_LENGTH = 100;

The wiki (http://www.reprap.org/wiki/Mechanical_Endstop) says that the Techzone endstops is normally high (opposite from mechanical switch which is normally ground) so I think that ENDSTOPS_INVERTING should be set to true. I also think that ENDSTOPPULLUPS need to be set to 0. If not, the opto endstop might not be able to pull the signal to ground when the path is interupted by the endstop flag.

Can someone verify if my understanding is correct before I do this myself?

I'm also not quite clear why const bool min_software_endstops is not set to true by default. Someone please explain.

Thanks.
Re: RAMPS 1.3 with Techzone opto-endstops
June 07, 2011 07:12PM
I converted from Gen3 electronics to Ramp V1.2. Used the opto endstops from my Techzone kit and wiring it per the ramps website. used Tonokip firmware const bool ENDSTOPS_INVERTING = true and they worked find. I had to check a few versions of this firmware in order to get one that would read these endstops but I wouldn't recommend reversing wires or you might blow your H21LOB. You will know it because the light won't go on. You can get a replacment chips in the Ultimachine website.

The firmware that would run the endstops wouldn't turn on a fan (D9) but I managed to add some code to the firmware that allowed M106 M107 commands.

Don't give up on the opto endstops.
Dean
Re: RAMPS 1.3 with Techzone opto-endstops
June 07, 2011 07:28PM
jsadusk Wrote:
-------------------------------------------------------
> True, its a pain but I guess I could get it
> working long enough to print something to mount
> the switches with. Has anyone used mechanical
> endstops on a non Prusa mendel?

The pics on the wiki are of my sells mendel, though it is using prusa endstop holders. http://www.reprap.org/wiki/Mechanical_Endstop#Switch_mounting

It's no problem to print without endstops, just make sure you home the mahcine before you power it up. (At least I have to with repsnapper and the fived firmware I'm running atm). You might also have to disable endstops in firmware.


--
-Nudel
Blog with RepRap Comic
Re: RAMPS 1.3 with Techzone opto-endstops
June 07, 2011 08:12PM
@Nudel - how reproducible is the mechanical switch on the z-axis? I think the x and y is not that critical since I don't home at every layer. But the z-axis needs to be reproducible to less than 0.1 mm in order to make sure that the first layer is at the correct height since I, as well as most people here, don't use a raft.
Re: RAMPS 1.3 with Techzone opto-endstops
June 07, 2011 08:15PM
dean448 Wrote:
-------------------------------------------------------
> I converted from Gen3 electronics to Ramp V1.2.
> Used the opto endstops from my Techzone kit and
> wiring it per the ramps website. used Tonokip
> firmware const bool ENDSTOPS_INVERTING = true
> and they worked find. I had to check a few
> versions of this firmware in order to get one that
> would read these endstops but I wouldn't recommend
> reversing wires or you might blow your H21LOB.
> You will know it because the light won't go on.
> You can get a replacment chips in the Ultimachine
> website.
>
> The firmware that would run the endstops wouldn't
> turn on a fan (D9) but I managed to add some code
> to the firmware that allowed M106 M107 commands.
>
>
> Don't give up on the opto endstops.
> Dean

Thanks for confirming that ENDSTOPS_INVERTING needs to be set true . How about the ENDSTOPPULLUPS? Do I need to comment that #define statement out?
Re: RAMPS 1.3 with Techzone opto-endstops
June 08, 2011 02:38AM
brnrd Wrote:
-------------------------------------------------------
> @Nudel - how reproducible is the mechanical switch
> on the z-axis? I think the x and y is not that
> critical since I don't home at every layer. But
> the z-axis needs to be reproducible to less than
> 0.1 mm in order to make sure that the first layer
> is at the correct height since I, as well as most
> people here, don't use a raft.

It's quite high actually, though far from perfect in the long run. When it was dialed in I think I adjusted it once every two-three days or something. And that was mostly needed because of hot end or carriage tweaks.

The main problem is it's terrible difficult to adjust, you have to wiggle it a bit and hope for the best. I have designed an adjustable holder, but it's not ready for prime time yet.
Re: RAMPS 1.3 with Techzone opto-endstops
June 08, 2011 04:25AM
The firmware I'm using doesn't have ENDSTOPPULLUPS.
Re: RAMPS 1.3 with Techzone opto-endstops
June 08, 2011 05:10AM
Mine neither dean448. That means you need to have the physical pullup resistors as described on the wiki.


--
-Nudel
Blog with RepRap Comic
Re: RAMPS 1.3 with Techzone opto-endstops
June 08, 2011 07:26AM
Quote
Nudel
brnrd Wrote:
-------------------------------------------------------
> @Nudel - how reproducible is the mechanical switch
> on the z-axis? I think the x and y is not that
>...

It's quite high actually, though far from perfect in the long run. When it was dialed in I think I adjusted it once every two-three days or something. And that was mostly needed because of hot end or carriage tweaks.

Once I set my bed height by adjusting the opto endstops, it stays for weeks unless I nudge the flag by accident. Yesterday, I was reminded of the disadvantage of opto endstops. I did some work on the x-axis and I forgot to check all the flags before I printed a part and crashed the tip onto the bed. Luckily, nothing broke. I just had to readjust the flag and relevel the bed. I'm planning to redesign the endstop flags for the z axis to make it less prone to this.

Quote
Nudel
Mine neither dean448. That means you need to have the physical pullup resistors as described on the wiki.

I didn't see that in the wiki. I looked at the schematic for Gen 3 and I don't see pullup resistors in the endstop signals. Also, in Sprinter, I see the code to set the endstop pins to high if ENDSTOPPULLUPS are defined that I don't see in the Five-D firmware for Gen 3.

  //endstop pullups
  #ifdef ENDSTOPPULLUPS
    if(X_MIN_PIN > -1) { pinMode(X_MIN_PIN,INPUT); digitalWrite(X_MIN_PIN,HIGH);}
    if(Y_MIN_PIN > -1) { pinMode(Y_MIN_PIN,INPUT); digitalWrite(Y_MIN_PIN,HIGH);}
    if(Z_MIN_PIN > -1) { pinMode(Z_MIN_PIN,INPUT); digitalWrite(Z_MIN_PIN,HIGH);}
    if(X_MAX_PIN > -1) { pinMode(X_MAX_PIN,INPUT); digitalWrite(X_MAX_PIN,HIGH);}
    if(Y_MAX_PIN > -1) { pinMode(Y_MAX_PIN,INPUT); digitalWrite(Y_MAX_PIN,HIGH);}
    if(Z_MAX_PIN > -1) { pinMode(Z_MAX_PIN,INPUT); digitalWrite(Z_MAX_PIN,HIGH);}
  #endif

So, I think this means that I need to comment out the #define ENDSTOPPULLUPS statement in Sprinter and I don't need to install pullup resistors either to use the TX Gen 3 Remix opto endstops.
Re: RAMPS 1.3 with Techzone opto-endstops
June 08, 2011 07:53AM
From http://www.reprap.org/wiki/Mechanical_Endstop#Switch_wiring :
"Note: if you use Teacup Firmware, resistor R1 and the connection to 5V are obsolete. The ATmega has internal pullup resistors, which can be turned on with the USE_INTERNAL_PULLUPS flag. See config.h.dist, there."

This might be true for other firmwares as well. If you don't have this option in the firmware, you need physical pullup resistors. The gen 3 opto endstops have pullup resistors on the board, so if you use those you should not change the flag.


--
-Nudel
Blog with RepRap Comic
Re: RAMPS 1.3 with Techzone opto-endstops
June 08, 2011 08:08AM
Thanks. So, I will set my configuration.h file for sprinter like this and see how it goes:

//Endstop Settings
//#define ENDSTOPPULLUPS 1
const bool ENDSTOPS_INVERTING = true;
Re: RAMPS 1.3 with Techzone opto-endstops
June 08, 2011 08:12AM
I just thought of a way to combine the best of mechanical and opto endstop for the z-axis. Why not connect both of them in parallel? I can set the mechanical switch to be lower than the opto endstop. This way, if the opto fails when the flag is misaligned, then the mechanical switch could serve as a backup. To be compatible, I would set the switch in the normally open configuration.
Re: RAMPS 1.3 with Techzone opto-endstops
June 08, 2011 07:49PM
This was the firmware that was able to read opto endstops with no hardware modification on ramps V1.2
However it has limited M code functionality.

https://github.com/prusajr/Tonokip-Firmware
Re: RAMPS 1.3 with Techzone opto-endstops
June 08, 2011 09:38PM
I understand that the Sprinter firmware that I'm setting up to use is a derivative of the Tonokip firmware.
Sorry, only registered users may post in this forum.

Click here to login