0
\$\begingroup\$

I have a 24V pressure switch that is loop powered. Here is the manual/datasheet. I'm trying to figure out how to read the sensor with an Arduino.

Obviously, the Arduino can't handle 24V, so I got some optocouplers (manual/datasheet)

The original schematic looked like this: Original Schematic

This, however, didn't seem to work. When I measured voltage across ports #1 and #2 (from the schematic), it measured between ~13V and ~20V (when the sensor was engaged vs not-engaged).

I'm not really sure how to fix this. I tried using a voltage divider (instead of an optocoupler), but, in my ignorance, I burned up one of my small resisters.

Thanks for any help!

UPDATE: New Schematic (the one above is old) enter image description here

asked Sep 11, 2017 at 21:00
\$\endgroup\$
12
  • \$\begingroup\$ I think that either the output of the optocoupler is not correctly wired (what's DI+ and DI-?) or you accidentally destroyed its LED. To make a test, use a 1-k resistor in series to a 9-V battery, and try to turn ON the LED. Do you see any variation on the rightside of the diagram? \$\endgroup\$ Commented Sep 11, 2017 at 21:15
  • 1
    \$\begingroup\$ So you used the optocoupler without a current-limiting resistor? \$\endgroup\$ Commented Sep 11, 2017 at 21:21
  • \$\begingroup\$ Are you trying to scale the signal from 24V to 5V? If so, use an op-amp with gain of 1/5. \$\endgroup\$ Commented Sep 11, 2017 at 21:23
  • \$\begingroup\$ @next-hack, This is actually an older schematic, my bad. In reality, this was for a National Instruments DAQ box, but I changed it to an Arduino. The post has an update of the new schematic. \$\endgroup\$ Commented Sep 11, 2017 at 21:24
  • \$\begingroup\$ Are you using the NPN or the PNP pressure switch? I think you have to order one or the other. \$\endgroup\$ Commented Sep 11, 2017 at 21:24

1 Answer 1

0
\$\begingroup\$

Here is the final (working) schematic: Final Schematic

In the end, I actually ended up using an NI DAQ box (USB-6255). This would still work with an Arduino though.

Thanks for all the help! Joe

answered Sep 12, 2017 at 16:09
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.