# Connecting IR Proximetry Detector E18-D80NK

**URL:** <https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740>\
**Category:** Sensors\
**Created:** [February 23, 2023, 7:28am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740 "2023-02-23T07:28:47Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![foamergene](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@foamergene](https://forum.arduino.cc/u/foamergene)\
**Post date:** [February 23, 2023, 7:28am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/1 "2023-02-23T07:28:47Z")

</div>

This proximity Sensor is excellent. For my outside app, folks said I would get false detections from sunlight, etc. However, this detector modulates its output signal and will only confirm a reflection if the modulation matches. I have shown it directly into the AZ sun without getting false detections. One consideration is its output is either near zero or 5V, too much for a 3.3V MicroController. I'm inserting a combination Pull-up resistor and voltage divider between the detector and the processor.

Start with a 220k resister between +5 and the signal lead of the detector. Continue the "tree" with a 6700 ohm resistor to the (low active) GPIO input of the processor. Then, finally connect a 22k resistor from there to ground. The processor will see either nearly 0 or 3.39V, both within the safety range. (I have a schematic drawn, but I don't see how to attach it)!

---

<div class="post-metadata">

**Author:** ![Ron\_Blain](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ron_blain/32/1126393_2.png) [@Ron\_Blain](https://forum.arduino.cc/u/Ron_Blain)\
**Post date:** [February 23, 2023, 3:30pm UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/2 "2023-02-23T15:30:26Z")

</div>

A little lost with your description but you have a max of 5.0 volts from sensor either a True or False (0.0 volt). I would just run with a 2:1 simple divider. Since you mention 220K I would use a pair of 220K resistors like so or a pair of 10 K resistors.

![Vdiv](https://europe1.discourse-cdn.com/arduino/original/4X/b/0/2/b02bc2a0a5c3ce23836d7eff3fb936dbedbcaeef.png)

With 5.0 Volts Applied Vout is 2.5 volts which should be a logic high (True) on your uC. Why do you want a pullup in the mix?

Ron

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [February 24, 2023, 1:53am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/3 "2023-02-24T01:53:35Z")

</div>

Yes, only a 2-resisor divider will do.  
5volt and 3.3volt is a 3:2 ratio. Pick two resistors with that ratio.  
R1 = 1k and R2 =2k (2k2) is common for high speed applications.  
Could increase that 10x for low speed and/or short wiring.  
Data could be corrupted with high resistor values and high bitrates.  
Leo..

Edit: Didn't see the previous thread.  
An NPN sensor doesn't need a voltage divider, so this and the previous post are irrelevant.  
You have wasted out time. Thank you..

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [February 24, 2023, 2:22am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/4 "2023-02-24T02:22:30Z")

</div>

Please do not [cross post](https://forum.arduino.cc/t/simple-level-shifter-for-ttl-to-3-3v/1094121)

---

<div class="post-metadata">

**Author:** ![foamergene](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@foamergene](https://forum.arduino.cc/u/foamergene)\
**Post date:** [February 24, 2023, 3:37am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/5 "2023-02-24T03:37:19Z")

</div>

The pullup is specified by the manufacturer. Without it , the resultant output voltage drops a little to 3.3 from 3.47V in my test setup. That is consistent with the manufacturer saying it's TTL output, but not with them specifying a 10k pullup. They did not say "open collector" which is what I would expect to work with a pullup.

---

<div class="post-metadata">

**Author:** ![foamergene](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@foamergene](https://forum.arduino.cc/u/foamergene)\
**Post date:** [February 24, 2023, 3:38am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/6 "2023-02-24T03:38:49Z")

</div>

Oops. I thought I was replying to two completely separate conversations.

---

<div class="post-metadata">

**Author:** ![foamergene](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@foamergene](https://forum.arduino.cc/u/foamergene)\
**Post date:** [February 24, 2023, 3:44am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/7 "2023-02-24T03:44:41Z")

</div>

Subsequently, I took a suggestion and looked at Level-shifting circuit modules. They would be simpler for my case of needing 4 shifts in one application. One version does not have a ground connection for itself as long as both logic level sides share a common ground. And they are cheap!

---

<div class="post-metadata">

**Author:** ![foamergene](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@foamergene](https://forum.arduino.cc/u/foamergene)\
**Post date:** [February 24, 2023, 12:52am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/8 "2023-02-24T00:52:29Z")

</div>

Using smart IR Proximity Detector E18-D80NK-ETC outdoors. This detector is very sensitive to its own beam, but ignores almost all other light (even direct AZ sunlight). However, it operates at 5V and is advertised to be TTL output. However the data sheet examples all have a 10k pull-up resister on the signal (output) lead. I'm using a three resister "tree" to keep 5V out of vulnerable inputs of 3.3V devices. From +5 to Detector output is 220k. From there to 3.3V input it's 6.7k. From there to ground, it's 22k. Much simpler than the use of level shifting ICs.

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [February 24, 2023, 2:11am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/9 "2023-02-24T02:11:46Z")

</div>

According to [this data sheet](https://datasheet4u.com/datasheet-pdf/ETC/E18-D80NK/pdf.php?id=1311839) and[this one](https://tienda.tettsa.gt/wp-content/uploads/2021/08/E18-D80NK-datasheet.pdf) the output of that sensor is open collector NPN, which is quite common for such sensors.

If so, you need only one pullup resistor to 3.3V to interface it with a 3.3V device. That could even be the internal input pullup resistor on Arduino, specified by `pinMode(pin, INPUT_PULLUP)`.

---

<div class="post-metadata">

**Author:** ![qubits-us](https://avatars.discourse-cdn.com/v4/letter/q/5daacb/32.png) [@qubits-us](https://forum.arduino.cc/u/qubits-us)\
**Post date:** [February 24, 2023, 3:26am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/10 "2023-02-24T03:26:02Z")

</div>

outdoor install, might want to isolate the input..

[isolated level shifter..](https://www.amazon.com/dp/B07TDYW5FF)

---

<div class="post-metadata">

**Author:** ![gilshultz](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gilshultz](https://forum.arduino.cc/u/gilshultz)\
**Post date:** [February 24, 2023, 3:35am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/11 "2023-02-24T03:35:10Z")

</div>

I would suggest you also add a pull up resistor of about 3K to the 3V3. This will help noise immunity.

---

<div class="post-metadata">

**Author:** ![Ballscrewbob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ballscrewbob/32/950458_2.png) [@Ballscrewbob](https://forum.arduino.cc/u/Ballscrewbob)\
**Post date:** [February 24, 2023, 4:05am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/12 "2023-02-24T04:05:36Z")

</div>

Your two or more topics on the same or similar subject have been merged.

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you also take a few moments to [Learn How To Use The Forum](https://forum.arduino.cc/index.php?topic=710766.0).

> [@](#):
>
> Hello, Welcome to the Arduino Forum. This guide explains how to get the best out of this forum. Please read and follow the instructions below. Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is frustrating for you and frustrating for us. The people who try to help with your pro…

It will help you get the best out of the forum in the future.

- Your OS and version can be valuable information, please include it along with extra security you are using.

- Always list the version of the IDE you are using and the board version if applicable.

- Use quote or add error messages as an attachment NOT a picture.

- How to [insert an image](https://forum.arduino.cc/t/a-thread-with-tips-and-tricks-for-the-new-discourse-based-arduino-forum/849827/3) into your post. ( Thanks @sterretje )

- Add your sketch where applicable but please use CODE TAGS ( **\</\>** )

- Add a SCHEMATIC were needed even if it is hand drawn

- Add working links to any specific hardware as needed ( **NOT** links to similar items)

- Remember that the people trying to help cannot see your problem so give as much information as you can

**COMMON ISSUES**

- Ensure you have **FULLY** inserted the USB cables.

- Check you have a [COMMON GROUND](https://forum.arduino.cc/index.php?topic=653831.msg4406618#msg4406618) where required. ( Thanks @Perry)

- Where possible use USB 2.0 ports or a USB 2.0 POWERED HUB to rule out USB 3.0 issues.

- Try other computers where possible.

- Try other USB leads where possible.

- You may not have the correct driver installed. [CH340/341](http://www.wch.cn/download/CH341SER_EXE.html) or [CP2102](https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers) or FT232 [VCP Drivers - FTDI](https://ftdichip.com/drivers/vcp-drivers/)

- There may be a problem with the board check or remove your wiring first.

- Remove any items connected to pins 0 and 1.

**COMPUTER RELATED**

- Close any other serial programs before opening the IDE.

- Ensure you turn off any additional security / antivirus just to test.

- There may be a problem with the PC try RESTARTING it.

- You may be selecting the wrong COM port.

- Avoid cloud/network based installations where possible OR ensure your Network/Cloud software is RUNNING.

- Clear your browsers CACHE.

- Close the IDE before using any other serial programs.

- Preferably install IDE’s as ADMINISTRATOR or your OS equivalent

**ARDUINO SPECIFIC BOARDS**

- CH340/341 based clones do not report useful information to the “get board info” button.

- NANO (Old Types) some require you to use the OLD BOOTLOADER option.

- NANO ( **ALL Types** ) See the [specific sections](https://forum.arduino.cc/index.php?board=135.0) lower in the forum.

- NANO ( **NEW Types** ) [Install your board CORE’s.](https://forum.arduino.cc/index.php?topic=642505.0)

- Unless using EXTERNAL PROGRAMMERS please leave the IDE selection at default “AVRISP mkII”.

- Boards using a MICRO usb connector need a cable that is both DATA and CHARGE. Many are CHARGE ONLY.

**CREATE editor install locations.**

- On macOs ~/Applications/ArduinoCreateAgent-1.1/ArduinoCreateAgent.app/Contents/MacOS/config.ini

- On Linux ~/ArduinoCreateAgent-1.1/config.ini

- On Windows C:\Users[your user]\AppData\Roaming\ArduinoCreateAgent-1.1

_ **Performing the above actions may help resolve your problem without further help.** _

**Language problem ?**

**Try a language closer to your native language:**

- [中文 (Chinese)](https://forum.arduino.cc/index.php?board=99.0)

- [Deutsch - German](https://forum.arduino.cc/index.php?board=31.0)

- [Español - Spanish](https://forum.arduino.cc/index.php?board=32.0)

- [Français - French](https://forum.arduino.cc/index.php?board=33.0)

- [অসমীয়া, বাংলা, बड़ो - India](https://forum.arduino.cc/index.php?board=82.0)

- [Italiano - Italian](https://forum.arduino.cc/index.php?board=34.0)

- [Nederlands - Dutch](https://forum.arduino.cc/index.php?board=77.0)

- [Portugues - Portuguese](https://forum.arduino.cc/index.php?board=35.0)

- [Россия - Russia](https://forum.arduino.cc/index.php?board=120.0)

- [Scandinavia Swedish, Suomi - Finnish, Norsk - Norwegian](https://forum.arduino.cc/index.php?board=36.0)

**Thanks to all those who helped and added to this list.**

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [February 24, 2023, 4:16am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/13 "2023-02-24T04:16:30Z")

</div>

From the spec page:  
"and a 10K Ohm resistor between Brown and Black."  
Which tells me that this is an open-collector NPN sensor.

My pea-brain tells me that you **don't need a resistor or voltage divider or level shifter**.

Measure the output of the sensor with just 5volt/ground connected to the sensor.  
No resistor, no Arduino.  
If the output is 0volt and stays 0volt, then it's an NPN sensor.

If so, then you can connect the output directly to the 3.3volt-logic pin.  
With internal pull up enabled.  
`pinMode(sensorPin, INPUT_PULLUP);`

If... you get false triggers from noise pickup from a long wire, then you could add a 10k resistor between Arduino pin and **Arduino 3.3volt VCC** , and/or a 10-100n capacitor from pin to ground.  
Leo..

---

<div class="post-metadata">

**Author:** ![foamergene](https://avatars.discourse-cdn.com/v4/letter/f/a88e4f/32.png) [@foamergene](https://forum.arduino.cc/u/foamergene)\
**Post date:** [February 24, 2023, 6:00am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/14 "2023-02-24T06:00:47Z")

</div>

Thank you. The first datasheet that you referenced is the one that got me confused. Note in that circuit diagram the 10k resistor labeled "Pull-up" is in series going to D5.  
However, another published data sheet (IR Sensor Switch E18-D80NK-N-ETT) specifically says the output is TTL. Hence my confusion. Further, the DEVMO brand sample I bought from Amazon with +5 to the detector V++ and only a 10k PU to 3.3V yields 4.7V out when IR reflection is absent, which is consistent with TTL output rather than Open-Collector NPN.

Button line, different outputs by different manufacturers.

I hope this clears things up, and I will be looking for a model that has Open Collector output going forward.

---

<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:** [August 23, 2023, 6:01am UTC](https://forum.arduino.cc/t/connecting-ir-proximetry-detector-e18-d80nk/1093740/15 "2023-08-23T06:01:08Z")

</div>

Closed on August 23, 2023, 6:01am UTC

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