I am using three Meanwell LDD-600L LED drivers (datasheet) to control brightness/color of a 50 Watts (total) RGB LED. This driver has a PWM input which I draw low with a PC817 opto isolator. Everything works fine in principle, but there is a little flaw:
When the internal phototransistor of the PC817 turns on, its output voltage changes to low lightning fast (500ns). When I turn the PC817 off, I have to use a voltage divider acting on the 30 V supply voltage in order to get around the 5V specified PWM voltage. This actually causes PWM input voltage to rise with a capacitor charge curve. The time constant of the exponential curve is 10us, so my conclusion is that the driver has an input capacitance of about 450 pF (given the 22k resistor from the voltage divider).
Since I want to control the driver with 16 bit PWM at ~305 Hz (i.e. a counter frequency of 20 MHz), the smallest pulse width that can be set inside the controller is 50ns. Of course I will not even get the electrical pulse width close to this (turning the phototransistor off already takes 500 ns), but being limited by the 10 us is a little too lousy for my taste.
Is there any other possible (economic) solution for a lower impedance pull-up of the PWM input capacitance than with a voltage divider?
Of course I don't want to use smaller resistors because they already get noticeably warm (+10 degrees) and I want the circuit to have as high efficiency as possible. The datasheet of the driver also specifies a maximum of 8V on the PWM input (if my interpretation is right), so pulling up directly to 30 V is probably not an option.
By the way: the whole circuit is built on a breadboard. I have not checked yet if the capacitance comes from the breadbord. I don't hope so.-
Edit: Tony's solution of connecting the digital IO's to the PWM with a resistor directly and dropping the optos actually works. Seems I have been a little to cautious with respect to EMI cause by the 5V/30V interface.