![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General Electronics Discussion Discuss basic electronics, power supplies and anything else electronic related here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I would like to run 3 slotted optical switches for limits on my mill. I am currently testing a Optek OPB620 and it seems to work well in testing. I do like its size, simplicity and hopefully its durability in a benchtop enviroment. I am out of pins and would like to just use 1 as I have done with mechanical limit switches. Is this possible? It would seem you could just wire the 3 emitters in parallel and then do series on the collectors. Would this work? |
|
#2
| ||||
| ||||
If you'd like, I have two at home I can try in series and tell you what happens. - amishx64 |
|
#4
| ||||
| ||||
| Not sure what you mean by series on the collectors, but in general an open collector transistor, can be used in parallel, emitters and collectors, and have a common load from all three collectors to +dc. This is called OR'ing, it works in the TTL world so it should work with these devices according to the app. sheet. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#5
| ||||
| ||||
| I am looking for the same information. I am using Mach3 with a CNC4PC C1 BOB. I only need to use 2 switches for home and limit. The only thing I have found is this video.... YouTube - ‪Optical Slotted Switches in series‬‏The person that posted the video said to look on this forum, but I have not been able to find anything. Anyone have a schematic?
__________________ Allen Louisville KY |
| Sponsored Links |
|
#6
| |||
| |||
| You need to tell us what you are driving with the switches. Is it a break out board (BOB) -OR - a drive amplifier - OR - the pins on the LPT port of your computer - or something else? Each type of input has its own drive requirements which the arrangement of your switches must meet with an adequate safe margin between 'ON' and 'OFF' both in terms of current and voltage. What are you driving? Tell us and I might be able to help. You also need to state what the desired logic is. To answer your posted question the answer is no. This is because each switch has two connections an emitter and the collector of the NPN photon operated transistor. Yes you could connect the switch outputs in series. i.e. emitter of the first is the common negative terminal and the collector goes to the emitter of the second switch and so on with the final collector going via a suitable resistor to the positive supply. But as each switch has a voltage drop of around 0.8 volt pulling the shutter on two switches in series would give 1.6volts for one of the states and this is may not look like either a logic one or zero to the circuit being driven This might work but you need to tell us what the drive conditions are for the following circuit input. The logic function performed is that any one switch that has its beam interrupted will operate by cutting off the current in the series resistor. Tell us more if you want further help. Regards - Pat PS the normal way of operating these switches, if there is such a thing as normal, is to common the emitters and the collectors. You then have a choice of putting the common ( a single ) resistor in either the collector to positive lead or in the emitter lead to the negative supply. The action is that the voltage across the resistor is highest when one or more switches has no shutter in place. However the voltages may well be wrong for direct drive into logic. Extra components may be required to adjust this. Placing the switches in parallel might be a better option but more information on the circuit to be driven and how the limit switch shutter operates please. If you are using this to indicate that the table has reached its end of travel by a shutter coming between the switch arms then putting the resistor in the emitter lead of the first switch generates a logic '1' and a suitable pull up or pull down resistor would also be required. Last edited by wildwestpat; 06-06-2011 at 06:12 PM. Reason: PS added |
|
#7
| |||
| |||
| BTS - Treat the switches as open collector NPN and the operation is described in the CNC4PC manual for your BOB. The manual indicates the value of the common resistor required and how to set the pull down resistors for that BOB. Respond if you need further help. The switches are operated when the shutter is absent. Regards _ Pat |
|
#8
| ||||
| ||||
| One feature of Optical switches is the transistor emitter & collector is usually uncommitted, IOW they are not necessarily referenced to any particular supply. Here is an example of using optical switches in series, or in logic it would be a NOR function. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#9
| ||||
| ||||
| I am using Mach3 with a CNC4PC C1 Break Out BoardCNC4PC. I want to set up home and limit using the optical slot switches existing on the machine that is being re-fit with new electronics. There are 2 per axis. on at each end of travel. My main concern is how to wire them. Another question is, if these are wired together as on circuit, how will Mach3 see them? Say the stage hits a limit on the X-axis, will this just kill the operation and stop the machine requiring a manual move back toward center? How does Mach3 know which travel limit (left or right) has been hit? If Mach3 needs to see each switch, would it be better to go with a board with more input channels?CNC4PC Sorry about all the questions! If I need to post these as new threads, I will.
__________________ Allen Louisville KY |
|
#10
| ||||
| ||||
| If using the same switch for home and over travel, when homing an axis, Mach expects that that is the only axis moving, if homing the X the the first switch tripped should be X home switch regardless and so on. Once homed, in the case of over travel, it does not matter which axis over traveled, all Mach knows it that an over travel has occurred and stops the process. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
| Sponsored Links |
|
#11
| |||
| |||
| Hi Allen - With the CNC4PC C1 Break Out Board (BOB) can I assume that you have them wired as in the manual for open collector electronic switches? If so then the switch has to be obstructed by the shutter when the axis is OK and reaching the limit removes the shutter. By shutter I an talking about the vane or flag used to operate the switch. This means a long vane almost the total length of the axis and the switch is uncovered only when it is required to indicate it has either reached the end of travel or is at the home position. Long vane with a break at the home position. Mach3 operates by driving each axis in turn to the axis limit. The limit can be set up in software or as a limit switch or as both. If you use software limits then these have to be set prior to use. Assuming you have configured Mach3 for hardware limit switches and a home switch using a single LPT input pin and told Mach3 the correct pin and polarity then Mach carries out the following actions. First axis is driven to the limit and the limit switch operates in your case the shutter at the opposite end of the table uncovers the switch. Mach3 detects the switch has been activated i.e. light shines from diode source to photo NPN transistor and the drive is instructed to stop. Mach3 then jogs (drives back off the switch) until the switch reverses state and notes the position. The axis is then driven to the opposite end of the axis when the limit switch at the opposite end of the table is uncovered by the vane and the axis halts jogs back off the limit switch and notes where the switch has been set. The same action is used for the home switch when the axis limits have been obtained. Mach3 repeats this action for all axis in turn (drink tea whilst waiting!). Mach 3 then has knowledge of when to expect the axis limits to be reached and where the home switches are. Sounds very complicated and there is a very good write up on the Mach 3 download page written as a stage by stage setting up procedure. The Mach 3 manual also covers the setting up of stepper motors in terms of acceleration and maximum speed etc. If the action of the vane and the switch is not as I have described please ask. It is easy to invert the switching logic but this requires extra components. Unfortunately you can not use Mach3 to invert the signals if they have been combined onto a single input pin. The logic has to be right before combining. There is a common problem with the simple optical shutter operated switches in that there are two distinct families of device often sharing a common part number using a suffix to differentiate between them. For example the H22** slotted optical switches. The first * can be an A or L the A indicates an analogue switch where the vane position can be detected as a change in the current conducted by the NPN transistor. These operate over 3 mm which is not what is required for a good limit switch. The L indicates logic functionality and the beam of light is focused much more tightly so that the switch range is sub the 0.1mm from 'ON' to 'OFF' . I suspect many have used the wrong switch as there is a load of conflicting advice on the web. Whilst I am on about the correct switches I seriously suggest not putting the diodes in series but using separate resistors for each switch diode. Since the diode has a forward voltage drop of 1.7 volts the value of resistor is easy to calculate as supply minus the 1.7 volts divided by the desired current (in milliamperes) to give the value in K Ohms. A typical switch should have 10 to 20 milliamps. The resistors are cheap and the wiring which needs to be screened is as neat or neater using separate resistors. It is also easy to inhibit the home switch when required if all leads from the switches start in the control box. Hope this helps - if not ask again - Regards - Pat |
|
#12
| |||
| |||
| Hi Allen Sorry missed the second part of the question about extra inputs. Here is my take:- Yes you could add another parallel port to the computer running Windows for your Mach 3 software. Windows will handle up to four parallel ports. Two is usually sufficient where high speed inputs are required along with motion control of the axis. As far as I can rember Mach 3 can only handle two. For switch controls other than the axis limits it is practical to use a key board emulator. Most machines can be controlled fully from two parallel ports and a few keyboard emulated instructions or using a standard key board with the short cut keys. You will soon see what you need when every thing is connected and you start to make things on it. I have found that one parallel port is OK until you want to add manual control handset. Even this is not a good reason to use a second port as there is a good plug in for the 'shuttle mouse' which provides a few buttons and a nice jog wheel at a fraction of the price as it is a standard USB main stream computer device. Look on the Mach 3 web site for details under down loads. Regards - Pat |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| IH Optical Limit Switches | HimyKabibble | Industrial Hobbies (Support forum) | 18 | 12-06-2008 11:09 PM |
| Optical Limit Switches | HimyKabibble | Bridgeport and Hardinge Mills | 7 | 11-20-2008 09:50 AM |
| Build Thread- Optical limiting switches | oxford | Benchtop Machines | 29 | 07-25-2008 05:37 PM |
| optical interrupter switches | arbus | General Electronics Discussion | 17 | 02-07-2008 07:10 AM |
| optical limit switches | woffler | Benchtop Machines | 7 | 12-17-2007 05:01 PM |