---
+ Post New Thread
Results 1 to 5 of 5
  1. #1
    Newbie level 5
    Points: 1,471, Level: 8
    jith's Avatar
    Join Date
    Feb 2005
    Posts
    10
    Helped
    0 / 0
    Points
    1,471
    Level
    8

    How to connect the LDR sensors to the port?

    i need to connect the LDR Sensors just to detect human presence and to enable a port where it is connected!

    i just want to know whether we can directly connect the LDR to the Port(eg. P0.0) or do we need to connect some more resistor- capacitor combination circuits?

    •   Alt28th February 2005, 02:46

      advertising

        
       

  2. #2
    Advanced Member level 5
    Points: 160,151, Level: 95
    Awards:
    Downloads2nd Helpful Member

    Join Date
    Oct 2004
    Location
    West Coast
    Posts
    7,943
    Helped
    2302 / 2302
    Points
    160,151
    Level
    95

    create ldr sensors

    If your microcontroller has A/D converter you can connect LDR directly to the ADC input and GND, and add anoter resistor between Vcc and this pin to create a voltage devider.
    If your microcontroller doesn't have A/D converter you will have to use a comparator with adjustable level and then connect the output ftom comparator to pin, say, P0.0 (or any other) ..


    1 members found this post helpful.

    •   Alt28th February 2005, 02:52

      advertising

        
       

  3. #3
    Newbie level 5
    Points: 1,471, Level: 8
    jith's Avatar
    Join Date
    Feb 2005
    Posts
    10
    Helped
    0 / 0
    Points
    1,471
    Level
    8

    ldr connection with microcontroller

    Thanks for the reply.......but just one more question! 'I dont have any A/d converters....so shud i buy them or can i connect the LDR Sensors to my uC pins using comparator? if i have to connect them thru comparator...then can u pls give me the CKT diagram for thy connection?

    The sensor has to give the pin a 5V Signal when its active and 0v when its inactive! thats all!



    •   Alt28th February 2005, 06:20

      advertising

        
       

  4. #4
    Advanced Member level 5
    Points: 160,151, Level: 95
    Awards:
    Downloads2nd Helpful Member

    Join Date
    Oct 2004
    Location
    West Coast
    Posts
    7,943
    Helped
    2302 / 2302
    Points
    160,151
    Level
    95

    ldr sensor connection

    Here is a simple light switch build on 2 transistors. For direct connection with the microcontroller input change pnp transistors no npn (polarity of power = 0V to emiters) and connect collector of the second transistor to microcontroller pin..

    http://www.mitedu.freeserve.co.uk/Ci...g/nitelite.htm


    1 members found this post helpful.

  5. #5
    Full Member level 1
    Points: 1,911, Level: 10

    Join Date
    Feb 2005
    Posts
    107
    Helped
    9 / 9
    Points
    1,911
    Level
    10

    can i connect ldr to vcc?

    you can use microcontroller ATMEL AT89C2051, 20 pin uC 8051 family. this uC have comparator internal. it is port 1.0 for + comparator and port 1.1 - comparator.



+ Post New Thread
Please login