Pick up your orders anytime, hassle-free!
Orders placed by 2:00 PM are shipped the same day. Delivered within 24h!
Reliable products, worry-free!
Unused items? No questions asked!
E18-B03N1 is a diffuse reflective photoelectric sensor (photoelectric switch) ideal for non-contact object detection in DIY projects, small production lines, part counting, or passage/position detection. It runs directly from 6–36 VDC and provides a NPN output, Normally Open (NO) contact—easy to integrate into automation, controllers, or microcontrollers.
The sensing distance is adjustable (via sensitivity trim). Behavior naturally varies with the target’s color/reflectivity: light/reflective objects are detected farther away than dark/matte ones.
Note: performance depends on the target’s color, texture, and size, as well as the sensitivity setting.
Purpose: read the sensor’s NPN output with an Arduino at 5 V.
Connections (typical – NPN open-collector output):
// E18-B03N1 – read on D2 with internal pull-up
const int SENSOR_PIN = 2;
void setup() {
pinMode(SENSOR_PIN, INPUT_PULLUP); // 5V pull-up
Serial.begin(115200);
}
void loop() {
bool object_detected = (digitalRead(SENSOR_PIN) == LOW); // LOW = active
if (object_detected) {
Serial.println("Object detected!");
}
delay(50);
}
Alternatively (isolation recommended if you are unsure of the output type): power the sensor at 12 V and route OUT through an optocoupler (e.g., PC817) to the Arduino. This eliminates the risk of accidentally applying >5 V to the MCU pin.
Your review appreciation cannot be sent
Report comment
Report sent
Your report cannot be sent
Write your review
Review sent
Your review cannot be sent
Reference: ZHTTVK_DHT11
Reference: HCYMTH_NTC-3950-100k
check_circle
check_circle