I doubt anyone here could see any way they would be related
FOD8316 2.5A IGBT Optocoupler
VIN+ Non-inverting Gate Drive Control Input
@OP,
So where is the rest of your buck converter schematic ?
(All you posted was the IGBT driver circuit)
But I do not know how to design codes for PWM cycle at 50kHz on Arduıno.
Have a look at this
For starters, consider the brute force bit banging approach (for the sake of discussion):
Let f = 50kHz
period = 1/50000 = 0.000020 sec = 20uS
Let duty cycle = 10%
0.1 * 0.000020 sec = 0.000002 sec (2 uS)
void setup()
{
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(13, HIGH);
delayMicroseconds(2); // Approximately 10% duty cycle @ 50KHz
digitalWrite(13, LOW);
delayMicroseconds(18);
}
delayMicroseconds()
Notes and Warnings
This function works very accurately in the range 3 microseconds and up. We cannot assure that delayMicroseconds will perform precisely for smaller delay-times.
(What does this mean ? It means you have to experiment with the delay times using a scope to see
if it is possible to achieve the desired timing)
and then there's Fast PWM:
Fast PWM Mode
The following code fragment sets up fast PWM on pins 3 and 11 (Timer 2). To summarize the register settings, setting the waveform generation mode bits WGM to 011 selects fast PWM. Setting the COM2A bits and COM2B bits to 10 provides non-inverted PWM for outputs A and B. Setting the CS bits to 100 sets the prescaler to divide the clock by 64. (Since the bits are different for the different timers, consult the datasheet for the right values.) The output compare registers are arbitrarily set to 180 and 50 to control the PWM duty cycle of outputs A and B. (Of course, you can modify the registers directly instead of using pinMode, but you do need to set the pins to output.)
pinMode(3, OUTPUT);
pinMode(11, OUTPUT);
TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20);
TCCR2B = _BV(CS22);
OCR2A = 180;
OCR2B = 50;