Analog vs TTL/PWM laser power

Hi,

PWM is frequently used to produce an analog voltage. It just needs to be filtered (resistance + capacitor).

You can chech here https://ontrak.net/pwm.htm to understand.

R should be as small as possible compared to input impedance (If input impedance is 100K, 4.7K is 1/20 of input impedance, that’s ok !), and C computed accordingly to needs.

With 1uf 4.7K, cut frequencey will be F = 1/ (2PiRC) = 33Hz

The output analog voltage will be same amplitude (ie : 0 > 5V) as the ttl value. It TTL output is 3.3V, analog voltage will be from 0 > 3.3V.

If Ruida analog input is alredy filtered (integrated R+C), then you can use a PWM. The most important thing will be to produce a PWM frequency adapted to the filter. You can also add a filter with a simple R+C calculated by you own.

Cheers
JPC