Using Op Amps and transistors to control LED output.

I have some knowledge of how opamps work in a audio-driver application..
But a recent project im attempting has me scratching my head.

Part of this circuit has an op amp and transistor based feedback that works to control 2 led outputs. One red and one IR.
And using data from a light to frequency sensor, the MCU controls a dual output DAC which gives output to two op amps which is connected to some transistors... connected in a fashion i dont really understand, thus controlling the IR led's output to match the Red led's output.
I could easily copy the schematic for my needs but i want to understand how it works.

On the code side of things, the microcontroller turns each led on and off, takes freq samples from the FTL and compares their frequencies and steps up or down the value to send to the DAC until the outputs match.

Thanks for any help trying to understand what the point of the quad-transistors are for..
Detail is what im looking for..

Some more info.. VB is the 9v source and Vdd is the 5v source.
The MCP4822 is the DAC
RB0 and RB1 are connected to the MCU

It appears the quad transistors are for current boost. The LEDs may use more power than the device can ouput from the pin.

The op amp is set as a voltage follower through one of the transistors. It is a current boost setup. The feedback to the negative input of the op amp insures the voltage output of the transistor matches the positive input to the op amp, no matter what current is flowing through the transistor.

This appears to be a brightness control for the LEDs. Note there is one for each. The higher the voltage applied to the 20 ohm resistors, the more current will flow, and the brighter the LED.

So in a nutshell, the top two transistors are the on-off switches, and the bottom two are brightness controls.

ADD: Or if you look at it in rf terms, picture AM radio. The top transistors control the carrier frequency, and the bottom control the AM signal level.

Hi, I currentlu working on a project something like you . I try to control two LED, red and ir, with using DAC (MCP 4822) and arduino mega .

Since i am a beginner with arduino, and i am at the step that producing analog voltage from the output of the DAC .

Could you help me about the source- code of arduino that produces the 1V from the output of the DAC