??? 06/12/07 16:04 Read: times |
#140603 - Diagram blues Responding to: ???'s previous message |
Hi Klass,
I am not very expert at ckt layout. I have used 89C51 as MCU. MCP 3202 as 2channel 12bit ADC. CD4052 as analog selector of Inputs. One part has voltages derived from 3phase voltage dividers that are not shown in ckt. It is 1.1Meg & 5k6 resistor combination to make input divided by 200 to 1.2V rms. Then other part has Current signals. These are from 3CTs with ratio 2500. with 100ohm resistor load they give 600mV rms output at 5amps. I have 2 LM324 ICs. In first 1/4 th part is used for making virtual ground from Ref voltage which is 4.096V derived from LM431. The 3voltage inputs are also fed to voltage followers in 3parts of other LM324. Output of one is inverted and all 3summed to get nearly double output which is squared by one amp and that drives the BC547 transistor. So I get Frequency reference from that whenever one of the 3phase voltages are present. In the code I measure the cycle time of this frequency marker and use to calculate the frequency with used crystal frequency counter in timer1. I also use this count to divide by 64 and then make free running timer1. At the end of timer interrupt routine takes the signal measurement and squares it and sums in buffer. After 64samples the sum buffer is divided by 64 and then square root is taken which gives RMS value of input. I have got this running quite OK but since 2weeks fighting with this extra counts appearing in Ch1. Now I am very sure that it is Ch0/8 counts and that comes ONLY IF the ADC is running in psudo-differential mode. After the sum is divided this product Ch0^2/64 remains in quotient and after square root it becomes Ch0/8. I am not great mathematician but have figured this out. Hope this is OK for your information |