if(process)
deltaT = (ADC_Read(2) * 1.0504202e-2 / 1023.0);
angle_in_decimal_degrees = (deltaT / T) * 360.0;
angle_in_radians = angle_in_decimal_degrees * 1.74532925e-2;
Hi,
@KhaledOsmani:
I see you are confused.
Klaus
Hi,
I'd like to recommend a second order LPF for filtering the pf analog signal.
The ripple is frequency is 100Hz.
To target a 1 LSB ripple with a second order filter with about 3Hz.
A simple R-C-R-C solution could be: 2k4 - 22uF - 7k5 - 6.8uF
Klaus
It will be hard to find out the true current:Do you have any replies concerning the CT circuitry
I can't view the simulation schematic but I assume the diodes are the V and I rectifiers. Klaus is correct that there will be some non-linearity, especially at low readings but I tried to overcome that to some degree by suggesting a slightly higher voltage (5.6V) at the resistor junction than the maximum 5V the ADC can utilize. It isn't a complete cure but it goes some way. The principle is that this is an AC line monitor so it is reasonable to expect a fairly good sine wave input and therefore the peak will be 1.414 times the RMS value in both cases. As the peak and RMS are proportional, the peak which is easier to measure can be used to calculate the RMS. If greater accuracy is needed, the alternatives are to rectify the AC first then reduce it with the potential divider (this needs higher voltage capacitors and resistors though) or to use a precision rectifier circuit but that needs more components.
Brian.
Hi,
you mean to calculate apparent power and so on from your post#173?
--> I think the OP decided not to use my solution. Am I wrong?
Klaus
Sorry (again) too many people are asking me to do too many things at the same time...
Brian.
I still can't see an up to date schematic but if I understand, you have a transformer based power supply to produce the 5V for the circuit. I assume 5V it is regulated from the rectified 12V transformer output. As the transformer output voltage is roughly proportional to its input voltage and you are rectifying it anyway, you can sense the AC line voltage by dividing down the DC before the 5V regulator.
Example, with 220V line AC you get 12V AC from the transformer, that is about 17V peak minus two diode drops (assuming you use a bridge rectifier giving ~15.5V DC at the regulator input. If you divide that with a series 2.7K resistor and 1K to ground it will drop 15V down to 4V which you can then feed directly to the ADC. With VDD as the ADC refererence you get an ADC value of 828 decimal (0x33C hex) representing 4V and a good safety margin. There is no point in using a precision rectifier for the voltage circuit as any non-linearity will be at low voltages and I think it's safe to assume you would only use this if there was sufficient line voltage to power it anyway!
For the CT, you can increase the value of the burden resistor (within reason) to make it give more V out in the secondary per Amp in the primary. You can set the value so your anticipated maximum load current gives ~5V out. The important thing to consider if you do that is the possibility of an overload making the secondary voltage dangerously high but a series resistor and Zener diode should be sufficient to protect the ADC input.
@Khaled Osmani
XOR method is brian's method. KlausST's method was calculating apparent and true powers and then calculate PF from them.
No.This was not your method?!
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?