Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Power supply to controller

Status
Not open for further replies.

venkates2218

Full Member level 6
Joined
Sep 30, 2016
Messages
354
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,298
Activity points
4,306
To measure the 230VAC using PIC controller,neutral from the AC supply is connected with GND(7805) pin of controller board's power supply and positive from the AC is given to PIC controller through resistor circuit.

Is it safe to use the AC Neutral with PIC controller and other IC'S GND directly..?
 

Hi,

this is not a safety problem for the PIC and other ICs....it´s a safety problem for humans. Can you really be sure that no one (customer) erroneously connect LIVE instead of NEUTRAL?
The PIC and other IC´s will do their job, independent of Neutral to GND connection.

In doubt show your schematic.

Klaus
 

It is not safe for a service persons, Difficult to get UL approval. Use restrictive divider to reduce the voltage to 5V/10 instead of 230AC then connect to PIC

it means neutral from AC supply connect to the ground of PIC through a resistor
Divider.png
 

Images_5.jpg


230VAC Raw Power is connected to micro controller through the resistors and Neutral is directly connected with GND pin...

In some control board,noticed that LM324 is connected between the Raw power and controller..Is it safe to use LM324 before connecting to controller..?

Except qualified person no another person will touch the PCB..
 

Post #5 - It will not work and it will probably damage the PIC.
Is it safe to use the AC Neutral with PIC controller and other IC'S GND directly..?
Yes, provided you are careful and can ensure correct connection, it will work but only if you use a potential divider. Resistors in series with the PIC input will never work simply because the division ratio is "(2 * 330K):almost infinity". The input impedance of the PIC is the lower part of the divider and being a MOS device that impedance will be hundreds of Megohms.

A far better solution is to use a resistive divider. At this point you have to decide whether you want to measure the AC by sampling the waveform or you just want a representation of the voltage.

1. if you want to sample the waveform you do it by taking many samples of the whole AC cycle and mathematically calculating the effective RMS voltage. This method gives best accuracy but adds a problem: the PIC cannot measure negative voltages at all. The way to solve that problem is to make sure the AC can not go negative by adding a positive voltage to it. You first use a potential divider across the live to neutral to drop the voltage down to less than 2.5V peak to peak, remember that the peak of a sine is 1.414 times its RMS value. Then you add 2.5V DC to the result so the waveform is centered between 0V and 5V so the ADC can read it. This is where the op-amp comes in handy, it can be used to add the offset and it also helps to make the ADC more accurate by providing it with a low impedance voltage source to measure.

2. if you just want a rough indication of the AC voltage, rectify it (a bridge rectifier would be appropriate) so the negative component of the waveform is removed, then filter it with as small as possible reservoir capacitor (~1uF) and finally divide it down to the peak voltage is less than 5V. Buffering with an op-amp will again improve accuracy. This method is simpler to implement but has two drawbacks, firstly it ignores the shape of the waveform so it doesn't see distortion or spikes, secondly it is slower to react to voltage changes because it relies on the charge and discharge of the reservoir capacitor to track the AC voltage.

Your choice....

Brian.
 

Hi,

I recommed:
230V_Line --> connector --> 100nF/ 400V foil capacitor --> 1M /1kV --> 1M /1kV --> (ADC) two 15k resistors (one to GND with 22nF in parall to it, the other to ADC_VRef)

How it works:
* the 100nF/400V foil prevents DC (high pass filter)
* both 1M/1kV is the upper part of the voltage divider (2M for calculation). Two to increase safety: if one fails short, then the other still limits the current to a safe value.
* both 15k resistors have two functions: 1) the form the lower part of the voltage divider (7.5k for calculation) 2) the generate a bias voltage of V_REF/2 to enable the negative part measurement of the AC input.
* 22nF (in combination with the other resistors) form a low pass filter for noise suppression and as anti aliasing filter.

Klaus
 

Safety related, neutral of a 230/400V mains needs the same isolation as live wire. Respectively a circuit connected to neutral needs safe isolation to exposed circuits. That's a common situation for electronic boards inside home appliances, e.g. washing machines.

You didn't give sufficient information about the planned controller to decide if it belongs to the category of directly mains connected electronics.

My personal preference would be symmetrical voltage divider with instrumentation amplifier. With sufficient resistor voltage rating and Megohm impedance, the solution provides safe isolation.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top