Could someone please provide me a little explanation of the following circuit I want to use in a project. I'm more software focused normally and lack the electrical knowledge, and would rather understand what is going on, than just buy the components and do it.
The circuit provided:
1) From I can see, 220v is applied through a rectifier which converts it to DC? Which is then fed through a series of diodes, resistors and capacitors to pin 5 of an Opto coupler. What is the purpose of this arrangement of capacitors and diodes?
2) Also, the IRF830, is that doing the actual switching of the lamp? How does it carry this out with the incoming PWM signal?
3) Are there any other topics or concepts I should read up on regarding this circuit.
Appreciate your time, thanks.
p.s this is the Arduino code if it may interest you:
The circuit provided:
1) From I can see, 220v is applied through a rectifier which converts it to DC? Which is then fed through a series of diodes, resistors and capacitors to pin 5 of an Opto coupler. What is the purpose of this arrangement of capacitors and diodes?
2) Also, the IRF830, is that doing the actual switching of the lamp? How does it carry this out with the incoming PWM signal?
3) Are there any other topics or concepts I should read up on regarding this circuit.
Appreciate your time, thanks.
p.s this is the Arduino code if it may interest you:
Code:
intledPin = 3;
void setup()
{
Serial.begin(9600);
Serial.println(“Serial connection started, waiting for instructions…n0 = Offn1 = 25%n2 =50%n3 = 75%n4 = 100%”);
}
void loop ()
{
if (Serial.available()) {
char ser = Serial.read(); //read serial as a character
switch (ser)
{
case ‘0’:
analogWrite(ledPin, 0);
break;
case ‘1’:
analogWrite(ledPin, 64);
break;
case ‘2’:
analogWrite(ledPin, 128);
break;
case ‘3’:
analogWrite(ledPin, 192);
break;
case ‘4’:
analogWrite(ledPin, 255);
break;
default:
Serial.println(“Invalid entry”);
}
}
}