G540 and proximity switches


Page 1 of 3 123 LastLast
Results 1 to 20 of 49

Thread: G540 and proximity switches

  1. #1
    Registered
    Join Date
    Jul 2006
    Location
    USA
    Posts
    887
    Downloads
    0
    Uploads
    0

    Default G540 and proximity switches

    I have a question, I have a set of prox switches (Koyo APS4-12s-e-d) the require 10 to 30 volts power. I have them hooked to a 12v walwart. My question is on wireing. The switches are 3 wire. When the switches are powered and I trigger one of the switches I get 12vs on the 3rd wire. Im not the sharpest tool in the shed, but I happen to know that if I put 12v`s to the g540 pin chances are Im going to let the magic smoke out.........
    I have a wirering diagram that I dont fully understand..... can one you you electronics guys simplify this for me please?

    Similar Threads:
    Attached Thumbnails Attached Thumbnails G540 and proximity switches-npn-sensor-c10-jpg  


  2. #2
    Registered
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    30
    Downloads
    0
    Uploads
    0

    Default

    Fixittt,

    What voltage are you running G540 on?

    The part should work with a G540 except for the issue of voltage issolation.

    I have just had a quick look at the full datasheet:
    http://web2.automationdirect.com/sta...oxrectaps4.pdf

    The wiring should be:
    Brown => +ve supply
    Black => Input terminal of G540 (wired directly)
    Blue => -ve supply

    The gotcha is the -ve supply feeding the proximity sensor must also be connected to the -ve supply of the G540. The APS4-12S-E-D has a maximum voltage rating of 30V DC (most simple voltage regulators also have a maximum input voltage of 30V except possibly the 7824 which is typically 40V).

    David Campbell



  3. #3
    Registered
    Join Date
    Jul 2006
    Location
    USA
    Posts
    887
    Downloads
    0
    Uploads
    0

    Default

    and I thought I couldnt get any more confused!!!!! LOLOL

    Here is what I have...
    I have a keling 36V PSU feeding the G540.
    I have a 12V wall wart feeding the prox switches......



  4. #4
    Registered
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    30
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Fixittt View Post
    and I thought I couldnt get any more confused!!!!! LOLOL

    Here is what I have...
    I have a keling 36V PSU feeding the G540.
    I have a 12V wall wart feeding the prox switches......
    OK - I'll try and go slow and walk you through the steps...
    There is a small diagram showing the suggested wiring below in the attached images.

    Step #1 - Grab a multimeter and make sure there is no conductivity between the 110V and the 12V side of the "wall wart". There shouldn't be any conductivity but this is a quick 30 second check just to make sure. If there is any conductivity between the low and high voltage side of the "wall wart", stop and do not proceed any further.

    Step #2 -
    a) Connect the -ve wire from the "wall wart" to the -ve terminal of the 36V PSU, leave the +ve wire from the "wall wart" disconnected for the moment.
    b) Turn both power supplies on and measure the voltage between the +ve terminal of the 36V PSU and the +ve terminal of the "wall wart". Red lead to the 36V PSU +ve terminal, black lead to the +ve terminal of the "wall wart". The voltage should be 24V (36V - 12V = 24V), if there is no voltage turn off and check your wiring.

    If nothing has gone pop yet then you have cleared the power supply problems.

    Step #3 - Connect the proximity switches as follows:
    Brown => +ve "wall wart"
    Black => Input terminal of G540 (wired directly)
    Blue => -ve (common to both supplies)

    The diagram you originally posted had additional resistors, these are not required for a G540.

    The proximity switch you have bought acts like a traditional switch between the black and the blue wires.

    If you look at the documentation you recieved with your G540 drive, the recommended input is a switch between the input and the G540 -ve supply wire.

    If you want to get rid of the "wall wart" you can make a small 24V regulator using three parts (7824, a small capacitor and a heatsink) which takes power from the 36V PSU and supplies the proximity switches. Just about any idiot with a screw driver and a bit of terminal strip could put together.

    David Campbell

    PS: An old style plug pack were pretty much guaranteed to have voltage issolation however with switchmode plug packs appearing you need to double check. Sorry if I am being a little paranoid about safety...

    Attached Thumbnails Attached Thumbnails G540 and proximity switches-wiring-jpg  


  5. #5
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    208
    Downloads
    0
    Uploads
    0

    Default

    I would add an opto-isolator to convert the 12V to 5V. When the proximity switch senses its target, the opto's transistor turns on and the output line goes LOW. There are two drawings, one for NPN sensors and one for PNP sensors.

    Attached Thumbnails Attached Thumbnails G540 and proximity switches-prox_sensor-jpg  


  6. #6
    Registered
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    30
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Richards View Post
    I would add an opto-isolator to convert the 12V to 5V. When the proximity switch senses its target, the opto's transistor turns on and the output line goes LOW. There are two drawings, one for NPN sensors and one for PNP sensors.
    Richards,

    Nice idea but with the G540 Rev3 there is no 5V supply readily available (the G540 Rev1 required an additional 5V supply for the logic side).

    I am not a fan of ganging different power supplies together as there are potential issues when only one of the power supplies is running. In this particular case as the output is only a pull down transistor there should be no issues.

    To get around the "two power supply problem" you can build a small voltage regulator that provides a lower voltage from the 36V supply. The simple 3 pin linear voltage regulators (eg: 78xx series) have a maximum inlet voltage of 30V to 35V (manufacturer dependent) except for the 24 volt version (7824) which has a 40V maximum inlet voltage.

    Fixittt: The 7824, capacitor and small heatsink should be easily purchased for less than $5.

    The other option is to keep the proximity switch and "wall wart" power supply completely issolated and use the proximity switch to drive a small 12V relay. Normally relays have over 1000V issolation between the coil and contacts.

    Come to think of it, the relay option probably is the best solution:
    - simple to wire
    - minimal extra components
    - no voltage issolation issues

    David Campbell



  7. #7
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    208
    Downloads
    0
    Uploads
    0

    Default

    David,

    I agree that the G540 has no 5VDC "tap". I get around that in my designs by sometimes using multi-stage voltage regulators to get the 24V or 12V for the proximity sensors and to get 5V for the TTL logic. Other times I use additional power supply (or supplies) with its (their) ground(s) tied to the stepper power supply ground.

    In this particular case, I'm wondering whether the G540 already has a pull-up resistor attached to each input so that the opto-isolator's transistor's collector (pin 5) could be attached directly to a G540 input and the emitter of the opto-isolator ((pin 4) could be attached to the G540's ground. Since I don't have a G540, I can't test that idea, but it might fall within the parameters of the TTL spec on page 2 of the data sheets.

    (Perhaps Mariss could comment on that possibility.)

    Page 1 of the data sheet for the G540 contains this notation:

    7) INPUTS: The G540 has four general purpose inputs called INPUT 1, INPUT 2, INPUT 3 and INPUT 4 on the MAIN TERMINAL BLOCK. They are at Pos 1, Pos 2, Pos 3 and Pos 4 respectively on the terminal block. These inputs may be used as limit switches or for any other purpose. SPST switches can be used with these inputs; one end of the switch goes to the input, the other end of the switch goes to ground (Pos 12).

    Page 2 of the data sheet contains this notation:

    Four SPST to GND inputs (TTL)

    As a side note, some might consider attaching the black wire of a three wire proximity sensor directly to a G540 input line and then connecting the sensor's blue wire to the G540's ground. I'm not comfortable with that idea, because I don't have a schematic of the proximity sensor's circuit. Since a PNP sensor has to SOURCE the current, it seems that it would be using 24V or 12V which would not work as an interface to a TTL circuit. An NPN sensor might actually have a built in opto-isolator, but, again, I don't have a schematic of the proximity sensor.

    Edited:
    Page t.5 of Balluff's 08/09 "Object Detection" Catalog shows that their sensors use the higher voltage (10V - 30V) as the source/sink voltage of the output, so it would not be possible to connect the black wire of a three-wire sensor directly to a TTL input line.

    Last edited by Richards; 01-03-2009 at 12:58 AM.


  8. #8
    Member jalessi's Avatar
    Join Date
    Feb 2007
    Location
    United States
    Posts
    4553
    Downloads
    1
    Uploads
    0

    Smile

    The opto-isolator and two LM317T chips would do the trick.

    One 317T for the Koyo APS4-12s-e-d "10-30 volts" and one 317T for the opto-isolator "5 volts".

    http://www.national.com/mpf/LM/LM317.html

    http://tinyurl.com/8wrnac

    No problem powering the LM317T off the Keling power supply either.

    Less than ten bucks for all the parts.

    Jeff...



  9. #9
    Registered
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    30
    Downloads
    0
    Uploads
    0

    Default

    Fixitt,

    I will shortly post a wiring diagram for a relay solution.

    Jeff,

    Based on Fixittt's original plea for help he is looking for a simple wiring solution. I overlooked the LM317 and other variable voltage regulators as they need extra resistors and you start getting into the realm of building a small PCB.

    For a very simple, fool-proof system I believe the good old electro-mechanical relay is the best option.

    Richards,

    With an NPN output transistor for the proximity sensor, the maximum voltage that proximity sensor can supply on the outlet connection is 0.6V if the -ve of the proximity sensor is at the same voltage as the -ve of the G540 supply.

    The output circuit for the proximity sensor can be found at the bottom left corner of the first page of the following PDF:
    http://web2.automationdirect.com/sta...oxrectaps4.pdf

    I did some quick checks with a multimeter on my G540:
    1) The resistance between an input to any other input is more than 2000k
    2) The resistance between an input to Vsupply is more than 2000k
    3) The resistance between an input to Ground is more than 2000k
    4) An open input measures 11.1V with respect to ground (24V supply)
    5) An ammeter between an input to ground reads 7.1 mA

    I double checked the 2000k ohm range on my multimeter and the range is functioning correctly as the first three results are "unusual" for a logic input (except for an unprotected CMOS input and I'd doubt that is the case).

    Test #4 & #5 indicates there is a 1.5k resistor to an internal 12V rail. It looks like each pull-up resistor has a diode inline, this explains the 11.1V and the "infinite resistance" between inputs.

    My guess is that the four inputs are opto-issolator inputs. Makes sense, a little current avoids a whole pile of spurious induced voltage noise.

    Edit: Just double checked a datasheet for a 4N25/6/7/8, the forward voltage at 25'C and 0.1 mA is 0.9V, I think we have a smoking gun...

    David Campbell

    Last edited by David Campbell; 01-03-2009 at 06:56 AM. Reason: Updated based on optocoupler datasheet info...


  10. #10
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    208
    Downloads
    0
    Uploads
    0

    Default

    Proximity sensors are not picky about voltages as long as the voltage is within the 10 to 30 volt range of the sensor. Having 25 volts or 21 volts works fine. I try to keep the voltage at 12V or higher and at 24V or lower just to make sure that the sensor works properly.

    The problem with converting high voltages from the stepper power supply to low voltages for 5V TTL or 12V sensors is heat - lots and lots of heat. When a voltage is dropped across a load (resistor or a regulator), the dropped voltage is converted to heat. That's one reason that transformers often have multiple outputs. Each required voltage level has its own output from the transformer.

    One way to handle the heat problem is to use components that can handle more heat (and voltage) than a TO-220 type regulator. A normal TO-3 size NPN transistor (with hefty heat sink), a zener diode and a current limiting resistor can do the job.

    A transistor has beta or gain. That simply means that a low current can control a high current. Small transistors typically have lots of gain and large transistors usually have less gain. Two transistors can be combined so that the gain of one transistor is multiplied by the gain of the second transistor (darlington configuration).

    Here's a simple circuit that shows how a zener diode could be used to control the voltage allowed through a transistor. Assuming that the transistor has a gain of 30, the resistor is chosen to allow about 1/30th of the desired current to pass through the base of the transistor; therefore, if 0.5A is required at 24 volts from the transistor, then 0.50/30 = 0.016A needs to pass through the resistor. The resistor needs to be about 24 / 0.016A = 1440 ohms. The wattage of the resistor would be 24 X 0.016 = 0.38W, so a 1W, 1.2K resistor could be used along with a 25V, 5W zener diode. (Pick higher wattage resistors and zeners to keep the heat level down.) Remember that a transistor requires about 0.6V for its base/collector junction, so pick a zener diode that is 0.6V (or about 1 volt) higher in value than the voltage that you need.

    [Edited: Thanks Dave. You posted while I was writing. Your experiment verifies what I had assumed.]

    Attached Thumbnails Attached Thumbnails G540 and proximity switches-ps_transistor_zener_2-jpg  


  11. #11
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    208
    Downloads
    0
    Uploads
    0

    Default

    A fact of life for the do-it-yourselfer is that if you want to build your own CNC controller, you're going to have to understand some basic electronics. A good source for basic information is the internet. When you read a term that you don't understand, Google that term and read until you do understand it. Interfacing devices to a CNC controller are part of the life of those of us who build our own equipment.

    Some basic steps might help.

    Go to your nearest Radio Shack type store and buy a 9-volt battery and a connector for the 9-volt battery. Buy one of their white prototyping boards and a length of solid telephone connecting cable so that you'll have some solid wire for the prototyping board. Get a $5 wire stripper and a $5 pair of nippers so that you can cut and strip the telephone wire. If they have some of their paper-back books that explain simple electronics, buy a few of those, too. Get a package of NPN and PNP transistors, some resistors (1K, 10K), some LEDs and experiment until you can get the transistor to turn the LED on and off.

    Once you can do that, you'll have learned about 75% of what you'll need to know to connect an external device to a CNC controller.

    After you've got the transistors and LEDs working, get a 7805 voltage regulator to give you 5VDC from the 9-volt battery. Buy some TTL chips (7400, 7404, etc.). Learn how to make the TTL chip turn the LED on and off.

    At this point, you're almost there.

    Get a few opto-isolators (4N25 are common) and learn how to turn the inputs on and off to make the outputs turn on and off.

    Every interface that I build is based on those simple components. Sometimes I use an 89C2051 micro-controller, but that's just a programmable 20-pin chip that can replace a whole board full of standard TTL chips.

    When you're ready to build a permenant circuit board, download the free software from ExpressPCB (or other similar software). That software contains both a schmatic package as well as a board layout package. It includes a library that contains hundreds of common devices. It has a simple tutorial to get you started and it allows you to directly upload your PC board to their fabrication facility. With ExpressPCB, you can build 2-layer and 4-layer boards of almost any reasonable size. They offer a service to make three 2.5X3.8 inch boards for you for about $70, including shipping, that will enable you to build many of the simple interfaces that you'll need without breaking the bank.

    If you think that a board that small wouldn't be of much value, think again. Last week I designed a board that holds five 20-pin micro-controllers, a watch-dog timer, an oscillator, two 14-pin "glue" chips and enough Phoenix connectors to allow me to monitor five stepper motors. That board allows me to modify the pulse width going to the steppers, modify the direction that the steppers turn, slave other steppers off one incoming signal, and, best of all, toggle a step signal back and forth on each axis to keep all axes active while a file is being run so that no single axis becomes inactive long enough for the Gecko to go into standby mode. That keeps the active axes from pushing around the inactive axes. Total time to draw the schematics and layout the PC Board was less than six-hours. A much simpler board that interfaced five proximity sensors, complete with five opto-isolators and a single 7408 AND gate chip took less than fifteen minutes from start of schmatic drawing to uploading the PC Board for fabrication.

    All it takes is a little time, a little desire, and about $100 worth of practice parts.



  12. #12
    Member
    Join Date
    Dec 2004
    Location
    usa
    Posts
    1865
    Downloads
    0
    Uploads
    0

    Default

    Of course, fixxit could just cut a small board on his mill as he has a high speed spindle and all he would need would be a few cutters if he doesn't have them already.

    Mike.

    Warning: DIY CNC may cause extreme hair loss due to you pulling your hair out.


  13. #13
    Registered
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    30
    Downloads
    0
    Uploads
    0

    Default

    Suggested wiring diagram(s) as promised earlier.

    David Campbell

    Attached Thumbnails Attached Thumbnails G540 and proximity switches-proximity-switch-wiring-pdf  


  14. #14
    Registered
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    30
    Downloads
    0
    Uploads
    0

    Default

    Updated wiring diagrams to include opto-coupler option.

    David Campbell

    Attached Thumbnails Attached Thumbnails G540 and proximity switches-proximity-switch-wiring-pdf  


  15. #15
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    208
    Downloads
    0
    Uploads
    0

    Default

    David,

    I'm wondering about the placement of the commutation diode. Wouldn't it normally be placed across the coil of the relay to route the back EMF? The Opto-22 datasheets that I have always show the diode going across the load (coil) rather than across the I/O module (G4ODC5).



  16. #16
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    208
    Downloads
    0
    Uploads
    0

    Default

    Here's a schematic showing an NPN Normally Open proximity sensor connected to a Gecko G540 via a 4N25 opto-isolator without the use of a relay.

    (NOTE: I have not tried this circuit because I don't own a G540. I'm using data from the G540 data-sheet and the information David Campbell posted yesterday at 4:47 a.m. The data sheet for the 4N25 shows that the input side can handle 80mA forward current. The 1K resistor limits that to about 10 - 12 mA, depending on the voltage drop across the LED. The output of a 4N25 is rated at 30VDC and 100mA. According to David's post, the input on the G540 sources less than 11 VDC and allows about 7mA of current. So the 4N25 opto-isolator is well with specs.)

    Attached Thumbnails Attached Thumbnails G540 and proximity switches-g540_prox-jpg  


  17. #17
    Registered
    Join Date
    Jul 2006
    Location
    USA
    Posts
    887
    Downloads
    0
    Uploads
    0

    Default

    did some testing....
    (BTW thanks guys for the help) Still a little out of my knowledge base....

    I wired the switch, checked to make sure pos went to pos ect.

    when the switch gets activated..... (RED LED on) the black wire appears to go ground. I can take my DMM probes red on the 12 v positive. Touch the black wire out of the prox switch and a get a positive 12 v reading.



  18. #18
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    208
    Downloads
    0
    Uploads
    0

    Default

    When I recommended the 4N25 opto-isolator, I failed to take into account its transfer ratio, which is about 20%. That means that if the input side senses 10mA, the output side will only sink about 2mA. David stated that the G540 pulls about 7mA.

    You would need to use something like part number 751-1319-5-ND from Digi-key, which gives 100% transfer. (I normally use the Texas Instruments TIL-111 and TIL-113 opto-isolators, so I never worry about the transfer ratio. If the TIL-111 can't handle things, I just substitute the TIL-113 darlington.)


    Fixitt,
    If you're testing an NPN three-wire proximity sensor, the brown wire connects to +12 (+10 to +30 is acceptable). The black wire is the output. The blue wire connects to ground. If you connect a 1K, 1/2-watt resistor between +12 volts and the black wire, you should be reading about +12V when the sensor is not sensing its target and about 0V when the sensor is sensing its target.



  19. #19
    Member
    Join Date
    Jun 2005
    Location
    USA
    Posts
    208
    Downloads
    0
    Uploads
    0

    Default

    On the Geckodrive group (yahoo.com), I found a schematic for the G540. It shows that the inputs are opto-isolators from Seimens (ILQ74) with a transfer ratio of 35% (typical).

    The resistor is 2.2k. The voltage is 12VDC.

    From those specs, it looks like the G540 input would require a darlington configured opto-isolator, such as the 751-1319-5-ND from Digi-key, which is an 8-pin, dual-channel, opto-isolator from Vishay.



  20. #20
    Registered
    Join Date
    Jul 2006
    Location
    USA
    Posts
    887
    Downloads
    0
    Uploads
    0

    Default

    I want to thank all for your input..........
    I found that the safest way was the relay method. I only have one relay on hand, but wired it up and all seems well. I know I am loosing some accuracy with the mechanical relay, so I am thinking solidstate would be the better way to go.



Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

G540 and proximity switches

G540 and proximity switches