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.

Measuring AC voltage and current using PIC micro-controller

Status
Not open for further replies.

hassanakhtar91

Newbie level 5
Joined
Jan 31, 2014
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
71
I need to measure 220 V and currents around 13 Amperes using PIC micro-controller. The circuit I have designed on Proteus using differential amplifier that converts 220 Volts to 2.5 volts (0-5 volts range) taking 40 samples of the peak voltage. The ADC of PIC is used for converting analog voltages into digital. The voltage divider divides the voltages into half so that it comes in the range of (0-5 volts) which can be read by PIC. For current measurement. 1 ohm resistor is used in parallel as a bypass and the current is measured by the voltage drop along the 1 ohm resistor using Ohm's Law. Maximum current will flow through the 1 Ohm resistor and min part of it goes towards the Op-amp.
It's showing the values of voltage and current on the input side accurately on LCD but I have some confusions regarding this circuit.
1. First of all is this circuit okay as I have some doubts about it?
2. Should I use a current transformer and voltage transformer on the input side?
3. The 1 ohm bypass resistor should be used if I use a current transformer or should I use only high power wire wound resistor only instead of CT for current measurement?
(I'm a student so I don't have much experience in this area. So kindly explain everything)
 

Attachments

  • Current and voltage measurement.PNG
    Current and voltage measurement.PNG
    41.3 KB · Views: 549

I need to measure 220 V and currents around 13 Amperes using PIC micro-controller. The circuit I have designed on Proteus using differential amplifier that converts 220 Volts to 2.5 volts (0-5 volts range) taking 40 samples of the peak voltage. The ADC of PIC is used for converting analog voltages into digital. The voltage divider divides the voltages into half so that it comes in the range of (0-5 volts) which can be read by PIC. For current measurement. 1 ohm resistor is used in parallel as a bypass and the current is measured by the voltage drop along the 1 ohm resistor using Ohm's Law. Maximum current will flow through the 1 Ohm resistor and min part of it goes towards the Op-amp.
It's showing the values of voltage and current on the input side accurately on LCD but I have some confusions regarding this circuit.
1. First of all is this circuit okay as I have some doubts about it?
2. Should I use a current transformer and voltage transformer on the input side?
3. The 1 ohm bypass resistor should be used if I use a current transformer or should I use only high power wire wound resistor only instead of CT for current measurement?
(I'm a student so I don't have much experience in this area. So kindly explain everything)

Is the 220V mains voltage?

If its mains voltage, you need to have some form of isolation between your circuit and it. Perhaps a sense transformer or an optoisolator.

If its not mains voltage, and its already isolated from the outside world, then you may be okay measuring it directly using just resistors however I would arrange things so that there is high impedance of some kind between then 220V and the rest of your circuitry. I.e. a series resistor that:

-could safely shunt the 220V directly to its return (power rating and resistance determined)
-will limit current into whatever is connected to it to below its maximum rating

Note that a series resistor like this may affect the performance of your differential amplifier and/or PIC A/D, so you will need to find a balance.

I would also connect limiting series resistor to your current shunt, so that in no situation could the 220V somehow directly reach your low voltage circuitry unless it is such a high impedance that it wont have a damaging effect.
 
Is the 220V mains voltage?

If its mains voltage, you need to have some form of isolation between your circuit and it. Perhaps a sense transformer or an optoisolator.

If its not mains voltage, and its already isolated from the outside world, then you may be okay measuring it directly using just resistors however I would arrange things so that there is high impedance of some kind between then 220V and the rest of your circuitry. I.e. a series resistor that:

-could safely shunt the 220V directly to its return (power rating and resistance determined)
-will limit current into whatever is connected to it to below its maximum rating

Note that a series resistor like this may affect the performance of your differential amplifier and/or PIC A/D, so you will need to find a balance.

I would also connect limiting series resistor to your current shunt, so that in no situation could the 220V somehow directly reach your low voltage circuitry unless it is such a high impedance that it wont have a damaging effect.

Yes, it's 220 V mains.
So you're saying that I use a current transformer, the circuitry would work fine? and still I need to use a high wattage resistance of 1 ohm or not in case of current sensing circuit?
The circuit I am talking about is given below:
 

Yes, it's 220 V mains.
So you're saying that I use a current transformer, the circuitry would work fine? and still I need to use a high wattage resistance of 1 ohm or not in case of current sensing circuit?
The circuit I am talking about is given below:


If you use a current sense transformer then what would the 1 ohm resistor be for?
 

If you use a current sense transformer then what would the 1 ohm resistor be for?
The 1 ohm resistor is actually used as a bypass resistor in this circuit. Max current flows towards the 1 ohm resistor side due to it's low resistance and min part of it goes towards the op-amp side so that the circuit will not damage.
Say the current transformer of 50/5 ratio is used. As my voltage is 220 V and current is 5A on secondary side, let the power factor is 0.85. So the total wattage will be 0.85x220x5=935 Watts which is very high and for this purpose I will use a wire wound resistance of high wattage.
Are those current transformers available whose secondary side has current in mA which will solve the above problem and I don't have to use high wattage resistor but I will use a simple carbon film resistor instead?
(The above two paragraphs was only for current measurement circuit)
 

The 1 ohm resistor is actually used as a bypass resistor in this circuit. Max current flows towards the 1 ohm resistor side due to it's low resistance and min part of it goes towards the op-amp side so that the circuit will not damage.
Say the current transformer of 50/5 ratio is used. As my voltage is 220 V and current is 5A on secondary side, let the power factor is 0.85. So the total wattage will be 0.85x220x5=935 Watts which is very high and for this purpose I will use a wire wound resistance of high wattage.
Are those current transformers available whose secondary side has current in mA which will solve the above problem and I don't have to use high wattage resistor but I will use a simple carbon film resistor instead?
(The above two paragraphs was only for current measurement circuit)

the current should flow through the current sense resistor, I dont see why you would need a 1 ohm resistor unless I am misunderstanding something

luckily I believe you have many alternatives to dealing with this

instead of current sense xfrmr, perhaps you could use something like a 0.1 ohm resistor as a current sense resistor which all current flows through, and then use an isolated opamp (see Avago tech for many) to amplify it and send it to your A/D. assuming your circuit can accept the added resistance
 
the current should flow through the current sense resistor, I dont see why you would need a 1 ohm resistor unless I am misunderstanding something

luckily I believe you have many alternatives to dealing with this

instead of current sense xfrmr, perhaps you could use something like a 0.1 ohm resistor as a current sense resistor which all current flows through, and then use an isolated opamp (see Avago tech for many) to amplify it and send it to your A/D. assuming your circuit can accept the added resistance
Can you suggest some alternatives?
Also suggest the model of isolaed op-amp?
 

Can you suggest some alternatives?
Also suggest the model of isolaed op-amp?

if you are going to use an isolated opamp you need to be able to pick it out yourself or you will be working in the dark. check out avago's website or look on digikey for isolated opamps. they are simple to use but you will need a power supply on both sides so you may have to add a DC-DC on the 220V side if you dont already have some kind of low voltage rail.
 

if you are going to use an isolated opamp you need to be able to pick it out yourself or you will be working in the dark. check out avago's website or look on digikey for isolated opamps. they are simple to use but you will need a power supply on both sides so you may have to add a DC-DC on the 220V side if you dont already have some kind of low voltage rail.

Okay thanks :)
 

Hey @hassanakhtar ,,i am working on a same project..but do not know much ...So will you please help me...or anybody else
my project is to measure 230V AC ,frequency and current using PIC18F4550... send me the design and program in Micro C pro.....
 

When I first Built my Energy Prepaid meter using GSM for control system, I dealt with AC voltage (230v) measurement, Ac current measurement, Frequency. That is why I decided to create an article at www.Pulsetronics.blogspot.com . To measure Ac voltage follow this Little Trick

Firstly get a Transformer 6v 500mA then connect your loads in series with the secondary winding terminals, the Primary winding Terminals to a rectifier. connect capacitor 1u and zener Diode 5.1v across the rectified output, pass the output through a variable of about 10k to the microcontroller ADC pin.

Connect a known current Load then adjust the variable resistor to get the same current output display on LCD. For Frequency of AC voltage 50Hz just use an optocoupler (PC817) connect to main through 100k resistor then attach a pull up resistor to Pin 4 when connected to either T0CKL or T1CKL pins of the microcontroller for counting every second.
 

Yes, it's 220 V mains.
So you're saying that I use a current transformer, the circuitry would work fine? and still I need to use a high wattage resistance of 1 ohm or not in case of current sensing circuit?
The circuit I am talking about is given below:

please give me the link of AC current measurement circuit you have used as the circuit you have posted is blurr. Thank you.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top