Detect 240V with a PIC


Closed Thread
Results 1 to 40 of 49

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by dhouston View Post
    Which has absolutely nothing to do with the topic nor with the article I cited.
    You're right. Sorry.
    On my screen, after opening the PDF, the LED booster came up first. I had to scroll UP to see the voltage monitor circuit.

  2. #2
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    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

  3. #3
    Join Date
    Dec 2005
    Posts
    1,073


    Did you find this post helpful? Yes | No

    Default

    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 15:04.

  4. #4
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Ive just realised that skimask has already given me the formula for that.

    E = IR, P = EI, therefore P = IIR
    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.

    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.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by The Master View Post
    Ive just realised that skimask has already given me the formula for that.
    I did? Oh boy...shouldn't have done that... Well, the damage is done... Pass it along when you get the chance

  6. #6
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

  7. #7
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Hi, my 10M resistors arrived today. Just before i blow myself up (or even worse another PIC :P) i wanna be sure what im doing. Ive looked in the datasheet for my PIC and the only mention of "clamp" is input/output clamp current which is 20mA. Does that mean it has those clamping diodes or is that something else?

    To connect it up am i right in thinking that the neutral wire connects to VSS and the live wire connects through the resistor into an input pin and thats all there is to it?

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. Detecting 240V with a PIC (Part2)
    By The Master in forum Off Topic
    Replies: 7
    Last Post: - 18th March 2009, 19:10
  3. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  4. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14
  5. pic detect amperage
    By jetpr in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th February 2005, 05:02

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts