0

I am new to Arduino. I want to detect if an Light bulb is broken or burned out. For which I don't want to use LDR or Photo Resistor since they can be triggered by Environmental Light Source. I am looking to use relay or something like that to detect if a bulb is working or not. Basically in Circuit there is push button, led, bulb and Arduino. On Clicking Button Bulb must be on if bulb is blown/burned/failed than led must blink else if bulb is working fine led must glow. Here I want to some how read voltage of bulb if its higher than may mean bulb is failed now problem how can I read that voltage.

Edit: So far I have done this: enter image description here

And here is my code:

void setup()
{
    pinMode(3, OUTPUT);
    pinMode(A5, INPUT);
    pinMode(4, OUTPUT);
}
void loop()
{
    delay(1000); // Wait for 1000 millisecond(s)
    digitalWrite(3, HIGH);
    if (analogRead(A5) != HIGH) {
        digitalWrite(4, HIGH);
    } else {
        digitalWrite(4, HIGH);
        delay(10); // Wait for 10 millisecond(s)
        digitalWrite(4, LOW);
        delay(10); // Wait for 10 millisecond(s)
        digitalWrite(4, HIGH);
        delay(10); // Wait for 10 millisecond(s)
        digitalWrite(4, LOW);
    }
}
6
  • What kind of "bulb"?
    – Majenko
    Sep 20 at 12:41
  • 3
    1. Re “[LDR] can be triggered by environmental light source”: not necessarily. If the LDR is close enough to the bulb (a few mm) and the detection threshold is correctly chosen, you should be able to reliably tell whether the bulb is on or off. I did it, and it works just fine. 2. Re “10 watt light bulb”: that's not specific enough. How is it powered? (AC? DC? What voltage?). Sep 20 at 13:09
  • 3
    You can measure the current flowing through the bulb. A blown bulb will not have any current flowing. There are ready to use measurement boards for measuring current. Which one you can use depends on what Edgar Bonet asked: AC or DC, voltage and also the current (to make sure, that the board can handle it)
    – chrisl
    Sep 20 at 13:14
  • 1
    although actual light is the way to detect if a light works, a bad bulb may show a change in resistance compared to when it was good. search how to measure resistance with an arduino.
    – Abel
    Sep 20 at 13:16
  • 1
    @EdgarBonet But What if LDR itself got shorted or something like that. 5-10 Volt Bulb and 5 Ampere current Sep 20 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.