Making of Photoresistor sensor

Output from photoresistors can be directly fed into a microcontroller’s Analog-to-digital converter pin. Just solder a resistor to one of the two leads and connect three wires to three outgoing pins; one for Vcc (or Vin), one for ground and the third one to your microcontroller. I have also given you a step by step guide to solder a resistor and connecting wires and make two photoresistor sensors.

Parts required:ldr_sensor_1
  1. Photoresistors / LDR's
    Photoresistors / LDR's
    : 2
  2. Wire with connectors
    Wire with connectors
    : 6
  3. Resistor
    Resistor
    : 2 (1.5KΩ to 2KΩ)
  4. Soldering Iron / Solder gun
    Solder Iron
  5. Solder / Solder Lead
    Solder Lead
  6. Duct Tape
    Duct Tape

Solder a 1.5KΩ resistor to one of the leads of photoresistor as shown in the image (As usual, click on the image for an enlarged view). Photoresistors are sturdy and can take enough heat from the soldering iron. But do not overdo it in such a way that you fry it. Also solder the resistor a few millimeters away from the tip or face of photoresistor and avoid bending the leads near the tip. Be cautious not to burn your fingers as the leads heat up very fast.

Note: I have used a 330Ω resistor in these pictures which were used for a different purpose altogether, but the procedure remains the same.

ldr_sensor_2

Now solder there wires with connectors to the three leads coming out of the photoresistor; two from Photoresistor and one from the resistor. Needless to say those connectors are there to make life easier while connecting to a circuit board. If you need to plug them to a breadboard, then you need male connectors plugged into a breadboard.

ldr_sensor_3

You are almost done. However as a safety measure, I normally prefer insulating these exposed leads. A cheap alternative is to use duct tape. If you have a heavy wallet or want your connections to look more professional, you can use heat shrink and cover up these exposed wires.

As for me, I carefully wound duct tape for all the three wires separately. As a side note, it is always advisable to use a different colored wire for identification.

ldr_sensor_4

You may not want to do this, but I like it this way. I wound duct tape a couple of more times to ensure they look like the one shown in the figure. This makes it easier for me whenever I keep it on any of my robot chassis.

ldr_sensor_5

Calculating resistor value:

1.5KΩ resistor selected in this sensor is not exactly true in all cases. Since each photoresistor can be different from the other, it is difficult to judge what value would suffice your needs. Hence I would suggest you to calculate resistance required for your individual LDR's and connect it accordingly.

Calculating resistance is quick and simple. Find the resistance of your LDR using a multimeter by pointing it to bright sunlight, or a fluorescent bulb and note down the result (say R1). Now cover the photoresistor completely and measure resistance (say R2). To calculate resistor value we need to find the square root of the product of these two resistances.

i.e: R = sqrt (R1 x R2)

You may not find a resistor with exactly the same value (R), but not to worry you can choose the next higher available value and solder it across.

If you are too lazy to pick up your calculator for this, I have a calculator here for your ready reference. Enter R1 and R2 and click calculate.

LDR Resistor Calculator (uses javascript)


Resistance in bright light - R1:	 
Resistance without light - R2:		  


Resistor Value:  O or  KO

  

That is it with the Photoresistor Sensor tutorial. Make one, connect it with your microcontroller analog pin and have fun.

Do you have anything to say?
Visit the Forum to discuss, learn and share anything related to robotics and electronics !!

rss feeds



Featured Videos




Advertisements


Recent Articles




Atmega8 Development Board


A great step-by-step tutorial on building your own Atmel AVR based Atmega8 development board. The board is ideal for beginners with detailed explanation and pictures More...

L293D Motor Driver


For robots to do work, you need to know how to control a motor. L293D is a cleverly packed IC which can control two DC motors in both directions: forwards and reverse. Here is a detailed explanation of building a board based on L293D ICMore...

Hobby Servo Tutorial


Servo Motor is a device which uses error-sensing feedback signals to determine and control the position of a motor shaft. The term "servomechanism" closely relates to servo motors..More...

Blinking LED Tutorial


This is similar to what we achieve in any "Hello World" program. However, it is not just limited to blinking LED but scratches the surface of AVR-GCC programming... More...


Kindly Donate

If this site has helped you, then kindly consider a Donation to say "Thank You!!". Donation might help us keep all this information available for free and also pay for the resources.

If that is difficult, then a simple "Hi" in the forum would still do good :)