Detect a voltage dangerous for my measure instrument

Discussion in 'The Projects Forum' started by bading, Apr 18, 2012.

  1. bading

    Thread Starter New Member

    Jan 18, 2012
    I need to a circuit to detect a voltage dangerous for my measure instrument. I can not know if the voltage is DC or AC. You may 230Vac, 110Vac,24Vac, 48Vdc, 24Vdc.
    The circuit has output 1 (5Vdc) if there is' tension and 0(0Vdc) if not or viceversa. I have to connect the output to my PIC.
    Any idea? Who can help me?
  2. Experimentonomen


    Feb 16, 2011
    A resistive divider that scales your desired voltage range to 0-5V.

    Use resistors in the 100k to 1M range to prevent currents high enough to damage the pic, and use diodes to GND and Vcc to clamp the analog input to max 5V and minimum 0V.
  3. bading

    Thread Starter New Member

    Jan 18, 2012
    A circuit as drawn in the diagram?
    But if to the input i have an AC voltage to the outpot i have a square wave?
    I would need a digital output!
  4. praondevou

    AAC Fanatic!

    Jul 9, 2011
    Are these zener diodes? They shouldn't. Use schottky diodes.

    Do you want to "measure" the voltages or only know if they are present?

    Is the 230VAC line voltage? If so I wouldn't recommend to directly connect the PICs ground to line voltage (or neutral).
    You should isolate them.

    You could just rectify the voltages (fullwave rectifier, so DC and AC will be transformed to DC independently of DC polarity), use a smoothing capacitor and an optocoupler (with current limiting resistors). However if you want to measure the absolute value you need something different.

    AAC Fanatic!

    Jul 1, 2008
    This is the safe way. The plot shows PP values.
  6. bading

    Thread Starter New Member

    Jan 18, 2012
    Hi praondeovou.
    I want only know if voltage are present.
    I do not want to use the capacitor because, if there is tension I want to measure with PIC how long is present.
    You can draw a diagram?