He is talking about this
![]()
He is talking about this
![]()
Dave
Always wear safety glasses while programming.
Ahh, I see. I thought i clicked that link earlier but i must have only clicked the one in the text. That string of LEDs does look incredibly usefull! :P
Im going to get components to try both methods just incase one fails. How do i work out the wattage i need for the 10M resistor method? I can use the maths from that LED page to work it out for the opto but i dont know about the PIC. I assume the PIC counts as some kind of load but only a small one
240 (E) / 10000000 (R) = 0.000024 (I)
0.000024 * 0.000024 = 0.000000000576 (I squared)
0.000000000576 * 10000000 = 0.00576 watts (I squared * R)
or
240 * 0.000024 = 0.00576 watts (I * E)
The clamping diodes will conduct when the voltage is > Vdd (+ diode drop) and when the voltage is < Vss (- diode drop) so, in essence, you have the resistor in series with a diode with 240V applied. The above calculations have ignored the forward voltage drop of the diodes as that's insignificant in comparison to 240V.
Last edited by dhouston; - 23rd October 2008 at 16:04.
Ive just realised that skimask has already given me the formula for that.
I should have realised but i was thinking of the formulas on the LED page. They also use ohms law so it must be the same kind of thing but as i understand it they work out the wattage based on the current required by the LEDs.E = IR, P = EI, therefore P = IIR
Im gonna read through all 3 ways of doing it again and see if i can understand exactly whats happening in all of them. I can see that the one you just gave me and the one skimask gave me are practically the same just written a little different.
Bookmarks