In that case you won't need 10M resistors. Here's a circuit you can modify for your app...
In that case you won't need 10M resistors. Here's a circuit you can modify for your app...
The circuit diagram in the PDF looks good. Nice and simple.
How do i know what value resistors to use? Do i stick with 130K as shown in the diagram? I would have thought it varies for each type of optoisolator. I tried to calculate it based on the maths from a site macrakit linked to Designing LED lighting. I worked out that for my opto isolator the resistors should be 3K975. I think ive gone wrong somewhere because i wouldnt have thought it would vary that much. Im using a MOC3020M.
I take it the diode is just to stop reverse voltage going into the optoisolator. Would it work the same if it was in series with it?
I think im missing some of the document. skimask mentioned page 77 but all i see is a single page with a short writeup and a link to a PDF file. I dont see any kind of navigation for multiple pages either
Look at the datasheet for your optoisolator - there's an Absolute Maximum Ratings section with an entry for Continuous Forward Current. Ignoring the forward voltage drop of the LED, you need about 4000 ohms total for 60mA @ 240V. The lower values in the example probably factor in the forward voltage drop. In this case, you want the current to be near the max to improve the coupling. If using the PIC pin directly you can limit the current to much lower levels, hence the larger resistor I recommended.
I would stay with the example or use an optoisolator designed for AC.I take it the diode is just to stop reverse voltage going into the optoisolator. Would it work the same if it was in series with it?
I don't see it either.I think im missing some of the document. skimask mentioned page 77 but all i see is a single page with a short writeup and a link to a PDF file. I dont see any kind of navigation for multiple pages either
About 4,000 ohms is what i got. 3,975 taking into account the voltage drop of the opto. The confusion is because the example shows 130K resistors. Together thats 260,000 ohms. I work that out to be a voltage drop of 15,600 (i think)
They may also be taking into account that it's AC so the average current can be a bit higher as it's not steady state (i.e. continuous).
Nice....except it'll never work!!!
That page 77 doesn't have Page 77 marked on it, but it is between page 76 and page 78.I think im missing some of the document. skimask mentioned page 77 but all i see is a single page with a short writeup and a link to a PDF file. I dont see any kind of navigation for multiple pages either
Why wont that circuit work?
I dont get the page 77 thing. I only see 3 paragraphs on that page.
Maybe i should just go with the direct to PIC chip idea. The only problem i have there is that i will be fiddling with this a lot and i have a habit of forgetting to turn the power off first (Ouch :P)
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
Bookmarks