Photo interrupters
24 Jan 2014 03:56 #43113
by bill516
Photo interrupters was created by bill516
I have just upgraded from micro switches to photo interupters because of the intermittant limit errors I was getting but I have run into a problem. I can wire up four interrupters and they work as expected but if I try to put in another one nothing works. With four I can see the switches toggle as I make and break the beam but when I fit another one nothing happens.
Interrupters are wired to 5v taken from a usb port via 330 r resistor to the led and then to ground. The transistor side is powered from pport pin 15 on the collector of the first interrupter and the emitter goes to the next interrupters collector, untill the last emitter goes to ground.
Is there any way to get six interrupters so I can have limits on x y and z or will I have to settle for limits on x and y.
Bill
Interrupters are wired to 5v taken from a usb port via 330 r resistor to the led and then to ground. The transistor side is powered from pport pin 15 on the collector of the first interrupter and the emitter goes to the next interrupters collector, untill the last emitter goes to ground.
Is there any way to get six interrupters so I can have limits on x y and z or will I have to settle for limits on x and y.
Bill
Please Log in or Create an account to join the conversation.
24 Jan 2014 23:44 - 24 Jan 2014 23:45 #43128
by PCW
Replied by PCW on topic Photo interrupters
You probably just have too much drop in the 6 series photo-transistors to pull the
parallel port input to a logic low. Without extra parts like gates or comparators
you will probably have to use 2 parallel port inputs.
(say one for the 3 + limits and one for the 3 - limits)
parallel port input to a logic low. Without extra parts like gates or comparators
you will probably have to use 2 parallel port inputs.
(say one for the 3 + limits and one for the 3 - limits)
Last edit: 24 Jan 2014 23:45 by PCW.
Please Log in or Create an account to join the conversation.
25 Jan 2014 01:12 #43132
by bill516
Replied by bill516 on topic Photo interrupters
Thanks for that, I was wondering if power was the problem. I never thought about splitting the limits into + and - sides something to have a look at. I did try to set up x and y as all limits and the z as a seperate limit but the step conf wizard doesnt let you do that so I might just have to go your way.
Bill
Bill
Please Log in or Create an account to join the conversation.
25 Jan 2014 02:09 #43138
by bill516
Replied by bill516 on topic Photo interrupters
Back to the drawing board. Looking at the step conf wizard on my netbook there is no option to select max xyz or min xyz which would have been great three optos per line and only two pport lines used, or is there a way to write this into the HAl file. When it comes to coding and things I'm like a monkey with a hammer.
Bill
Bill
Please Log in or Create an account to join the conversation.
25 Jan 2014 02:28 #43141
by PCW
Replied by PCW on topic Photo interrupters
Yes this is beyond what stepconf can do without help...
You might take a look here:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Homing_And_Limit_Switch
You might take a look here:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Homing_And_Limit_Switch
Please Log in or Create an account to join the conversation.
25 Jan 2014 03:29 #43142
by bill516
Replied by bill516 on topic Photo interrupters
I've looked at that and the hal file and it seems to me that the following should do the trick.
net limit-max <- parport.0.pin.10.in
net min-limit <-parport.0.pin.15.in
net limit-max =>axis.0.neg-lim-sw-in
net limit-min=>axis.0.pos-lim-sw-in
net limit-ma=>axis.1.neg-lim-sw-in
net limit-min=>axis.1.pos-lim-sw-in
net limit-max=>axis.2.neg-lim-sw-in
net limitmin=>axis.2.pos-lim-sw-in
Is it right and is there anywhere else I need to change things.
Bill
net limit-max <- parport.0.pin.10.in
net min-limit <-parport.0.pin.15.in
net limit-max =>axis.0.neg-lim-sw-in
net limit-min=>axis.0.pos-lim-sw-in
net limit-ma=>axis.1.neg-lim-sw-in
net limit-min=>axis.1.pos-lim-sw-in
net limit-max=>axis.2.neg-lim-sw-in
net limitmin=>axis.2.pos-lim-sw-in
Is it right and is there anywhere else I need to change things.
Bill
Please Log in or Create an account to join the conversation.
26 Jan 2014 04:29 #43166
by bill516
Replied by bill516 on topic Photo interrupters
Sorted, the hal code worked perfectly. Thanks for the tip on using two inputs PCW I would have been going round in cirlces if you hadnt come up with that one.
Please Log in or Create an account to join the conversation.
Time to create page: 0.433 seconds