{"product_id":"ldr-light-sensor-module-with-daynight-invert-logic-compoden","title":"LDR Light Sensor Module with Day\/Night Invert Logic | CompoDen","description":"\u003ch1\u003eLDR Light Sensor Module with Day\/Night Invert Logic – Digital Output, Adjustable Threshold\u003c\/h1\u003e\u003cp\u003eThe LDR Light Sensor Module with Day\/Night Invert Logic is a digital light detection module using an onboard comparator to provide a clean HIGH\/LOW signal based on ambient light levels. Ideal for automatic lighting, security systems, and robotics, it features an adjustable sensitivity potentiometer and a jumper to invert the output logic, making it versatile for both light-activated and dark-activated circuits. The module operates at 3.3V–5V and outputs a TTL-compatible signal directly to microcontrollers.\u003c\/p\u003e\u003ch2\u003eKey Specifications\u003c\/h2\u003e\u003ctable\u003e\n\u003cthead\u003e\u003ctr\u003e\n\u003cth\u003eSpecification\u003c\/th\u003e\n\u003cth\u003eValue\u003c\/th\u003e\n\u003c\/tr\u003e\u003c\/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003eOperating Voltage\u003c\/td\u003e\n\u003ctd\u003e3.3V to 5V DC\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eComparator IC\u003c\/td\u003e\n\u003ctd\u003eLM393\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eOutput Signal\u003c\/td\u003e\n\u003ctd\u003eDigital (TTL compatible); sink current 15mA\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eSensitivity Adjustment\u003c\/td\u003e\n\u003ctd\u003eOnboard potentiometer (100K)\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eLogic Inversion\u003c\/td\u003e\n\u003ctd\u003eJumper to select light-on or dark-on mode\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eBoard Size\u003c\/td\u003e\n\u003ctd\u003e32 mm x 14 mm\u003c\/td\u003e\n\u003c\/tr\u003e\n\u003c\/tbody\u003e\n\u003c\/table\u003e\u003ch2\u003eWhat You Can Build With This\u003c\/h2\u003e\u003cul\u003e\n\u003cli\u003eAutomatic porch light that switches on at dusk using a relay module.\u003c\/li\u003e\n\u003cli\u003eDarkness-activated LED strip for staircases or cabinets.\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"\/products\/kit-line-following-robot\"\u003eLine-following robot with ambient light sensing for course adjustments.\u003c\/a\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"\/products\/kit-real-time-clock-alarm\"\u003eSunrise alarm clock that triggers a buzzer when ambient light increases.\u003c\/a\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\u003ch2\u003eCompatibility\u003c\/h2\u003e\u003cp\u003eThis module works with any microcontroller that has a digital input pin, including Arduino Uno, Nano, Mega, ESP8266, ESP32, and Raspberry Pi (with appropriate level shifting for 3.3V logic). Connect the DO pin directly to a digital I\/O. The output is push-pull with onboard pull-up, so no external resistors are needed. Common pairings include relay modules, motor drivers, and LED strips.\u003c\/p\u003e\u003ch2\u003eWiring Notes\u003c\/h2\u003e\u003cp\u003eConnect VCC to 3.3V or 5V on your board, GND to ground, and DO to a digital input pin. The module includes a power LED and an output indicator LED. When using with inductive loads like relays, add a flyback diode and a transistor driver if the relay coil current exceeds the module’s 15mA sink capacity. No additional pull-up is required.\u003c\/p\u003e\u003ch2\u003eWhy Buy from Compoden\u003c\/h2\u003e\u003cp\u003eEvery component is sourced from verified suppliers and tested for compatibility before listing. We've spent 10 years building projects for makers, schools, and institutions across India. Ships from Bengaluru in 3-5 days. If defective on arrival, replace within 7 days.\u003c\/p\u003e\u003cdetails\u003e\u003csummary\u003eIs this compatible with Arduino Uno?\u003c\/summary\u003e\u003cp\u003eYes, the module works directly with the Arduino Uno at 5V logic. Connect VCC to 5V, GND to GND, and DO to any digital pin (e.g., pin 2) and read its state with digitalRead().\u003c\/p\u003e\u003c\/details\u003e\u003cdetails\u003e\u003csummary\u003eHow do I invert the output logic?\u003c\/summary\u003e\u003cp\u003eThe board has a 2-pin jumper header. Place the jumper on the pins marked L to get HIGH when light is above the threshold (light-on). Move it to pins marked D for HIGH when dark (dark-on).\u003c\/p\u003e\u003c\/details\u003e\u003cdetails\u003e\u003csummary\u003eWhat is the detection range?\u003c\/summary\u003e\u003cp\u003eThe sensitivity potentiometer adjusts the threshold from a few lux (dim light) to direct sunlight. Turn it clockwise for higher light thresholds. The onboard LDR responds across a wide spectrum.\u003c\/p\u003e\u003c\/details\u003e\n\u003cdiv class=\"compoden-handoff\" style=\"margin-top:24px;padding:16px;background:#f0f4ff;border-left:4px solid #2B4D8F;border-radius:4px;\"\u003e\n  \u003cp style=\"margin:0 0 6px 0;font-weight:600;color:#1A3560;\"\u003e📦 Free Setup Handoff Document Included\u003c\/p\u003e\n  \u003cp style=\"margin:0;font-size:0.95em;color:#333;\"\u003eEvery Compoden order includes a free setup handoff document — step-by-step instructions to get your component working within minutes. Download it via QR code on your package. The handoff document is also trained to help you troubleshoot the majority of problems.\u003c\/p\u003e\n\u003c\/div\u003e\n","brand":"Compoden","offers":[{"title":"Default Title","offer_id":53444957667693,"sku":"CDN-0305","price":45.0,"currency_code":"INR","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0999\/3997\/5533\/files\/image_1_c0e069e6-0465-43f6-8002-9d117bd3ecfd.jpg?v=1781512425","url":"https:\/\/compoden.com\/products\/ldr-light-sensor-module-with-daynight-invert-logic-compoden","provider":"Compoden","version":"1.0","type":"link"}