Welcome! Log In Create A New Profile

Advanced

strangest problem ever!

Posted by Jorge Nunes 
strangest problem ever!
April 07, 2009 07:51PM
Hi!

We are having a lot of problems with the assembly'working of our reprap. The most recent, without any scientific reason (at least, that i can find). Let me describe it:

We had unsolved problems with the endstops... allways on, and we couldn't make them work. so, plan b), replace them with other switch.... simply connected the 5 V to the switch, and the other terminal to the signal. Worked perfect for a while, althout needed some retouches, it was usable. When we manage to start printing, the part started to appear distorced... so we thought that it was the vibration which would make the switch to act and do that... after a while, we realize it wasn't that... (this simptom was only on the Y axis... and if we swiched the plugs from the stepper in y to x and x to y, weverything was perfect.) sometimes, the arduino thought the switch was on... so, we've solved it by making a bypass. simply connected the 5 volt and the signal directly on the arduino, instead of going thru the stepper motor driver... still the same problem... thinking on a shortcut somewhere, i've cutted off the switch. so, i had the wires unconnected at the end. no use, the arduino still thinks the switch is on... however, if i disconnect the wire in the arduino, it works ok. so, a shortcut inside somepart of the wire? (the multimeter doesn say so...) but i kept cutting the wires down... so i have now 20 cm of wire, with both ends unconnected, without short cuts, which make the arduino think that there is some kind of connection! only on the Y axis! (but now spreading to the z axis too)

Help/exorcist required!!!!!!
Re: strangest problem ever!
April 07, 2009 08:24PM
Take your digital camera out and do some close up photographs of the optoendstop boards as you have put them together. Pull the pics into Paint or similar and label the input lines, viz, +5, GND, output...

Do closeups of both sides of the board and write down here what resistors you've used and what is the model number of the IR opto circuit.

Also, this is very important, what are you using as a tab to break the IR beam in the optoendstop?

I've built three of these and didn't have a bit of trouble. I suspect that you've just got something backwards.

For debugging, hook up the +5V and gnd lines and connect your multimeter, set to DC voltage, to the output and GND lines.

Now move a piece of thin metal shim into the IR beam and watch the voltage on your multimeter. Are you actually getting +5 volts out of it when the beam is unbroken? Does it go down to very near zero when you break the beam?

Post your pics here and let me know and I'll try to help. There is no reason whatsoever that your endstop circuits shouldn't be working.spinning smiley sticking its tongue out


-------------------------------------------------------

Hell, there are no rules here - we're trying to accomplish something.

Opportunity is missed by most people because it is dressed in overalls and looks like work.

Thomas A. Edison
Re: strangest problem ever!
April 08, 2009 03:59AM
When your switch is open the input is floating, so the micro will read random values.

The opto endtop board has a pull-up resistor which drives the line high and a transistor to drive it low. To use a switch you need a resistor to ground to ensure the line is low when the switch is open.

The more normal way of connecting a switch is with a pull up resistor to 5V and the switch to ground. That will invert the signal so you either change the firmware to match, or change the switch from NO to NC or vice versa.


[www.hydraraptor.blogspot.com]
Re: strangest problem ever!
April 08, 2009 09:35PM
The Arduino actually has internal pull-up resistors. You can activate them (and skip and external component) by attempting to write a "high" to the digital pin. Consult the data sheet for more info on that. Then the read value will no longer float, and you can use a simple switch connected to ground as your endstop.

One warning: Hook up your switch so it's ACTIVE LOW. i.e. so it's connected to ground when NOT positioned at the end stop. That's so that if the kids (or cat, or thermal creep) disconnect the switch, it won't do a head crash when seeking "home".


--
I'm building it with Baling Wire
Re: strangest problem ever!
April 08, 2009 09:54PM
I think I have seen this effect on the arduino decima I cant remember which version of the firmware I was using at the time. My solution was to change the Z endstop input pins on the Arduinoin the pins.h file .

Which pins on the arduino do you have connected to the XY&Z end stops?

Which Arduino version are you using? >> 10 11 12 13 ... 15

Which version of the SW are you using?

PS I have 12 working RRRF Opto endstops


Bodge It [reprap.org]
=======================================

BIQ Sanguinololu SD LCD board BIQ Stepcon BIQ Opto Endstop
BIQ Heater Block PCB BIQ Extruder Peek clamp replacement BIQ Huxley Seedling
BIQ Sanguinololu mounting BIQ standalone Sanguinololu or Ramps mounting Print It Stick It Cut it


My rep strap: [repstrapbertha.blogspot.com]

Buy the bits from B&Q pipestrap [diyrepstrap.blogspot.com]
How to Build a Darwin without any Rep Rap Parts [repstrapdarwin.blogspot.com]
Web Site [www.takeaway3dtech.com]
Re: strangest problem ever!
April 09, 2009 07:05AM
Hi!

Here are the pics...Between the ground and signal there is allways 5V, no matter if i stop the beam or not, or even if i disconnect the emitter part... I'm using the 2.1 version of the opto endstop... I've got 6, plus 3 extra sensors (all of them are H21LOB. I've got the kit from the link in the Reprap website) and still didn't managed to make them work... I have already tried to debugg like that...

I'm using the arduino diecimille, with the arduino software version 10 (i didn't managed to upload with the 12th version). the firmware software version is the 2430, if i'm not wrong... i can't use one newer because the extruder won't work...

I've used the pins mentioned in the site:

y axis (the troublemaker)
step - pin 10
direction - pin 7
minimum - pin 8
maximum - pin 13
Re: strangest problem ever!
April 09, 2009 08:08AM
Jorge: You need to attach and display the pics with your message. spinning smiley sticking its tongue out


-------------------------------------------------------

Hell, there are no rules here - we're trying to accomplish something.

Opportunity is missed by most people because it is dressed in overalls and looks like work.

Thomas A. Edison
Re: strangest problem ever!
April 09, 2009 09:08AM
I just forgot to add the pics...



Re: strangest problem ever!
April 09, 2009 12:12PM
Looking at your pictures, it looks all right. Zach added a few things and generalised the circuit, but I can't see anything there to cause any trouble.

> Between the ground and signal there is allways 5V,
> no matter if i stop the beam or not, or even if i
> disconnect the emitter part...

Now, did you just build out one of these opto-interrupters or did you do all three?

If you did all three do they all behave the same way?

Here's what I would do next. You may have already done it.

Take Zach's schematic...

[reprap.org]

...and take your board, unpowered, and check for continuity with your multimeter for all of the points where you can get your probes to. For example, is the cathode really connected to ground, and so on.

Doing that kind of work up will let you be confident that your soldering is okay.

Next, power up the board, but don't attach it to your arduino. Now use your multimeter in dc voltage mode and see if you are getting 5v where you should be getting 5v and 0v where you should be getting 0v.

If you come up clean on that and get no new information, I'd guess that you have a bad H21LOB. If you've built all three boards, that's not a likely scenario. If you've only built one, that may be the problem. Bad components are rare, but not unknown. Mouser has, from time to time, sold me bum IC's.

Anyhow, let me know how that comes out.


-------------------------------------------------------

Hell, there are no rules here - we're trying to accomplish something.

Opportunity is missed by most people because it is dressed in overalls and looks like work.

Thomas A. Edison
Re: strangest problem ever!
April 09, 2009 07:30PM
Well... I've built 6 of them (ordered from the states), and replaced the sensor (bought here in Portugal) on 3 of them, and all behaved like that... So, I would have to be a very unlucky guy to have all 9 of them with defect... I've already checked again and again the connections and the soldering, but I'll check again, just in case... I have already connected it to the 5 volts (not on arduino) and check the polarity... I have the 5V where they should, but the signal just doesn't change...

Now, going appart from this problem, Let me get back to the other one: lets suppose i disconect the plug of the minimum endstop on Y and Z axis from the arduino... and that i order it to go to the home on all the axis... the x axis works perfectly... when I arrive to the Y axis, i take a simple screwdriver (or any 20cm lenght of copper wire) and i connect it to the minimum pin... and that it acts like if it touched on the switch. lets suppose i keep the screw driver/wire connected and that i click again on home, and it doesn't move (or move less than 1 mm)... How on this earth this can happen? is it my mental power producing enough electricity so that the arduino thinks the switch is closed?! Why is it happening only on y and z axis?!
Re: strangest problem ever!
April 09, 2009 09:20PM
You know how, on the board, it says "For ZD1901, etc: cut A, jumper B"? You didn't do either of those, right?
Re: strangest problem ever!
April 10, 2009 02:28AM
Quote

How on this earth this can happen? is it my mental power producing enough electricity so that the arduino thinks the switch is closed?

If you have an open circuit input on a CMOS chip, then its input impedance can be so high that the electrostatic field from moving a hand near it can make it change state. You need a pull down resistor to keep it low when the switch is open.


[www.hydraraptor.blogspot.com]
Re: strangest problem ever!
April 13, 2009 03:02AM
I have four opt-endstops that also mysteriously stopped working with the my v1.2 stepper motor drivers - and after checking all my leads and supply voltages, I was also completely puzzled.
They were all working perfectly for the past few days.

If I just power up the stepper driver board alone and connect the OES, shouldn't the debug light work?

Is it possible that my ATX 5V supply is whimping out? It measured +5V/12 without a load just fine... but maybe I should have bridged that 3.3v sense wire on the supply?

This all happened after I broke down that electronics and relocated the rig to clean up... What the hell? (I'll get another chance to debug on Tuesday...)

MR
Re: strangest problem ever!
April 13, 2009 03:08AM
Oh, one more thing that screws up these OES's... If you are using an arduino, avoid using pin 13 for input sensing (like an opto endstop). Because it has that internal LED hooked in, that pin will always light up your debug LED and foul up your signal. Forgot that I had that issue a couple days ago.
Re: strangest problem ever!
April 13, 2009 03:15AM
Quote

If I just power up the stepper driver board alone and connect the OES, shouldn't the debug light work?

Yes it should because the 5V power comes from the stepper driver board and that is all that is required to make the OES work.


[www.hydraraptor.blogspot.com]
Re: strangest problem ever!
April 13, 2009 06:03AM
Well.... the opto still don't work, even in debbugging mode... however, the good news is that i finnally solved the problem with the contact switch! the arduino is so sensible that can detect any electrical discharge... so, as we are using double switch, i connected the ground to the switch, so that when it is disconnected there is contact to the ground. like that, just became perfect!!!!
Re: strangest problem ever!
April 13, 2009 02:43PM
Quote:
If I just power up the stepper driver board alone and connect the OES, shouldn't the debug light work?
Yes it should because the 5V power comes from the stepper driver board and that is all that is required to make the OES work.

Thanks Nophead,
I thought so... Then what could this be? I connected the OES's to isolated stepper driver boards and had that same non-responsive debug LED's...

Many people seem to be having quirky OES stories - and I'm not planning to abandon OES's for switches.

I'll check in after I test the ATX PS more carefully.
Re: strangest problem ever!
April 13, 2009 03:18PM
It's all very odd. I work in an industry that uses up to 120,000 slotted optos pa and not had any problems other than people plugging things in backwards and blowing them up occasionally. They are very reliable, much more reliable than switches, that is why they are used.

Is 5V getting to the correct pins on the board? The LEDs were working before? It is easy to get LEDs the wrong way round. Ridiculously you can get ones where the flat or the long lead is either the anode, or the cathode, so the only way to be sure is with a multimeter.

If the LED was backwards it would not light, but the OTA should still function.

Reversing the supply will destroy them but since it moved from a 3 pin header to an RJ45 that would be hard to do. Ah, perhaps that is it, you can get Ethernet patch cables that reverse the connections ...


[www.hydraraptor.blogspot.com]
Re: strangest problem ever!
April 14, 2009 12:28AM
nophead Wrote:
> Ah, perhaps that is it, you can get
> Ethernet patch cables that reverse the connections


that's funny. I came across a x-over ethernet cable when I made up the OES cables.
I guess the funny thing is that every thing worked fine an hour earlier...
Re: strangest problem ever!
April 14, 2009 06:53AM
I've made my own cables... and confirmed the connections too many times... I can't make none of the opto work...


either way, i won't bother about the opto anymore... that part is working and reliable now, so, no point in wasting time, specially when I'm going to have to make a completelly new extruder... the screw and wire "theory" is not reliable... gonna make it the old fashion way...
Re: strangest problem ever!
April 16, 2009 03:47AM
nophead Wrote:
-------------------------------------------------------
> It's all very odd. I work in an industry that uses
> up to 120,000 slotted optos and not had any
> problems other than people plugging things in
> backwards and blowing them up occasionally.


Well, This is funny - and it probably answers the mystery of this issue: For me, the problem came up after I tore down my electronics and relocated the whole set up to a dedicated bench... a great work table with really really great BRIGHT work lighting. I guess I forgot that these opto-interrupts bug out with too much ambient lighting.

Changed the lighting, and everything worked great!
I'd venture to guess that this may be what happened to Jorge too.
Sorry, only registered users may post in this forum.

Click here to login