Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Making a photodiode behave like a LDR

Status
Not open for further replies.

ACharnley

Member
I have an application which needs to determine various states of ambient light from daytime to night. An LDR is well suited as it has a linear working range. A LDR I tested required roughly a 3k high side resistor to give a good voltage divider. Two problems however have me looking at photodiodes, with which I have no experience, 1. LDR's are not SMT and 2. I need to add switch in capacitance to smooth light transients over a good few seconds. With a 3k resistor these capacitances are too large for the application design.

I hit LtSpice and came up with the attached circuit. I'm basing the light output and the sensitivity on R2, which is a complete guess. I don't know at what light point a photo diode typically hits it's turn on region.

The switch in capacitance in real life but be via an MCU with open drain pins.

Any thoughts/suggestions/improvements?
 

Attachments

  • Screenshot_2020-06-04_15-30-49.png
    Screenshot_2020-06-04_15-30-49.png
    62.1 KB · Views: 194
  • lightsensor.asc
    2.1 KB · Views: 162
LDRs come in a range of resistance values and can be tiny. This one, for example, is only ~4mm diameter and has a resistance range of 80k-200k. Couldn't you simply cut the leads and surface mount it?
 
I haven't used a color sensor, what are these?

Cutting the leads and SMD was/is my current approach, but I'd like to avoid it for 2,000 boards.
 
I haven't used a color sensor, what are these?

Cutting the leads and SMD was/is my current approach, but I'd like to avoid it for 2,000 boards.

The modern Chinese LDR's come in a large range of different values, simply pick one that's more suitable for the values you require - the wires come out on the bottom so would be simple to fit, just drop it through a couple of PCB holes and solder it in. Doing it with an photodiode is going to require a great many more components (opamps, resistors, capacitors etc.) - which is why everything you see uses an LDR, one simple cheap component, job done.
 
Do they though, nobody is using photodiodes for ambience level detection?

I've never seen one?, what would be the point?, more expensive, more complicated, takes up more room, and offers no advantages?. The slow speed of an LDR is excellent for that prupose, and the high speed of aphitodio

Photodiodes are usually used where speed is an issue, such as data transfer, in decades old IR remote control systems (and 'presumably' inside modern IR receiver IC's?, although it could be a phototransistor?).

As regards your simulation, I presume you are aware that it's using an opto-coupler?, and the output from an actual photodiode is likely to be miniscule for ambient brightness measuring and will require lots of amplification.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top