# Photodiode to dim a led in bright light and brighten in dim light

1. Oct 31, 2013

### bneal

Hello everyone!

I'm currently working on something and am finding myself a little stuck. I am trying to determine how to use a photodiode to brighten leds in low light conditions and dim in bright light conditions. I was able to do this with a simple pnp transistor, however, i need to be able to complete this task with an op amp.

I was able to construct a current to high voltage converter, and also a high gain current amplifier but was at a lack of knowledge as to how to use it to dim or brighten lights.

So does anyone know of a circuit that does what i am attempting to do, or does someone know how to use a current or voltage to dim a led running of a simple battery and resistor. Each time i connect my op amps output to my led, it either makes the battery draw more or less current, without affecting the lights.

The values do not matter, given a circuit i can interpret and scale to my needs, i just need to see it done.

2. Oct 31, 2013

### Staff: Mentor

Welcome to the PF.

That seems a bit backwards to me. Why would you want to make the LED harder to see in bright light?

3. Nov 1, 2013

### bneal

Thx.

Well im working on designing a toy car, during the day there is already light, so you can dim the lights, or almost shut them off completely. During the night when you can't see outside i want the lights to be bright so you can see.

4. Nov 1, 2013

### George H

So here's one way.
Use a TIA (trans-impedance amp) to turn the photodiode current into a voltage.
Now bias the LED on with a some setpoint voltage through a resistor.
(say 10 V and 5 k ohm) and then subtract the TIA voltage from the setpoint voltage. (turning the LED off in bright light.) Adjust the gain of the TIA to make things work the way you want.

George H.

5. Nov 4, 2013

### Okefenokee

Put current sensing resistors after your photodiode and your led lights. Sense resistors are just accurate resistors which have an adequate power rating for the application.

The current passing through the sense resistors will create voltages which can be inputs to an opamp circuit that suits your needs. I think you can do the whole thing with one differential amplifier circuit.