Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

interface an LDR with atmega16

Status
Not open for further replies.

ppatel23

Newbie level 5
Joined
Jul 24, 2012
Messages
10
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,357
Hello,
i want to interface an LDR with atmega16,..I need to control n measure the light intensity and obtaining the logic 0 or 1 at any pin of port A when ever the light intensity falls below certain level..help me with the circuit n programming ...
Thanks..
 

This is also very easy. Make a potential divider using a resistor and LDR. Either one of the pins of LDR is connected to +5V or GND. The voltage across the LDR should not exceed 5v. When there is sufficient light (bright) the LDR o/p voltage should be 5V and when there is not sufficient light (dark) the voltage must be less than 2.5V. Connect the o/p of LDR to any port pin configured as digital input.
 

thank you for ur advice , it means that it is to be just connect an pot between the supply and one of the LDR terminals and adjust the pot to vary the light intensity levels....whenever the light falls below some level it would give +5V to the port connected..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top