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.

LDR and RTD to ADC of microcontroller

Status
Not open for further replies.

fireball003

Full Member level 3
Joined
Oct 28, 2005
Messages
181
Helped
8
Reputation
16
Reaction score
3
Trophy points
1,298
Activity points
3,157
ldr microcontroller

Hi,
How would I connect LDR or RTD to the ADC port of my microcontroller ?

Would I connect in two ADC pins dirtectly?
Or i would have to follow a circuit diagram?
What is the main logic?
Please explain and upload circuit diagram if there any.

Thanks in advance.
 

amrstaha

Full Member level 2
Joined
Aug 29, 2005
Messages
136
Helped
8
Reputation
16
Reaction score
2
Trophy points
1,298
Location
Egypt
Activity points
2,312
ldr to adc

No you can not connect an RTD not an LDR directly to a microcontroller pin. These two sensors are mere temperature dependemt resitors; meaning that the value of their resistance varies with temperature. You need to convert this variable resistance to a voltage so that it can be sensed with an ADC. The best strategy is to supply them with a constant current (from a current source) and measure the developed voltage. Feed this voltage to the ADC to convert to digital form.

Hope this helps.
Good luck
 

fireball003

Full Member level 3
Joined
Oct 28, 2005
Messages
181
Helped
8
Reputation
16
Reaction score
3
Trophy points
1,298
Activity points
3,157
how do i interface ldr to microcontroller

Hi,
suppose I use 5v current from by board as constant current source then if I connect LDR with that source and ADC pin , then is it not correct?

Else what circuit do I need?

Thank you.
 

Ravi Verma

Newbie level 3
Joined
Jun 15, 2010
Messages
3
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
Ahmedabad
Activity points
1,296
try connecting it using the inbuilt ADC pins (Eg: PORTA for ATmega16),choose appropriate mux channel and program d algorithm using AVRSTUDIO GCC compiler,output digital signals can be taken from other ports.Watch out videos of tishitu electronics on youtube.

Added after 2 minutes:

It's better to use ADC chips than to use the Adc pins of uC
 

waseem

Full Member level 5
Joined
Apr 13, 2005
Messages
284
Helped
64
Reputation
128
Reaction score
19
Trophy points
1,298
Location
Pakistan
Activity points
3,674
A Simple arrangement to use these sensors with an ADC is to form a voltage divider circuit. This can be done very easily by connecting the LDR in series with a fixed resistor. Since the two resistors (fixed resistor and LDR) are forming a voltage divider circuit there will be a certain voltage drop across each resistor.
As the resistance of the LDR varies with the intensity of the incident light there the voltage drop across it will also vary.
This change of voltage can be sensed by any ADC wheather it is a built in ADC inside a controller or an independent ADC.
The circuit diagram of a simple circuit that explains the above arrangement is added an an attachment.
 

chanchal.chauhan

Full Member level 4
Joined
Apr 23, 2009
Messages
217
Helped
5
Reputation
10
Reaction score
1
Trophy points
1,298
Location
Hyderabad, India
Activity points
2,539
One another alternate way for LDR is use comparator with 0.6v internal ref on comparator - pin & at +pin give LDR voltage to compare the light intensity for Light.

Regards
Chanchal Chauhan
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top