Buy an Axon, Axon II, or Axon Mote and build a great robot, while helping to support SoR.
0 Members and 1 Guest are viewing this topic.
I see... So you're able to measure the angle that current and voltage have...
What you are trying to measure is a little bit pain in the butt...
Have you thought of a comparator/pin polling approach (for a revision some day)...You can get much more precision, not that this extra precision will do any better with the ultra slow mains,
BTW... I also fail to see how the ADC pin is protected from negative voltages... In the schematics you seem to be getting the voltages from the AC supply before being rectified... since the resistors are quite large at the voltage divider you aren't having any problems, but generally that's no good getting negative voltages at any pin, you know that more than I do...And I really don't try to criticizes anyone or anything... Just trying to say an opinion... I may as well be wrong :-/
Hmm, explain this a little better? The trouble I had is the current clamps have very poor response with low currents, and currents near the zero crossing. The only part of the signal distinguishable above the noise is the peak, and just some random duration of the waveform before and after. I originally measured PF using zero crossing timings, but when I went to test it with the actual clamps, readings were sporadic. I O-scoped the clamps and discovered how noisy the signal was around zero crossing. That's when I realized I had to time peaks instead to measure frequency and PF. So since the actual values of the peaks are arbitrary in regards to freq and PF, how would you use a comparator?
Doesn't it feel nice that you add doubt in your posts....
Also, you can quite easily get the frequency, as the frequency would be the 1/t where t is the time between logic low to logic high transitions (or the opposite, or even better you can measure both and do the average in case your sine wave isn't so "healthy" and get an even more accurate reading)....
As for the clamps, ok... From the picture you have posted it's a little messy yup.... So why don't you add a simple low pass filter... All you need in your existing schematics is a rather small capacitor, between the signal line after the resistor and the ground if I remember the schematics correctly...
Are you sure that the clamps aren't inducing a phase swift? Usually alteration of a magnet flux though a coil means alteration to the current through it, not the voltage... Even if it's producing a voltage, are you sure that this voltage is in phase with the current....
QuoteDoesn't it feel nice that you add doubt in your posts....I did mention the clamping diodes in my blog...
QuoteAlso, you can quite easily get the frequency, as the frequency would be the 1/t where t is the time between logic low to logic high transitions (or the opposite, or even better you can measure both and do the average in case your sine wave isn't so "healthy" and get an even more accurate reading)....Ok, this is what I thought you meant. It's only really effective at measuring frequency. Sine PF involves comparing two separate signals with arbitrary amplitudes, it doesn't work, since the amplitude will also affect when the logic level flips. And since I had to code peak detectors for PF, I just did it for frequency as well.