Transistor - Dark/Light Sensor

Introduction: Transistor - Dark/Light Sensor

About: Love engineering and building gadgets, like climbing on stuff and also have a passion for knocking things down.

Hello Friends,

From this instructable we will be able to learn how to make a Dark and Light sensor. Two tutorials in one.Basic principle is really simple the possibilities and uses of these basic sensors are almost unlimited.

Depending on the purpose and the outcome of your circuit, you may need extra items such as soldering iron, solder and PCB. But in this tutorial we will be using just a simple electronic components, breadboard and some jumper wires.

So lets start building.

Step 1: Transistor - Dark Sensor

Transistor - Dark sensor circuit requires basic parts such as:

  • 1x NPN transistor(BC547)
  • 1x LED(any colour)
  • 1x Photoresistor
  • 1x Resistor 330R (for LED)
  • 1x Resistor 100kR (for grounding)

Step 2: Transistor - Dark Sensor (circuit)

As you will see, this circuit is almost the same as for the circuit we will be using for the light sensor. The only difference between these circuits are the placement of LDR(light dependant resistor and 100kR resistor).

Working principle:

Dark sensor works in the way that then the LDR comes to the darkness, or in other words, if no light falls on it, the transistor turns on. Then transistor turns on, it lets the current flow trough it and also the right branch of the circuit is now active. LED starts emmiting.

The dark sensor could be made more controllable by switching the R1 resistor with variable resistor, thus:

High resistance-> more darkness to switch on the LED.
Low resistance-> less darkness to switch on the LED.

A basic voltage divider is formed between the LDR and the resistor R1=100kR. When light is shinning and some photons are falling on the LDR its resistance is low and because of that, positive rail gets grounded to the bottom negative rail. Thus zero base voltage is applied to the transistor and so it is off.

Step 3: Transistor - Light Sensor

Transistor - Light sensor circuit requires basic parts such as:

  • 1x NPN transistor(BC547)
  • 1x LED(any colour)
  • 1x Photoresistor
  • 1x Resistor 330R (for LED)
  • 1x Resistor 100kR (for grounding)

Step 4: Transistor - Light Sensor (circuit)

Working principle:

Light sensor works in the way that then the LDR comes to the darkness, or in other words, if no light falls on it, the transistor turns off. Just the opposite of what we saw with dark sensor. Same as the dark sensor we could modify light sensor to be more modular by switching the R1 resistor with variable resistor, thus:

LESS RESISTANCE(R1)-> LESS DARKNESS TO SWITCH OFF THE LED

HIGH RESISTANCE(R1)-> MORE DARKNESS TO SWITCH OFF THE LED

Yet again, this circuit works the same as the dark sensor. Just now the potential divider circuit is formed a bit differently. Thus, when no light is present resistance of LDR is very high and no base voltage is applied to the transistor - transistor remains shut off.
As the light level increases the resistance of the LDR starts to decrease causing the base voltage to rise. At some point determined by the voltage divider, the base bias voltage is high enough to turn the transistor on. Activating the right branch of the circuit.

Step 5: Summary

This project is really great for learning purposes of building simple circuits with transistors. But not only it is simple, these circuits can be really powerful and give great outcome if used with relay or other components.

The only difference between these two circuits is just the possition of LDR and R1. It just differently forms the voltage divider and so, the transistor reacts differently too.

Keep learning and have a great day Thank you for reading/watching.

First Time Author Contest

Participated in the
First Time Author Contest

Be the First to Share

    Recommendations

    • Fruit and Veggies Speed Challenge

      Fruit and Veggies Speed Challenge
    • Maps Challenge

      Maps Challenge
    • DIY Summer Camp Contest

      DIY Summer Camp Contest

    9 Comments

    0
    da75
    da75

    Question 9 months ago

    For the dark sensor application my understanding of the voltage output from the voltage divider created using the LDR i.e. V output = V supply multiply by ratio of R2(LDR) divided by sum of R1 47K and R2 LDR. When LDR is in darkness resistance will i believe be very high say 1MOhm so V output will be close to total V supply giving transistor bias of somewhere in the region of 8+V. First is my understanding of a voltage divider correct and second if so is such a high base bias voltage acceptable or am i missing something in how this circuit operates??.

    0
    MaxCh
    MaxCh

    Question 1 year ago on Step 4

    For the dark sensor, you control base current by LDR but you are not specifying resistance of the sensor. Usually, photo sensor resistance is relatively low. How do you make sure that base current stays within transistor limits?

    0
    pradhantejendra
    pradhantejendra

    1 year ago on Step 4

    I also made three dark senser circuits successfully .But when I tried making another the circuit failed to work.what could be the problem ?

    0
    pradhantejendra
    pradhantejendra

    Question 1 year ago on Introduction

    does the choice of resistance has (seeing some use 50k and some use 100k as voltage divider along with LDR )anything to do in making the circuit work?

    0
    pradhantejendra
    pradhantejendra

    1 year ago on Step 1

    I dont know why I got into this even as i am old man but your instructions gave me some about how to make this dark senser.thank you

    0
    manareldredy
    manareldredy

    Question 2 years ago

    it's very helpfull,,
    but I want to add a variable res to control the sensor so how should I insert it without missing the whole circuit up ??!

    0
    DavidN17
    DavidN17

    3 years ago

    Great tutorial. I come asking a question. I've done both of these kinds of circuits in the past with success. Now I'm working on a TFT LCD I would like to integrate the same concept on.... lights go out in the room and the screen dims. My question is, how can this be wired then you have access to only the ground pin of the LED's? Pos is shared on the PCB for the screen, ,touch and backlight, behind the screen and not accessible to break out just the LED's.

    0
    MarkN28
    MarkN28

    3 years ago

    How could I adjust the light sensor circuit to work for 12v led strip lights?

    0
    DIY Hacks and How Tos

    Great intro to electronics tutorial. You should enter this into the First Time Authors contest that is currently running.