# Help needed with a 24 V Sensor

**URL:** <https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868>\
**Category:** General Electronics\
**Created:** [November 17, 2024, 1:43pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868 "2024-11-17T13:43:44Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![pintteros](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pintteros/32/1121170_2.png) [@pintteros](https://forum.arduino.cc/u/pintteros)\
**Post date:** [November 17, 2024, 1:43pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868/1 "2024-11-17T13:43:44Z")

</div>

Hi Guys, i am new to this forum.  
I have a problem:  
i am trying to connect a sensor (24 v ) to Arduino. I looked everywhere, but i still dont understand what i am doing wrong. when i measure the sensor Output sinal , i get 24 v. thats too much for Arduino. Therefore, i bought a 4 channel Optocoupler. i did the wiring, but somehow , i am getting more than 24v from output. i can't connect the output to arduino, otherwise i will fry it.  
Here's a small drawing of how i tried to do it. maybe someone can help me .

 ![Setup](https://europe1.discourse-cdn.com/arduino/original/4X/e/8/9/e89bf7900ea6c34fe377ff43ada05bd7a9622edd.png)

---

<div class="post-metadata">

**Author:** ![anon95813201](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@anon95813201](https://forum.arduino.cc/u/anon95813201)\
**Post date:** [November 17, 2024, 1:47pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868/2 "2024-11-17T13:47:47Z")

</div>

What is this sensor?

---

<div class="post-metadata">

**Author:** ![pintteros](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pintteros/32/1121170_2.png) [@pintteros](https://forum.arduino.cc/u/pintteros)\
**Post date:** [November 17, 2024, 1:48pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868/3 "2024-11-17T13:48:53Z")

</div>

Hi Jim . Is a reflexion sensor .

> **[Spiegelreflexschranke universal (P1NL101)](https://www.wenglor.com/de/Sensoren/Optoelektronische-Sensoren/Spiegelreflexschranken/Spiegelreflexschranken-universal/Spiegelreflexschranke-universal/p/P1NL101)**
>
> Die Spiegelreflexschranke arbeitet mit Rotlicht und einem Reflektor. Sie erfasst Objekte auch mit spiegelnden oder glänzenden Oberflächen bei hoh...

---

<div class="post-metadata">

**Author:** ![pintteros](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pintteros/32/1121170_2.png) [@pintteros](https://forum.arduino.cc/u/pintteros)\
**Post date:** [November 17, 2024, 1:58pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868/4 "2024-11-17T13:58:02Z")

</div>

Here's a list with the devices I have

1. Sensor

2. LightingWill Switching Power Supply 24 V 2.5 A 60 W Power Supply, LED Transformer Switching Converter AC 230 V to DC 24 Volt, Adapter Transformer for LED Strip Lights, 3D Printer, CCTV, LED Lighting [LightingWill Schaltnetzteil 24V 2,5A 60W Netzteil, LED Trafo Schaltwandler AC 230V auf DC 24 Volt, Adapter Transformator für LED Streifen Lichter, 3D Drucker, CCTV, LED Beleuchtung : Amazon.de: Baumarkt](https://amzn.eu/d/di7M98W)

3.4-Kanal-Optokoppler-Isolationsmodul, 24V bis 5V 4 Kanal Optokoppler Isolator PLC Signalpegel Spannungswandler Modul [4-Kanal-Optokoppler-Isolationsmodul, 24V bis 5V 4 Kanal Optokoppler Isolator PLC Signalpegel Spannungswandler Modul : Amazon.de: Gewerbe, Industrie & Wissenschaft](https://amzn.eu/d/4RlfhAP)  
4. Arduino Mega 2560

---

<div class="post-metadata">

**Author:** ![anon95813201](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@anon95813201](https://forum.arduino.cc/u/anon95813201)\
**Post date:** [November 17, 2024, 2:12pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868/5 "2024-11-17T14:12:03Z")

</div>

> [@pintteros](#):
>
> , i am getting more than 24v from output. i can't connect the output to arduino,

As far as I can tell you have it all connected the right way.  
Are you saying that you are seeing 24V between Q1 and GND?  
How are you measuring the voltage?

---

<div class="post-metadata">

**Author:** ![pintteros](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pintteros/32/1121170_2.png) [@pintteros](https://forum.arduino.cc/u/pintteros)\
**Post date:** [November 17, 2024, 2:15pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868/6 "2024-11-17T14:15:44Z")

</div>

with a multimeter i've tried 01 and VCC on the Optocoupler

---

<div class="post-metadata">

**Author:** ![anon95813201](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@anon95813201](https://forum.arduino.cc/u/anon95813201)\
**Post date:** [November 17, 2024, 2:19pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868/7 "2024-11-17T14:19:25Z")

</div>

> [@pintteros](#):
>
> i've tried 01 and VCC on the Optocoupler

If you measure between Vcc and GND is it 5V?  
If you measure 24V between Q1 and GND then something is wrong with the optocoupler. Try one of the other channels.

---

<div class="post-metadata">

**Author:** ![pintteros](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pintteros/32/1121170_2.png) [@pintteros](https://forum.arduino.cc/u/pintteros)\
**Post date:** [November 17, 2024, 2:24pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868/8 "2024-11-17T14:24:02Z")

</div>

Ive tried with second channel. I am getting 4.83V now. I was worried i did something wrong with the wiring. When i measure O2 and VCC i get 4.82V,measuring VCC and GND i get 5V.  
i assume now is safe to connct O2 to Arduino. Thanks alot for your help

---

<div class="post-metadata">

**Author:** ![anon95813201](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@anon95813201](https://forum.arduino.cc/u/anon95813201)\
**Post date:** [November 17, 2024, 2:26pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868/9 "2024-11-17T14:26:58Z")

</div>

> [@pintteros](#):
>
> i assume now is safe to connct O2 to Arduino.

Should be OK.  
Maybe at first you connected something wrong and damaged 01 output.

---

<div class="post-metadata">

**Author:** ![pintteros](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/pintteros/32/1121170_2.png) [@pintteros](https://forum.arduino.cc/u/pintteros)\
**Post date:** [November 17, 2024, 2:29pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868/10 "2024-11-17T14:29:06Z")

</div>

that's how i'll learn in future: asking,searching documentation and breaking things 🙂 .Thank you very much for your help

---

<div class="post-metadata">

**Author:** ![anon95813201](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@anon95813201](https://forum.arduino.cc/u/anon95813201)\
**Post date:** [November 17, 2024, 2:29pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868/11 "2024-11-17T14:29:40Z")

</div>

Have fun!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 16, 2025, 2:30pm UTC](https://forum.arduino.cc/t/help-needed-with-a-24-v-sensor/1322868/12 "2025-05-16T14:30:18Z")

</div>

Closed on May 16, 2025, 2:30pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
