Skip to main content
Tweeted twitter.com/StackElectronix/status/1264753073018331137
Fixed typo in title. While I'm here, standardized on "microcontroller" as one word (both 1 and 2 word versions had been used). Used HTML list to display the 2 points with clear separation, to help readability. Added Archive link to 2nd method and copied explanation, as link in comments was broken.
Source Link
SamGibson
  • 18.3k
  • 5
  • 41
  • 63

How to intefaceinterface LDR with microcontroller?

I need to interface an LDR with micro controller,a microcontroller.

While searching for some circuit ideas on the internet, I came across two different ideas.:

  • One was using a voltage divider circuit with another resistor and input that into the ADC port of a microcontroller.

  • Another was to couple the LDR to ground via small capacitor and connect the other end directly to a microcontroller. (I am not sure how this works?)

One was using a voltage divider circuit with another resistor and input that into ADC port of micro controller.For example:

Another was to couple LDR to ground via small capacitor and another end directly to microcontroller. ( I am not sure how this works? )schematic for measuring light using LDR without an ADC

Image source: Measuring Light on a PIC 16F62x from Robot Builder

The PIC 16F62X series is a pin-compatible upgrade to the old F84 offering lots of extra internal goodies such as timers, a USART and a couple of comparators. There are no analogue to digital converters (ADC) as such but it is a simple job to use a comparator, a timer and a few lines of software to make one.

Which one is more accurate?

How to inteface LDR with microcontroller?

I need to interface LDR with micro controller,

While searching some circuit ideas on the internet I came across two different ideas.

One was using a voltage divider circuit with another resistor and input that into ADC port of micro controller.

Another was to couple LDR to ground via small capacitor and another end directly to microcontroller. ( I am not sure how this works? )

Which one is more accurate?

How to interface LDR with microcontroller?

I need to interface an LDR with a microcontroller.

While searching for some circuit ideas on the internet, I came across two different ideas:

  • One was using a voltage divider circuit with another resistor and input that into the ADC port of a microcontroller.

  • Another was to couple the LDR to ground via small capacitor and connect the other end directly to a microcontroller. (I am not sure how this works?)

For example:

schematic for measuring light using LDR without an ADC

Image source: Measuring Light on a PIC 16F62x from Robot Builder

The PIC 16F62X series is a pin-compatible upgrade to the old F84 offering lots of extra internal goodies such as timers, a USART and a couple of comparators. There are no analogue to digital converters (ADC) as such but it is a simple job to use a comparator, a timer and a few lines of software to make one.

Which one is more accurate?

added 7 characters in body
Source Link
Michael Karas
  • 57.9k
  • 3
  • 74
  • 139

I need to interface LDR with micro controller,

whileWhile searching some circuit Ideaideas on the internet I came across towtwo different ideaideas.

One was using a voltage divider circuit with another resistor and input it in tothat into ADC port of micro controller.

anotherAnother was to couple LDR to ground via small capacitor and another end directly to microcontroller. ( I am not sure how this works  ? )

whichWhich one is more accurate  ?

I need to interface LDR with micro controller,

while searching some circuit Idea on internet I came across tow different idea.

One was using voltage divider circuit with another resistor and input it in to ADC port of micro controller.

another was to couple LDR to ground via small capacitor and another end directly to microcontroller. ( I am not sure how this works  ? )

which one is more accurate  ?

I need to interface LDR with micro controller,

While searching some circuit ideas on the internet I came across two different ideas.

One was using a voltage divider circuit with another resistor and input that into ADC port of micro controller.

Another was to couple LDR to ground via small capacitor and another end directly to microcontroller. ( I am not sure how this works? )

Which one is more accurate?

Source Link
gopal
  • 51
  • 1
  • 2
Loading