Monday, July 21, 2025

LED Auto ON/OFF Using LDR and Arduino | Light Sensor Project for Beginners

Have you ever wanted a light that turns ON automatically when it’s dark and OFF when it’s bright? In this beginner-friendly project, we’ll show you how to build a simple light-sensitive LED control system using an Arduino and an LDR (Light Dependent Resistor) module.

Simple LED Auto ON/OFF

📦 What You’ll Need

To get started, you will need the following components:

Components required for this tutorial

✅ Arduino UNO × 1
✅ 3-pin LDR Module × 1
✅ Jumper Wires × 1
✅ USB cable for Arduino × 1
✅ Resistor 220Ω × 1
✅ Breadboard × 1

🛠️ Circuit Wiring

Here’s how to connect each component to the Arduino:

3-pin LDR module wiring

3-pin LDR Module 
✅ VCC → 5V on Arduino
✅ GND → GND on Arduino
✅ A0 → Analog pin A0 on Arduino

LED and resistor wiring

LED and Resistor
✅ LED Anode (long leg) → Digital pin 9 on Arduino
LED Cathode (short leg) → 220Ω resistor → GND on Arduino

The connection between components and Arduino

💻 Uploading the Code

After wiring everything up, connect the Arduino to your computer using a USB cable.  Then, upload the following code, or you can download the code HERE.
int ldrPin = A0;
int ledPin = 9;
int threshold = 500;

void setup() {
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  int ldrValue = analogRead(ldrPin);
  Serial.println(ldrValue);

  if (ldrValue < threshold) {
    digitalWrite(ledPin, HIGH);  // It's dark, turn on LED
  } else {
    digitalWrite(ledPin, LOW);   // It's bright, turn off LED
  }

  delay(200);
}

Open Arduino IDE and copy-paste the code

The value 500 is the light threshold. You can check the actual LDR readings via the Serial Monitor and adjust this number depending on your room lighting conditions.

🧪 Test the System

In low light, the LED should turn ON.

In bright light, the LED should turn OFF.

📌 Conclusion

This project is a simple yet powerful introduction to sensor-based automation using Arduino. By combining a Light Dependent Resistor (LDR) with an LED, you’ve created a system that can react to ambient light—automatically turning the light ON in the dark and OFF in bright conditions.

🎥 Watch the Full Video Tutorial


🔔 If you found this guide helpful, share it with fellow makers! For more tutorials, subscribe to our YouTube channel and follow us on social media. 🚀

#Arduino #DIYElectronics #LDREngineering #SmartLighting #BeginnerProject #IoT #Maker

Tuesday, July 1, 2025

Samsung Washing Machine Not Spinning? Easy Drain Motor Fix! Step-by-Step Repair Guide

Is your Samsung washing machine refusing to spin at the end of the wash cycle? Don’t panic — this is a common issue and is often caused by a faulty drain motor. In this blog, we’ll walk you through the step-by-step process to troubleshoot and replace the drain motor yourself.

Drain motor replacement guide.

🪛Step-by-Step Instructions

Step 1:🔍 Common Symptom

Washing machine not spinning.

Problem: The washing machine completes the wash and rinse cycle, but does not spin.
Likely Cause: The drain motor is not working, which means water stays in the drum and the spin cycle won't start.

Step 2:🔧Access the Drain Motor
To begin troubleshooting:
  1. Unplug the washing machine for safety.
  2. Remove the back cover by unscrewing two screws.

    Remove the back cover.

  3. Detach the hose inlet.

    Remove the hose inlet.

  4. If there’s still water in the drum, manually pull the drain valve to let the water out.

    Pull the drain valve to let the water out.

Step 3:🔌Test Drain Motor Voltage
  1. Tilt the washing machine backward for better access.

    Tilt the washing machine.

  2. Disconnect the drain motor wiring.

    Pull the drain motor connector.

  3. Plug the machine back in and set it to Spin mode.

    Set it to Spin mode.

  4. Use a multimeter to measure voltage at the motor connector. Normal voltage 230±10% VAC. 

     If voltage is present but the motor doesn’t operate, the drain motor is faulty.

Step 4:🪛Remove the Faulty Drain Motor
  1. Remove the three screws holding the drain motor in place.

    Remove the drain motor.

  2. Disconnect the drain motor wire from the drain valve.

    Carefully pull the motor out.
Step 5:⚙️Install the New Drain Motor
  1. Reconnect the drain motor wire.

    Attach the drain motor wire to the drain valve.

  2. Align and secure the new drain motor in place.

    Reattach the motor screws.

  3. Test it by setting the machine to Spin.

    The motor should pull the valve open.
Step 6:🧩Reassemble the Machine
Put everything back, reconnect the hose inlet and reinstall the back cover.

Install the back cover.

Step 7: 🧪Final Testing
Pour some water into the washing machine bucket and set it to Spin.

The drain valve opens, and water drains out.

Once the drain water empties, the washer begins spinning.

🎉Conclusion

A non-spinning Samsung washer is often caused by a faulty drain motor, and as you’ve seen, replacing it is a manageable DIY task. By checking the voltage and following a few simple steps, you can save both time and repair costs.

🎥Video


If you found this helpful, don’t forget to like the video, leave a comment, and subscribe to our channel for more tech tips and tutorials! Your support means a lot. 🙌