View Full Version : Build Thread Optical limiting switches
oxford 07-04-2008, 01:12 PM I had searched through CNCZone for building some simple optical switches.
This thread was what started me off:
http://www.cnczone.com/forums/showthread.php?p=422008
I liked IH's and Tpworks designs, but neither would not fit in my machine. I also needed to play around a little to get the electronics right.
I kept tabs on what I did in the hope it will make the process easier for others.
At the center are:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=QVA11134-ND
I used a .5" thick plastic cutting board for housing. 1/8" x 1" Aluminum bar as a plunger and blade. Springs and epoxy from a local hardware store. Also, (gasp) resistors, wire, and PNP(packet of 15) transistors from Radioshack. Finally, shrink tubing from digikey I had laying around.
First used a table saw to cut 1" squares out of the cutting board. Used nine of the squares but made thirteen so I had some to play with. Also used saw to cut 1/4" x 1/8"x 1" blade/plungers from aluminum.
Used a drill press to drill out a pocket for the electronics with a 1/4" bit.
Drilled small holes for spring and plunger retainer clip. Cut springs to size and attached.
Checked alignment and cut with x-acto knife rectangles for plunging blade.
Put it all together with epoxy.
Disclaimer: I am not an electronic specialist and my design may kill your computer or controller. Try at your own risk:P
Mr.Chips 07-04-2008, 05:21 PM Nice job.
Could you show some more photos of the finished assembly, top and bottom so we can see the see more assembly details.
Does it activate when the sensor is blocked or unblocked?
Thanks
oxford 07-04-2008, 05:54 PM Thanks:)
The switches are unblocked when they are on/high.
For now, this is the last of the photos I have on hand.
Mr.Chips 07-04-2008, 05:59 PM Thanks:)
The switches are unblocked when they are on/high.
For now, this is the last of the photos I have on hand.
I see, the light sensing module goes up from the bottom.
Thanks for the explination and additional photo.
Robin Hewitt 07-04-2008, 06:31 PM Presumably the extra transistor is to counteract the hysteresis on the logic input reading it? Would you consider using a comparator next time?
I like opto slots for end detection because, unlike a switch, you can overshoot without destroying them :D
oxford 07-05-2008, 03:11 PM I had considered using a comparator.
However, I am more familiar with transistors and had a handful of them stashed in my parts drawer.
Size constraints were the last issue. There would be no way for me to cheaply get some surface mount chips that would fit during my vacation.
Regnar 07-10-2008, 08:44 PM I have been thinking about this for a few hours and want to know if you think this will work out. Pictures are below. Basically I was thinking of the same setup as the IH just with 1 switch and using aluminum or steel depending on what come out nicer. I still don't fully understand how the wiring is setup but I am going to try and have a guy at work help me out. Either way let me know what you think.
oxford 07-10-2008, 09:53 PM I like its shape and simplicity.
The one thing that is confusing for me is the pocket in the middle of the plunger.
It looks too far away from where the optical limiting switch is to trigger it.
The plunger movement when you include the size of the springs may inhibit the switch state from ever switching.
I would turn the middle pocket 90 degrees and have the photo-receptor triggered by the diode until the plunger moves away from its relaxed position.
Regnar 07-10-2008, 10:20 PM Good point on turning the middle pocket on the plunger 90 degress. I should have thought about that but I think I was just trying to give it as much strength. But your Ideal makes more sense especially if I use a 1/4 inch endmill.
I dont have the springs on hand so I had guess from the mcmasters catalog. Basically its a .5 dia. by .5 tall spring. I dont know if that was inside or outside dia nor do I know the thickness of the wire. I just drew it up guessing for proof of concept. I think as of now I am am going to do it in aluminum for the plunger and delrin for the housing. I still need to ad mounting holes and the cover holes but that will be added in tomorrow. Thanks I will post more pictures tomorrow.
I was wondering if you have the idiots guide for wiring these up? I can do just about anything mechanical but when it comes to electrical I am struggling.
acondit 07-10-2008, 11:00 PM My recollection is that you only need about a 0.035" hole for the emitter/detector pair and the center of the detector is located about 0.103" from the top edge of the optical switch (H22A1). So a 1/16" hole (0.0625") would be adequate and you could drill it 0.100" from the edge of your slide piece. Then your slide doesn't have to move very far to trigger.
Alan
oxford 07-11-2008, 12:16 AM The 1 pin is by the little dot on the optical switch.
This should help:
http://www.fairchildsemi.com/ds/QV/QVA11134.pdf
You can see the 1 pin reference if you look careful at the product photo here:
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=QVA11134-ND
The picture has the pins labeled in the wiring.
Regnar 07-11-2008, 12:28 AM This might seem like a dumb question but does "out" goto the breakout board or do you hook up the breakout board to the 5volt connection?
oxford 07-11-2008, 12:30 AM The output of the switch circuit would go to an input of the breakout board.
It would get its 5v and ground from the bob too.
Regnar 07-11-2008, 12:40 AM So like so
oxford 07-11-2008, 12:43 AM Yes
Regnar 07-11-2008, 01:02 AM Thankyou so far, I have only one 2 more question for tonight. On the pnp did you use this http://www.radioshack.com/product/index.jsp?productId=2062585&tab=custRatings#showReviews and does 1 pin come from the switch another goto the bob and the last pin to 5 volt source or to a ground?
Robin Hewitt 07-11-2008, 03:50 AM Hi
If you're actually going to use that circuit you should be aware that it has a few unusual features.
It has an NPN labled as a PNP and shows a PNP optoslot, they are usually NPN.
A PNP traditionally has it's emitter tied to the voltage rail and the load resistor to ground. That way it pulls up and down. This circuit only pulls up :confused:.
best regards
Robin
Robin Hewitt 07-11-2008, 04:14 AM Have a piccy :)
If you must use a transistor, I'd go for the NPN. Uses less power when the beam isn't broken, presumably the normal state.
Edit: Amend that picture, I got it wrong to :rolleyes: :D
May need a pull up on the opto collector in the PNP circuit if it's at all leaky
Regnar 07-11-2008, 08:37 AM Robin what are some of the ill effect of using the simple circuit you drew up? I have been reading wiki and slowly and slightly getting the pnp and npn.
Robin Hewitt 07-11-2008, 09:31 AM Robin what are some of the ill effect of using the simple circuit you drew up? I have been reading wiki and slowly and slightly getting the pnp and npn.
Not a lot :D
As you break the beam the output will rise from 0.6 volts to 5 volts in a fairly straight line.
The input at the computer end will interpret that somewhat and you will get slightly different positions for open and close. It's called hysteresis.
The transistor will reduce the hysteresis, the comparator will remove it.
If you use the simple circuit and want repeatability use either the open or the close to position by, not both.
Regnar 07-12-2008, 09:23 PM Well my wife went out with her friends so that means I had alittle time in the garage. Not much tho the heat is killer. This is what I was able to get done today. Im thinking I will do the simple circuit first and advance from there. Nothing is finished I still have to thread the holes do some polishing and need to get a 1/8th endmill. Smallest I have now is 3/16 and it just seems to let the spring move around to much in the plunger. I will put in the order with digi-key on Monday and will post back with finished results. But without further do some pictures.
Regnar 07-13-2008, 12:09 AM Oxford I didnt mean to hijack your thread. I will start my own if you would like. Just figured this could be a good source for optical limits.
Well gave it even more thought. I didn't like the fact that the springs where open to containments and it was kinda hard to get the springs cut with even pressure on both sides. I think I have found the solution. I used only one spring and made a pocket to house it in the housing itself. I left out the spring in the drawings just because it slows the computer down quickly with its 18,000,000 faces. Let me know what you think.
Overall dimesions as drawn 2.00 wide 1.25 tall and .75 in depth. The one I acutally milled was 1.00 wide 1.5 tall and .75 depth and could have made it even smaller. I might be able to shave a little of the wide if I shrink the spring down right now I planned for a 1.00 in length so there is room to shrink.
oxford 07-13-2008, 01:46 AM I like seeing others' ideas...
Regnar, your earlier design had a plunger on both sides.
With the covered spring, you chopped off the right side.
Why not reattach the right side of the plunger and then fill the entire large rectangular with rounded corners pocket with the spring. The plunger can slide both ways and will be at equilibrium in the middle, as long as the slots in the plunger for the spring are the same length as the width of the pocket.
One spring and both ways:)
Regnar 07-13-2008, 06:04 AM Oxford, I only cut off the right side for my application having both sides is easily doable. With mine the spring is going to act as the equalibriam and the left side is going to stretch out across the axis to the otherside. I will put 2 adjustable stops along the way with a brace on the otherside. I would make up a model for you but I have to goto work for the next 36 hours. Just think IH y axis and it will come very close to what I have in my head.
I was thinking about making the opening where the spring would sit just the right size with nothing threw the middle. This would make it a drop-in. The one a actually made up I had to thread onto the plunger. It was kinda a pain and mared up the plunger in the process and the left side spring go damaged in the process.
HARI_R 07-14-2008, 09:24 PM hex inverter
joeybagadonuts 07-14-2008, 09:28 PM HARI_R,
Please explain your circuit.
JoeyB
Robin Hewitt 07-15-2008, 03:35 AM hex inverter
Duh :confused:
Most opto-slots are NPN phototransistors and the emitter usually goes to the ground rail so it fixes the base voltage.
A Schmitt will increase the hysteresis, if you want to buffer it a comparator seems the way to go :confused:
If you are doing something clever you will need to explain :D
I make bullet velocity measuring tools. I have to use photo-diodes because I need to switch in nanoseconds and phototransistors work in microseconds. That shouldn't be a problem for a limit switch.
oxford 07-15-2008, 11:57 AM Regnar:
I know how annoying threading springs onto an aluminum shaft can be.
I had to sand out some of my own marring.
I had been thinking about your pocket for the the spring to sit in.
Maybe just tweek it a little with some small indents > < on each side.
oxford 07-25-2008, 05:14 PM Ragnar:
Any progress on those switches?
Regnar 07-25-2008, 06:37 PM Im still waiting on the switches. I ordered them a week and half ago and just recieved conformation that they are going to ship but UPS has no tracking as of yet so It will probably get shipped Monday. I was watching a thread over in the DIY section and it looks like they are doing some optical switches over there. Just havent had the chance to read the whole thread.
I wont lie but it will be September before I can actually cut them out. With the garage being 105 degrees with 100% humidity it doesnt make for comfort. Then I go for a small vacation to Disney for a week, then to the Bahamas 2 and then I took a month of September off from work. SO that is when it will more than likely be the time to cut these out. This will give me time to do this the right way rather than whipping it together just to have it.
I did redesign them both ways and will post pictures later. I have to go out the door now. Be back soon
|