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
-
\$\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\$next-hack– next-hack2017年09月11日 21:15:10 +00:00Commented Sep 11, 2017 at 21:15
-
1\$\begingroup\$ So you used the optocoupler without a current-limiting resistor? \$\endgroup\$Mike– Mike2017年09月11日 21:21:40 +00:00Commented 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\$Mike– Mike2017年09月11日 21:23:14 +00:00Commented 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\$jojoguy10– jojoguy102017年09月11日 21:24:03 +00:00Commented 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\$jonk– jonk2017年09月11日 21:24:08 +00:00Commented Sep 11, 2017 at 21:24
1 Answer 1
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
Explore related questions
See similar questions with these tags.