Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: turbothis on July 17, 2013, 08:53:51 PM

Title: optical switch opb917bz mach lathe index
Post by: turbothis on July 17, 2013, 08:53:51 PM
for the life of me i cant get the opb917bz switch working in mach. ???
i thought the one that worked forever died when upgrading my computer so i bought 4 more!

i have the c11g BOB and are trying to use the 5v on the input pins to run the red+ and white wires. i ran a 220 ohm on the red and once without. no difference. i cant find any ma output on the 5v pins.
the black and green are tied together and grounded on the grd of the input pins.
the blue goes right into pin 11.

the old computer worked fine with this setup for a long time but now i cant get any input on this.
if there is close to the right amount of power to the led should i be able to see it with my eyes?

Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 17, 2013, 10:31:19 PM
I have 043.066 for the version and was thinking about trying v3.042.033  if I can find a download for that. seems to be liked well for threading.
Title: Re: optical switch opb917bz mach lathe index
Post by: Hood on July 18, 2013, 03:24:19 AM
Putting 5v in on the red wire without a resistor will instantly blow the LED as you have not limited the current to the LED :(
Hood
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 10:20:48 AM
I wired up a new one with the 220 ohm resister and it did not work.
I thought some where I read that the input pin 5v supply is already limited to something small?
if I have 5v then what resister size do I want to use?
thanks
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 01:43:03 PM
so I have the opb917bz specs
Forward Voltage = 1.3
Forward DC Current = 50mA
BOB put off 5.6V

the online resistor calculator say to use a  100000 ohm resistor for the power red+
did this with no results on a new switch

http://led.linear1.org/1led.wiz

I added in a 10k resistor from the 5v source to the input pin of the switch (blue wire). still nothing?

5v to the red wire reads 1.06v after the resistor going to the led now.
Title: Re: optical switch opb917bz mach lathe index
Post by: Hood on July 18, 2013, 01:54:34 PM
Dont think your calculator was giving good results.
220 Ohm is higher than needed, certainly for OPB917b (no Z)

Where are you getting your 5v from?


Hood
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 02:34:20 PM
the BOB has some 5v pins right next to the input pins......
Title: Re: optical switch opb917bz mach lathe index
Post by: Hood on July 18, 2013, 03:35:36 PM
Ok so is the 0V you are using referenced to the 5v that you are using?
Hood
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 03:40:17 PM
I have the green and black wires tied together and going to a ground pin on the input pin header.
Title: Re: optical switch opb917bz mach lathe index
Post by: Hood on July 18, 2013, 03:46:31 PM
Ok I am not familiar with the BOB and pic isnt big enough for me to see however what I am asking, if you put a voltmeter between the 5v beside an input and the Gnd do you get 5v? If yes then that means they are basically from the same supply.

Ok so if that is the case then I wonder if the pull down resistor is too strong for the input? I am not an electronics guy so cant really say even if that could be an issue but I think it could be.

If you take the Output wire from opto out of your BOBs input and connect your voltmeter between it and the Gnd you should be able to block/unblock the opto and you should see the voltage on your meter.

Hood
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 04:04:03 PM
1 yes

2 the same model switch was used before and functioned great. I just swapped the computer a while back and now need to do some threading.

3 not sure what you mean there?
Title: Re: optical switch opb917bz mach lathe index
Post by: Hood on July 18, 2013, 05:24:50 PM
3.
 I am saying remove the blue wire from the input on the BOB. Connect the positive probe to the blue wire, connect the negative probe to the Gnd pin. Turn your spindle so that the slot passes the opto and you should see a voltage.
Hood
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 05:54:18 PM
I get nothing.
this is a new switch that has only been wired through the 100,000k resistor for the red wire.
Title: Re: optical switch opb917bz mach lathe index
Post by: Hood on July 18, 2013, 05:58:32 PM
100,000K?
You will get nothing through that.
Put a 220 Ohm and try again.
Hood
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 06:06:46 PM
cool! I get 5.57v
what now?
Title: Re: optical switch opb917bz mach lathe index
Post by: Hood on July 18, 2013, 06:12:01 PM
Put it back to your bob and try.
Hood
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 06:17:06 PM
nope
I try all the setting combos I can think of in the port/pins but nothing seems to read it.
I swapped it with the estop to double check and the pin works?
Title: Re: optical switch opb917bz mach lathe index
Post by: Hood on July 18, 2013, 06:20:23 PM
Put the opto into the EStops input and see if it E-Stops when you rotate off the slot.
Hood
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 06:21:04 PM
I get 1.74v to the input pin when the switch is open and 0v when blocked.
Title: Re: optical switch opb917bz mach lathe index
Post by: Hood on July 18, 2013, 06:23:21 PM
Sounds like the BOB is pulling it down.
Can you connect direct to the port in some way?
Hood
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 06:30:28 PM
not without taking off the db25 cable.
estop works but the switch does not in the same pin.
Title: Re: optical switch opb917bz mach lathe index
Post by: Hood on July 18, 2013, 06:38:45 PM
I am sorry I dont know why it worked before but not now but seems like the BOB is not passing the signal, it seems to be pulling the voltage down.
If the PP cable had a screwed cover you could connect direct to a pin on it but if its a molded cover then only way would be to chop into the cable.
Atill why it used to work and now doesnt is a mystery.
Hood
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 06:48:07 PM
I found my old db25 pass through breakout board and it still does not work.
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 06:55:28 PM
the blue wire read .05v when hooked up to the db25 breakout board?
this might be the dumbest thing I have ever run across.
Title: Re: optical switch opb917bz mach lathe index
Post by: Hood on July 18, 2013, 07:07:58 PM
What does the 5v supply read when you have the opto connected? ie between the 5V and Gnd, both when switch is open and blocked.
Hood
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 07:08:22 PM
well, I got it!
I hooked up my pass through break out board up to the second parallel port and now the stupid ass thing works like it should.
why the first port sucks is a mystery to me.
I might put my other couple inputs on the secod board for the hell of it too.

thanks for the help!!!!!!!!!!!!
Title: Re: optical switch opb917bz mach lathe index
Post by: Hood on July 18, 2013, 07:10:19 PM
Good you have progress :)
Hood
Title: Re: optical switch opb917bz mach lathe index
Post by: turbothis on July 18, 2013, 07:36:00 PM
2 days lost to this.....