Page 1 of 2 12 LastLast
Results 1 to 12 of 16

Thread: Invert the output from an opto switch

  1. #1
    Registered uspl's Avatar
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    72
    Downloads
    0
    Uploads
    0

    Invert the output from an opto switch

    Howdy all

    The router build is coming along well, cold weather means I am indoors doing fiddly things instead of the shed so the opto home switches are on the agenda.

    I am using the circuit as per http://www.cnczone.com/forums/genera..._switches.html and many other threads and have the LED flicking off and on just fine.

    My issue is, how do I get this to work as ON when the opto is clear, i.e. not blocked. I want to use the switches as NC so that a power failure or cable fault on the opto circuit will cause an alert on Mach3.

    Thanks for any suggestions

    David


  2. #2
    Registered doorknob's Avatar
    Join Date
    Jan 2010
    Location
    USA
    Posts
    1,743
    Downloads
    0
    Uploads
    0
    Can't you reverse the 'sense' of the input by switching the Mach3 input signal definition from Active Low to Active High (or vice versa)?


  3. #3
    Registered uspl's Avatar
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    72
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by doorknob View Post
    Can't you reverse the 'sense' of the input by switching the Mach3 input signal definition from Active Low to Active High (or vice versa)?
    Yeah I can but if the power fails on that circuit or some other fault occurs, Mach3 wont see it.


  4. #4
    Registered doorknob's Avatar
    Join Date
    Jan 2010
    Location
    USA
    Posts
    1,743
    Downloads
    0
    Uploads
    0
    There are several variations on the circuit described in that thread - do you have a diagram of how you actually have it wired?


  • #5
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,964
    Downloads
    0
    Uploads
    0
    You must have the 'Operate on Dark' version instead of the normal 'Operate on Light' type.
    The latter is the fail safe version you are looking for, which are normally ON when un-blocked.
    You could use a 2N7000 with pull up resistor on the gate to invert the output, use the same power source as the opto.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  • #6
    Registered uspl's Avatar
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    72
    Downloads
    0
    Uploads
    0
    Thanks Al

    The opto is the ZD1901 from Jaycar here on Oz, http://www.jaycar.com.au/products_uploaded/ZD1901.pdf

    Wiring is like the pic attached.

    Could I trouble you to expand on the wiring for the FET, my electronics sort of stops about "First, turn on the soldering iron....."

    I have a few solid state relays I could use instead but it seems silly to use an $8.00 component when a $0.60 one would do the same job.
    Attached Thumbnails Attached Thumbnails Invert the output from an opto switch-opto.jpg  


  • #7
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,964
    Downloads
    0
    Uploads
    0
    Looks to me like you have it connected wrong? No1 the device is already operate on light so you don't really need the inversion for safety reasons?
    If you put the LED in series with the collector instead of parallel it will switch but indicate when non-triggered, i.e. switch off when blocked.
    If this is an issue, and you want the inversion, the 2n7000 source pin connects to the emitter, the collector to the gate, and the drain pin would be the output, if you want to invert the LED indication then put it in series with the 2n7000 drain pin and whatever you are switching into if this is a BOB, if going into a P.P. then also use a 1k resistor on the drain to +5v and replace the gate 1k with a 10k.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  • #8
    Registered uspl's Avatar
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    72
    Downloads
    0
    Uploads
    0
    Hi

    By "wrong" do you mean Collector and Emitter reversed ? I thought so too based on the other CNC Zone post but when i looked at figNoggle Designs: Photodarlington Optical Interrupter Switch Wiring How-To I wired mine the same way and got the result of blocked=LED On.

    Any chance you sketch what you think the wiring should be, I can test it this afternoon and report back. This particular opto is the one of choice for many of us in Oz as it is pretty much all you can get in the market at the retail level.

    Cheers


  • #9
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,964
    Downloads
    0
    Uploads
    0
    By wrong, I meant you could have wired the LED in series with the collector, just that it will light on non. shuttered (off), I can whip up a dwg to include the 2n7000
    Al.
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  • #10
    Registered uspl's Avatar
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    72
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Al_The_Man View Post
    I can whip up a dwg to include the 2n7000
    Al.
    That would be very generous of you, thanks


  • #11
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,964
    Downloads
    0
    Uploads
    0
    Something like this maybe, but I don't see why you need the inversion?
    Al.
    Attached Files Attached Files
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  • #12
    Registered uspl's Avatar
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    72
    Downloads
    0
    Uploads
    0
    Thanks Al, I will drop by the local parts store and grab some trannies tonight.
    My opto must be the operate on dark type, as measured with the multimeter I get 0v at normal state and 4.99v against a Vi of 5.00 when I block the slot.

    Weired

    Thanks again for the schematics


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Opto switch
      By sivtek in forum Norwegian Club House
      Replies: 3
      Last Post: 03-12-2010, 01:19 PM
    2. Need Help!- How to invert the output bit with Motenc lite
      By jatchan in forum LinuxCNC (formerly EMC2)
      Replies: 0
      Last Post: 04-23-2009, 03:26 PM
    3. Need Help with Picstep opto output board
      By ve3sjk in forum PicStep Controllers
      Replies: 1
      Last Post: 04-25-2007, 11:04 PM
    4. Need Help with Opto Switch
      By bcromwell in forum General Electronics Discussion
      Replies: 3
      Last Post: 05-02-2006, 10:57 PM
    5. How to sense a switch with both opto-isolator and logic?
      By arvidb in forum General Electronics Discussion
      Replies: 8
      Last Post: 09-01-2004, 11:04 AM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.