Grounding of non-isolated power supply - Page 1
Forum section: electronics / beginners

author: x4ce
author_rank: Contributor
timestamp: August 01, 2024, 06:22:37 pm
content: Hello,I have created a following non-isolated power supply circuit. I am very well aware that it could be dangerous. This is the first time I am trying to build a non-isolated supply and wanted to ask about grounding. The grounding shown is correct? Can we isolate it using capacitors?Thanks

author: Andy Chee
author_rank: Super Contributor
timestamp: August 01, 2024, 06:30:26 pm
content: This non-isolated design cannot be connected to ground. Ground must remain unconnected.If you require grounding, then use an isolated design.

author: PGPG
author_rank: Frequent Contributor
timestamp: August 01, 2024, 11:08:26 pm
content: Quote from: x4ce on August 01, 2024, 06:22:37 pmWhat do you understand as 'grounding'?1. Connecting to protective grounding of your AC supply?2. Point to which '-' of something being supplied by your supply should be connected?If 1. - don't do that!If 2. - yes it is the right point/net to get '-' of your supply. But have in mind that this point even it can be the 'ground' to some circuit it is not save ground. It should not be touched by you.And why you used +5V power symbol while you used 3.3V IC?

author: x4ce
author_rank: Contributor
timestamp: August 02, 2024, 04:34:50 am
content: Thanks for your response.Thanks for pointing out the power symbol and I have updated my schematic, accordingly.Yes, by grounding, I meant connecting negative(-) of the DC supply. So, the neg(-) of DC will be connected with AC neutral and touching may be very risky. In such a design, is it suggested to use a ground plane in PCB as it will cover the whole PCB and more risk associated with it?Should I also put AGND on AC input side before bridge? I have used only on the rectified side.Secondly, I have a Zener diode of 5.1V/1W rating and using 3V3 LDO, there might be a loss but as it is powered through mains then no big deal? Should I replace it with 3.9V/1W one?Thanks

author: Andy Chee
author_rank: Super Contributor
timestamp: August 02, 2024, 06:05:30 am
content: Quote from: x4ce on August 02, 2024, 04:34:50 amDefinitely NO!This design must only use reference GND on the rectified side.Remember, this is reference GND, not safety GND. If you want something safe, then the entire design must be changed.Wat is the purpose of your power supply? Are you powering a light dimmer? Motor controller? Or medical device? Touch sensor?

author: Phil1977
author_rank: Frequent Contributor
timestamp: August 02, 2024, 06:23:49 am
content: Are $1.34 minus the capacitor dropper components really worth the following risks:- Electric shock while testing- Electric shock due to insulation failure- Circuit destruction due to accidental / wrong grounding- Circuit destruction due to power surges or stupid phase correlation of switching off/switching onYes there are some applications for capacitive droppers, but is yours one of them?https://hlktech.net/index.php?id=product&cate=cate703PS: I personally started replacing capacitive droppers with these modules as soon as I see one with a blown fuse or fuse resistor. Up to now this always was a final solution, I have never had a failure with these micro-SMPS so far.

author: Andy Chee
author_rank: Super Contributor
timestamp: August 02, 2024, 07:57:05 am
content: Even the notoriously unsafe Chinese eBay modules would be safer than your proposed design:https://www.ebay.com.au/itm/334704384294?mkcid=16&mkevt=1&mkrid=705-154756-20017-0&ssspo=CxgLRb26Rx6&sssrc=2047675&ssuid=&widget_ver=artemis&media=COPY

author: Phil1977
author_rank: Frequent Contributor
timestamp: August 02, 2024, 08:09:48 am
content: But these notoriously unsafe modules are also notoriously unreliable.The low-power potted modules are even cheaper, safer and more reliable. They just don't have much power.PS: I miss a fuse in the OP´s design.

author: PGPG
author_rank: Frequent Contributor
timestamp: August 02, 2024, 12:34:11 pm
content: Quote from: x4ce on August 02, 2024, 04:34:50 amI don't understand your reasoning.Where from the conclusion that (-) of DC will be connected with AC neutral?If it were connected with neutral touching it would be not so risky. But it is not connected with neutral.Seeing your reasoning, and those simple mistake with 3V3 and 5V I think that even you declared that you are "very well aware that it could be dangerous" you should not do this project.

author: wasedadoc
author_rank: Super Contributor
timestamp: August 02, 2024, 02:14:54 pm
content: The 100 Ohms and 2.2uF are only about 1.5k at 50Hz. 220 volt rms ac input lets -200mA peak through the bridge rectifier to the point you ask about connecting to ground. Gasp!

author: wraper
author_rank: Unknown
timestamp: August 02, 2024, 02:22:07 pm
content: Ground != Earth. In many cases they're connected together but ground is not the same as Protective Earth (PE). Ground basically is just a common reference point in the circuit, usually a negative power rail or in the middle of split power rails. So there is nothing wrong with OP's circuit per se, as long as everything is well isolated from the outside (it must not be connected to PE other than through Y class safety capacitors).

author: x4ce
author_rank: Contributor
timestamp: August 02, 2024, 05:36:15 pm
content: Quote from: PGPG on August 02, 2024, 12:34:11 pmThanks for your honest suggestion.From that I meant that AC phase & neutral will be passing through bridge to rectified side and there might still be high voltage or risk associated?

author: x4ce
author_rank: Contributor
timestamp: August 02, 2024, 05:39:39 pm
content: Quote from: Andy Chee on August 02, 2024, 06:05:30 amThanks!I want to make a low-cost, AC powered solution for powering microcontroller.

author: x4ce
author_rank: Contributor
timestamp: August 02, 2024, 05:41:12 pm
content: Quote from: Phil1977 on August 02, 2024, 08:09:48 amI have used these modules in one of my projects but I had 35V in my neg(-) rail and that might be due to induction through PCB. Besides, you need to have protection with it as well.

author: x4ce
author_rank: Contributor
timestamp: August 02, 2024, 05:42:26 pm
content: Quote from: wraper on August 02, 2024, 02:22:07 pmThanks for your response.Is there any further suggestion in its improvement.Thanks

author: Andy Chee
author_rank: Super Contributor
timestamp: August 02, 2024, 05:56:51 pm
content: Quote from: x4ce on August 02, 2024, 05:39:39 pmYes, but what does the microcontroller do? Is the microcontroller connected to sensors? What kind of sensors? Is the microcontroller connected to MOSFET for motor PWM? or light/LED dimming phase control triac?This extra information is important to making your project a success.

author: wraper
author_rank: Unknown
timestamp: August 02, 2024, 07:58:08 pm
content: Quote from: x4ce on August 02, 2024, 05:42:26 pmWith this circuit in isolation it does not even matter what you consider as ground. Often it's just something arbitrary just to draw schematics with GND symbols instead of long lines across all the circuit. Also it's used for simulation as you define it as a reference point for all voltages.For particular circuit I can give some suggestions not related to GND. Either: a) add a fuse, or B) throw out R3 and use fusible resistor with adequate voltage rating for R1 (TVS is not needed for this circuit and likely will cause more reliability problems than it solves). R1 also should be sufficiently powerful to survive inrush current when powered on. R2 must be rated for at least 350V peak voltage, regular 1/4W resistors are not suitable. Must be higher power or high voltage series. C1 should be a usual film capacitor rated for at least 630VDC or X2/X1 safety capacitor. For Input connector I suggest using 3 pin version and leave middle contact unconnected to have more distance.

author: x4ce
author_rank: Contributor
timestamp: August 03, 2024, 04:31:52 am
content: Quote from: Andy Chee on August 02, 2024, 05:56:51 pmDefinitely not going to control 220VAC using TRIAC.Just to measure AC voltage and current, operating Relay, or opto-coupler to detect AC voltage etc.

author: x4ce
author_rank: Contributor
timestamp: August 03, 2024, 04:32:42 am
content: Quote from: wraper on August 02, 2024, 07:58:08 pmThanks, I will consider putting these into my schematic/ design.

author: Andy Chee
author_rank: Super Contributor
timestamp: August 03, 2024, 06:07:00 am
content: Quote from: x4ce on August 03, 2024, 04:31:52 amOk! Now this is interesting!If you are going to measure the AC voltage of the same source that is powering your microcontroller, then you will have to be very particular about your reference GND and circuit design.This would be much easier with an isolated/floating power supply for the microcontroller.

author: ledtester
author_rank: Super Contributor
timestamp: August 03, 2024, 06:16:27 am
content: Quote from: x4ce on August 03, 2024, 04:31:52 amHave a look at Atmel App Note 465 for design considerations and calculations:https://ww1.microchip.com/downloads/en/AppNotes/Atmel-2566-Single-Phase-Power-Energy-Meter-with-Tamper-Detection_Ap-Notes_AVR465.pdfTo get signals/data out of the microcontroller you'll have to some sort of isolated data channel.Note that you can get power meter modules with a rs485 interface from Aliexpress.And to just detect/measure AC current you can use a current transformer and you wouldn't have to use your non-isolated power supply.

author: Andy Chee
author_rank: Super Contributor
timestamp: August 03, 2024, 06:29:37 am
content: Quote from: ledtester on August 03, 2024, 06:16:27 amIn particular note that the Atmel app note uses a half wave rectifier, which allows the Neutral to act as reference GND. This is not possible with your bridge rectifier design, meaning a simple resistor voltage divider to measure AC voltage is also not possible with your bridge rectifier design.

author: Xena E
author_rank: Frequent Contributor
timestamp: August 03, 2024, 08:44:37 am
content: Quote from: x4ce on August 03, 2024, 04:32:42 amThis was a worrying comment. I translated it as: "FU___I'm doing this anyway." (From someone with very little idea what they're doing.)Non isolated (particularly full wave rectified) power supplies, are the reason that many careless people are now taking a dirt nap.If you want to do this yourself, FFS just buy a transformer,thenyou can ground the crap out of your do-dad.Stay safe...

author: MrAl
author_rank: Super Contributor
timestamp: August 03, 2024, 09:20:48 am
content: Quote from: x4ce on August 01, 2024, 06:22:37 pmHello there,If you look at your schematic, if you connect AGND to pin 2 of your input connector (pin 2 being the neutral) you can see you will short out the lower diode in the full wave bridge rectifier. That looks like it will render that part of the circuit as a voltage doubler which is half wave.However, if you put two capacitors in series with the input, one cap for each lead, it will be a full wave rectifier again and work as you intended. This will not be galvanically isolated though so it will not be much safer, but it will allow the circuit to work for powering devices that do not have to be isolated from the line like a small relay or similar.The cost of those two caps may be a little more than you want to pay though you'd have to check. They would have to be at least equal to the other cap there which is 2.2uf, and have a high enough voltage rating to handle the peak of the 230vac RMS input voltage.In these cases it is usually better to just buy a wall wart that has the required output. They are much cheaper these days and already built and already have galvanic isolation too.The only time you would not want to do this is in a large production run where you have to create thousands or even millions of these power supplies and it has to be kept very small. There you want to cut costs to the minimum and have the circuit be as small as possible. That's as long as it does not require real galvanic isolation.

author: SteveThackery
author_rank: Super Contributor
timestamp: August 03, 2024, 11:07:32 am
content: @x4ce: I'm a bit like you - my experience and knowledge places me firmly in the "novice" category. I can totally relate to where you are coming from with your original post.However, please let me beg you: the electrical mains supply (whether 110V or 220-240V) is extremely dangerous stuff and, as a novice, it is just too easy to make a simple mistake which has the potential to kill someone. And it's not just your life at risk - it might be someone you love, or a complete stranger. Even if someone just gets a painful shock, how will your conscience feel?Yes, a person who knows what they are doing can design and build their own power supply. But even if you are just building a capacitive dropper, you need a thorough understanding of the standards and ratings each component must meet. You need to understand about double insulation, about component spacing and track clearances, about the correct material for the PCB, about the choice of connectors, and so on. This is definitely non-trivial, even when the circuit looks simple on paper.Plug-top PSUs are everywhere andcheap. So are those encapsulated modules referred to earlier. Having been a hobbyist (and permanent novice) for 50 years, I wouldn't dream of making my own mains-powered PSU. As well as being potentially dangerous, it's just not worth the considerable effort when you can buy a suitable unit for a few bucks (or pounds, in my case).Please, abandon your current course, buy a PSU module from a source you trust, and then move on to the more interesting part of your project (whatever it is, you haven't given us details).

author: x4ce
author_rank: Contributor
timestamp: August 03, 2024, 02:36:44 pm
content: Quote from: ledtester on August 03, 2024, 06:16:27 amThanks for sharing informative app note and will go through it as well as look into your other suggestions.

author: x4ce
author_rank: Contributor
timestamp: August 03, 2024, 02:41:45 pm
content: Quote from: Andy Chee on August 03, 2024, 06:29:37 amThanks, I do understand now it requires half-wave so other half acts as reference which is missing in my schematic. If I change this to half-wave that may drop my overall efficiency and amperage of it?

author: x4ce
author_rank: Contributor
timestamp: August 03, 2024, 02:45:55 pm
content: Quote from: MrAl on August 03, 2024, 09:20:48 amThanks for sharing your expertise.Before that I have always been using isolated power source (charger, wall wart, transformer etc.) and wanted to try this convenient but risky way of supplying power. Anyway, looking at the suggestions/ critics, I may stick using isolated sources.

author: x4ce
author_rank: Contributor
timestamp: August 03, 2024, 02:47:06 pm
content: Quote from: SteveThackery on August 03, 2024, 11:07:32 amThanks Steve!I will be using risk very isolated power source as per your advice.

author: Andy Chee
author_rank: Super Contributor
timestamp: August 03, 2024, 04:06:22 pm
content: Quote from: x4ce on August 03, 2024, 02:41:45 pmApart from the microcontroller, what else do you plan on supplying power to? Half-wave is more than enough for powering a microcontroller.

author: x4ce
author_rank: Contributor
timestamp: August 03, 2024, 04:10:53 pm
content: Quote from: Andy Chee on August 03, 2024, 04:06:22 pmSRD-03VDC which may take around 40-50mA.

author: MrAl
author_rank: Super Contributor
timestamp: August 04, 2024, 07:49:59 am
content: Quote from: x4ce on August 03, 2024, 02:45:55 pmHello again,I forgot to mention the half wave solution that came up some time after my post. If you use one diode for rectifying you can then keep one side "grounded". Still no galvanic isolation though.This would be used in something like a microcontroller controlled lamp dimmer circuit.