Dynomotion

Group: DynoMotion Message: 15066 From: lmp582002 Date: 10/4/2017
Subject: Trouble With Switches
Attachments :
Howdy.. I am having trouble setting up my limit switches. I am trying to wire them directly into JP7 on the KFlop board. 

I am using Omron switches EE-SX671. Here is the data sheet:


Strange things are happening when I try to do this. As I watch the digital IO screen, the input just seems to flash on and off randomly. I have tried wiring several ways, but none of them seem to function.

I have successfully used these at 24V on the KStep or the Konnect. Unfortunately I only have the KFlop on this build.

The KFlop is good for 5V? Shouldnt I be able to get this to work? Does anyone have any ideas? Should I be using one of the IO on JP4 or JP6 with pull down resistors? Would I roast those because they are not 5V tolerant?

Scott

  @@attachment@@
Group: DynoMotion Message: 15067 From: Russ Larson Date: 10/5/2017
Subject: Re: Trouble With Switches [1 Attachment]

Scott,

I use these exact same optical limit sensors on my machine with the KFLOP and they work perfect.  I will run out in the garage and check how I have them wired.

Russ

 

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Wednesday, October 04, 2017 11:45 PM
To: DynoMotion@yahoogroups.com
Subject: [DynoMotion] Trouble With Switches [1 Attachment]

 

 

[Attachment(s) from lmp582002@... [DynoMotion] included below]

Howdy.. I am having trouble setting up my limit switches. I am trying to wire them directly into JP7 on the KFlop board. 

 

I am using Omron switches EE-SX671. Here is the data sheet:

 

 

Strange things are happening when I try to do this. As I watch the digital IO screen, the input just seems to flash on and off randomly. I have tried wiring several ways, but none of them seem to function.

 

I have successfully used these at 24V on the KStep or the Konnect. Unfortunately I only have the KFlop on this build.

 

The KFlop is good for 5V? Shouldnt I be able to get this to work? Does anyone have any ideas? Should I be using one of the IO on JP4 or JP6 with pull down resistors? Would I roast those because they are not 5V tolerant?

 

Scott

 


Virus-free. www.avast.com
Group: DynoMotion Message: 15068 From: Russ Larson Date: 10/5/2017
Subject: Re: Trouble With Switches [1 Attachment]

Scott,

In my case I actually have my KFLOP plugged onto a KANALOG board and my EE-SX671 attach to the KANALOG.  I also run my sensors on 24V and that is why I need to use the KANALOG board.  Those sensors work on 5-24V, but only some of the input pins on the KFLOP are 5V tolerant, so the OUT leg on the sensor might require a small resistor to help protect the kflop input.  I wired the 24V to + and L, and in your case you would tie those two pins to +5V.  The - leg ties to the minus side of the 5V supply.   When you do this correctly you can read the inputs and they will be steady on or off.

 

Russ

 

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Wednesday, October 04, 2017 11:45 PM
To: DynoMotion@yahoogroups.com
Subject: [DynoMotion] Trouble With Switches [1 Attachment]

 

 

[Attachment(s) from lmp582002@... [DynoMotion] included below]

Howdy.. I am having trouble setting up my limit switches. I am trying to wire them directly into JP7 on the KFlop board. 

 

I am using Omron switches EE-SX671. Here is the data sheet:

 

 

Strange things are happening when I try to do this. As I watch the digital IO screen, the input just seems to flash on and off randomly. I have tried wiring several ways, but none of them seem to function.

 

I have successfully used these at 24V on the KStep or the Konnect. Unfortunately I only have the KFlop on this build.

 

The KFlop is good for 5V? Shouldnt I be able to get this to work? Does anyone have any ideas? Should I be using one of the IO on JP4 or JP6 with pull down resistors? Would I roast those because they are not 5V tolerant?

 

Scott

 


Virus-free. www.avast.com
Group: DynoMotion Message: 15069 From: lmp582002 Date: 10/5/2017
Subject: Re: Trouble With Switches [1 Attachment]
Thanks for looking! I wire them the same way on the Konnect board and the KStep. Doesnt seem to work directly into the KFlop at 5V.

Maybe this has something to do with it being a digital IO rather than the optically isolated circuit on the other boards? 
Group: DynoMotion Message: 15070 From: TK A2 Date: 10/5/2017
Subject: Re: Trouble With Switches
That is correct. An open digital input will not necessarily turn off. It may float high or low. This is different from an opto input that works more like a light bulb when disconnected will definitely go off. 

Please do not drive any KFLOP input higher than 3.8V. Not even the 5V Tolerant ones. 

If your 5V sensor sources current you might connect to KFLOP inputs with the 150 ohm pull down resistors through a 100 ohm resistor. You may also need a 0.1uF ceramic capacitor filter capacitor if there are noise problems. 

HTH
Regards
TK

On Oct 5, 2017, at 6:55 AM, lmp582002@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Thanks for looking! I wire them the same way on the Konnect board and the KStep. Doesnt seem to work directly into the KFlop at 5V.


Maybe this has something to do with it being a digital IO rather than the optically isolated circuit on the other boards? 

Group: DynoMotion Message: 15071 From: cnc_machines Date: 10/5/2017
Subject: Re: Trouble With Switches
Tom,

That is news to me about not driving the 5V tolerant inputs past 3.8V? I have a mechanical style switch that I am planning to use for a tool setter. My plan was to hook it up to 5V+ and the other side to a 5V tolerant input. Sounds like a bad idea?  Sounds like it would be unreliable anyway if the input was floating around when the switch is opened.

Maybe a better option would be to hook it up to 3.3V+, and then to one of the inputs with pull down resisters? The resister would make sure it stays low, and when the switch closes high the 3.3V wouldnt overdrive?

My tool setter is bundled together with one of my stepper motor cables for about 3 feet(60V). Do you think there is any chance my tool setter could get a false signal from the stepper cable? Maybe the pull down on the input would be enough prevent noise?

Thanks,

Scott
Group: DynoMotion Message: 15072 From: Tom Kerekes Date: 10/5/2017
Subject: Re: Trouble With Switches
Hi Scott,

Yes KFLOP inputs must be driven high and low.

Using 3.3V would be better.  But running long wires with low voltage signals is asking for trouble.  That is why 24V opto isolated signals are normally used.  Are the stepper motor wires shielded to Earth Ground to limit the amount of noise they radiate?   Is the signal wiring shielded and connected to DC GND to protect the signals?  It may work if you add a 0.1uF filter capacitor to GND close to KFLOP.

Regards
TK

On 10/5/2017 8:01 AM, cnc_machines@... [DynoMotion] wrote:
 

Tom,


That is news to me about not driving the 5V tolerant inputs past 3.8V? I have a mechanical style switch that I am planning to use for a tool setter. My plan was to hook it up to 5V+ and the other side to a 5V tolerant input. Sounds like a bad idea?  Sounds like it would be unreliable anyway if the input was floating around when the switch is opened.

Maybe a better option would be to hook it up to 3.3V+, and then to one of the inputs with pull down resisters? The resister would make sure it stays low, and when the switch closes high the 3.3V wouldnt overdrive?

My tool setter is bundled together with one of my stepper motor cables for about 3 feet(60V). Do you think there is any chance my tool setter could get a false signal from the stepper cable? Maybe the pull down on the input would be enough prevent noise?

Thanks,

Scott

Group: DynoMotion Message: 15073 From: Moray Cuthill Date: 10/5/2017
Subject: Re: Trouble With Switches
I'll add that proximity sensors often don't switch perfectly, like a mechanical switch should.

When On, prox's will often still have a fraction of a volt voltage drop, which is fine when you're switching a reasonable load like a 12/24V opto or relay, but when you're relying on switching TTL levels directly, that fraction of a volt can be border line to guarantee a low state, and make things far more susceptible to noise.

When dealing with TTL levels, you're often far better using mechanical switches, or adding some form of interface which helps minimise the impact of noise. It doesn't have to use greater than 5V, you just need something where a reasonable amount of current has to flow to guarantee high or low. Even something like a reasonably sized pull down resistor, so you need 5V at 20mA will greatly reduce noise problems. It won't be quite as good as adding an opto, whereby you need the current flow to turn the opto on, but it's better than only a very weak resistor to pull the input low and not be pulled high by noise.

Moray

On Thu, Oct 5, 2017 at 5:19 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hi Scott,

Yes KFLOP inputs must be driven high and low.

Using 3.3V would be better.  But running long wires with low voltage signals is asking for trouble.  That is why 24V opto isolated signals are normally used.  Are the stepper motor wires shielded to Earth Ground to limit the amount of noise they radiate?   Is the signal wiring shielded and connected to DC GND to protect the signals?  It may work if you add a 0.1uF filter capacitor to GND close to KFLOP.

Regards
TK

On 10/5/2017 8:01 AM, cnc_machines@... [DynoMotion] wrote:
 

Tom,


That is news to me about not driving the 5V tolerant inputs past 3.8V? I have a mechanical style switch that I am planning to use for a tool setter. My plan was to hook it up to 5V+ and the other side to a 5V tolerant input. Sounds like a bad idea?  Sounds like it would be unreliable anyway if the input was floating around when the switch is opened.

Maybe a better option would be to hook it up to 3.3V+, and then to one of the inputs with pull down resisters? The resister would make sure it stays low, and when the switch closes high the 3.3V wouldnt overdrive?

My tool setter is bundled together with one of my stepper motor cables for about 3 feet(60V). Do you think there is any chance my tool setter could get a false signal from the stepper cable? Maybe the pull down on the input would be enough prevent noise?

Thanks,

Scott


Group: DynoMotion Message: 15074 From: cnc_machines Date: 10/5/2017
Subject: Re: Trouble With Switches
Attachments :
I did a bench test after looking at the wiring diagram. We use the same sensors with the konnect. I got it working, though I dont completely understand why. 

I put a 100 ohm resister between 5V+ and the output. This makes a voltage divider with the 150 ohm pull down resister on JP6. If I understand correctly when the switch energizes it completes the circuit between 5+ and the output. Not sure what is going on in the IC, but when I measure voltage between the out and ground it moves between 3V and 0.2V. This should be about perfect.

Voltage between the output and 5V moves between 4.5V and 1.5V. I am not sure what is going on inside of the switch. I dont know if this voltage potential could damage the KFlop. Maybe Tom can help
  @@attachment@@
Group: DynoMotion Message: 15075 From: Tom Kerekes Date: 10/5/2017
Subject: Re: Trouble With Switches [1 Attachment]
I'm not sure I understand what you are saying.

Actually the circuit diagram in your last email shows a "open collector" output.  That should operate like a switch from the Output to GND or an open circuit.  Not as you say completing the circuit to +5V.

The 100 ohm pull up to +5V volts should work as you describe as a voltage divider.

With the output open the voltage (relative to GND) should be:

5V x (150)/(100+150) = 3V

And when the Transistor turns on the voltage (relative to GND) should be ~ 0.2V

So that should work well as you stated.

Basic electronics dictates that if you have some voltage between 0V and 5V then the difference between the signal and 0V plus the difference between the signal and +5V should always add to 5V.   

Its like measuring one person 5ft tall and one person 3ft tall.  The distance from the top of one to the other must then measure 2ft.  If not, then something was measured wrong. 

So theoretically when the output is at 3V the voltage to +5V should be 2V not 1.5V.  Or that would indicate maybe the +5V supply is really only 4.5V.  Similarly when the output reads 0.2V then the voltage to +5V should read 4.8V not 4.5V.  Or that would indicate the +5V supply is really only 4.7V.

HTH
Regards
TK

On 10/5/2017 3:49 PM, cnc_machines@... [DynoMotion] wrote:
 
I did a bench test after looking at the wiring diagram. We use the same sensors with the konnect. I got it working, though I dont completely understand why. 

I put a 100 ohm resister between 5V+ and the output. This makes a voltage divider with the 150 ohm pull down resister on JP6. If I understand correctly when the switch energizes it completes the circuit between 5+ and the output. Not sure what is going on in the IC, but when I measure voltage between the out and ground it moves between 3V and 0.2V. This should be about perfect.

Voltage between the output and 5V moves between 4.5V and 1.5V. I am not sure what is going on inside of the switch. I dont know if this voltage potential could damage the KFlop. Maybe Tom can help