From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-21-2019 09:21 AM
Hello!
I am looking for a schematic to convert a NPN sensor output to PNP using a relay.
Many thanks!
01-21-2019 10:58 AM
Do yourself a favour and use an optocoupler.
If no galvanic isolation is needed: 1x PNP + 2 Rs ?
But the basic question is WHY do you need to convert it?
Sensor out (OK, open collector?)
DAQ card?
01-22-2019 01:16 AM
Thank you for your answer!
I was thinking of a relay because I have some here already in the drawer. I am not concerned about life of the component due to the number of ON/OFF cycles.
The reason I need to convert my NPN (open collector) sensor is because my DAQ card has sinking inputs. I cannot buy the same sensors but PNP unfortunately.
Hope it helps! 🙂
01-22-2019 01:39 AM
Sinking input... how about a simple pull up resistor?
Relays are bouncing, have back EMF ...
01-22-2019 01:52 AM
I have tried already to put a resistor (see the picture attached), but the DAQ is always seeing the DI0 input at "high".
When I unplug the resistor from the 24VDC+ source, the input goes to 0.
When I "run" the sensor, nothing happens.
Maybe I am not doing it right?
01-22-2019 02:19 AM - edited 01-22-2019 02:21 AM
It would be helpful if you tell us the type of DAQ.
link to spec?
(while at it, for the sensor too?)
Seems that the OC output can't sink the current, together with the DAQ input signal levels one could find a solution BUT we (I) need the specs!
Try a voltage divider with 2x 10k where the resistor to COM is 'short cutted' by the OC output.
01-22-2019 02:38 AM
Here is the DAQ manual: http://www.ni.com/pdf/manuals/373504a_02.pdf
Here is the sensor datasheet: https://www.distrelec.ch/Web/Downloads/_t/ds/FT-210_eng_tds.pdf
01-22-2019 03:11 AM - edited 01-22-2019 03:14 AM
The FT-210 sensors generates a variable frequency according to the flow and not only an ON/OFF output.
How do you plan to read this signal with the NI-USB 9241 ?
I would use :
1) A frequency to voltage converter IC and a DAQ interface with an analog input.
2) Or a DAQ interface with a counter input to measure the frequency.
01-22-2019 03:30 AM
I would like to retain the NI9421 that I have, but I thought its digital input was capable of measuring frequencies using the chassis counter (cDAQ).
01-22-2019 09:00 AM
A simple 10k to 20k pull up resistor should work ... the 2.2k you used results in a 11mA current that run the 9421 into current limit.
Do you have an oscilloscope (or know someone, who ...;) ) to monitor the voltage at the DI?
If you poll the input, you need to know the minimum pulse length, to choose at least half sample time.
(with a 50% duty cycle and 915Hz pulse frequency, at least 2kHz , with 25% duty cycle you need 4kHz)