logo elektroda
logo elektroda
X
logo elektroda

Detection of the presence of 230V AC mains voltage - digital signal for the microcontroller

MES Mariusz 1110 6
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18819604
    MES Mariusz
    Level 36  
    What's top of mind right now when it comes to 230V AC mains voltage detection?

    I need to tell the digital input of the microcontroller whether mains voltage (230V AC) has been applied to a particular terminal.

    A circuit with an optocoupler (like a zero crossing detector)? Or maybe a very miniature relay with a 230V AC coil (it seems that they - with such a coil - are not miniature at all).

    Or maybe there are some dedicated, specialised mains voltage detection circuits that return an adequate, low-voltage logic level that can be fed into the microcontroller input ?

    Target: cheap, miniature (minimum extra PCB space), reliable.
  • ADVERTISEMENT
  • #2 18819612
    Anonymous
    Level 1  
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #4 18819680
    Jogesh
    Level 28  
    How about special photocouplers such as the SFH628A-4 TLP182? I will be testing a similar arrangement soon.
  • ADVERTISEMENT
  • #5 18820874
    Anonymous
    Level 1  
  • #7 18825768
    tmf
    VIP Meritorious for electroda.pl
    If galvanic isolation from the mains is not required, then 2 resistors of 1 MOm each will suffice - one between the IO pin and the wire, the other between the GND of the prock and the other 230V wire. Theoretically you can on one resistor, but usually resistors have an operating voltage up to 200V, so two will provide safe conditions. If separation is required, however, an optocoupler, necessarily with two anti-parallel diodes on the structure. There is nothing to combine in such a simple circuit.

Topic summary

The discussion centers on methods for detecting 230V AC mains voltage for microcontroller input. Various solutions are proposed, including using an optocoupler, a voltage divider with resistors, and a reed switch activated by current in a nearby wire. Special photocouplers like SFH628A-4 and TLP182 are suggested for testing. If galvanic isolation is not necessary, a simple circuit with two high-value resistors can suffice, while an optocoupler with anti-parallel diodes is recommended for isolated applications. The focus is on achieving a compact, reliable, and cost-effective design.
Summary generated by the language model.
ADVERTISEMENT