Hello Guest it is April 26, 2024, 08:46:57 AM

Author Topic: Can you wire a proximity sensor directly to a motion control board like a pokeys  (Read 6649 times)

0 Members and 1 Guest are viewing this topic.

Cool. I'll look this over. Consequently Pokeys support says my sensor has a built in resistor and is ok to use with my board.
Hi,
if your sensor has even a high value resistance pull-up resistor it will feed supply voltage albeit at low current back into your 57CNC. DON"T do it!

You are trying to save a few cents worth of components and some time soldering but putting your $200 controller at risk...

The vast majority of 3.3V (5V tolerant) ICs are very susceptable to damage from excess voltage being applied to its inputs.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Ok got it. I'll have to wade through what you posted. I don't get most of it. Let me read it over and see if I can figure it out.
Hi, found this old post. Hope that it is okay to post here. I am looking to install proximity NPN switches too with my PoKeys57cnc board. I am not an electrical engineer. I understand from this thread, that I have to wire a pull down resistor between the sensor and the keys57 board, but in this manual https://www.poscope.com/wp-content/uploads/downloads/Pokeys/LibrariesAndPlugins/Mach4%20and%20PoKeys57CNC%20-%20step%20by%20step%20guide.pdf page 15 it just sounds like you can connect the switch directly, but they mention an built in pull up resistor. So i am kind of confused here. I would of course like to do the right thing, so that I don't blow up my keys57 board.

Offline MN300

*
  •  298 298
    • View Profile
On page 15 it says
"Mechanical switches can be directly connected between the GND and the selected input terminal."

This tells me the 10K resistor in the figure at the bottom of the page is built in to the PoKeys57CNC.
A NPN sensor makes the same connection to ground as the mechanical switch.

The hazard occurs when the sensor has its own pull-up resistor to its power supply. If the sensor supply is over 5V the PoKeys input will see too much voltage.
Check the datasheet to see if your sensor has a pull-up resistor. If it does a 4.7V zener diode across the Pokeys input will limit the voltage.
Post the model number of your sensor if you have more questions.
I'm in the same situation of wanting to use my pokeys57cnc board with inductive prox probes (Fotek PS-05N which have npn transistor with an inbuilt 4k7 pullup resistor and run off 12V). 

On the previous page, joeaverage posted two options: either zener diode with series resistor, or blocking diode.  Is there any reason to prefer one option over the other ?  Seems like the single diode option would be just as good as any other, and simpler.
Hi,
a blocking diode will work IF the input to the 57CNC has a pull up resistor.  With the proximity sensor transistor
off the diode is reverse biased and the 57CNC pull up resistor takes the input high. When the proximity sensor transistor
is conducting the input pin of the 57CNC is pulled one diode drop (0.7V) above earth, to all intents and purposes
low.

If you use the zener and 470Ohm resistor  when the proximity sensor transistor is off the 12V of the proximity
sensor is limited by the dropper resistor (470 Ohm) and clamped to no more than the zener voltage (4.7V). In identical
manner when the proximity sensor transistor is conducting the input pin of the 57CNC will be pulled low but
without the diode drop.

In short both work. I personally would go with the zener/resitor because then I can be assured that at no time will excess voltage
be presented to the 57CNC, I consider that to be safer than the blocking diode alone.

Craig

'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline MN300

*
  •  298 298
    • View Profile
When a transistor is used as a switch the VCE(sat), the collector saturation voltage, is typically around 0.05-0.2 Volts. This is what the input would see as a low level.
A blocking diode in series with the input raises the low level about 0.6 volts, lowering the noise margin a bit.

If the pull-up of the sensor is just the 4700 ohm resistor, adding another 470 ohms in series makes little difference. Just the zener across the input will protect it.

If the sensor had an active pull up to 12 volts that would be a different case, the 470 ohm resistor would limit the current into the zener.
Hi MN300,

Quote
If the pull-up of the sensor is just the 4700 ohm resistor, adding another 470 ohms in series makes little difference. Just the zener across the input will protect it.
Yes 100% correct, as you say IF the sensor has an active pull up then the 470 Ohm resistor will save the either the sensor, the
zener and/or the 57CNC. That is the reason I suggested its inclusion, just in case. If OP chooses to leave it out and he
lets the smoke out it wont be because I didn't think about making the solution I recommended to him robust.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Thanks for the suggestions.  I think I'll go with the zener+470R combination even though not strictly necessary for my current situation (sensor has 4k7 pullup), just in case I change the sensors in the future and forget how I had things wired up.