Controlling voltage out of Arduino (to replace vactrol)

I have this two leds I want to replace in a circuit, I know it's possible to vary voltage from PWM, but I really don't know if this is the same as what the vactrol does in this circuit

Is it possible to connect maybe led "R1" and led "R2" pins to Arduino's PWM's pins and replace that from there?

I don't think that R1 and R2 are LEDs given there names R= resistor. They are Light Dependant Resistors (LDR).

Which make sense of the drawing's title!

Mark

What signals come in on the 3 inputs?

What are you trying to do? You can get digitally controlled filters. That might be better than trying to convert a variable analog filter to digital control.

PWM isn’t a variable DC voltage. It’s a pulsed voltage. For example, 5V PWM with a 50% duty cycle is on half of the time for an average of 2.5V. PWM is unlikely to work in your application.

However, you can replace the LDRs with digital potentiometers (if you can find the correct values) and you can control the resistance with the Arduino.

Thanks for the replies!

holmes4: I don't think that R1 and R2 are LEDs given there names R= resistor. They are Light Dependant Resistors (LDR).

Which make sense of the drawing's title!

Mark

Yes, sorry! I meant LDRs!

What signals come in on the 3 inputs?

I should have explained better, I plan to use only the input on the left (lowpass) and leave the other two disconnected, I am sending an audio signal (oscillator that comes from Arduino)

What are you trying to do? You can get digitally controlled filters. That might be better than trying to convert a variable analog filter to digital control.

However, you can replace the LDRs with digital potentiometers (if you can find the correct values) and you can control the resistance with the Arduino.

I just want to have the audio filtered and control it from Arduino, I already did it with LDRs and leds that are connected to Arduino PWM pins and that works fine! But as I plan it to do some professional PCBs and vactrols are very pricey, I thought maybe that can be controlled from Arduino without using homemade vactrols. What do you mean digitally controlled filter? I know there are filters which have CV control and maybe that would be better, but I think they require more parts and I like the sound of this one.

PWM isn't a variable DC voltage. It's a pulsed voltage. For example, 5V PWM with a 50% duty cycle is on half of the time for an average of 2.5V. PWM is unlikely to work in your application.

I know it's you are not directly able to do it, but it can be done (I think) with this circuit:

Well... maybe the only choices are doing it with vactrols or digital resistor (IC)

You could look at replacing the LDR's with an opto isolator and then PWM'ing the opto isolators input side. Look in the playground to see how to convert PWM to voltage. Needs 1 or 2 resistors and the same number of cap's.

Mark

Do you mean you want to control the gain of an amplifier using the Arduino ?

If so, you could just buy a digital pot IC and get that to control the gain of the amplifier i.e to replace the volume control

Or for audio frequencies, you could just sample the audio with the ADC in the Arduino then process the amplitude of the signals in code i.e just scale the incoming numbers from the ADC, albeit the normal Arduino's dont have a DAC, but you can get external dacs, or just build a resistor ladder DAC yourself, as long as you would be happy with 8 bit output