Hi, I have a chinese 3 phase VFD to run my cnc spindle motor. I'm trying to interface it to GRBL pwm output via an FOD817B opto isolator.
It basically works but when I check the output voltage it is highly non-linear, rising too quickly initially, then flattening off. The lower part is quite linear but in fact is not the speeds that are really likely to be used.
I would like to understand where I'm going wrong and how to correct it.
The current circuit gets the full range 0-10V ( the supply voltage is actually 10.8V ) and the opto has VCE sat of about 0.2 V . There is no doc on the VFD input circuit but it seems to have an input resistance of about 20k. It is shown used with a 10k pot to provide the input signal ( earlier models seem to have had this on the front panel ).
I don't know what the problem is but if I were doing this I'd be looking at the response time of the FOD817. Above about 2kHz it starts to fall off. Did you consider this in the design? What frequency is the PWM?
Me again, sorry, I still don't know the answer to your question but it is bugging me.
When I tried to send digital signals through opto isolators I quickly learned that using simple transistor isolators didn't give the results I expected. I looked for ones with digital outputs, and had success with TLP2962, which has a proper logic detecting circuit and a much faster response than you get with a simple transistors. There are others, this just happens to be the one I used.
You will see that the rise and fall times are not equal
This will mean that the duty cycle of the optoisolator's output will be different to the duty cycle of the Arduino PWM output.
Thus the output voltage of your circuit will not be directly proportional to the PWM duty cycle., giving rise to the non-linearity of the motor's response.
Faster optoisolators with digital output circuits will improve the situation.
Remove the capacitor. It is
slowing the rise and fall
time of the waveform.
Good catch Herb !
I didn't see that.
@OP,
You realize that a resistor and capacitor wired like that is called an RC LOW PASS FILTER , right ?
(I assume not, or you wouldn't have done that)
Why did you add R8, R9 & C9 and where did you get those values from ?
Looking at the circuit that response looks totally correct to me - assuming that axis "spindle setting / 1000 rmp" (whatever that may actually mean) actually represents the duty cycle of the PWM input signal.
That's indeed an RC filter, commonly used to turn a PWM signal into an analog voltage. It'll work fine like this if you connect it to a high impedance input, if you want to have the circuit produce any current it you have to add an OpAmp buffer.
You will have to tweak the RC values, but I don't know if it's even possible to get a linear response over the full 0-10V range with such a circuit (which I guess is what you actually want to achieve). If you need this, you may be better off with a digipot.
The R8 is guilty IMHO: opto is pulling to 10V strongly while R8 is pulling to GND relatively weakly. The input of the RC filter should "see" 0V to 10V square wave but in fact "sees" 0.8*Vin (voltage on C9) to nearly 10V square wave. I guess filtering of this results roughly in the observed behaviour.