G540 and proximity switches - Page 2


Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 49

Thread: G540 and proximity switches

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

    Default

    I've been over-thinking the proximity sensor design. Since the G540 already has opto-isolators built in, a 2-wire proximity sensor could be connected directly to the G540 without the need of an external power supply and without the need of an external opto-isolator.

    The G540 has an internal 12VDC that connects to the four inputs via 2.2K resistors. That means that the external device only has to sink 5mA. The AMI-AO-2H (quick disconnect) and AMI-AO-2A (standard cable) proximity sensors from www.automationdirect.com can easily handle that job.

    Here's a schematic showing which wires would go to the G540 input pin(s) and ground. Note that the quick-disconnect cable uses the brown and the black wire and that the standard cable uses the brown and the blue wire. In either case, the brown wire connects to the G540 input pin.

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


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

    Default

    Quote Originally Posted by Fixittt View Post
    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.
    You probably not going to loos too much accuracy at all.

    A normal relay has a 5 msec change overtime, if you are moving 2"/sec (120"/min) this translates to an extra 10 thou of an inch overshoot. Normally Mach3 is configured to immediately stop all drives and then slowly back out, if the back out rate is something like 3"/min (1/20" per sec) then the error is in the sub 1 thou of an inch range.

    David Campbell



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

    Default

    thought I would post this as a thank you for all the wireing help.

    If you listen you can hear the relays click Also thats stargate playing in the background.

    "http://www.youtube.com/watch?v=O5UkTQjegAM&feature=channel_page"]YouTube - Minitech homing sub routine



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

    Default

    Stargate Atlantis?

    Mike

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


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

    Default

    hahaha Yeah...... marathon today, got the tv cranked up in the living room for background noise..... Helps me think....



  6. #26
    Registered
    Join Date
    Aug 2008
    Location
    US
    Posts
    44
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Richards View Post
    I've been over-thinking the proximity sensor design. Since the G540 already has opto-isolators built in, a 2-wire proximity sensor could be connected directly to the G540 without the need of an external power supply and without the need of an external opto-isolator.

    The G540 has an internal 12VDC that connects to the four inputs via 2.2K resistors. That means that the external device only has to sink 5mA. The AMI-AO-2H (quick disconnect) and AMI-AO-2A (standard cable) proximity sensors from The best way to buy industrial controls--low prices, fast shipping and superior service. can easily handle that job.

    Here's a schematic showing which wires would go to the G540 input pin(s) and ground. Note that the quick-disconnect cable uses the brown and the black wire and that the standard cable uses the brown and the blue wire. In either case, the brown wire connects to the G540 input pin.
    Did you ever try this to see if it works?



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

    Default

    It works fine.

    I have an AM1-A0-2A sensor connected to my G540 right now. The brown wire is connected to terminal 1. The blue wire is connected to terminal 12. In Mach 3 I've assigned X++ to pin 10, active low. When I put a piece of metal close enough to the sensor, the diagnostic screen shows that the M1++ limit has been sensed, and I have to push the reset button to continue.



  8. #28
    Registered
    Join Date
    Aug 2008
    Location
    US
    Posts
    44
    Downloads
    0
    Uploads
    0

    Default

    Those are NO switches.

    How did you overcome the chance of them failing?



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

    Default

    A proximity senses metal. It's up to you to decide how you're going to use it. Gerald at MechMate designed his machine so that the sensor detects a 'hole', i.e. a metal strip is in close enough proximity to the sensor so that the sensor is always active until it comes to a hole in the metal strip, then it goes inactive.

    You could do the same if you choose to use a N/O sensor.

    On my Shopbot PRT-Alpha, I used N/O sensors to sense a bolt head. In my case, a defective sensor would not have been able to sense the bolt head; however, my startup routine included zeroing the X-axis and the Y-axis. That safety check verified that the sensor was working - before work started for the day.

    The machines that I use have very robust stop blocks that are designed to stop a run-away axis. Before adding proximity sensors to my machine, I hit those blocks a few times. No damage was done to the machine, but my ego took a hit every time that happened.



  10. #30
    Registered
    Join Date
    Aug 2008
    Location
    US
    Posts
    44
    Downloads
    0
    Uploads
    0

    Default

    Have you tried running multiple ones in parallel?

    I understand the idea of NC and I understand how you have yours configured as well. hmmm...some things to think about.



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

    Default

    No, I haven't tried using proximity sensors in parallel. Because I don't have control of the entire circuit, I always build my process controllers to have only one input per signal.

    If the input is truly Open Collector, you could use several SINKING sensors in parallel. If ANY ONE of the sensors went active, the Open Collector would be pulled LOW and the circuit would activate. If more than one sensor went active, no harm would be done - if the circuit truly had an Open Collector input.

    A lot of people like to visualize proximity sensors as though they were mechanical switches. That visualization leads to problems. Mechanical switches can be connected in series or in parallel, but most electronic switches cannot. When it only costs a few dollars to AND or to OR proximity sensors using off-the-shelf electronics, I always go to the trouble of designing a circuit that properly handles multiple signals.



  12. #32
    Registered
    Join Date
    Mar 2013
    Location
    Greece
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default

    Hi Fixxittt,
    I am new to the forum, searching about proximity switches connection for G540.
    These are the switches I have bought Sorotec - Induktiver Näherungsschalter
    I have been trying to connect them to my gecko g540 but with no luck at all. I have the same setup as yours, a 36V DC for the gecko and motors and a 12V Dc for the
    switches.
    Could you please tell me what relay did you use and how you have connect it?



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

    Default

    It looks like the Sorotec units have the standard wire colors, i.e. Brown = +12VDC, Black = sensor output, Blue = Ground. Connect +12VDC to the Brown wire. Connect the Blue wire to Ground and then connect the Black wire to one of the G540 inputs. When the proximity sensor "sees" metal, it will pull the sensor input to Ground. The units are NPN, which means that they "sink" current. (PNP units "source" current.)

    Look at the schematics for the G540 and you'll see that the inputs are connected via optocouplers that require the signal to pull the input to ground to turn on the optocoupler. That's exactly what the NPN proximity switch does. The anode of the optocoupler is connected internally to +12VDC. The cathode is connected to your device through a 4.7K resistor. That means that the NPN sensor will pull about 2.5mA through the diode part of the optocoupler, which is enough to turn on the transistor that pulls the parallel port pin LOW.

    Good luck.



  14. #34
    Registered
    Join Date
    Mar 2013
    Location
    Greece
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default

    Hi Richards,
    I tried it and it works!

    I wanted to connect all 3 switches in parallel so I could have 2 more available inputs in G540, as I already have a zero tool connected.
    My previous, mechanical switches were connected that way.
    But, as you wrote proximity switches cannot be connected in parallel.
    So, I thought to connect the X and Y axis and leave the Z unconnected, I want the last input for a relay for my spindle.

    Thank you!



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

    Default

    Buy an Arduino Uno (or similar) microcontroller and let the microcontroller provide a single output for multiple inputs. The Arduinos that I have on my test bench have at least 20 I/O lines available, more than enough to handle proximity sensors. Where I live, an Arduino Uno R3 costs about $30 U.S. The software is OpenSource (no cost). Breadboard layout and schematic capture software is also OpenSource, so designing a circuit costs nothing but your time. Tutorials are available to teach you how to build anything from simple circuits blink a single LED to more complex interrupt driven designs that can provide a pulse train to drive a stepper motor (via a Geckodrive stepper controller) at high speed.

    Visit the Ardunio website at arduino.cc. You'll quickly see just how much you can do with a $30 Arduino. (Currently, I have seven Arduinos sitting on my test bench, each running different 'sketches' that will go to final design next week. I test things on the Ardunio, work out the bugs in the design or software, then burn an ATmega328P microcontroller chip (about $2.00 each) and finally have circuit boards made. For one-off work, you can just use a "shield" and mount your connectors/parts to the shield, plug the shield into the Arduino and then run the "custom" project.)



  16. #36
    Registered
    Join Date
    Mar 2013
    Location
    Greece
    Posts
    6
    Downloads
    0
    Uploads
    0

    Default

    I have an arduino Uno already, if you see my other thread
    http://www.cnczone.com/forums/gecko_...ter_gecko.html
    I've used it to create a thermometer to monitor my G540 temperature.

    I am familiar with the software programing, as I already program. in .Net, but I am not so in the Hardware department!
    This was my first project with the arduino and I am already amazed about what you can do with this little think!
    I have yet a lot to learn.

    It never cross my mind to use it for the proximity sensors, though.
    I suppose that there isn't any pcb available for purchase, you must design your own.
    Have you done something similar to that?
    Do you have any pcb design you would like to share?

    Thanks



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

    Default

    SteliosA,

    I noticed your other post after I wrote about the Arduino. You'll have no trouble making a "black box interface" for your sensors. I've sent you some files. Those files are too large to post on this forum, but I'm hoping that they will help you with your interface.

    Microcontrollers in general, and Arduino in particular, make designing "black boxes" so simple. I define "black box" as the logic necessary to take one signal, or a group of signals from one device, and convert that signal or set of signals to be properly used by another device. The Arduino Uno R3 has a 16mhz clock that gives very fast response times for simple logic, so it makes an ideal solution for "black-box" applications. It is very well supported with numerous online tutorials and several "helper" applications, like Fritzing and Eagle that helps take your design from idea to finished PCB.



  18. #38
    Member ny_racer_xxx's Avatar
    Join Date
    Mar 2012
    Location
    USA
    Posts
    231
    Downloads
    0
    Uploads
    0

    Default Re: G540 and proximity switches

    I know this is an old thread, but I'm having issues with my Prox swicthes, and trying not to burn up my G540....

    I followed all the instructions here, but I'm seeing supply voltage on my black wire to ground, then goes to zero when in prox of metal.

    That can't be right??? They are labeled as NPN's, but they seem to be working like PNP's?

    They are Feebay craps, labeled SN04-N. I have another set of SN04-P, they do the same thing as the others, only difference is one acts as a NO, the other NC??

    The SN04-N, should be open to ground in one position, and short to ground in the other???



  19. #39
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24220
    Downloads
    0
    Uploads
    0

    Default Re: G540 and proximity switches

    I haven't read the whole thread but If the black is the collector output then if a N.O. NPN it will sink the load (output) to -ve or common when tripped (turn on).
    Also if open collector you need resistor from output to +ve.
    You can also get N.O. or N.C. in both PNP & NPN.
    Al.
    .

    CNC, Mechatronics Integration and Custom Machine Design

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


  20. #40
    Member ny_racer_xxx's Avatar
    Join Date
    Mar 2012
    Location
    USA
    Posts
    231
    Downloads
    0
    Uploads
    0

    Default Re: G540 and proximity switches

    Al, I appreciate the quick replay...

    My limited understanding with these SN04-N is that they don't need a resistor and NO would be no connection and closed would be short to ground. SN04-P PNP type would be open would be open and closed would be =ve voltage to signal...

    On the G540, I can't have any voltage on the inputs, just open or short to ground.

    CRT



Page 2 of 3 FirstFirst 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