01-14-2019 01:43 AM
Hi.
My DAQ module 9401 has a digital counter input on it which it is a TTL 5V high/low signal. I am attempting to use it to count the pulses that an encoder puts out. The issue is that the encoder puts out 24 volt pulses, not the 5V that my DAQ can read. I was looking for some suggestions for solutions, whether it be through a few resistors or some more complicated circuitry.
01-14-2019 01:53 AM - edited 01-14-2019 01:54 AM
You can buy complete level shifting boards, no need to fiddle with resistors yourself. For instance this one: https://www.sparkfun.com/products/12009
Or buy a chip: https://nl.farnell.com/c/semiconductors-ics/logic/level-shifters
01-14-2019 02:38 AM
01-14-2019 03:14 AM
2 resistors that'll work as voltage divider should be easy enough. E.g. 1k + 4,2k, connect the DAQ over the 1k resistor.
/Y
01-14-2019 06:25 AM
@LennartM wrote:
For instance this one: https://www.sparkfun.com/products/12009
That one is not made for handling 24V. And finding level shifting chips that can handle 24V is also really hard (I have yet to run into one).
The simple solution is a resistor and Zenor diode circuit. For more isolation, a solid-state relay would be a good way to go.
01-14-2019 06:30 AM - edited 01-14-2019 06:32 AM
@crossrulz wrote:
@LennartM wrote:
For instance this one: https://www.sparkfun.com/products/12009
That one is not made for handling 24V. And finding level shifting chips that can handle 24V is also really hard (I have yet to run into one).
The simple solution is a resistor and Zenor diode circuit. For more isolation, a solid-state relay would be a good way to go.
Ah, didn't look at the specs enough. But an optocoupler is also a good option. For instance this one: https://www.amazon.com/24V-Optocoupler-Voltage-Level-Converter/dp/B06XKSFGXX
You do have to check if the speed is fast enough. An encoder signal can be quite fast. There is also a 80 kHz variant.
01-14-2019 09:53 AM - edited 01-14-2019 09:55 AM
Well if a simple voltage divider will not work why not just use a transistor and a couple resistors like this?
01-14-2019 03:02 PM
I like the idea of optoisolators particularly if there is a concern of galvanic isolation.
If R1 is blown you will have 24V on the base of the resistor.
Ben
01-14-2019 03:56 PM - edited 01-14-2019 03:57 PM
@Ben wrote:
I like the idea of optoisolators particularly if there is a concern of galvanic isolation.
If R1 is blown you will have 24V on the base of the resistor.
Ben
Why would R1 blow?
Even if if did all that would probably do is blow the transistor and put constant 5 volts on the output.
Nothing too tragic. Well except for shorting the 24V to ground through the shorted transistor...
04-16-2020 10:32 PM
More likely, it would "short" 24 volts to the 5 volts supply and the 5 volts input of the following electronics, which is quite dangerous for those electronics. The ground line has still another resistor in it. So that optocoupler in not a bad idea at all. But I agree that there is normally little worry for a 10K resistor (in this configuration) to blow up.