I think I understand most of it. Basically you are detecting then the ac switches from pos. to neg. and telling the triac not to turn on until a few miliseconds after that, and the delay essentially controles how bright the light will be.
Here is what I dont understand:
-for the IL250 schematic, what is the top right pin hooked up to (pin B) ? it says DIP_6 IL250 or something.
for the second schematic, what is pin 6 of the MOC3020 connected to? it looks like a plug for ac?
-for pin 1 of the MOC3020, what is that connected to? I'm not sure what Vcc means (I think it means +v?) and what is the value of the resistor with it? (Rin).
-How would the code be writen? Does the IL250 zero cross detection send a high or a low signal into the arduino? And how would you use that information to send to the triac?
As you can tell, I am pretty new to electronics and arduino's, but I absolutely need to get this project done.
If your new to electronics I'd strongly suggest avoiding anything to do with mains voltage - lethal voltages are not the place to
start. Also that project is seriously dangerous as described - the PCB has mains voltage traces far too close to the low-voltage
traces and lacks an earth connection - a death trap to my mind. One ant crawling across that PCB or some condensation
would short mains directly into your Arduino.
High voltage sections of a PCB are normally either confined to a separate board or separated with slots cut in
the board and solder-resist or some conformal coating is highly desirable. Mains live can have switching spikes of perhaps
1 kilovolt from nearby inductive loads switching and lightning strikes and the insulation has to be able to handle several kV
reliably to be safe in all circumstances. Earthing and fusing is not optional for such a project either.
Maybe information and all discussions here should be limited to Low-voltage DC Only.
I have pondered whether in some instances there might be, perhaps as this, too much disclosed where a broader understanding of the situation is required. Like, if I say, "Hey, get dressed and go to school" is my instruction is deficient if I don't include "put your socks and shoes on, too" and "Look both ways before you cross the street"?
MarkT:
If your new to electronics I'd strongly suggest avoiding anything to do with mains voltage - lethal voltages are not the place to
start.
I'm sorry, what I meant to say is that I am new to arduinos and microchips etc.
I have built several tesla coils over 1kw and many other dangerous hv projects, so safety should not be a concern.
I just really need someone to help me out with the coding of this project and with the pin connections I did not understand. Or provide me with a link with the answers in them. I have not found the answers anywhere which is why I am needing help with them.
If this is the wrong place to be asking, where should I repost this question.