# How does this circuit work?

#### Frank@Frank

Joined Jul 24, 2021
23
Hi guys.
I saw a led circuit like this.
the led is pulse drived, and there is a photodiode seems to be feedback to the Led driver circuit.
but it is not the standard Voltage follower or inverting amplifier or any basic circuit that I learned in the txetbook.
so I am curious how this circuit work and how to determine the values?

PS: please ignore the value of C,R.

#### Attachments

• 33 KB Views: 44

#### ericgibbs

Joined Jan 29, 2010
17,132
hi Frank.
That circuit has no feedback, it is just badly drawn.
Where did you get the circuit, is that supposed to be an opto coupler.???
E

#### Attachments

• 26.1 KB Views: 12

#### Frank@Frank

Joined Jul 24, 2021
23
hi Frank.
That circuit has no feedback, it is just badly drawn.
Where did you get the circuit, is that supposed to be an opto coupler.???
E
I am so sorry.
it seems something went wrong when I upload the attatchment.

#### DickCappels

Joined Aug 21, 2008
9,609
What is your circuit supposed to do?

is that a transmission gate in series with the base drive?

#### Frank@Frank

Joined Jul 24, 2021
23
What is your circuit supposed to do?

is that a transmission gate in series with the base drive?
Hi！
I think the photodiode is monitoring the light power of led and feedback to the driver circuit.
But don’t know how it works and how to calculate the parameters of capacitors or resistors

#### DickCappels

Joined Aug 21, 2008
9,609
Is that a transmission gate in series with the base drive?

#### DickCappels

Joined Aug 21, 2008
9,609
How do you want to use it?

#### Frank@Frank

Joined Jul 24, 2021
23
Is that a transmission gate in series with the base drive?
You mean the components in series between the output of op-amp and the base of the transistor?
That’s an analog switch.
This is not drew by me.
I config it out from a pcb board and want to know how it works.

#### Alec_t

Joined Sep 17, 2013
13,319
My guess would be that the photo-diode is sensing ambient light. In daylight it passes current, allowing C1 to charge up to a voltage which exceeds the reference, thus causing the op-amp output to go low and turn off the transistor and LED.
At night the photo-diode passes next to no current, so C1 discharges, the op-amp output goes high and turns on the transisitor and LED. The PWM'ed gate/switch controls LED brightness by pulsing the transistor base.

#### Frank@Frank

Joined Jul 24, 2021
23
My guess would be that the photo-diode is sensing ambient light. In daylight it passes current, allowing C1 to charge up to a voltage which exceeds the reference, thus causing the op-amp output to go low and turn off the transistor and LED.
At night the photo-diode passes next to no current, so C1 discharges, the op-amp output goes high and turns on the transisitor and LED. The PWM'ed gate/switch controls LED brightness by pulsing the transistor base.
Hi Alec!
I measure the output of the op-amp. It was not just high or low. The PS is 3.3V and the output is about 1.x Volt.

#### Alec_t

Joined Sep 17, 2013
13,319
the output is about 1.x Volt.
We don't know whether what I referred to as an op-amp is indeed one, or if it is a proper comparator IC. It's also unknown if that device is a rail-to-rail type capable of driving its output fully low (~0V) or fully high (~3.3V). Depending on the contents of the PWM'ed box of tricks, 1.xV may or may not be enough to turn on the transistor.

#### Irving

Joined Jan 30, 2016
3,301
The opamp with capacitor feedback is an integrator. Its output represents the time integrated photocurrent from the diode which, as you surmised, is related to the light output from the LED. Do you know what LED, photodiode, supply voltage, PWM frequency/duty cycle?

#### Frank@Frank

Joined Jul 24, 2021
23
The opamp with capacitor feedback is an integrator. Its output represents the time integrated photocurrent from the diode which, as you surmised, is related to the light output from the LED. Do you know what LED, photodiode, supply voltage, PWM frequency/duty cycle?
Hi!
The VCC is around 9V.
PWM frequency is 20kHz/5%.
Don’t know the exact part number of the LED and photodiode.
But the VF of Led is around 1.8V.

#### Alec_t

Joined Sep 17, 2013
13,319

#### Frank@Frank

Joined Jul 24, 2021
23
So what does the 3.3V PS do (per post #10)?
power supply to the opamp