LED indicator for 240VAC - Page 1
Forum section: electronics / beginners

author: Aleksolder
author_rank: Contributor
timestamp: January 26, 2021, 04:34:06 pm
content: Hi, Could someone please suggest a workable approach to providing an LED to indicate presence of 240VAC (or part thereof)?By approach I mean the general concept, I'm happy to try to work out the details myself.I've found or guessed several approaches:a. resistor + cap across L and N, but critics say the resistor drops too much voltage so needs high wattage. I like the parts count, though.b. FET or similar to sense the voltage and open a current path in "another" circuit that powers the LED. I'm not sure you can mix AC and DC so simply.c. op amp but this must compare and I only want to compare with zero, not sure you can do thatd. zener but it seems the zener must drop 238V to feed the LED, seems a lot to med. Some complicated looking arrangements of aboveBroadly these are in two camps, both are ok with me:1. rely upon the sensed voltage to power the LED2. rely upon separately provided power for the LEDThe goal (if you're curious): I have a bunch of AC and DC devices bolted to a big PCB, all of which are hooked together to field cables using the PCB. I want an LED at each device's input terminals to help with troubleshooting.

author: tunk
author_rank: Super Contributor
timestamp: January 26, 2021, 04:47:10 pm
content: Is this any help:

author: BreakingOhmsLaw
author_rank: Frequent Contributor
timestamp: January 26, 2021, 04:59:13 pm
content: Check out this chip:https://ww1.microchip.com/downloads/en/DeviceDoc/20005544A.pdf

author: Benta
author_rank: Super Contributor
timestamp: January 26, 2021, 05:02:00 pm
content: Far too complicated.An old-fashioned neon lamp and a resistor will do the job.https://en.wikipedia.org/wiki/Neon_lamp

author: schmitt trigger
author_rank: Super Contributor
timestamp: January 26, 2021, 05:06:49 pm
content: Very interesting IC, the SR037. Unfortunately it is at end of life.Therefore I also vouch for a simple neon lamp and series resistor.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: January 26, 2021, 05:09:07 pm
content: White LED with resistor to provide half a milliamp or so - 1/8 watt dissipation at 230V.

author: JohnnyMalaria
author_rank: Super Contributor
timestamp: January 26, 2021, 05:11:55 pm
content: Quote from: Benta on January 26, 2021, 05:02:00 pmOP states he wants LEDs.

author: langwadt
author_rank: Super Contributor
timestamp: January 26, 2021, 05:15:02 pm
content: Quote from: mikeselectricstuff on January 26, 2021, 05:09:07 pmmight want two resistors to get the needed voltage rating and a reverse diode, LEDs can't handle much reverse voltage

author: BreakingOhmsLaw
author_rank: Frequent Contributor
timestamp: January 26, 2021, 05:16:19 pm
content: Quote from: schmitt trigger on January 26, 2021, 05:06:49 pmI updated link for newer part. click again.

author: Benta
author_rank: Super Contributor
timestamp: January 26, 2021, 05:33:37 pm
content: Quote from: JohnnyMalaria on January 26, 2021, 05:11:55 pmYes, because everything that lights today is a "LED". Showing alternatives can sometimes be helpful.

author: Zero999
author_rank: Super Contributor
timestamp: January 26, 2021, 05:45:42 pm
content: What are the requirements? Powering an LED off the mains is easy. If it just needs to be visible, use a high efficiency green LED, with an anti-parallel diode and a 0.5W 220k resistor. If flicker is an issue, use a bipolar LED, or add a bridge rectifier. If more light is required, go with the capacitive dropper. If you don't want it to light due to ghost voltages, put a 4k7 resistor in parallel, with the LED.

author: schmitt trigger
author_rank: Super Contributor
timestamp: January 26, 2021, 06:31:19 pm
content: This is a perfect example of the XY Problem;Whereas the TS is asking about his attempted solution rather than the actual problem.This leads to lots of confusion, wasted time and sometimes quarrels between the people providing their advice.It is an extremely common occurrence in all of the web’s help forums.In this case, the way I understand it, the TS wants a visual indication whenever 240V are present. That is the problem. His solution is to light up an LED, but there are simpler solutions (neon lamp) which would still solve his original problem.Of course, I could be totally wrong in my understanding.

author: gnuarm
author_rank: Super Contributor
timestamp: January 27, 2021, 09:11:11 am
content: Quote from: Zero999 on January 26, 2021, 05:45:42 pmWhat are "ghost voltages"?

author: Gyro
author_rank: Super Contributor
timestamp: January 27, 2021, 09:39:14 am
content: Quote from: Zero999 on January 26, 2021, 05:45:42 pmSurely you shouldalwaysuse a small bridge rectifier. Ignoring the flicker, an anti-parallel diode is throwing away half of the current that could otherwise be making the LED perceptually brighter. Bipolar LEDs would clearly be better, I haven't looked to see if they do them with the same colour in both directions (but if not, they should!).

author: Gyro
author_rank: Super Contributor
timestamp: January 27, 2021, 09:45:42 am
content: Quote from: gnuarm on January 27, 2021, 09:11:11 amGhost voltages (or more properly in this context, ghost currents) are caused by stray capacitance between wires, EMC filter capacitors etc. that can cause a high efficiency LED to glow dimly, even when it's supposed to be turned off. Modern high efficiency LEDs can show a visible glow in the dark even when the current is in the 10s of uA region. It is sometimes a problem with mains LED lamps when the cabling to the light switch is very long (2 way hall and landing for instance) or with unsuitable dimmers.

author: Aleksolder
author_rank: Contributor
timestamp: January 27, 2021, 11:14:18 am
content: Thanks for the simple solution. I ought to have mentioned I know of these but need LED.

author: Aleksolder
author_rank: Contributor
timestamp: January 27, 2021, 11:16:31 am
content: Thanks for the pointer, I will shortlist this if I can find an active part.

author: Aleksolder
author_rank: Contributor
timestamp: January 27, 2021, 11:17:48 am
content: Thanks for that. I prefer to read solutions so often miss good stuff on video. Will view when I get some bandwidth tomorrow.

author: Aleksolder
author_rank: Contributor
timestamp: January 27, 2021, 11:24:12 am
content: Thanks. Do you mean something as simple as:Live -------0.22uF ------LED -----resistor------Neutral| |--diode---I hope that shows up alright. Diode is meant be reverse of LED in same place as LED.As shown here:https://www.eleccircuit.com/mains-voltage-indicator-with-a-led/

author: Aleksolder
author_rank: Contributor
timestamp: January 27, 2021, 11:26:22 am
content: Ah yes, someone somewhere said two resistors, one can act as fuse while distributing the heat (IIRC). I've pointed in another reply here to this:https://www.eleccircuit.com/mains-voltage-indicator-with-a-led/

author: Aleksolder
author_rank: Contributor
timestamp: January 27, 2021, 11:28:55 am
content: Oh thanks, I ought to have read all replies before starting my own replies.

author: Aleksolder
author_rank: Contributor
timestamp: January 27, 2021, 11:31:09 am
content: Yes I think you folks can see my level and that my question might be constraining myself too much. But in this case, must be LED.

author: Aleksolder
author_rank: Contributor
timestamp: January 27, 2021, 11:39:40 am
content: Quote from: Zero999 on January 26, 2021, 05:45:42 pmThis reply contains quite a lot of concise explanations, very useful for helping me stand on my own. Small part count, too. Answer the ghost issue which I've heard about for LED light bulbs but did not guess it would apply here.To answer your question: It's meant as a very simplistic indicator, power distribution in a glance. I have purposely left open the ranges to detect to see what my options are. Lots of good stuff has come in!

author: Aleksolder
author_rank: Contributor
timestamp: January 27, 2021, 11:45:42 am
content: Quote from: schmitt trigger on January 26, 2021, 06:31:19 pmI agree that questions are often phrased poorly with results you mention, so I do try to take about that. My attempts are listed because this is good practice in asking a question (often forum policy, even). Always willing to improve, though. I do appreciate everyone's comments, including on the quality of my post, thanks indeed.

author: Aleksolder
author_rank: Contributor
timestamp: January 27, 2021, 11:50:04 am
content: Quote from: Gyro on January 27, 2021, 09:39:14 amI wouldn't say always, though I will mock this up to see whether the flicker is noticeable. Bipolar is interesting here because the frequency is high enough that human eye (well geez, what other eye could I be talking about, a parrot's eye? I'm such an idiot) will average out and get a third color.

author: Aleksolder
author_rank: Contributor
timestamp: January 27, 2021, 11:53:33 am
content: I accidentally posted a bunch of my replies to specific messages without quoting. Oops. Very sincere thanks to everyone! This is my first foray intoAC and hope it will be interesting (mostly I'm just a digital microcontroller guy, no real understanding of much).In a separate post, I'm going to ask about my personal safety at my bench before I begin. Do some research first...

author: Aleksolder
author_rank: Contributor
timestamp: January 27, 2021, 12:15:56 pm
content: Nobody seems keen on a transistor or FET to sense the 240. Could someone please explain why this is not viable? Transistors are used all the time as switches and I'm willing to separately provide 5VDC to drive the LED.

author: gnuarm
author_rank: Super Contributor
timestamp: January 27, 2021, 12:27:33 pm
content: Quote from: Aleksolder on January 27, 2021, 12:15:56 pmWhen you reply, it can help provide context if you quote at least a small part of the post you are replying to.I don't know how adding a separate power supply provides any benefit. There are safety issues to consider if the AC sensing circuit is combined with a PSU that may be powering circuits a user could potentially come in contact with.

author: Zero999
author_rank: Super Contributor
timestamp: January 27, 2021, 01:24:49 pm
content: Quote from: Gyro on January 27, 2021, 09:39:14 amGenerally, I agree about the bridge rectifier, but 1mA 50% duty cycle is enough for the most efficient green LEDs and I gather the original poster wants a minimum part solution.Yes, bipolar LEDs are available with two dies of the same colour, but the selection is limited.https://docs.rs-online.com/02eb/0900766b814f533e.pdf

author: Aleksolder
author_rank: Contributor
timestamp: January 30, 2021, 11:30:21 am
content: Quote from: gnuarm on January 27, 2021, 12:27:33 pmYes, quoting thanks, I thought that was going to happen automatically, oops.I thought that one way to sense the presence of the AC was a FET and that perhaps if the sensed voltage was low (not actually a requested feature in my original post), that separate DC could be provided to turn on the LED. I don't know whether FETs can tolerate this, but I think I can mock this up fairly easily with a function generator and a DC power supply and see what happens.

author: Per Hansson
author_rank: Unknown
timestamp: January 30, 2021, 08:13:37 pm
content: Just a couple ideas you may not have entertained:You can get ready made LED's with "industry standard" BA9s sockets, albeit at 240v the choices are limited and prices high.Instead of a resistive dropper you can use a regulator, I saw one was mentioned before as discontinued but others exist, like NCP785AH50T1GSee the section "linear regulators" on Mouser for example and sort by input voltage high to low.Also maybe a small video on general design might help, here is a eBay cheapie that does more than you need, the relevant part is in the HV section:

author: gnuarm
author_rank: Super Contributor
timestamp: January 30, 2021, 08:27:41 pm
content: Quote from: Aleksolder on January 30, 2021, 11:30:21 amYeah, sure, that can be made to work. But you need to be concerned with safety. As I said, if the PSU also powers circuits which will be within range of contact of the user that's not safe. The transistor is not a safe isolation barrier. It can fail shorted.If you are going to use a PSU to power the LED, why not just hook it up to the PSU and sense the mains power by the PSU output going away? In essence the PSU becomes your safety isolation.