Tekko BDSimSimulatorProjects

অপ-অ্যাম্প নাইট লাইট — কোড ছাড়াইOp-Amp Comparator Night Light (LM358)

LDR আর 10 kΩ resistor মিলে supply ভাগ করে inverting input এ দেয়, আর নব non-inverting input এ ট্রিপ লেভেল ঠিক করে। অন্ধকারে sensor এর voltage নবের নিচে নামলে LM358 এর output HIGH হয়ে LED জ্বলে যায় — রাস্তার ল্যাম্পের আসল analogue ব্রেন, একটাও কোড ছাড়া।

The LDR and a 10 kΩ resistor divide the supply down to the inverting input, and the knob sets the trip level on the non-inverting one. When darkness drags the sensor voltage below the knob, the LM358 output swings HIGH and the LED lights — the analogue brain of a street light.

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

সার্কিট ডায়াগ্রাম · Circuit diagram

Op-Amp Comparator Night Light (LM358) circuit diagram — Breadboard power supply (3.3 V / 5 V), 9 V battery, Op-amp LM358 (comparator), Light sensor (LDR), Resistor 10000Ω, Knob (potentiometer), LED (yellow), Resistor 220Ω, Jumper wires

যা যা লাগবে · Parts you need

তার লাগানো · Wiring

9 V battery +→Breadboard power supply (3.3 V / 5 V) DC+
9 V battery -→Breadboard power supply (3.3 V / 5 V) DC-
Breadboard power supply (3.3 V / 5 V) V1→Light sensor (LDR) a
Light sensor (LDR) b→Resistor a
Resistor b→Breadboard power supply (3.3 V / 5 V) GND
Breadboard power supply (3.3 V / 5 V) V1→Op-amp LM358 (comparator) VCC
Op-amp LM358 (comparator) GND→Breadboard power supply (3.3 V / 5 V) GND
Light sensor (LDR) b→Op-amp LM358 (comparator) IN1-
Breadboard power supply (3.3 V / 5 V) V1→Knob (potentiometer) 1
Knob (potentiometer) 2→Breadboard power supply (3.3 V / 5 V) GND
Knob (potentiometer) W→Op-amp LM358 (comparator) IN1+
Op-amp LM358 (comparator) OUT1→Resistor a
Resistor b→LED A
LED K→Breadboard power supply (3.3 V / 5 V) GND

Code (Arduino C++)

// No Arduino here! The LDR and the 10k resistor divide the supply down to the
// IN1- pin: bright light means a low LDR resistance and IN1- near 4.5 V,
// darkness means the LDR climbs towards 1M and IN1- falls. The knob feeds a
// trip level to IN1+. The LM358 compares the two: IN1+ higher than IN1- ->
// OUT1 swings HIGH and the LED lights. Daylight keeps the LED off, darkness
// flips it on, and the knob sets exactly how dark it must get. This analogue
// comparison is the brain of real night lights and street lamps — not one
// line of code anywhere.

আরো project · More projects